From 9cc73e971d4b650e0b2dcd456f4924c0f2fbaa3f Mon Sep 17 00:00:00 2001 From: sladecraven Date: Sun, 4 Apr 2021 22:47:33 +0200 Subject: [PATCH] #171 - Gestion potion de soins (WIP) --- module/actor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/actor.js b/module/actor.js index ab6bf606..7e93497d 100644 --- a/module/actor.js +++ b/module/actor.js @@ -3109,12 +3109,17 @@ export class RdDActor extends Actor { await this.reveActuelIncDec(-1); potionData.guerisonData = await this.buildPotionGuerisonList(potionData.pointsGuerison); potionData.guerisonMinutes = potionData.guerisonData.pointsConsommes * 5; + potionData.reussiteReve = true; ChatMessage.create({ whisper: ChatUtility.getWhisperRecipientsAndGMs(game.user.name), content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-appliquer-potion-soin.html`, potionData ) }); } else { - + potionData.reussiteReve = false; + ChatMessage.create({ + whisper: ChatUtility.getWhisperRecipientsAndGMs(game.user.name), + content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-appliquer-potion-soin.html`, potionData ) + }); } } else {