#27 Gestion des rencontres

This commit is contained in:
2020-11-21 09:10:31 +01:00
parent 40f0efec1a
commit 40027882e4
4 changed files with 17 additions and 15 deletions

View File

@ -1,15 +1,17 @@
export class RdDDice {
static deDraconique(rollMode="selfroll") {
/* -------------------------------------------- */
static async deDraconique(rollMode="selfroll") {
let roll = new Roll("1d8x8").evaluate();
this.show(roll, rollMode);
await this.show(roll, rollMode);
return roll.total - Math.ceil(roll.total / 8);
}
static show(roll, rollMode = "roll") {
/* -------------------------------------------- */
static async show(roll, rollMode = "roll") {
if (roll.showDice || game.settings.get("foundryvtt-reve-de-dragon", "dice-so-nice") == true) {
this.showDiceSoNice(roll, rollMode);
await this.showDiceSoNice(roll, rollMode);
}
return roll;
}