fix common tests

This commit is contained in:
Matteo Pagliazzi
2019-10-03 16:27:44 +02:00
parent 5b406ba70f
commit 17c7a2bad1
12 changed files with 989 additions and 837 deletions

View File

@@ -7,7 +7,7 @@ import splitWhitespace from '../../libs/splitWhitespace';
import {
NotAuthorized,
} from '../../libs/errors';
import randomVal from '../../libs/randomVal';
import randomVal, * as randomValFns from '../../libs/randomVal';
import {removeItemByPath} from '../pinnedGearUtils';
import {AbstractGoldItemOperation} from './abstractBuyOperation';
@@ -35,7 +35,7 @@ export class BuyArmoireOperation extends AbstractGoldItemOperation {
executeChanges (user, item) {
let result = {};
let armoireResult = randomVal.trueRandom();
let armoireResult = randomValFns.trueRandom();
let eligibleEquipment = filter(content.gear.flat, (eligible) => {
return eligible.klass === 'armoire' && !user.items.gear.owned[eligible.key];
});
@@ -147,7 +147,7 @@ export class BuyArmoireOperation extends AbstractGoldItemOperation {
}
_experienceResult (user) {
let armoireExp = Math.floor(randomVal.trueRandom() * 40 + 10);
let armoireExp = Math.floor(randomValFns.trueRandom() * 40 + 10);
user.stats.exp += armoireExp;
return {