forked from public/foundryvtt-reve-de-dragon
Foundry: Roll#evaluate sera async
This commit is contained in:
@ -7,6 +7,7 @@ import { Grammar } from "./grammar.js";
|
||||
import { TMRUtility } from "./tmr-utility.js";
|
||||
import { DialogItemAchat } from "./dialog-item-achat.js";
|
||||
import { ReglesOptionelles } from "./regles-optionelles.js";
|
||||
import { RdDDice } from "./rdd-dice.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// This table starts at 0 -> niveau -10
|
||||
@ -444,8 +445,8 @@ export class RdDUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static getLocalisation(type = 'personnage') {
|
||||
let result = new Roll("1d20").roll().total;
|
||||
static async getLocalisation(type = 'personnage') {
|
||||
let result = await RdDDice.rollTotal("1d20");
|
||||
let txt = ""
|
||||
if (type == 'personnage') {
|
||||
if (result <= 3) txt = "Jambe, genou, pied, jarret";
|
||||
@ -477,15 +478,6 @@ export class RdDUtility {
|
||||
return duplicate(table[0]);
|
||||
}
|
||||
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static _evaluatePerte(formula, over20) {
|
||||
console.log("_evaluatePerte", formula, over20);
|
||||
let perte = new Roll(formula, { over20: over20 });
|
||||
perte.evaluate();
|
||||
return perte.total;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static currentFatigueMalus(value, max) {
|
||||
if (ReglesOptionelles.isUsing("appliquer-fatigue")) {
|
||||
|
Reference in New Issue
Block a user