mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
* Added missing check for damage prevention by protection for planeswalkers (fixes #7194).
This commit is contained in:
parent
137070d523
commit
13fa98ec44
2 changed files with 54 additions and 1 deletions
|
|
@ -973,7 +973,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
GameEvent event = new DamagePlaneswalkerEvent(objectId, sourceId, controllerId, damage, preventable, combat);
|
||||
event.setAppliedEffects(appliedEffects);
|
||||
if (!game.replaceEvent(event)) {
|
||||
int actualDamage = event.getAmount();
|
||||
int actualDamage = checkProtectionAbilities(event, sourceId, game);
|
||||
if (actualDamage > 0) {
|
||||
int countersToRemove = actualDamage;
|
||||
if (countersToRemove > getCounters(game).getCount(CounterType.LOYALTY)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue