diff --git a/module/actor.js b/module/actor.js index 9423a2d7..7ef498f3 100644 --- a/module/actor.js +++ b/module/actor.js @@ -69,6 +69,7 @@ export class RdDActor extends Actor { // Make separate methods for each Actor type (character, npc, etc.) to keep // things organized. if (actorData.type === 'personnage') this._prepareCharacterData(actorData); + if (actorData.type === 'creature') this.computeEtatGeneral(actorData); } /* -------------------------------------------- */ @@ -371,7 +372,8 @@ export class RdDActor extends Actor { let data = this.data.data; let state = 0; state = state - (data.sante.vie.max - data.sante.vie.value); - state = state + RdDUtility.currentFatigueMalus(data.sante.fatigue.value, data.sante.endurance.max); + if (data.sante.fatigue) // Creatures n'ont pas de fatigue + state = state + RdDUtility.currentFatigueMalus(data.sante.fatigue.value, data.sante.endurance.max); data.compteurs.etat.value = state; } diff --git a/system.json b/system.json index 42b41f20..a4f11348 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.14", + "version": "0.9.15", "minimumCoreVersion": "0.6.0", "compatibleCoreVersion": "0.6.6", "templateVersion": 37, diff --git a/templates/actor-creature-sheet.html b/templates/actor-creature-sheet.html index 3495b6d4..bdf0397d 100644 --- a/templates/actor-creature-sheet.html +++ b/templates/actor-creature-sheet.html @@ -178,7 +178,7 @@ {{!-- Biography Tab --}}
- {{editor content="data.description" target="data.description" button=true owner=owner editable=editable}} + {{editor content=data.description target="data.description" button=true owner=owner editable=editable}}