Fixed a rare divide by zero error game crash affecting some cards (such as the Merry, From O'er the Brandywine errata)

This commit is contained in:
Christian 'ketura' McCarty
2024-12-21 14:35:07 -06:00
parent 478c907dc7
commit baad735d4d

View File

@@ -52,7 +52,7 @@ public class ModifyStrength implements EffectAppenderProducer {
LotroGame game = actionContext.getGame(); LotroGame game = actionContext.getGame();
final int amount = evaluator.evaluateExpression(game, actionContext.getSource()); final int amount = evaluator.evaluateExpression(game, actionContext.getSource());
if (limit != -1) { if (limit != -1 && amount != 0) {
int absAmount = Math.abs(amount); int absAmount = Math.abs(amount);
int multiplier = absAmount / amount; int multiplier = absAmount / amount;
List<Modifier> modifiers = new LinkedList<>(); List<Modifier> modifiers = new LinkedList<>();