forked from public/foundryvtt-reve-de-dragon
Correction async pas utiles
This commit is contained in:
@ -85,21 +85,20 @@ export class RdDResolutionTable {
|
||||
|
||||
}
|
||||
/* -------------------------------------------- */
|
||||
static async roll(carac, finalLevel, showDice=false) {
|
||||
static roll(carac, finalLevel) {
|
||||
let chances = this.computeChances(carac, finalLevel);
|
||||
chances.showDice = showDice;
|
||||
let rolled = await this.rollChances(chances);
|
||||
chances.showDice = true;
|
||||
let rolled = this.rollChances(chances);
|
||||
rolled.carac = carac;
|
||||
rolled.finalLevel = finalLevel;
|
||||
return rolled;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async rollChances(chances) {
|
||||
static rollChances(chances) {
|
||||
let myRoll = new Roll("d100").roll();
|
||||
if (chances.showDice) {
|
||||
await RdDDice.showDiceSoNice(myRoll);
|
||||
}
|
||||
myRoll.showDice = chances.showDice;
|
||||
RdDDice.show(myRoll);
|
||||
chances.roll = myRoll.total;
|
||||
mergeObject(chances, this._computeReussite(chances, chances.roll));
|
||||
return chances;
|
||||
|
Reference in New Issue
Block a user