mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
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)
This commit is contained in:
parent
6d17199129
commit
f166bebe8c
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue