Fix repeatables buying more than intended when cumulativeCost
is false
#18
1 changed files with 3 additions and 1 deletions
|
@ -1453,7 +1453,9 @@ export function calculateMaxAffordable(
|
|||
formula.invertIntegral(Decimal.add(resource.value, formula.evaluateIntegral()))
|
||||
).sub(unref(formula.innermostVariable) ?? 0);
|
||||
} else {
|
||||
affordable = Decimal.floor(formula.invert(resource.value));
|
||||
affordable = Decimal.floor(
|
||||
formula.invert(resource.value)
|
||||
).add(1).sub(unref(formula.innermostVariable) ?? 0);
|
||||
}
|
||||
}
|
||||
affordable = Decimal.clampMax(affordable, maxBulkAmount);
|
||||
|
|
Loading…
Reference in a new issue