feat(combat): refonte UI — tracker v14, handicap III, malus d'attaque, checkbox
Release Creation / build (release) Failing after 1m28s
Release Creation / build (release) Failing after 1m28s
- combat-tracker.hbs + fight.mjs : alignés sur le CSS core v14 (header/tracker/footer, boutons <button>), attitudes/couleurs PJ-PNJ conservées, menu contextuel combatant réparé - less/combat.less (nouveau) : styles custom tracker + footer sticky des dialogues - handicap des 3 dialogues de jet étendu jusqu'à III - dialogue d'attaque : champ « Malus temporaires » (malus sur les jets) - checkbox/radio : flex: 0 0 auto global (fin des icônes étirées — ex. « Deuxième action » 228px → 24px) - TEST_COMBAT.md : plan de test combat rejouable (S1-S8, tout PASS)
This commit is contained in:
@@ -51,7 +51,9 @@ export default class CombatDialog extends HandlebarsApplicationMixin(foundry.app
|
||||
this.weapon = options.weapon ?? null;
|
||||
this.mode = options.mode ?? "contact";
|
||||
this.abilityKey = VermineExchange.attackAbility(this.mode);
|
||||
this.skillKey = this.weapon?.system?.skill || null;
|
||||
// Une arme sans compétence définie est traitée comme une attaque
|
||||
// improvisée au contact : Corps-à-corps (Vigueur + pool Corps-à-corps).
|
||||
this.skillKey = this.weapon?.system?.skill || 'close';
|
||||
this.skillValue = this.skillKey ? (this.actor.system?.skills?.[this.skillKey]?.value || 0) : 0;
|
||||
this.skillPool = this.skillValue ? (CONFIG.VERMINE.SkillLevels?.[this.skillValue]?.dicePool || 0) : 0;
|
||||
this.skillReroll = this.skillValue ? (CONFIG.VERMINE.SkillLevels?.[this.skillValue]?.reroll || 0) : 0;
|
||||
@@ -218,6 +220,10 @@ export default class CombatDialog extends HandlebarsApplicationMixin(foundry.app
|
||||
return parseInt(this.#el.querySelector("#pools-spent")?.value, 10) || 0;
|
||||
}
|
||||
|
||||
#getTemporaryMalus() {
|
||||
return parseInt(this.#el.querySelector("#temporary-malus")?.value, 10) || 0;
|
||||
}
|
||||
|
||||
#getUseAmmo() {
|
||||
return this.#el.querySelector("#use-ammo")?.checked ?? false;
|
||||
}
|
||||
@@ -278,9 +284,10 @@ export default class CombatDialog extends HandlebarsApplicationMixin(foundry.app
|
||||
const group = parseInt(this.#el.querySelector("#group")?.value, 10) || 0;
|
||||
const wound = VermineExchange.woundMalus(this.actor);
|
||||
const lourd = VermineTraits.lourdMalus(this.actor);
|
||||
const malus = wound + lourd;
|
||||
const tempMalus = this.#getTemporaryMalus();
|
||||
const malus = wound + lourd + tempMalus;
|
||||
const total = Math.max(0, this.basePool + selfControl + pools + specialty + help + tooling + group - malus);
|
||||
return { ability, skill, selfControl, pools, specialty, help, tooling, group, wound, lourd, malus, total };
|
||||
return { ability, skill, selfControl, pools, specialty, help, tooling, group, wound, lourd, tempMalus, malus, total };
|
||||
}
|
||||
|
||||
getDicePool() {
|
||||
|
||||
Reference in New Issue
Block a user