calculate -1 to hit directly in ws

This commit is contained in:
NilsUeter
2023-04-18 21:12:24 +02:00
parent d8a7511728
commit d67df22b4d
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -57,7 +57,7 @@ const Weapon = ({ weapon, modelStats, isMelee, className }) => {
type = type.substring(0, lastWhiteSpace); type = type.substring(0, lastWhiteSpace);
const bs = modelStats[0].bs; const bs = modelStats[0].bs;
const ws = modelStats[0].ws; let ws = modelStats[0].ws;
const strModel = modelStats[0].str; const strModel = modelStats[0].str;
const meleeAttacks = modelStats[0].attacks; const meleeAttacks = modelStats[0].attacks;
@@ -83,6 +83,17 @@ const Weapon = ({ weapon, modelStats, isMelee, className }) => {
abilities = abilities.replaceAll("Blast", ""); abilities = abilities.replaceAll("Blast", "");
type += ", Blast"; type += ", Blast";
} }
if (
abilities?.includes(
"Each time an attack is made with this weapon, subtract 1 from that attacks hit roll."
)
) {
abilities = abilities.replaceAll(
"Each time an attack is made with this weapon, subtract 1 from that attacks hit roll.",
""
);
ws = `${parseInt(ws, 10) + 1}+`;
}
return ( return (
<> <>
+1 -1
View File
@@ -158,7 +158,7 @@ export class Model extends BaseNotes {
} }
nameAndGear() { nameAndGear() {
let name = super.name; let name = this.name;
if (this.weapons.length > 0 || this.upgrades.length > 0) { if (this.weapons.length > 0 || this.upgrades.length > 0) {
const gear = this.getDedupedWeaponsAndUpgrades(); const gear = this.getDedupedWeaponsAndUpgrades();