From 60e38e57057ccbded0a7c3df436ae54e9e48663d Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 20 Apr 2026 19:17:00 +0200 Subject: [PATCH] . --- module/data/actor/character.mjs | 19 ++++++++++--------- ...ary_Demon_of_Despair_kE4dfhqmIQpNd44e.json | 2 +- ...rsary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json | 2 +- ...ironment_Cult_Ritual_QAXXiOKBDmCTauHD.json | 2 +- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/module/data/actor/character.mjs b/module/data/actor/character.mjs index 1c1b96a5..f4d9ab7b 100644 --- a/module/data/actor/character.mjs +++ b/module/data/actor/character.mjs @@ -269,7 +269,7 @@ export default class DhCharacter extends DhCreature { label: 'DAGGERHEART.ACTORS.Character.roll.guaranteedCritical.label', hint: 'DAGGERHEART.ACTORS.Character.roll.guaranteedCritical.hint' }), - hope: new fields.NumberField({ + hopeIndex: new fields.NumberField({ required: true, integer: true, min: 0, @@ -278,7 +278,7 @@ export default class DhCharacter extends DhCreature { label: 'DAGGERHEART.ACTORS.Creature.rules.roll.hope.label', hint: 'DAGGERHEART.ACTORS.Creature.rules.roll.hope.hint' }), - fear: new fields.NumberField({ + fearIndex: new fields.NumberField({ required: true, integer: true, min: 0, @@ -287,7 +287,7 @@ export default class DhCharacter extends DhCreature { label: 'DAGGERHEART.ACTORS.Creature.rules.roll.fear.label', hint: 'DAGGERHEART.ACTORS.Creature.rules.roll.fear.hint' }), - advantage: new fields.NumberField({ + advantageIndex: new fields.NumberField({ required: true, integer: true, min: 0, @@ -296,7 +296,7 @@ export default class DhCharacter extends DhCreature { label: 'DAGGERHEART.ACTORS.Creature.rules.roll.advantage.label', hint: 'DAGGERHEART.ACTORS.Creature.rules.roll.advantage.hint' }), - disadvantage: new fields.NumberField({ + disadvantageIndex: new fields.NumberField({ required: true, integer: true, min: 0, @@ -305,7 +305,7 @@ export default class DhCharacter extends DhCreature { label: 'DAGGERHEART.ACTORS.Creature.rules.roll.disadvantage.label', hint: 'DAGGERHEART.ACTORS.Creature.rules.roll.disadvantage.hint' }), - comboDie: new fields.NumberField({ + comboDieIndex: new fields.NumberField({ integer: true, min: 0, max: 5, @@ -767,7 +767,7 @@ export default class DhCharacter extends DhCreature { }); break; case 'comboStrikes': - this.rules.roll.comboDie += 1; + this.rules.roll.comboDieIndex += 1; break; } } @@ -827,10 +827,11 @@ export default class DhCharacter extends DhCreature { }; /* Add convience Faces properties for all dice */ - const { hope, fear, advantage, disadvantage } = this.rules.roll; - const dice = { hope, fear, advantage, disadvantage }; + const { hopeIndex, fearIndex, advantageIndex, disadvantageIndex, comboDieIndex } = this.rules.roll; + const dice = { hopeIndex, fearIndex, advantageIndex, disadvantageIndex, comboDieIndex }; for (const dieKey of Object.keys(dice)) { - this.rules.roll[`${dieKey}Faces`] = CONFIG.DH.GENERAL.dieFaces[dice[dieKey]]; + const diceBaseKey = dieKey.replace('Index', ''); + this.rules.roll[`${diceBaseKey}Faces`] = CONFIG.DH.GENERAL.dieFaces[dice[dieKey]]; } this.attack.damage.parts.hitPoints.value.custom.formula = `@prof${this.basicAttackDamageDice}${this.rules.attack.damage.bonus ? ` + ${this.rules.attack.damage.bonus}` : ''}`; diff --git a/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json b/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json index 1bd47b82..73c129d4 100644 --- a/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json +++ b/src/packs/adversaries/adversary_Demon_of_Despair_kE4dfhqmIQpNd44e.json @@ -357,7 +357,7 @@ }, "changes": [ { - "key": "system.rules.roll.hope", + "key": "system.rules.roll.hopeIndex", "value": 2, "priority": null, "type": "override" diff --git a/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json b/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json index 6e32e6bb..005ae1ec 100644 --- a/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json +++ b/src/packs/adversaries/adversary_Demon_of_Wrath_5lphJAgzoqZI3VoG.json @@ -320,7 +320,7 @@ }, "changes": [ { - "key": "system.rules.roll.fear", + "key": "system.rules.roll.fearIndex", "value": 5, "priority": null, "type": "override" diff --git a/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json b/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json index ceb78083..478a19de 100644 --- a/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json +++ b/src/packs/environments/environment_Cult_Ritual_QAXXiOKBDmCTauHD.json @@ -192,7 +192,7 @@ }, "changes": [ { - "key": "system.rules.roll.hope", + "key": "system.rules.roll.hopeIndex", "mode": 5, "value": 3, "priority": null