forked from public/foundryvtt-reve-de-dragon
#158 : Gestion de l'armure sur la fenêtre d'encaissement
This commit is contained in:
@ -2581,14 +2581,21 @@ export class RdDActor extends Actor {
|
||||
dmg = 0;
|
||||
}
|
||||
}
|
||||
// TODO: max armure sur chutes...
|
||||
const penetration = arme ? Misc.toInt(arme.data.penetration) : 0;
|
||||
protection = Math.max(protection - penetration, 0);
|
||||
protection += this.getProtectionNaturelle();
|
||||
console.log("Final protect", protection);
|
||||
// Gestion des cas particuliers sur la fenêtre d'encaissement
|
||||
if ( attackerRoll.dmg.encaisserSpecial && attackerRoll.dmg.encaisserSpecial == "noarmure") {
|
||||
protection = 0;
|
||||
}
|
||||
if ( attackerRoll.dmg.encaisserSpecial && attackerRoll.dmg.encaisserSpecial == "chute" && Number(protection) > 2) {
|
||||
protection = 2;
|
||||
}
|
||||
console.log("Final protect", protection, attackerRoll);
|
||||
return protection;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
_deteriorerArmure(item, dmg) {
|
||||
if (!ReglesOptionelles.isUsing('deteriorationArmure')) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user