From d1082293a8a88dccf6b9f046f9c23ff651302bdc Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Fri, 14 Mar 2014 15:05:36 +0100 Subject: [PATCH] Fixed that Haste effects given to Obzedat on enters the battlefield stayed after going back to hand and recasting of it. --- Mage.Sets/src/mage/sets/theros/WhipOfErebos.java | 5 +++-- .../mage/abilities/effects/common/ExileSourceEffect.java | 8 +++++--- .../common/continious/GainAbilitySourceEffect.java | 3 +++ Mage/src/mage/abilities/keyword/UnearthAbility.java | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/theros/WhipOfErebos.java b/Mage.Sets/src/mage/sets/theros/WhipOfErebos.java index b486e41c8b4..6d12de664b8 100644 --- a/Mage.Sets/src/mage/sets/theros/WhipOfErebos.java +++ b/Mage.Sets/src/mage/sets/theros/WhipOfErebos.java @@ -155,8 +155,9 @@ class WhipOfErebosReplacementEffect extends ReplacementEffectImpl { @Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); + Player controller = game.getPlayer(source.getControllerId()); if (permanent != null) { - return permanent.moveToExile(null, "", source.getId(), game); + return controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, null); } else { - // try to exile card + // try to exile card -> is this correct in all cases? (LevelX2) Card card = game.getCard(source.getSourceId()); if (card != null) { - return card.moveToExile(null, "", source.getSourceId(), game); + return controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, null); } } return false; diff --git a/Mage/src/mage/abilities/effects/common/continious/GainAbilitySourceEffect.java b/Mage/src/mage/abilities/effects/common/continious/GainAbilitySourceEffect.java index 1c875233445..65b8806e0aa 100644 --- a/Mage/src/mage/abilities/effects/common/continious/GainAbilitySourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/GainAbilitySourceEffect.java @@ -109,6 +109,9 @@ public class GainAbilitySourceEffect extends ContinuousEffectImpl { public UnearthAbility(ManaCosts costs) { super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), costs); this.timing = TimingRule.SORCERY; - this.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield)); + this.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom)); this.addEffect(new CreateDelayedTriggeredAbilityEffect(new UnearthDelayedTriggeredAbility())); this.addEffect(new UnearthLeavesBattlefieldEffect()); }