From 1760d260148a0811932cc41726138a95f76d5ea0 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 27 Oct 2024 00:01:33 +0200 Subject: [PATCH] PNJ: support initiative --- module/actor-sheet.js | 2 +- templates/actor/combat.html | 2 +- templates/actor/export-scriptarium/arme.hbs | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 8e5ab07c..1b2f7abf 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -224,7 +224,7 @@ export class RdDActorSheet extends RdDBaseActorSangSheet { this.html.find('.roll-arme').click(async event => this.actor.rollArme(foundry.utils.duplicate(this._getEventArmeCombat(event)), 'competence')) // Initiative pour l'arme - this.html.find('.arme-initiative a').click(async event => { + this.html.find('.roll-init-arme').click(async event => { let combatant = game.combat.combatants.find(c => c.actor.id == this.actor.id) if (combatant) { RdDCombatManager.rollInitiativeAction(combatant._id, this._getEventArmeCombat(event)); diff --git a/templates/actor/combat.html b/templates/actor/combat.html index 776f2b34..8179a27b 100644 --- a/templates/actor/combat.html +++ b/templates/actor/combat.html @@ -25,7 +25,7 @@ {{plusMoins arme.system.niveau}} {{plusMoins arme.system.dommagesReels}} - {{arme.system.initiative}} + {{arme.system.initiative}} {{/each}} {{#each esquives as |esq key|}} diff --git a/templates/actor/export-scriptarium/arme.hbs b/templates/actor/export-scriptarium/arme.hbs index 80b3b77e..264fce9f 100644 --- a/templates/actor/export-scriptarium/arme.hbs +++ b/templates/actor/export-scriptarium/arme.hbs @@ -10,7 +10,11 @@
{{niveau}}
{{#if init}} -
{{init}}
+ {{#if name}} +
{{init}}
+ {{else}} +
{{init}}
+ {{/if}}
{{dommages}}
{{else}}