Gestion des signes draconiques #455
@ -2566,7 +2566,8 @@ export class RdDActor extends Actor {
|
||||
let dmg = (attackerRoll.dmg.dmgArme ?? 0) + (attackerRoll.dmg.dmgActor ?? 0);
|
||||
let armeData = attackerRoll.arme;
|
||||
let protection = 0;
|
||||
const armures = this.data.items.filter(it => it.type == "armure" && it.data.equipe);
|
||||
const armures = this.items.map(it => Misc.data(it))
|
||||
.filter(it => it.type == "armure" && it.data.equipe);
|
||||
for (const itemData of armures) {
|
||||
protection += new Roll(itemData.data.protection.toString()).roll().total;
|
||||
if (dmg > 0) {
|
||||
@ -2574,7 +2575,7 @@ export class RdDActor extends Actor {
|
||||
dmg = 0;
|
||||
}
|
||||
}
|
||||
const penetration = armeData ? Misc.toInt(armeData.data.penetration) : 0;
|
||||
const penetration = Misc.toInt(armeData?.data.penetration ?? 0);
|
||||
protection = Math.max(protection - penetration, 0);
|
||||
protection += this.getProtectionNaturelle();
|
||||
// Gestion des cas particuliers sur la fenêtre d'encaissement
|
||||
|
Loading…
Reference in New Issue
Block a user