#1 gestion encombrement et malus associé

This commit is contained in:
2020-11-11 14:42:11 +01:00
parent 70abeb2c87
commit 021948bf6e
4 changed files with 26 additions and 4 deletions

View File

@ -102,6 +102,9 @@ export class RdDActorSheet extends ActorSheet {
data.data.nbLegeres = this.actor.GetNumberBlessures(data.data.blessures.legeres.liste );
data.data.nbGraves = this.actor.GetNumberBlessures(data.data.blessures.graves.liste );
data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.liste );
// Mise à jour de l'encombrement total
this.actor.computeEncombrementTotal();
// low is normal, this the base used to compute the grid.
data.data.fatigueHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix( data.data.sante.fatigue.value, data.data.sante.endurance.max ).html() + "</table>";
@ -121,10 +124,9 @@ export class RdDActorSheet extends ActorSheet {
data.data.tetes = this._checkNull(data.itemsByType['tete']);
data.data.objets = data.data.materiel.concat(data.data.armes).concat(data.data.armures).concat(data.data.munitions).concat(data.data.livres).concat(data.data.potions).concat(data.data.herbes).concat(data.data.ingredients);
data.data.competenceByCategory = data.competenceByCategory;
data.data.encombrementTotal = this.actor.encombrementTotal;
data.data.isGM = game.user.isGM;
data.bonusmalusTable = CONFIG.RDD.bonusmalus;
this.actor.computeEncombrementTotal();
return data;
}