#27 Gestion des rencontres

This commit is contained in:
2020-11-21 09:54:21 +01:00
parent 40027882e4
commit 176e3b7916
4 changed files with 17 additions and 15 deletions

View File

@ -282,7 +282,7 @@ export class TMRUtility {
/* -------------------------------------------- */
static async rencontreTMRRoll( coordTMR, cellDescr )
{
let rencontre = this.rencontreTMRTypeCase(cellDescr.type);
let rencontre = await this.rencontreTMRTypeCase(cellDescr.type);
//let rencontre = rencontresTable[4];
if (rencontre){
rencontre = duplicate(rencontre);
@ -300,10 +300,11 @@ export class TMRUtility {
}
/* -------------------------------------------- */
static rencontreTMRTypeCase(typeTMR, roll=undefined) {
static async rencontreTMRTypeCase(typeTMR, roll=undefined) {
if (!roll)
{
roll = RdDDice.show(new Roll("d100").evaluate()).total;
//roll = await RdDDice.show(new Roll("d100").evaluate()).total;
roll = new Roll("d100").roll().total;
console.log("rencontreTMRTypeCase", roll);
}
typeTMR = typeTMR.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "");