diff --git a/module/actor.js b/module/actor.js index c62e0a69..585a47cf 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1133,7 +1133,7 @@ export class RdDActor extends Actor { action: r => this._appliquerAjoutExperience(r) }; } - + /* -------------------------------------------- */ async _appliquerAjoutExperience(rollData) { let xpResult = this.appliquerExperience( rollData.rolled, rollData.selectedCarac.label, (rollData.competence) ? rollData.competence.data.name: undefined ); @@ -1389,6 +1389,7 @@ export class RdDActor extends Actor { label: 'Jet de Tâche ' + tache.name, callbacks: [ this.createCallbackExperience(), + { condition: r=> r.rolled.isETotal, action: r => this._tacheETotal(r)}, { action: r => this._tacheResult(r) } ] } ); @@ -1418,6 +1419,11 @@ export class RdDActor extends Actor { }, this.name); } + _tacheETotal(rollData) { + rollData.tache.data.difficulte --; + this.updateEmbeddedEntity( "OwnedItem", rollData.tache); + } + /* -------------------------------------------- */ _competenceResult(rollData) { ChatUtility.chatWithRollMode({