Added Math.floor()
This commit is contained in:
parent
8e16c6a7bd
commit
3aeccb896d
|
|
@ -144,7 +144,7 @@ export default class M5ModAggregate {
|
||||||
mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.DIVISION);
|
mods = arr.filter((pair) => pair.mod.operation === M5ModOperation.DIVISION);
|
||||||
if (mods.length !== 0) {
|
if (mods.length !== 0) {
|
||||||
ret.mods = ret.mods.concat(mods.map(this.pairAsSource));
|
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);
|
ret.value = Math.max(0, ret.value + bonus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue