From 41e34cabe5daaf656e8413016b0617b747a1ac79 Mon Sep 17 00:00:00 2001 From: North Date: Fri, 21 Dec 2012 22:34:26 +0200 Subject: [PATCH] added missing access modifier --- .../sets/betrayersofkamigawa/WaxmaneBaku.java | 67 +++++++++---------- .../mage/sets/darkascension/Wakedancer.java | 2 +- .../mage/sets/exodus/RecurringNightmare.java | 4 +- .../src/mage/sets/lorwyn/Surgespanner.java | 3 - .../mage/sets/mirage/SpiritOfTheNight.java | 3 +- .../sets/morningtide/PreeminentCaptain.java | 7 +- .../sets/returntoravnica/ArmoryGuard.java | 4 +- .../sets/riseoftheeldrazi/InduceDespair.java | 4 +- .../riseoftheeldrazi/PerishTheThought.java | 2 +- .../sets/riseoftheeldrazi/RealitySpasm.java | 4 +- .../riseoftheeldrazi/VeneratedTeacher.java | 4 +- .../mage/sets/worldwake/JoragaWarcaller.java | 2 +- .../sets/worldwake/QuestForTheGoblinLord.java | 5 +- .../sets/worldwake/QuestForUlasTemple.java | 4 +- .../sets/worldwake/RumblingAftershocks.java | 4 +- .../sets/worldwake/ShorelineSalvager.java | 3 +- .../src/mage/sets/worldwake/TectonicEdge.java | 2 +- .../mage/sets/zendikar/BraveTheElements.java | 2 +- .../src/mage/sets/zendikar/KabiraEvangel.java | 2 +- .../src/mage/sets/zendikar/NissasChosen.java | 7 +- .../src/mage/sets/zendikar/ShoalSerpent.java | 5 +- 21 files changed, 62 insertions(+), 78 deletions(-) diff --git a/Mage.Sets/src/mage/sets/betrayersofkamigawa/WaxmaneBaku.java b/Mage.Sets/src/mage/sets/betrayersofkamigawa/WaxmaneBaku.java index 787cb2d9a3..db0183ea96 100644 --- a/Mage.Sets/src/mage/sets/betrayersofkamigawa/WaxmaneBaku.java +++ b/Mage.Sets/src/mage/sets/betrayersofkamigawa/WaxmaneBaku.java @@ -84,48 +84,47 @@ public class WaxmaneBaku extends CardImpl { public WaxmaneBaku copy() { return new WaxmaneBaku(this); } +} - private class WaxmaneBakuTapEffect extends OneShotEffect { +class WaxmaneBakuTapEffect extends OneShotEffect { - FilterPermanent filter = new FilterCreaturePermanent(); + private static final FilterPermanent filter = new FilterCreaturePermanent(); - public WaxmaneBakuTapEffect() { - super(Constants.Outcome.Tap); - staticText = "Tap X target creatures"; - } + public WaxmaneBakuTapEffect() { + super(Constants.Outcome.Tap); + staticText = "Tap X target creatures"; + } - public WaxmaneBakuTapEffect(final WaxmaneBakuTapEffect effect) { - super(effect); - } + public WaxmaneBakuTapEffect(final WaxmaneBakuTapEffect effect) { + super(effect); + } - @Override - public boolean apply(Game game, Ability source) { - int numberToTap = 0; - for (Cost cost : source.getCosts()) { - if (cost instanceof RemoveVariableCountersSourceCost) { - numberToTap = ((RemoveVariableCountersSourceCost)cost).getAmount(); - } + @Override + public boolean apply(Game game, Ability source) { + int numberToTap = 0; + for (Cost cost : source.getCosts()) { + if (cost instanceof RemoveVariableCountersSourceCost) { + numberToTap = ((RemoveVariableCountersSourceCost) cost).getAmount(); } - TargetPermanent target = new TargetPermanent(numberToTap, filter); - if (target.canChoose(source.getControllerId(), game) && target.choose(Constants.Outcome.Tap, source.getControllerId(), source.getId(), game)) { - if (!target.getTargets().isEmpty()) { - List targets = target.getTargets(); - for (UUID targetId : targets) { - Permanent permanent = game.getPermanent(targetId); - if (permanent != null) { - permanent.tap(game); - } + } + TargetPermanent target = new TargetPermanent(numberToTap, filter); + if (target.canChoose(source.getControllerId(), game) && target.choose(Constants.Outcome.Tap, source.getControllerId(), source.getId(), game)) { + if (!target.getTargets().isEmpty()) { + List targets = target.getTargets(); + for (UUID targetId : targets) { + Permanent permanent = game.getPermanent(targetId); + if (permanent != null) { + permanent.tap(game); } } - return true; } - return false; + return true; } - - @Override - public WaxmaneBakuTapEffect copy() { - return new WaxmaneBakuTapEffect(this); - } - + return false; } -} \ No newline at end of file + + @Override + public WaxmaneBakuTapEffect copy() { + return new WaxmaneBakuTapEffect(this); + } +} diff --git a/Mage.Sets/src/mage/sets/darkascension/Wakedancer.java b/Mage.Sets/src/mage/sets/darkascension/Wakedancer.java index ae100bc7f6..8d2c0c1b50 100644 --- a/Mage.Sets/src/mage/sets/darkascension/Wakedancer.java +++ b/Mage.Sets/src/mage/sets/darkascension/Wakedancer.java @@ -44,7 +44,7 @@ import mage.game.permanent.token.ZombieToken; * @author Loki */ public class Wakedancer extends CardImpl { - static String staticText = "Morbid - When {this} enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield."; + private static final String staticText = "Morbid - When {this} enters the battlefield, if a creature died this turn, put a 2/2 black Zombie creature token onto the battlefield."; public Wakedancer(UUID ownerId) { super(ownerId, 79, "Wakedancer", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{2}{B}"); diff --git a/Mage.Sets/src/mage/sets/exodus/RecurringNightmare.java b/Mage.Sets/src/mage/sets/exodus/RecurringNightmare.java index 920bc48a85..f1e687e296 100644 --- a/Mage.Sets/src/mage/sets/exodus/RecurringNightmare.java +++ b/Mage.Sets/src/mage/sets/exodus/RecurringNightmare.java @@ -48,8 +48,8 @@ import mage.target.common.TargetControlledPermanent; */ public class RecurringNightmare extends CardImpl { - FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard"); - FilterControlledPermanent filter2 = new FilterControlledPermanent("creature to sacrifice"); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card in your graveyard"); + private static final FilterControlledPermanent filter2 = new FilterControlledPermanent("creature to sacrifice"); public RecurringNightmare(UUID ownerId) { super(ownerId, 72, "Recurring Nightmare", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}"); diff --git a/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java b/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java index 57941ebafc..4df809e835 100644 --- a/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java +++ b/Mage.Sets/src/mage/sets/lorwyn/Surgespanner.java @@ -37,7 +37,6 @@ import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.DoIfCostPaid; import mage.abilities.effects.common.ReturnToHandTargetEffect; import mage.cards.CardImpl; -import mage.filter.FilterPermanent; import mage.target.TargetPermanent; /** @@ -46,8 +45,6 @@ import mage.target.TargetPermanent; */ public class Surgespanner extends CardImpl { - FilterPermanent filter = new FilterPermanent(); - public Surgespanner(UUID ownerId) { super(ownerId, 92, "Surgespanner", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{U}{U}"); this.expansionSetCode = "LRW"; diff --git a/Mage.Sets/src/mage/sets/mirage/SpiritOfTheNight.java b/Mage.Sets/src/mage/sets/mirage/SpiritOfTheNight.java index 8dbc35c3c8..42e53cef83 100644 --- a/Mage.Sets/src/mage/sets/mirage/SpiritOfTheNight.java +++ b/Mage.Sets/src/mage/sets/mirage/SpiritOfTheNight.java @@ -51,13 +51,12 @@ import java.util.UUID; */ public class SpiritOfTheNight extends CardImpl { + private static final String rule = "Spirit of the Night has first strike as long as it's attacking"; private static final FilterCard filter = new FilterCard("Black"); static { filter.add(new ColorPredicate(ObjectColor.BLACK)); } - - String rule = "Spirit of the Night has first strike as long as it's attacking"; public SpiritOfTheNight(UUID ownerId) { super(ownerId, 44, "Spirit of the Night", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{6}{B}{B}{B}"); diff --git a/Mage.Sets/src/mage/sets/morningtide/PreeminentCaptain.java b/Mage.Sets/src/mage/sets/morningtide/PreeminentCaptain.java index c832e751b6..5af2f805fa 100644 --- a/Mage.Sets/src/mage/sets/morningtide/PreeminentCaptain.java +++ b/Mage.Sets/src/mage/sets/morningtide/PreeminentCaptain.java @@ -53,8 +53,6 @@ import mage.target.common.TargetDefender; */ public class PreeminentCaptain extends CardImpl { - final PreeminentCaptainEffect effect = new PreeminentCaptainEffect(); - public PreeminentCaptain(UUID ownerId) { super(ownerId, 20, "Preeminent Captain", Rarity.RARE, new CardType[] { CardType.CREATURE }, "{2}{W}"); @@ -69,7 +67,7 @@ public class PreeminentCaptain extends CardImpl { this.addAbility(FirstStrikeAbility.getInstance()); // Whenever Preeminent Captain attacks, you may put a Soldier creature // card from your hand onto the battlefield tapped and attacking. - this.addAbility(new AttacksTriggeredAbility(effect, true)); + this.addAbility(new AttacksTriggeredAbility(new PreeminentCaptainEffect(), true)); } public PreeminentCaptain(final PreeminentCaptain card) { @@ -115,8 +113,7 @@ class PreeminentCaptainEffect extends OneShotEffect { TargetDefender def = new TargetDefender(game .getCombat().getDefenders(), player.getId()); if (def.choose(getOutcome(), player.getId(), source.getSourceId(), game)) { - // TODO -> If only one option, don't ask, as for - // normal attacking. + // TODO -> If only one option, don't ask, as for normal attacking. if (def.getTargets().size() > 0) { game.getCombat().declareAttacker( permanent.getId(), diff --git a/Mage.Sets/src/mage/sets/returntoravnica/ArmoryGuard.java b/Mage.Sets/src/mage/sets/returntoravnica/ArmoryGuard.java index 5defc2263b..833b087a9d 100644 --- a/Mage.Sets/src/mage/sets/returntoravnica/ArmoryGuard.java +++ b/Mage.Sets/src/mage/sets/returntoravnica/ArmoryGuard.java @@ -47,9 +47,9 @@ import mage.filter.predicate.mageobject.SubtypePredicate; */ public class ArmoryGuard extends CardImpl { - String rule = "Armory Guard has vigilance as long as you control a Gate"; + private static final String rule = "Armory Guard has vigilance as long as you control a Gate"; - final static private FilterPermanent filter = new FilterPermanent("Gate"); + private static final FilterPermanent filter = new FilterPermanent("Gate"); static { filter.add(new SubtypePredicate("Gate")); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java index 23e3f790e0..2fafe3ade6 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/InduceDespair.java @@ -49,7 +49,7 @@ import mage.target.common.TargetCreaturePermanent; */ public class InduceDespair extends CardImpl { - FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand."); + private static final FilterCreatureCard filter = new FilterCreatureCard("creature card from your hand."); public InduceDespair(UUID ownerId) { super(ownerId, 114, "Induce Despair", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{2}{B}"); @@ -103,4 +103,4 @@ class InduceDespairEffect extends OneShotEffect { return new InduceDespairEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/PerishTheThought.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/PerishTheThought.java index b1196de741..16afe1c9b4 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/PerishTheThought.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/PerishTheThought.java @@ -70,7 +70,7 @@ public class PerishTheThought extends CardImpl { class PerishTheThoughtEffect extends OneShotEffect { - FilterCard filter = new FilterCard("card in target opponent's hand"); + private static final FilterCard filter = new FilterCard("card in target opponent's hand"); public PerishTheThoughtEffect() { super(Constants.Outcome.Neutral); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealitySpasm.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealitySpasm.java index b7f22dff4a..4d4e6529e2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealitySpasm.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/RealitySpasm.java @@ -72,7 +72,7 @@ public class RealitySpasm extends CardImpl { class RealitySpasmTapEffect extends OneShotEffect { - FilterPermanent filter = new FilterPermanent("permanent"); + private static final FilterPermanent filter = new FilterPermanent("permanent"); public RealitySpasmTapEffect() { super(Outcome.Tap); @@ -112,7 +112,7 @@ class RealitySpasmTapEffect extends OneShotEffect { class RealitySpasmUntapEffect extends OneShotEffect { - FilterPermanent filter = new FilterPermanent("permanent"); + private static final FilterPermanent filter = new FilterPermanent("permanent"); public RealitySpasmUntapEffect() { super(Outcome.Untap); diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/VeneratedTeacher.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/VeneratedTeacher.java index 01f9898c79..8da0147333 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/VeneratedTeacher.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/VeneratedTeacher.java @@ -75,7 +75,7 @@ public class VeneratedTeacher extends CardImpl { class VeneratedTeacherEffect extends OneShotEffect { - FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control"); + private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creatures you control"); public VeneratedTeacherEffect() { super(Outcome.BoostCreature); @@ -106,4 +106,4 @@ class VeneratedTeacherEffect extends OneShotEffect { public VeneratedTeacherEffect copy() { return new VeneratedTeacherEffect(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java b/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java index 64a24835ef..de41dab8de 100644 --- a/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java +++ b/Mage.Sets/src/mage/sets/worldwake/JoragaWarcaller.java @@ -53,7 +53,7 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class JoragaWarcaller extends CardImpl { - String rule = "Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller"; + private static final String rule = "Other Elf creatures you control get +1/+1 for each +1/+1 counter on Joraga Warcaller"; private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Other elf creatures you control"); diff --git a/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java b/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java index e496d0f5c1..893ac1add0 100644 --- a/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java +++ b/Mage.Sets/src/mage/sets/worldwake/QuestForTheGoblinLord.java @@ -53,13 +53,12 @@ import mage.game.permanent.Permanent; */ public class QuestForTheGoblinLord extends CardImpl { - final static private FilterCreaturePermanent filter = new FilterCreaturePermanent(); + private static final String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0."; + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); static { filter.add(new ControllerPredicate(TargetController.YOU)); } - - String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0."; public QuestForTheGoblinLord(UUID ownerId) { super(ownerId, 86, "Quest for the Goblin Lord", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{R}"); diff --git a/Mage.Sets/src/mage/sets/worldwake/QuestForUlasTemple.java b/Mage.Sets/src/mage/sets/worldwake/QuestForUlasTemple.java index 783f2d4b73..fac3474518 100644 --- a/Mage.Sets/src/mage/sets/worldwake/QuestForUlasTemple.java +++ b/Mage.Sets/src/mage/sets/worldwake/QuestForUlasTemple.java @@ -152,7 +152,8 @@ class QuestForUlasTempleTriggeredAbility extends TriggeredAbilityImpl { - final static private FilterCreatureCard filter = new FilterCreatureCard("Kraken, Leviathan, Octopus, or Serpent creature card from your hand"); + private static final String query = "Do you want to put a Kraken, Leviathan, Octopus, or Serpent creature card from your hand onto the battlefield?"; + private static final FilterCreatureCard filter = new FilterCreatureCard("Kraken, Leviathan, Octopus, or Serpent creature card from your hand"); static { filter.add(Predicates.or( @@ -161,7 +162,6 @@ class QuestForUlasTempleEffect2 extends OneShotEffect new SubtypePredicate("Octopus"), new SubtypePredicate("Serpent"))); } - String query = "Do you want to put a Kraken, Leviathan, Octopus, or Serpent creature card from your hand onto the battlefield?"; QuestForUlasTempleEffect2() { super(Constants.Outcome.PutCreatureInPlay); diff --git a/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java b/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java index 74f9ef0755..0c0ed37e68 100644 --- a/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java +++ b/Mage.Sets/src/mage/sets/worldwake/RumblingAftershocks.java @@ -54,14 +54,12 @@ import mage.target.common.TargetCreatureOrPlayer; */ public class RumblingAftershocks extends CardImpl { - final static private FilterCreaturePermanent filter = new FilterCreaturePermanent(); + private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(); static { filter.add(new ControllerPredicate(TargetController.YOU)); } - String rule = "As long as Quest for the Goblin Lord has five or more quest counters on it, creatures you control get +2/+0."; - public RumblingAftershocks(UUID ownerId) { super(ownerId, 89, "Rumbling Aftershocks", Rarity.UNCOMMON, new CardType[]{CardType.ENCHANTMENT}, "{4}{R}"); this.expansionSetCode = "WWK"; diff --git a/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java b/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java index 7ed40158ce..5ccf761eea 100644 --- a/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java +++ b/Mage.Sets/src/mage/sets/worldwake/ShorelineSalvager.java @@ -47,14 +47,13 @@ import mage.filter.predicate.permanent.ControllerPredicate; */ public class ShorelineSalvager extends CardImpl { + private static final String rule = "Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card."; private static final FilterPermanent filter = new FilterPermanent("Island"); static { filter.add(new ControllerPredicate(TargetController.YOU)); filter.add(new SubtypePredicate("Island")); } - - String rule = "Whenever Shoreline Salvager deals combat damage to a player, if you control an Island, you may draw a card."; public ShorelineSalvager(UUID ownerId) { super(ownerId, 67, "Shoreline Salvager", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{3}{B}"); diff --git a/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java b/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java index 3d32287c47..c968857764 100644 --- a/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java +++ b/Mage.Sets/src/mage/sets/worldwake/TectonicEdge.java @@ -81,7 +81,7 @@ public class TectonicEdge extends CardImpl { class TectonicEdgeCost extends CostImpl { - FilterLandPermanent filter = new FilterLandPermanent(); + private static final FilterLandPermanent filter = new FilterLandPermanent(); public TectonicEdgeCost() { this.text = "Activate this ability only if an opponent controls four or more lands"; diff --git a/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java b/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java index 18d6598ff9..69940b0d5d 100644 --- a/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java +++ b/Mage.Sets/src/mage/sets/zendikar/BraveTheElements.java @@ -77,7 +77,7 @@ class BraveTheElementsEffect extends GainAbilityControlledEffect { filter1.add(new ColorPredicate(ObjectColor.WHITE)); } - FilterCard filter2; + private FilterCard filter2; public BraveTheElementsEffect() { super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1); diff --git a/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java b/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java index b558d847b3..15c17dab91 100644 --- a/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java +++ b/Mage.Sets/src/mage/sets/zendikar/KabiraEvangel.java @@ -130,7 +130,7 @@ class GainProtectionFromChosenColorEffect extends GainAbilityControlledEffect { filter1.add(new ControllerPredicate(TargetController.YOU)); filter1.add(new SubtypePredicate("Ally")); } - FilterCard filter2; + private FilterCard filter2; public GainProtectionFromChosenColorEffect() { super(new ProtectionAbility(new FilterCard()), Duration.EndOfTurn, filter1); diff --git a/Mage.Sets/src/mage/sets/zendikar/NissasChosen.java b/Mage.Sets/src/mage/sets/zendikar/NissasChosen.java index 2e0eb1e502..fb26389227 100644 --- a/Mage.Sets/src/mage/sets/zendikar/NissasChosen.java +++ b/Mage.Sets/src/mage/sets/zendikar/NissasChosen.java @@ -75,8 +75,6 @@ public class NissasChosen extends CardImpl { class NissasChosenEffect extends ReplacementEffectImpl { - boolean onTop = false; - public NissasChosenEffect() { super(Duration.WhileOnBattlefield, Outcome.Benefit); staticText = "If {this} would be put into a graveyard from the battlefield, put it on the bottom of its owner's library instead"; @@ -84,7 +82,6 @@ class NissasChosenEffect extends ReplacementEffectImpl { public NissasChosenEffect(final NissasChosenEffect effect) { super(effect); - this.onTop = effect.onTop; } @Override @@ -101,7 +98,7 @@ class NissasChosenEffect extends ReplacementEffectImpl { public boolean replaceEvent(GameEvent event, Ability source, Game game) { Card card = game.getCard(event.getTargetId()); if ( card != null && event.getTargetId().equals(source.getSourceId()) ) { - return card.moveToZone(Zone.LIBRARY, source.getId(), game, onTop); + return card.moveToZone(Zone.LIBRARY, source.getId(), game, false); } return false; } @@ -118,4 +115,4 @@ class NissasChosenEffect extends ReplacementEffectImpl { return false; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/sets/zendikar/ShoalSerpent.java b/Mage.Sets/src/mage/sets/zendikar/ShoalSerpent.java index e11c212004..6bb12aff1d 100644 --- a/Mage.Sets/src/mage/sets/zendikar/ShoalSerpent.java +++ b/Mage.Sets/src/mage/sets/zendikar/ShoalSerpent.java @@ -51,8 +51,6 @@ import mage.game.permanent.Permanent; */ public class ShoalSerpent extends CardImpl { - static String rule = "Landfall - Whenever a land enters the battlefield under your control, Shoal Serpent loses defender until end of turn"; - public ShoalSerpent(UUID ownerId) { super(ownerId, 65, "Shoal Serpent", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{5}{U}"); this.expansionSetCode = "ZEN"; @@ -105,8 +103,9 @@ class ShoalSerpentEffect extends ContinuousEffectImpl { if (sublayer == SubLayer.NA) { for (Iterator i = permanent.getAbilities().iterator(); i.hasNext();) { Ability entry = i.next(); - if (entry.getId().equals(DefenderAbility.getInstance().getId())) + if (entry.getId().equals(DefenderAbility.getInstance().getId())) { i.remove(); + } } } break;