diff --git a/module/actor-sheet.js b/module/actor-sheet.js index d18987bd..a8ef1ab5 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -59,6 +59,7 @@ export class RdDActorSheet extends ActorSheet { calc: { fortune: Monnaie.getFortune(this.actor), encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(), + surenc: this.actor.computeMalusSurEncombrement(), prixTotalEquipement: this.actor.computePrixTotalEquipement(), surprise: RdDBonus.find(this.actor.getSurprise(false)).descr, resumeBlessures: this.actor.computeResumeBlessure(this.actor.system.blessures), diff --git a/module/actor.js b/module/actor.js index e54cfcbd..4dd54eed 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1385,9 +1385,6 @@ export class RdDActor extends Actor { if (!this.pack) { await this.computeMalusArmure(); this.encTotal = this.items.map(it => it.getEncTotal()).reduce(Misc.sum(), 0); - if (!this.isVehicule()) { - this.system.compteurs.surenc.value = this.computeMalusSurEncombrement(); - } return this.encTotal; } return 0; diff --git a/template.json b/template.json index a81410e4..7b86582a 100644 --- a/template.json +++ b/template.json @@ -97,10 +97,6 @@ "etat": { "value": 0, "label": "Etat général" - }, - "surenc": { - "value": 0, - "label": "Sur-encombrement" } }, "attributs": { @@ -231,10 +227,6 @@ "etat": { "value": 0, "label": "Etat général" - }, - "surenc": { - "value": 0, - "label": "Sur-encombrement" } } }, @@ -530,10 +522,6 @@ "value": 0, "label": "Etat général" }, - "surenc": { - "value": 0, - "label": "Sur-encombrement" - }, "ethylisme": { "value": 1, "label": "Ethylisme", diff --git a/templates/actor/header-etat.html b/templates/actor/header-etat.html index 583a5afe..a2e30510 100644 --- a/templates/actor/header-etat.html +++ b/templates/actor/header-etat.html @@ -1,7 +1,7 @@
{{system.compteurs.etat.label}}: {{system.compteurs.etat.value}} - {{system.compteurs.surenc.label}}: {{system.compteurs.surenc.value}} + Sur-encombrement: {{calc.surenc}} {{calc.resumeBlessures}} {{>"systems/foundryvtt-reve-de-dragon/templates/actor/header-effects.html"}}