diff --git a/Mage.Sets/src/mage/sets/theros/WhipOfErebos.java b/Mage.Sets/src/mage/sets/theros/WhipOfErebos.java index b486e41c8b..6d12de664b 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<WhipOfErebosRe @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Card card = game.getCard(source.getFirstTarget()); - if (card != null) { - card.moveToExile(null, "", source.getId(), game); + Player controller = game.getPlayer(source.getControllerId()); + if (card != null && controller != null) { + controller.moveCardToExileWithInfo(card, null, null, source.getSourceId(), game, null); } return true; } diff --git a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java b/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java index 582c66f273..c324a4b04c 100644 --- a/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java +++ b/Mage/src/mage/abilities/effects/common/ExileSourceEffect.java @@ -34,6 +34,7 @@ import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.game.Game; import mage.game.permanent.Permanent; +import mage.players.Player; /** * @@ -58,13 +59,14 @@ public class ExileSourceEffect extends OneShotEffect<ExileSourceEffect> { @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 1c87523344..65b8806e0a 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<GainAbilitySou permanent.addAbility(ability, source.getSourceId(), game); return true; } + if (duration.equals(Duration.Custom)) { + this.discard(); + } } return false; } diff --git a/Mage/src/mage/abilities/keyword/UnearthAbility.java b/Mage/src/mage/abilities/keyword/UnearthAbility.java index 59a84127fa..b2470ca2c2 100644 --- a/Mage/src/mage/abilities/keyword/UnearthAbility.java +++ b/Mage/src/mage/abilities/keyword/UnearthAbility.java @@ -65,7 +65,7 @@ public class UnearthAbility extends ActivatedAbilityImpl<UnearthAbility> { 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()); }