fatigue optionnelle #113
This commit is contained in:
@ -13,6 +13,7 @@ import { RdDCombatManager } from "./rdd-combat.js";
|
||||
import { RdDCarac } from "./rdd-carac.js";
|
||||
import { RdDItem } from "./item.js";
|
||||
import { DialogSplitItem } from "./dialog-split-item.js";
|
||||
import { ReglesOptionelles } from "./regles-optionelles.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class RdDActorSheet extends ActorSheet {
|
||||
@ -68,10 +69,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
|
||||
prixTotalEquipement: this.actor.computePrixTotalEquipement(),
|
||||
surprise: RdDBonus.find(this.actor.getSurprise(false)).descr,
|
||||
fatigue: {
|
||||
malus: RdDUtility.calculMalusFatigue(formData.data.sante.fatigue.value, formData.data.sante.endurance.max),
|
||||
html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(formData.data.sante.fatigue.value, formData.data.sante.endurance.max).html() + "</table>"
|
||||
},
|
||||
fatigue: RdDUtility.calculFatigueHtml(formData.data.sante.fatigue.value, formData.data.sante.endurance.max),
|
||||
resumeBlessures: this.actor.computeResumeBlessure(formData.data.blessures),
|
||||
};
|
||||
formData.calc.surEncombrementMessage = (formData.data.compteurs.surenc.value < 0) ? "Sur-Encombrement!" : "";
|
||||
@ -99,12 +97,6 @@ export class RdDActorSheet extends ActorSheet {
|
||||
formData.ajustementsConditions = CONFIG.RDD.ajustementsConditions;
|
||||
formData.difficultesLibres = CONFIG.RDD.difficultesLibres;
|
||||
|
||||
// low is normal, this the base used to compute the grid.
|
||||
formData.fatigue = {
|
||||
malus: RdDUtility.calculMalusFatigue(formData.data.sante.fatigue.value, formData.data.sante.endurance.max),
|
||||
html: "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix(formData.data.sante.fatigue.value, formData.data.sante.endurance.max).html() + "</table>"
|
||||
}
|
||||
|
||||
formData.hautreve = {
|
||||
sortsReserve: formData.data.reve.reserve.list,
|
||||
rencontres: duplicate(formData.data.reve.rencontre.list),
|
||||
@ -211,6 +203,7 @@ export class RdDActorSheet extends ActorSheet {
|
||||
super.activateListeners(html);
|
||||
|
||||
HtmlUtility._showControlWhen($(".gm-only"), game.user.isGM);
|
||||
HtmlUtility._showControlWhen($(".appliquerFatigue"), ReglesOptionelles.isUsing("appliquer-fatigue"));
|
||||
|
||||
html.find('#show-hide-competences').click((event) => {
|
||||
this.options.showCompNiveauBase = !this.options.showCompNiveauBase;
|
||||
|
Reference in New Issue
Block a user