Correction async pas utiles

This commit is contained in:
2020-11-17 11:35:05 +01:00
parent 803b340ad0
commit fbe70e42ea
6 changed files with 69 additions and 56 deletions

View File

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