diff --git a/module/rdd-combat.js b/module/rdd-combat.js index 79ea86d7..cc0a6748 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -180,6 +180,7 @@ export class RdDCombatManager extends Combat { ui.notifications.warn(`Le combatant ${combatant.name} n'est pas associé à un acteur, impossible de déterminer ses actions de combat!`) return []; } + const actorData = Misc.data(combatant.actor); let items = combatant.actor.data.items; let actions = [] if (combatant.actor.isCreature()) { @@ -192,9 +193,11 @@ export class RdDCombatManager extends Combat { .concat(RdDItemArme.mainsNues()); let competences = items.filter(it => it.type == 'competence'); - actions = actions.concat(RdDCombatManager.finalizeArmeList(armes, competences, Misc.data(combatant.actor).data.carac)); - - actions.push({ name: "Draconic", data: { initOnly: true, competence: "Draconic" } }); + actions = actions.concat(RdDCombatManager.finalizeArmeList(armes, competences, actorData.data.carac)); + + if (actorData.data.attributs.hautrevant.value){ + actions.push({ name: "Draconic", data: { initOnly: true, competence: "Draconic" } }); + } } actions.push({ name: "Autre action", data: { initOnly: true, competence: "Autre action" } }); diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 9542a692..f25e230d 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -61,7 +61,7 @@ - {{#if (eq data.attributs.hautrevant.value 'Haut rêvant')}} + {{#if data.attributs.hautrevant.value}} @@ -164,15 +164,17 @@ {{#each data.attributs as |attr key|}} + {{#unless (eq key 'hautrevant')}}