From ebb6b34cce838c538c5e4642a8c320c9f90d3e88 Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Wed, 2 Jun 2021 23:01:32 +0200 Subject: [PATCH] Fix: Compatibility Dice-so-nice --- module/rdd-dice.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/module/rdd-dice.js b/module/rdd-dice.js index c60f12d2..0b77bf57 100644 --- a/module/rdd-dice.js +++ b/module/rdd-dice.js @@ -46,11 +46,11 @@ export class De7 extends Die { return this.values.filter(it => it != 8).reduce(Misc.sum(), 0); } - getResultLabel(result) { - switch (result) { + getResultLabel(diceTerm) { + switch (diceTerm.result) { case 7: return imgSigneDragon; } - return result; + return diceTerm.result.toString(); } } @@ -83,12 +83,12 @@ export class DeDraconique extends Die { return this.values.filter(it => it != 8).reduce(Misc.sum(), 0); } - static getResultLabel(result) { - switch (result) { + getResultLabel(diceTerm) { + switch (diceTerm.result) { case 7: return imgSigneDragon; - case 8: return 0; + case 8: return '0'; } - return result; + return diceTerm.result.toString(); } } @@ -112,8 +112,8 @@ export class DeHeure extends Die { super(termData); } - getResultLabel(result) { - return img(imagesHeures[result - 1]); + getResultLabel(diceTerm) { + return img(imagesHeures[diceTerm.result - 1]); } }