diff --git a/module/roll/chat-roll-result.mjs b/module/roll/chat-roll-result.mjs index 8ac1c26b..7898b5d1 100644 --- a/module/roll/chat-roll-result.mjs +++ b/module/roll/chat-roll-result.mjs @@ -20,7 +20,7 @@ export default class ChatRollResult { 'partial-encaissement': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-encaissement.hbs', 'partial-recul-choc': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-recul-choc.hbs', 'partial-info-appel-moral': 'systems/foundryvtt-reve-de-dragon/templates/roll/result/partial-info-appel-moral.hbs', - }) + }) } async display(roll) { @@ -44,7 +44,7 @@ export default class ChatRollResult { roll.show.chance = this.isAppelChancePossible(roll) roll.show.encaissement = this.isShowEncaissement(roll) roll.show.recul = this.getRecul(roll) - roll.show.particuliere = roll.show.particuliere ?? [] + //roll.show.particuliere = roll.show.particuliere ?? [] } isAppelChancePossible(roll) { @@ -54,12 +54,16 @@ export default class ChatRollResult { } isShowEncaissement(roll) { - return roll.rolled.isEchec && - roll.attackerRoll?.dmg.mortalite != 'empoignade' + switch (roll.type.current) { + case ROLL_TYPE_DEFENSE: + return roll.rolled.isEchec && + roll.attackerRoll?.dmg.mortalite != 'empoignade' + } + return false } - getRecul(roll, defender = roll.active.actor, attacker = roll.opponent.actor) { + getRecul(roll, defender = roll.active.actor, attacker = roll.opponent?.actor) { switch (roll.type.current) { case ROLL_TYPE_DEFENSE: { diff --git a/templates/roll/result/chat-attaque.hbs b/templates/roll/result/chat-attaque.hbs index 9f7fc372..ba173d6c 100644 --- a/templates/roll/result/chat-attaque.hbs +++ b/templates/roll/result/chat-attaque.hbs @@ -1,7 +1,7 @@
- +
diff --git a/templates/roll/result/chat-comp.hbs b/templates/roll/result/chat-comp.hbs new file mode 100644 index 00000000..91d7323a --- /dev/null +++ b/templates/roll/result/chat-comp.hbs @@ -0,0 +1,23 @@ +
+
+ + +
+
+ {{active.name}} fait un jet de {{current.comp.label}} +
+ +
+ {{current.carac.label}} / {{current.comp.label}} à {{current.diff.value}} +
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.hbs"}} +
+ +
+

Qualité {{rolled.ptQualite}}, points de tâche {{rolled.ptQualite}} +

+ {{> 'partial-info-appel-moral'}} +
+
+ {{> 'partial-appel-chance'}} +
+
diff --git a/templates/roll/result/chat-competence.hbs b/templates/roll/result/chat-competence.hbs deleted file mode 100644 index e69de29b..00000000 diff --git a/templates/roll/result/chat-defense.hbs b/templates/roll/result/chat-defense.hbs index 6ff7c97d..975134a9 100644 --- a/templates/roll/result/chat-defense.hbs +++ b/templates/roll/result/chat-defense.hbs @@ -1,7 +1,7 @@
- +
diff --git a/templates/roll/result/chat-oeuvre.hbs b/templates/roll/result/chat-oeuvre.hbs index 2157d2da..f0300a72 100644 --- a/templates/roll/result/chat-oeuvre.hbs +++ b/templates/roll/result/chat-oeuvre.hbs @@ -1,7 +1,7 @@
- +
{{active.name}} {{current.oeuvre.art.action}}: {{current.oeuvre.label}} (de niveau {{current.oeuvre.oeuvre.system.niveau}})