From f2a2b2acdad59424c81c7a48df8d5c230dc8bb61 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 ca2dc607..3001ee45 100644 --- a/module/item-competencecreature.js +++ b/module/item-competencecreature.js @@ -26,6 +26,7 @@ export class RdDItemCompetenceCreature extends Item { competence: itemData.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 f8b8fa54..20097958 100644 --- a/module/rdd-combat.js +++ b/module/rdd-combat.js @@ -1179,7 +1179,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); }