Gere recul pour creature

This commit is contained in:
sladecraven 2021-01-23 18:04:49 +01:00
parent bcc5f77589
commit 41e63cd7e0
2 changed files with 12 additions and 4 deletions

View File

@ -794,9 +794,17 @@ export class RdDCombat {
if (this._isAttaqueCauseRecul(attackerRoll)) {
let impactRecul = this._computeImpactRecul(attackerRoll);
const agilite = this.defender.isEntiteCauchemar()
? this.defender.data.data.carac.reve.value
: this.defender.data.data.carac.agilite.value;
const agilite = 10;
if ( this.defender.data.data.carac.agilite ) {
agilite = this.defender.data.data.carac.agilite.value;
} else if ( this.defender.data.data.carac.force) {
agilite = this.defender.data.data.carac.force.value;
} else if ( this.defender.isEntiteCauchemar()) {
agilite = this.defender.data.data.carac.reve.value;
} else
ui.notifications.warn("Recul impossible pour cette créature/entité");
return;
}
let rollRecul = await RdDResolutionTable.rollData({ caracValue: 10, finalLevel: impactRecul, showDice: false });

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT",
"version": "1.2.36",
"version": "1.2.37",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.8",