Fix: Compatibility Dice-so-nice

This commit is contained in:
Vincent Vandemeulebrouck 2021-06-02 23:01:32 +02:00
parent a059d69acd
commit ebb6b34cce

View File

@ -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]);
}
}