Foundry: Roll#evaluate sera async

This commit is contained in:
Vincent Vandemeulebrouck
2021-05-11 21:45:43 +02:00
parent d1ac4b3d59
commit f87efee2fe
20 changed files with 160 additions and 147 deletions

View File

@ -283,16 +283,14 @@ export class RdDCommands {
/* -------------------------------------------- */
async rollDeDraconique(msg) {
let ddr = new Roll("1dr + 7").evaluate();
ddr.showDice = true;
await RdDDice.showDiceSoNice(ddr);
RdDCommands._chatAnswer(msg, `Lancer d'un Dé draconique: ${ddr.total}`);
let ddr = await RdDDice.rollTotal("1dr + 7", { showDice:true });
RdDCommands._chatAnswer(msg, `Lancer d'un Dé draconique: ${ddr}`);
}
getTMRAleatoire(msg, params) {
async getTMRAleatoire(msg, params) {
if (params.length < 2) {
let type = params[0];
const tmr = TMRUtility.getTMRAleatoire(type ? (it => it.type == type) : (it => true));
const tmr = await TMRUtility.getTMRAleatoire(type ? (it => it.type == type) : (it => true));
RdDCommands._chatAnswer(msg, `Case aléatoire: ${tmr.coord} - ${tmr.label}`);
}
else {