diff --git a/module/rdd-utility.js b/module/rdd-utility.js index cf8798a4..5494602c 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -628,7 +628,10 @@ export class RdDUtility { } else if (command === "/tmrr") { TMRUtility.getRencontre(commands[1], commands[2] ) return false - } + } else if (command === "/tmra") { + TMRUtility.getTMRAleatoire( ) + return false + } return true; } diff --git a/module/tmr-utility.js b/module/tmr-utility.js index f0157270..430759e0 100644 --- a/module/tmr-utility.js +++ b/module/tmr-utility.js @@ -159,7 +159,7 @@ const TMRMapping = { C12: { type: "lac", label: "Lac de Fricassa"}, D12: { type: "collines", label: "Collines d’Huaï"}, E12: { type: "monts", label: "Monts Ajourés"}, - F12: { type: "necropole", label: "Nécropole de 'roat"}, + F12: { type: "necropole", label: "Nécropole de Troat"}, G12: { type: "plaines", label: "Plaines de Lufmil"}, H12: { type: "collines", label: "Collines de Tooth"}, I12: { type: "gouffre", label: "Gouffre Abimeux"}, @@ -428,6 +428,24 @@ export class TMRUtility { } } - + + /* -------------------------------------------- */ + /** + * + */ + static getTMRAleatoire() + { + let num = new Roll("1d15").roll().total; + let letter, letterValue; + if ( num == 15) { + letterValue = new Roll( "1d7").roll().total; + letter = String.fromCharCode( 65 + ((parseInt(letterValue)-1)*2) ); + } else { + letterValue = new Roll( "1d13 + 64" ).roll().total; + letter = String.fromCharCode( letterValue ); + } + let caseIndex = letter+num; + console.log("Case ", letterValue, letter, num, TMRMapping[caseIndex].label ); + } }