mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
game: fixed game error in some multi blocker damage use cases (NPE error);
This commit is contained in:
parent
1179ca6874
commit
93cb4404e3
1 changed files with 4 additions and 2 deletions
|
|
@ -361,14 +361,16 @@ public class CombatGroup implements Serializable, Copyable<CombatGroup> {
|
|||
if (power != null) {
|
||||
// might be missing canDamage condition?
|
||||
Permanent blocker = game.getPermanent(blockerId);
|
||||
if (!assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(blocker, blocker.getControllerId(), first, game, false)) {
|
||||
if (blocker != null && !assignsDefendingPlayerAndOrDefendingCreaturesDividedDamage(blocker, blocker.getControllerId(), first, game, false)) {
|
||||
attacker.markDamage(power, blockerId, null, game, true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Map.Entry<UUID, Integer> entry : assigned.entrySet()) {
|
||||
Permanent blocker = game.getPermanent(entry.getKey());
|
||||
blocker.markDamage(entry.getValue(), attacker.getId(), null, game, true, true);
|
||||
if (blocker != null) {
|
||||
blocker.markDamage(entry.getValue(), attacker.getId(), null, game, true, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (UUID blockerId : blockerOrder) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue