diff --git a/module/actor.js b/module/actor.js index 796d0c1c..3b763ae6 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1288,6 +1288,10 @@ export class RdDActor extends Actor { /* -------------------------------------------- */ computeMalusSurEncombrement() { + switch (this.type) { + case 'entite': case 'vehicule': + return 0; + } return Math.min(0, this.getEncombrementMax() - Math.ceil(Number(this.getEncTotal()))); } getMessageSurEncombrement(){ @@ -1295,9 +1299,14 @@ export class RdDActor extends Actor { } getEncombrementMax() { - return (this.data.type == 'vehicule') - ? Misc.templateData(this).capacite_encombrement - : Misc.templateData(this).attributs.encombrement.value; + switch (this.type){ + case 'vehicule': + return Misc.templateData(this).capacite_encombrement; + case 'entite': + return 0; + default: + return Misc.templateData(this).attributs.encombrement.value; + } } /* -------------------------------------------- */