* Fixed possible IndexOutOfBoundsException during combat.

This commit is contained in:
LevelX2 2017-01-22 22:27:39 +01:00
parent dad1a10eec
commit 719f88b3c8

View file

@ -299,7 +299,7 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
} }
if (damage > 0 && hasTrample(attacker)) { if (damage > 0 && hasTrample(attacker)) {
defenderDamage(attacker, damage, game); defenderDamage(attacker, damage, game);
} else { } else if (!blockerOrder.isEmpty()) {
// Assign the damge left to first blocker // Assign the damge left to first blocker
assigned.put(blockerOrder.get(0), assigned.get(blockerOrder.get(0)) + damage); assigned.put(blockerOrder.get(0), assigned.get(blockerOrder.get(0)) + damage);
} }