From 0c08784fe9ad2e0e953434c57ddcf9b979ee6347 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 6 Oct 2015 22:40:54 +0200 Subject: [PATCH] * Fixed a bug that a commander on the stack could not be returned to command zone if an end turn effect resolved (e.g. from Sundial of the Infinite). --- .../common/continuous/CommanderReplacementEffect.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java b/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java index c2cc74dd6e..cc5e2c0ad7 100644 --- a/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java +++ b/Mage/src/mage/abilities/effects/common/continuous/CommanderReplacementEffect.java @@ -108,6 +108,12 @@ public class CommanderReplacementEffect extends ReplacementEffectImpl { } case GRAVEYARD: case EXILED: + if (((ZoneChangeEvent) event).getFromZone().equals(Zone.STACK)) { + Spell spell = game.getStack().getSpell(event.getTargetId()); + if (spell != null && commanderId.equals(spell.getSourceId())) { + return true; + } + } if (commanderId.equals(event.getTargetId())) { return true; }