From 76865d24d2562cc4e791cf35b3e71f0066f4869c Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Sun, 25 Apr 2021 14:50:44 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20recul=20sur=20encaissement=20cr=C3=A9atu?= =?UTF-8?q?re=20#187?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/item-competencecreature.js | 1 + module/rdd-combat.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/item-competencecreature.js b/module/item-competencecreature.js index aa35e787..3eecf008 100644 --- a/module/item-competencecreature.js +++ b/module/item-competencecreature.js @@ -25,6 +25,7 @@ export class RdDItemCompetenceCreature extends Item { competence: arme.name, resistance: 100, equipe: true, + dommagesReels: arme.data.dommages, penetration: 0, force: 0, rapide: true diff --git a/module/rdd-combat.js b/module/rdd-combat.js index 97b10eaf..506148fa 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -1185,7 +1185,7 @@ export class RdDCombat { _computeImpactRecul(attaque) { const taille = this.defender.getTaille(); const force = this.attacker.getForce(); - const dommages = attaque.arme.data.dommagesReels; + const dommages = attaque.arme.data.dommagesReels ?? attaque.arme.data.dommages; return taille - (force + dommages); }