Minor fixes
This commit is contained in:
parent
213d02c2b0
commit
03a310e493
@ -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);
|
||||
@ -1389,6 +1388,7 @@ export class RdDActor extends Actor {
|
||||
compteurs.exaltation.value = 0;
|
||||
message.content += "<br>Vous transformez " + convertis + " points de Stress en Expérience" + stressRoll.comment;
|
||||
await this.update({ "data.compteurs": compteurs });
|
||||
return true;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
@ -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);
|
||||
|
24
templates/chat-resultat-ethylisme.html
Normal file
24
templates/chat-resultat-ethylisme.html
Normal file
@ -0,0 +1,24 @@
|
||||
<h4>
|
||||
{{alias}} {{#if isSortReserve}}met en réserve{{else}}lance{{/if}}
|
||||
le {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}}
|
||||
{{selectedSort.name}}
|
||||
</h4>
|
||||
<div>Pour {{selectedSort.data.ptreve_reel}} point{{~#if (gt selectedSort.data.ptreve_reel 1)}}s{{/if}} de rêve en {{coordLabel}} ({{coord}}).
|
||||
{{#if show.reveInsuffisant}}
|
||||
<span>Pas assez de rêve!</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
|
||||
<hr>
|
||||
<div>
|
||||
<span>
|
||||
{{#if rolled.isETotal}}Echec TOTAL
|
||||
{{else if rolled.isEchec}}Echec
|
||||
{{else}}Réussite{{/if}}
|
||||
du {{#if selectedSort.data.isrituel}}rituel{{else}}sort{{/if}},
|
||||
{{#if (eq depenseReve 0)}}pas de dépense de rêve
|
||||
{{else if (eq depenseReve 1)}}1 point de rêve a été dépensé
|
||||
{{else}}{{depenseReve}} points de rêve ont été dépensés
|
||||
{{~/if}}.
|
||||
</span>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user