From 3aeccb896d91ad377265637914d86143c7c0ea04 Mon Sep 17 00:00:00 2001 From: LeFrique Date: Fri, 1 Dec 2023 15:23:28 +0100 Subject: [PATCH] Added Math.floor() --- source/module/actors/M5ModAggregate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/module/actors/M5ModAggregate.ts b/source/module/actors/M5ModAggregate.ts index ff59ce4..c84fa37 100644 --- a/source/module/actors/M5ModAggregate.ts +++ b/source/module/actors/M5ModAggregate.ts @@ -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); } }