Ajout commande /tmra
This commit is contained in:
parent
cec65edb83
commit
cd291c4ae0
@ -628,7 +628,10 @@ export class RdDUtility {
|
|||||||
} else if (command === "/tmrr") {
|
} else if (command === "/tmrr") {
|
||||||
TMRUtility.getRencontre(commands[1], commands[2] )
|
TMRUtility.getRencontre(commands[1], commands[2] )
|
||||||
return false
|
return false
|
||||||
}
|
} else if (command === "/tmra") {
|
||||||
|
TMRUtility.getTMRAleatoire( )
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ const TMRMapping = {
|
|||||||
C12: { type: "lac", label: "Lac de Fricassa"},
|
C12: { type: "lac", label: "Lac de Fricassa"},
|
||||||
D12: { type: "collines", label: "Collines d’Huaï"},
|
D12: { type: "collines", label: "Collines d’Huaï"},
|
||||||
E12: { type: "monts", label: "Monts Ajourés"},
|
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"},
|
G12: { type: "plaines", label: "Plaines de Lufmil"},
|
||||||
H12: { type: "collines", label: "Collines de Tooth"},
|
H12: { type: "collines", label: "Collines de Tooth"},
|
||||||
I12: { type: "gouffre", label: "Gouffre Abimeux"},
|
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 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user