Séparation de l'Actor Créature

This commit is contained in:
2023-11-04 17:48:50 +01:00
parent e5bb2e9afc
commit bea4124388
9 changed files with 414 additions and 508 deletions

View File

@ -363,7 +363,7 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
this.actor.jetVie();
});
this.html.find('.jet-endurance').click(async event => {
this.actor.jetEndurance();
await this.jetEndurance();
});
this.html.find('.vie-plus').click(async event => {
@ -386,6 +386,16 @@ export class RdDActorSheet extends RdDBaseActorReveSheet {
});
}
async jetEndurance() {
const endurance = this.actor.getEnduranceActuelle()
const result = await this.actor.jetEndurance(endurance);
ChatMessage.create({
content: `Jet d'Endurance : ${result.jetEndurance} / ${endurance}
<br>${this.actor.name} a ${result.sonne ? 'échoué' : 'réussi'} son Jet d'Endurance ${result.sonne ? 'et devient Sonné' : ''}`,
whisper: ChatUtility.getWhisperRecipientsAndGMs(this.actor.name)
});
}
getBlessure(event) {
const itemId = this.html.find(event.currentTarget).parents(".item-blessure").data('item-id');
const blessure = this.actor.getItem(itemId, 'blessure');