Fix creature again

This commit is contained in:
2020-09-20 21:45:46 +02:00
parent ad8354217c
commit 5e7a5f4ccb
4 changed files with 179 additions and 185 deletions

View File

@ -6,7 +6,7 @@
import { RdDUtility } from "./rdd-utility.js";
const creatureCarac = [ "taille", "constitution", "force", "perception", "volonte", "reve" ]
/* -------------------------------------------- */
export class RdDActorCreatureSheet extends ActorSheet {
/** @override */
@ -54,7 +54,8 @@ export class RdDActorCreatureSheet extends ActorSheet {
data.data.nbCritiques = this.actor.GetNumberBlessures(data.data.blessures.critiques.liste );
data.data.competencecreature = data.itemsByType["competencecreature"];
console.log("DATA:", data);
return data;
}

View File

@ -5,6 +5,7 @@
import { RdDUtility } from "./rdd-utility.js";
/* -------------------------------------------- */
export class RdDActorSheet extends ActorSheet {
/** @override */
@ -20,7 +21,6 @@ export class RdDActorSheet extends ActorSheet {
}
/* -------------------------------------------- */
_checkNull(items) {
if (items && items.length) {
return items;
@ -29,7 +29,6 @@ export class RdDActorSheet extends ActorSheet {
}
/* -------------------------------------------- */
getData() {
let data = super.getData();
@ -102,7 +101,6 @@ 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 );
console.log( data.data.compteurs );
// 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>";