Corrige competence humanoide

This commit is contained in:
2020-11-25 20:30:48 +01:00
parent 192a530d58
commit 253073fff9
4 changed files with 13 additions and 8 deletions

View File

@ -263,13 +263,17 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
_calculBonusDommages(carac, arme, isForce=false) {
const dmgArme = parseInt(arme.data.dommages) + (isForce)? 5 : 0;
if ( arme.name.toLowerCase() == "esquive") return 0; // Specific case management
let dmgArme = 0;
const dmgPerso = parseInt(this.data.data.attributs.plusdom.value);
if (carac.label == "Tir") {
return dmgArme;
}
if (carac.label == "Lancer") {
return dmgArme + Math.min(dmgArme, dmgPerso);
if ( arme.data.dommages ) {
dmgArme = parseInt(arme.data.dommages) + (isForce)? 5 : 0;
if (carac.label == "Tir") {
return dmgArme;
}
if (carac.label == "Lancer") {
return dmgArme + Math.min(dmgArme, dmgPerso);
}
}
return dmgArme + dmgPerso;
}