diff --git a/Mage.Sets/src/mage/sets/scarsofmirrodin/PrototypePortal.java b/Mage.Sets/src/mage/sets/scarsofmirrodin/PrototypePortal.java index 318e6b8fbf..d652a09a25 100644 --- a/Mage.Sets/src/mage/sets/scarsofmirrodin/PrototypePortal.java +++ b/Mage.Sets/src/mage/sets/scarsofmirrodin/PrototypePortal.java @@ -27,9 +27,11 @@ */ package mage.sets.scarsofmirrodin; -import mage.Constants; +import java.util.UUID; import mage.Constants.CardType; +import mage.Constants.Outcome; import mage.Constants.Rarity; +import mage.Constants.Zone; import mage.abilities.Ability; import mage.abilities.common.EntersBattlefieldTriggeredAbility; import mage.abilities.common.SimpleActivatedAbility; @@ -50,7 +52,6 @@ import mage.sets.tokens.EmptyToken; import mage.target.TargetCard; import mage.util.CardUtil; -import java.util.UUID; /** * @author nantuko @@ -65,7 +66,7 @@ public class PrototypePortal extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility(new PrototypePortalEffect(), true)); // {X}, {tap}: Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card. - Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new PrototypePortalCreateTokenEffect(), new ManaCostsImpl("{X}")); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PrototypePortalCreateTokenEffect(), new ManaCostsImpl("{X}")); ability.addCost(new TapSourceCost()); this.addAbility(ability); } @@ -102,10 +103,10 @@ public class PrototypePortal extends CardImpl { class PrototypePortalEffect extends OneShotEffect { - private static FilterCard filter = new FilterArtifactCard(); + private static final FilterCard filter = new FilterArtifactCard(); public PrototypePortalEffect() { - super(Constants.Outcome.Benefit); + super(Outcome.Benefit); staticText = "exile an artifact card from your hand"; } @@ -117,9 +118,9 @@ class PrototypePortalEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player.getHand().size() > 0) { - TargetCard target = new TargetCard(Constants.Zone.HAND, filter); + TargetCard target = new TargetCard(Zone.HAND, filter); target.setRequired(true); - player.choose(Constants.Outcome.Benefit, player.getHand(), target, game); + player.choose(Outcome.Benefit, player.getHand(), target, game); Card card = player.getHand().get(target.getFirstTarget(), game); if (card != null) { card.moveToExile(getId(), "Prototype Portal (Imprint)", source.getSourceId(), game); @@ -143,7 +144,7 @@ class PrototypePortalEffect extends OneShotEffect { class PrototypePortalCreateTokenEffect extends OneShotEffect { public PrototypePortalCreateTokenEffect() { - super(Constants.Outcome.PutCreatureInPlay); + super(Outcome.PutCreatureInPlay); this.staticText = "Put a token that's a copy of the exiled card onto the battlefield. X is the converted mana cost of that card"; } @@ -159,7 +160,9 @@ class PrototypePortalCreateTokenEffect extends OneShotEffect 0) { Card card = game.getCard(permanent.getImprinted().get(0)); diff --git a/Mage/src/mage/cards/CardImpl.java b/Mage/src/mage/cards/CardImpl.java index 6dad6a9dfa..a9a260a32d 100644 --- a/Mage/src/mage/cards/CardImpl.java +++ b/Mage/src/mage/cards/CardImpl.java @@ -403,7 +403,7 @@ public abstract class CardImpl> extends MageObjectImpl game.getPlayer(ownerId).removeFromLibrary(this, game); break; default: - //logger.warning("moveToExile, not fully implemented: from="+fromZone); + logger.warn("moveToExile, not fully implemented: from="+fromZone); } game.rememberLKI(objectId, event.getFromZone(), this); } diff --git a/Mage/src/mage/game/Exile.java b/Mage/src/mage/game/Exile.java index 0ff60a73ba..821afc8d9a 100644 --- a/Mage/src/mage/game/Exile.java +++ b/Mage/src/mage/game/Exile.java @@ -28,12 +28,17 @@ package mage.game; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.UUID; import mage.cards.Card; import mage.util.Copyable; -import java.io.Serializable; -import java.util.*; -import java.util.Map.Entry; /** * @@ -75,7 +80,7 @@ public class Exile implements Serializable, Copyable { return createZone(id, name + " - Exile", false); } - public ExileZone createZone(UUID id, String name, boolean hidden) { + private ExileZone createZone(UUID id, String name, boolean hidden) { if (!exileZones.containsKey(id)) { ExileZone exile = new ExileZone(id, name, hidden); exileZones.put(id, exile); @@ -89,8 +94,9 @@ public class Exile implements Serializable, Copyable { public Card getCard(UUID cardId, Game game) { for (ExileZone exile: exileZones.values()) { - if (exile.contains(cardId)) + if (exile.contains(cardId)) { return game.getCard(cardId); + } } return null; } @@ -105,8 +111,9 @@ public class Exile implements Serializable, Copyable { public void removeCard(Card card, Game game) { for (ExileZone exile: exileZones.values()) { - if (exile.contains(card.getId())) + if (exile.contains(card.getId())) { exile.remove(card); + } } }