From fcff65ca3446511dd4a8e325d75acff881c494c5 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Wed, 19 Jun 2013 16:15:58 +0200 Subject: [PATCH] Fixed some unlean code. Added CardUtil method to get card and ZoneChangeCounter specific exileId. --- .../src/mage/sets/innistrad/NightTerrors.java | 9 ++++---- .../sets/returntoravnica/AngelOfSerenity.java | 20 ++++++++-------- Mage/src/mage/util/CardUtil.java | 23 +++++++++++++++++++ 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/Mage.Sets/src/mage/sets/innistrad/NightTerrors.java b/Mage.Sets/src/mage/sets/innistrad/NightTerrors.java index b5f9d43e23..159725c6e2 100644 --- a/Mage.Sets/src/mage/sets/innistrad/NightTerrors.java +++ b/Mage.Sets/src/mage/sets/innistrad/NightTerrors.java @@ -28,14 +28,13 @@ package mage.sets.innistrad; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; import mage.abilities.Ability; import mage.abilities.effects.OneShotEffect; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; import mage.constants.Zone; import mage.filter.common.FilterNonlandCard; import mage.game.Game; @@ -98,7 +97,7 @@ class NightTerrorsEffect extends OneShotEffect { if (player.choose(Outcome.Exile, targetPlayer.getHand(), target, game)) { Card card = targetPlayer.getHand().get(target.getFirstTarget(), game); if (card != null) { - card.moveToExile(null, "", source.getId(), game); + card.moveToExile(null, "", source.getSourceId(), game); } } diff --git a/Mage.Sets/src/mage/sets/returntoravnica/AngelOfSerenity.java b/Mage.Sets/src/mage/sets/returntoravnica/AngelOfSerenity.java index 0d65d73f69..d1e7d5ad01 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/AngelOfSerenity.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/AngelOfSerenity.java @@ -28,11 +28,6 @@ package mage.sets.returntoravnica; import java.util.UUID; - -import mage.constants.CardType; -import mage.constants.Outcome; -import mage.constants.Rarity; -import mage.constants.Zone; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.LeavesBattlefieldTriggeredAbility; @@ -41,6 +36,10 @@ import mage.abilities.effects.OneShotEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.Card; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.filter.FilterCard; import mage.filter.common.FilterCreatureCard; import mage.filter.common.FilterCreaturePermanent; @@ -52,6 +51,7 @@ import mage.game.permanent.Permanent; import mage.target.Target; import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCreaturePermanent; +import mage.util.CardUtil; /** * @@ -156,7 +156,7 @@ class AngelOfSerenityEnterEffect extends OneShotEffect