diff --git a/module/actor.js b/module/actor.js
index 0f2d7916..cea4509d 100644
--- a/module/actor.js
+++ b/module/actor.js
@@ -416,6 +416,7 @@ export class RdDActor extends Actor {
ChatMessage.create(message);
}
+ /* -------------------------------------------- */
async _recupererEthylisme(message) {
let ethylisme = duplicate(this.data.data.compteurs.ethylisme);
ethylisme.nb_doses = 0;
@@ -1356,7 +1357,6 @@ export class RdDActor extends Actor {
whisper: ChatUtility.getWhisperRecipientsAndGMs(game.user.name)
};
await this.transformerStress(message);
-
ChatMessage.create(message);
}
@@ -1366,10 +1366,9 @@ export class RdDActor extends Actor {
const stress = Misc.toInt(compteurs.stress.value);
if (stress <= 0) {
- return;
+ return false;
}
-
let stressRoll = await this._stressRoll();
let convertis = Math.floor(stress * stressRoll.factor);
compteurs.stress.value = Math.max(stress - convertis - 1, 0);
@@ -1388,7 +1387,8 @@ export class RdDActor extends Actor {
compteurs.dissolution.value = dissolution;
compteurs.exaltation.value = 0;
message.content += "
Vous transformez " + convertis + " points de Stress en Expérience" + stressRoll.comment;
- await this.update({ "data.compteurs": compteurs });
+ await this.update({ "data.compteurs": compteurs });
+ return true;
}
/* -------------------------------------------- */
diff --git a/module/rdd-roll-ethylisme.js b/module/rdd-roll-ethylisme.js
index 906253ea..0b4a9eca 100644
--- a/module/rdd-roll-ethylisme.js
+++ b/module/rdd-roll-ethylisme.js
@@ -16,7 +16,7 @@ export class RdDRollDialogEthylisme extends Dialog {
// Common conf
let dialogConf = { content: html, title: "Test d'éthylisme", buttons: myButtons, default: "rollButton" };
- let dialogOptions = { classes: ["rdddialog"], width: 400, height: 400, 'z-index': 99999 }
+ let dialogOptions = { classes: ["rdddialog"], width: 400, height: 220, 'z-index': 99999 }
super(dialogConf, dialogOptions)
//console.log("ETH", rollData);
diff --git a/templates/chat-resultat-ethylisme.html b/templates/chat-resultat-ethylisme.html
new file mode 100644
index 00000000..c6c374eb
--- /dev/null
+++ b/templates/chat-resultat-ethylisme.html
@@ -0,0 +1,24 @@
+