Added Math.floor()

This commit is contained in:
LeFrique 2023-12-01 15:23:28 +01:00
parent 8e16c6a7bd
commit 3aeccb896d
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ export default class M5ModAggregate {
mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.DIVISION);
if (mods.length !== 0) {
ret.mods = ret.mods.concat(mods.map(this.pairAsSource));
const bonus = mods.map((p) => p.mod.value).reduce((a, b) => a / b, 0);
const bonus = mods.map((p) => p.mod.value).reduce((a, b) => Math.floor(a / b), 0);
ret.value = Math.max(0, ret.value + bonus);
}
}