Fix 1 main of ISS on Autobomb showing 50% ink consumption

This commit is contained in:
Kalle
2023-01-26 23:28:38 +02:00
parent 646c3feac5
commit ecf3763c37

View File

@@ -223,7 +223,12 @@ function subWeaponInkConsumptionPercentage(args: StatFunctionInput) {
return {
modifiedBy: "ISS" as const,
baseValue: roundToNDecimalPlaces(args.subWeaponParams.InkConsume * 100),
value: roundToNDecimalPlaces(subWeaponConsume(args).inkConsume * 100),
value: roundToNDecimalPlaces(
// + 0.004 is a hack to avoid situation where the value is e.g. 50.0005
// -> rounds to 50% so it appears you can throw two subs
// which is not correct so we force the round upwards
subWeaponConsume(args).inkConsume * 100 + 0.0045
),
};
}