forked from public/foundryvtt-reve-de-dragon
Calcul automatique du niveau des entités
This commit is contained in:
@ -15,6 +15,8 @@ export class RdDActorEntiteSheet extends RdDBaseActorReveSheet {
|
||||
|
||||
async getData() {
|
||||
let formData = await super.getData();
|
||||
formData.niveau = this.actor.getNiveau()
|
||||
delete formData.system.carac.niveau
|
||||
formData.resonances = this.actor.system.sante.resonnance.actors.map(actorId => game.actors.get(actorId))
|
||||
.map(actor => { return { id: actor.id, name: actor.name, img: actor.img } })
|
||||
return formData
|
||||
@ -33,10 +35,6 @@ export class RdDActorEntiteSheet extends RdDBaseActorReveSheet {
|
||||
let compName = event.currentTarget.attributes.compname.value;
|
||||
this.actor.updateCreatureCompetence(compName, "carac_value", parseInt(event.target.value));
|
||||
});
|
||||
this.html.find('.creature-niveau').change(async event => {
|
||||
let compName = event.currentTarget.attributes.compname.value;
|
||||
this.actor.updateCreatureCompetence(compName, "niveau", parseInt(event.target.value));
|
||||
})
|
||||
this.html.find('.creature-dommages').change(async event => {
|
||||
let compName = event.currentTarget.attributes.compname.value;
|
||||
this.actor.updateCreatureCompetence(compName, "dommages", parseInt(event.target.value));
|
||||
|
Reference in New Issue
Block a user