Fix /tmrr

This commit is contained in:
Vincent Vandemeulebrouck
2021-01-23 00:29:03 +01:00
parent 0575ddf561
commit 3f603ac05d
2 changed files with 15 additions and 13 deletions

View File

@ -31,8 +31,11 @@ export class RdDCommands {
rddCommands.registerCommand({ path: ["/tmra"], func: (content, msg, params) => TMRUtility.getTMRAleatoire(), descr: "Tire une case aléatoire des Terres médianes" });
rddCommands.registerCommand({
path: ["/tmrr"], func: (content, msg, params) => rddCommands.getRencontreTMR(msg, params),
descr: "Exemple: <strong>/tmrr forêt 47</strong><br>Détermine quelle est la rencontre dans une case 'forêt' pour un jet de dé de 47"
path: ["/tmrr"], func: (content, msg, params) => rddCommands.getRencontreTMR(params),
descr: `
Exemple: <strong>/tmrr foret</strong> lance un d100 et détermine la rencontre correspondante en 'forêt'
Exemple: <strong>/tmrr forêt 47</strong> détermine la rencontre en 'forêt' pour un jet de dé de 47
`
});
rddCommands.registerCommand({
@ -182,8 +185,8 @@ export class RdDCommands {
}
/* -------------------------------------------- */
getRencontreTMR(params) {
if (params.length == 2) {
async getRencontreTMR(params) {
if (params.length == 1 || params.length ==2) {
return TMRUtility.getRencontre(params[0], params[1])
}
else {
@ -226,7 +229,7 @@ export class RdDCommands {
async rollDeDraconique(msg) {
let ddr = new DeDraconique().evaluate();
ddr.showDice = true;
await RdDDice.show(ddr);
await RdDDice.showDiceSoNice(ddr);
RdDCommands._chatAnswer(msg, `Lancer d'un Dé draconique: ${ddr.total}`);
}