forked from public/foundryvtt-reve-de-dragon
Compute general state
This commit is contained in:
@ -54,7 +54,9 @@ export class RdDActorSheet extends ActorSheet {
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
data.data.fatigueHTML = "<table class='table-fatigue'>" + RdDUtility.makeHTMLfatigueMatrix( data.data.sante.fatigue.value, data.data.sante.fatigue.max ).html() + "</table>";
|
||||
|
||||
//endurance.max below 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>";
|
||||
data.data.materiel = this._checkNull(data.itemsByType['objet']);
|
||||
data.data.armes = this._checkNull(data.itemsByType['arme']);
|
||||
data.data.armures = this._checkNull(data.itemsByType['armure']);
|
||||
@ -105,26 +107,32 @@ export class RdDActorSheet extends ActorSheet {
|
||||
|
||||
$("#vie-plus").click((event) => {
|
||||
this.actor.santeIncDec("vie", 1);
|
||||
this.actor.update({"data.sante.vie.value": this.actor.data.data.sante.vie.value});
|
||||
this.render(true);
|
||||
});
|
||||
$("#vie-moins").click((event) => {
|
||||
this.actor.santeIncDec("vie", -1);
|
||||
this.actor.update({"data.sante.vie.value": this.actor.data.data.sante.vie.value});
|
||||
this.render(true);
|
||||
});
|
||||
$("#endurance-plus").click((event) => {
|
||||
this.actor.santeIncDec("endurance", 1);
|
||||
this.actor.update({"data.sante.endurance.value": this.actor.data.data.sante.endurance.value});
|
||||
this.render(true);
|
||||
});
|
||||
$("#endurance-moins").click((event) => {
|
||||
this.actor.santeIncDec("endurance", -1);
|
||||
this.actor.update({"data.sante.endurance.value": this.actor.data.data.sante.endurance.value});
|
||||
this.render(true);
|
||||
});
|
||||
$("#fatigue-plus").click((event) => {
|
||||
this.actor.santeIncDec("fatigue", 1);
|
||||
this.actor.update({"data.sante.fatigue.value": this.actor.data.data.sante.fatigue.value});
|
||||
this.render(true);
|
||||
});
|
||||
$("#fatigue-moins").click((event) => {
|
||||
this.actor.santeIncDec("fatigue", -1);
|
||||
this.actor.update({"data.sante.fatigue.value": this.actor.data.data.sante.fatigue.value});
|
||||
this.render(true);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user