Fix bonus de case sorts

This commit is contained in:
Vincent Vandemeulebrouck 2021-01-22 14:35:14 +01:00
parent a380876ea6
commit a99a08ab21
2 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ export class RdDItemSort extends Item {
let bonusCaseList = this.buildBonusCaseList(sort.data.bonuscase, false); let bonusCaseList = this.buildBonusCaseList(sort.data.bonuscase, false);
for( let bc of bonusCaseList) { for( let bc of bonusCaseList) {
if (bc.case == coordTMR) { // Case existante if (bc.case == coordTMR) { // Case existante
return bc.bonus; return Number(bc.bonus);
} }
} }
return 0; return 0;

View File

@ -134,7 +134,7 @@ export class RdDResolutionTable {
/* -------------------------------------------- */ /* -------------------------------------------- */
static _updateChancesWithBonus(chances, bonus) { static _updateChancesWithBonus(chances, bonus) {
if (bonus) { if (bonus) {
let newScore = chances.score + bonus; let newScore = Number(chances.score) + bonus;
mergeObject(chances, this._computeCell(null, newScore), { overwrite: true }); mergeObject(chances, this._computeCell(null, newScore), { overwrite: true });
} }
} }