Fixed lethal damage potentially dipping into negative values
Example: in multiple multi-blocker creatures blocking the same creatures (if one of them assigns more than lethal to the first creature in its attackerOrder)
@@ -311,7 +311,7 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
if (attacker.getAbilities().containsKey(DeathtouchAbility.getInstance().getId())) {
lethalDamage = 1;
} else {
- lethalDamage = blocker.getToughness().getValue() - blocker.getDamage();
+ lethalDamage = Math.max(blocker.getToughness().getValue() - blocker.getDamage(), 0);
}
if (lethalDamage >= damage) {
if (!oldRuleDamage) {
@@ -483,7 +483,7 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
if (blocker.getAbilities().containsKey(DeathtouchAbility.getInstance().getId())) {
lethalDamage = 1;
} else {
- lethalDamage = attacker.getToughness().getValue() - attacker.getDamage();
+ lethalDamage = Math.max(attacker.getToughness().getValue() - attacker.getDamage(), 0);
}
if (lethalDamage >= damage) {
assigned.put(attackerId, damage);
