From a4616bc7ee95d6717acc2b0d4c93c7eb0a38de15 Mon Sep 17 00:00:00 2001 From: xenohedron Date: Sat, 13 May 2023 23:03:11 -0400 Subject: [PATCH] Cleanup SearchLibraryPutOnLibraryEffect --- Mage.Sets/src/mage/cards/a/AinokGuide.java | 2 +- Mage.Sets/src/mage/cards/b/BoggartHarbinger.java | 2 +- Mage.Sets/src/mage/cards/b/BrutalizerExarch.java | 2 +- Mage.Sets/src/mage/cards/c/CampusGuide.java | 2 +- Mage.Sets/src/mage/cards/c/ConduitOfRuin.java | 2 +- Mage.Sets/src/mage/cards/c/CruelTutor.java | 2 +- Mage.Sets/src/mage/cards/d/DuneMover.java | 2 +- Mage.Sets/src/mage/cards/e/ElvishHarbinger.java | 2 +- Mage.Sets/src/mage/cards/e/EnlightenedTutor.java | 2 +- Mage.Sets/src/mage/cards/f/FaerieHarbinger.java | 2 +- .../src/mage/cards/f/FlamekinHarbinger.java | 2 +- .../mage/cards/f/ForerunnerOfTheCoalition.java | 2 +- .../src/mage/cards/f/ForerunnerOfTheEmpire.java | 1 - .../src/mage/cards/f/ForerunnerOfTheHeralds.java | 3 +-- .../src/mage/cards/f/ForerunnerOfTheLegion.java | 3 +-- Mage.Sets/src/mage/cards/g/GiantHarbinger.java | 2 +- Mage.Sets/src/mage/cards/g/GiantLadybug.java | 2 +- Mage.Sets/src/mage/cards/k/KithkinHarbinger.java | 2 +- Mage.Sets/src/mage/cards/l/LoamLarva.java | 2 +- Mage.Sets/src/mage/cards/m/MerrowHarbinger.java | 2 +- .../src/mage/cards/m/MomirVigSimicVisionary.java | 2 +- .../src/mage/cards/m/MoonBlessedCleric.java | 2 +- .../src/mage/cards/m/MwonvuliBeastTracker.java | 3 +-- Mage.Sets/src/mage/cards/m/MysticalTutor.java | 2 +- Mage.Sets/src/mage/cards/p/PersonalTutor.java | 2 +- Mage.Sets/src/mage/cards/s/SterlingGrove.java | 2 +- Mage.Sets/src/mage/cards/s/SylvanTutor.java | 2 +- .../src/mage/cards/t/TreefolkHarbinger.java | 2 +- Mage.Sets/src/mage/cards/v/VampiricTutor.java | 2 +- Mage.Sets/src/mage/cards/w/WorldlyTutor.java | 2 +- .../search/SearchLibraryPutOnLibraryEffect.java | 16 ++++------------ 31 files changed, 33 insertions(+), 45 deletions(-) diff --git a/Mage.Sets/src/mage/cards/a/AinokGuide.java b/Mage.Sets/src/mage/cards/a/AinokGuide.java index 3ce99a028dc..955c526bd1f 100644 --- a/Mage.Sets/src/mage/cards/a/AinokGuide.java +++ b/Mage.Sets/src/mage/cards/a/AinokGuide.java @@ -35,7 +35,7 @@ public final class AinokGuide extends CardImpl { Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance())); // * Search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. - Mode mode = new Mode(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true)); + Mode mode = new Mode(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true)); ability.addMode(mode); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/b/BoggartHarbinger.java b/Mage.Sets/src/mage/cards/b/BoggartHarbinger.java index 2e86ea73f3b..bd8a6b32be1 100644 --- a/Mage.Sets/src/mage/cards/b/BoggartHarbinger.java +++ b/Mage.Sets/src/mage/cards/b/BoggartHarbinger.java @@ -34,7 +34,7 @@ public final class BoggartHarbinger extends CardImpl { // When Boggart Harbinger enters the battlefield, you may search your library for a Goblin card, reveal it, // then shuffle your library and put that card on top of it. TargetCardInLibrary target = new TargetCardInLibrary(filter); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true),true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true),true)); } private BoggartHarbinger(final BoggartHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/b/BrutalizerExarch.java b/Mage.Sets/src/mage/cards/b/BrutalizerExarch.java index 83068067577..0aa85410a81 100644 --- a/Mage.Sets/src/mage/cards/b/BrutalizerExarch.java +++ b/Mage.Sets/src/mage/cards/b/BrutalizerExarch.java @@ -45,7 +45,7 @@ public final class BrutalizerExarch extends CardImpl { // When Brutalizer Exarch enters the battlefield, choose one // - Search your library for a creature card, reveal it, then shuffle your library and put that card on top of it; TargetCardInLibrary target = new TargetCardInLibrary(new FilterCreatureCard("a creature card")); - Ability ability = new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), false); + Ability ability = new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true), false); // or put target noncreature permanent on the bottom of its owner's library. Mode mode = new Mode(new BrutalizerExarchEffect2()); mode.addTarget(new TargetPermanent(filter)); diff --git a/Mage.Sets/src/mage/cards/c/CampusGuide.java b/Mage.Sets/src/mage/cards/c/CampusGuide.java index 7c22b7956db..361c467440c 100644 --- a/Mage.Sets/src/mage/cards/c/CampusGuide.java +++ b/Mage.Sets/src/mage/cards/c/CampusGuide.java @@ -26,7 +26,7 @@ public final class CampusGuide extends CardImpl { // When Campus Guide enters the battlefield, you may search your library for a basic land card, reveal it, then shuffle and put that card on top. this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect( - new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true + new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true ), true)); } diff --git a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java index f9e79a610da..34d54983a0a 100644 --- a/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java +++ b/Mage.Sets/src/mage/cards/c/ConduitOfRuin.java @@ -52,7 +52,7 @@ public final class ConduitOfRuin extends CardImpl { // When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, then shuffle your library and put that card on top of it. TargetCardInLibrary target = new TargetCardInLibrary(filter); - this.addAbility(new CastSourceTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), true)); + this.addAbility(new CastSourceTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true), true)); // The first creature spell you cast each turn costs {2} less to cast. Effect effect = new SpellsCostReductionControllerEffect(filterCost, 2); diff --git a/Mage.Sets/src/mage/cards/c/CruelTutor.java b/Mage.Sets/src/mage/cards/c/CruelTutor.java index ec1e9267376..3dd76b68fac 100644 --- a/Mage.Sets/src/mage/cards/c/CruelTutor.java +++ b/Mage.Sets/src/mage/cards/c/CruelTutor.java @@ -21,7 +21,7 @@ public final class CruelTutor extends CardImpl { // Search your library for a card, then shuffle your library and put that card on top of it. You lose 2 life. TargetCardInLibrary target = new TargetCardInLibrary(); - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(target, false, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(target, false)); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/d/DuneMover.java b/Mage.Sets/src/mage/cards/d/DuneMover.java index 9a5519ea30b..0f90e5a986c 100644 --- a/Mage.Sets/src/mage/cards/d/DuneMover.java +++ b/Mage.Sets/src/mage/cards/d/DuneMover.java @@ -31,7 +31,7 @@ public final class DuneMover extends CardImpl { // When Dune Mover enters the battlefield, you may search your library for a basic land card, reveal it, then shuffle and put that card on top. this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect( - new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A), true, true + new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A), true ), true)); } diff --git a/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java b/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java index 8c19bde88f1..d598b728550 100644 --- a/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java +++ b/Mage.Sets/src/mage/cards/e/ElvishHarbinger.java @@ -33,7 +33,7 @@ public final class ElvishHarbinger extends CardImpl { this.toughness = new MageInt(2); // When Elvish Harbinger enters the battlefield, you may search your library for an Elf card, reveal it, then shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true), true)); // {tap}: Add one mana of any color. this.addAbility(new AnyColorManaAbility(new TapSourceCost())); } diff --git a/Mage.Sets/src/mage/cards/e/EnlightenedTutor.java b/Mage.Sets/src/mage/cards/e/EnlightenedTutor.java index 45db5d19a1a..7ce40641594 100644 --- a/Mage.Sets/src/mage/cards/e/EnlightenedTutor.java +++ b/Mage.Sets/src/mage/cards/e/EnlightenedTutor.java @@ -28,7 +28,7 @@ public final class EnlightenedTutor extends CardImpl { // Search your library for an artifact or enchantment card and reveal that card. Shuffle your library, then put the card on top of it. - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true)); } private EnlightenedTutor(final EnlightenedTutor card) { diff --git a/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java b/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java index e74aa2bcbb6..c38e62ce632 100644 --- a/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java +++ b/Mage.Sets/src/mage/cards/f/FaerieHarbinger.java @@ -37,7 +37,7 @@ public final class FaerieHarbinger extends CardImpl { // Flying this.addAbility(FlyingAbility.getInstance()); // When Faerie Harbinger enters the battlefield, you may search your library for a Faerie card, reveal it, then shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true), true)); } private FaerieHarbinger(final FaerieHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java b/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java index 3f00df3c385..672dff97acb 100644 --- a/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java +++ b/Mage.Sets/src/mage/cards/f/FlamekinHarbinger.java @@ -35,7 +35,7 @@ public final class FlamekinHarbinger extends CardImpl { // When Flamekin Harbinger enters the battlefield, you may search your library for an Elemental card, // reveal it, then shuffle your library and put that card on top of it. TargetCardInLibrary target = new TargetCardInLibrary(filter); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true), true)); } private FlamekinHarbinger(final FlamekinHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheCoalition.java b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheCoalition.java index 2b3c91a3b31..af65e6fa6dd 100644 --- a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheCoalition.java +++ b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheCoalition.java @@ -41,7 +41,7 @@ public final class ForerunnerOfTheCoalition extends CardImpl { this.addAbility(new EntersBattlefieldTriggeredAbility( new SearchLibraryPutOnLibraryEffect( new TargetCardInLibrary(new FilterBySubtypeCard(SubType.PIRATE)), - true, true), true)); + true), true)); // Whenever another Pirate enters the battlefield under your control, each opponent loses 1 life. Ability ability = new EntersBattlefieldControlledTriggeredAbility( diff --git a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java index 52268e92390..e0208bf194e 100644 --- a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java +++ b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheEmpire.java @@ -43,7 +43,6 @@ public final class ForerunnerOfTheEmpire extends CardImpl { new EntersBattlefieldTriggeredAbility( new SearchLibraryPutOnLibraryEffect( new TargetCardInLibrary(new FilterBySubtypeCard(SubType.DINOSAUR)), - true, true ), true diff --git a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheHeralds.java b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheHeralds.java index 02419f0cd14..9936c36282e 100644 --- a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheHeralds.java +++ b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheHeralds.java @@ -45,7 +45,6 @@ public final class ForerunnerOfTheHeralds extends CardImpl { new EntersBattlefieldTriggeredAbility( new SearchLibraryPutOnLibraryEffect( new TargetCardInLibrary(new FilterBySubtypeCard(SubType.MERFOLK)), - true, true ), true @@ -65,4 +64,4 @@ public final class ForerunnerOfTheHeralds extends CardImpl { public ForerunnerOfTheHeralds copy() { return new ForerunnerOfTheHeralds(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheLegion.java b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheLegion.java index 97a71e9dfe9..abc526eab16 100644 --- a/Mage.Sets/src/mage/cards/f/ForerunnerOfTheLegion.java +++ b/Mage.Sets/src/mage/cards/f/ForerunnerOfTheLegion.java @@ -42,7 +42,6 @@ public final class ForerunnerOfTheLegion extends CardImpl { new EntersBattlefieldTriggeredAbility( new SearchLibraryPutOnLibraryEffect( new TargetCardInLibrary(new FilterBySubtypeCard(SubType.VAMPIRE)), - true, true ), true @@ -63,4 +62,4 @@ public final class ForerunnerOfTheLegion extends CardImpl { public ForerunnerOfTheLegion copy() { return new ForerunnerOfTheLegion(this); } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/g/GiantHarbinger.java b/Mage.Sets/src/mage/cards/g/GiantHarbinger.java index 31435f9e705..c9f1e2d9f96 100644 --- a/Mage.Sets/src/mage/cards/g/GiantHarbinger.java +++ b/Mage.Sets/src/mage/cards/g/GiantHarbinger.java @@ -31,7 +31,7 @@ public final class GiantHarbinger extends CardImpl { this.toughness = new MageInt(4); // When Giant Harbinger enters the battlefield, you may search your library for a Giant card, reveal it, then shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true), true)); } private GiantHarbinger(final GiantHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/g/GiantLadybug.java b/Mage.Sets/src/mage/cards/g/GiantLadybug.java index 3e57c568e9f..dbae1df0dae 100644 --- a/Mage.Sets/src/mage/cards/g/GiantLadybug.java +++ b/Mage.Sets/src/mage/cards/g/GiantLadybug.java @@ -30,7 +30,7 @@ public final class GiantLadybug extends CardImpl { // When Giant Ladybug enters the battlefield, you may search your library for a basic land card, reveal it, then shuffle and put that card on top. this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect( - new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A), true, true + new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND_A), true ), true)); } diff --git a/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java b/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java index 6e90092d3d9..2d3af792afd 100644 --- a/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java +++ b/Mage.Sets/src/mage/cards/k/KithkinHarbinger.java @@ -32,7 +32,7 @@ public final class KithkinHarbinger extends CardImpl { this.toughness = new MageInt(3); // When Kithkin Harbinger enters the battlefield, you may search your library for a Kithkin card, reveal it, then shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true), true)); } private KithkinHarbinger(final KithkinHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/l/LoamLarva.java b/Mage.Sets/src/mage/cards/l/LoamLarva.java index 4e31a495ad4..61047021fc2 100644 --- a/Mage.Sets/src/mage/cards/l/LoamLarva.java +++ b/Mage.Sets/src/mage/cards/l/LoamLarva.java @@ -27,7 +27,7 @@ public final class LoamLarva extends CardImpl { // When Loam Larva enters the battlefield, you may search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. TargetCardInLibrary target = new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND); - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(target, true), true)); } private LoamLarva(final LoamLarva card) { diff --git a/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java b/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java index daed3833fbc..ab7ca241328 100644 --- a/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java +++ b/Mage.Sets/src/mage/cards/m/MerrowHarbinger.java @@ -36,7 +36,7 @@ public final class MerrowHarbinger extends CardImpl { // Islandwalk this.addAbility(new IslandwalkAbility()); // When Merrow Harbinger enters the battlefield, you may search your library for a Merfolk card, reveal it, then shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true), true)); } private MerrowHarbinger(final MerrowHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java b/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java index 5415d63496b..be979c9bbaf 100644 --- a/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java +++ b/Mage.Sets/src/mage/cards/m/MomirVigSimicVisionary.java @@ -50,7 +50,7 @@ public final class MomirVigSimicVisionary extends CardImpl { this.toughness = new MageInt(2); // Whenever you cast a green creature spell, you may search your library for a creature card and reveal it. If you do, shuffle your library and put that card on top of it. - Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true); + Effect effect = new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true); effect.setText("search your library for a creature card, reveal it, then shuffle and put that card on top"); this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, true)); diff --git a/Mage.Sets/src/mage/cards/m/MoonBlessedCleric.java b/Mage.Sets/src/mage/cards/m/MoonBlessedCleric.java index 9528d7e94ef..e21991689a9 100644 --- a/Mage.Sets/src/mage/cards/m/MoonBlessedCleric.java +++ b/Mage.Sets/src/mage/cards/m/MoonBlessedCleric.java @@ -32,7 +32,7 @@ public final class MoonBlessedCleric extends CardImpl { // Divine Intervention — When Moon-Blessed Cleric enters the battlefield, you may search your library for an enchantment card, reveal it, then shuffle and put that card on top. this.addAbility(new EntersBattlefieldTriggeredAbility( new SearchLibraryPutOnLibraryEffect( - new TargetCardInLibrary(filter), true, true + new TargetCardInLibrary(filter), true ), true ).withFlavorWord("Divine Intervention")); } diff --git a/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java b/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java index 1d799a1e8bf..17ed7d60fd6 100644 --- a/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java +++ b/Mage.Sets/src/mage/cards/m/MwonvuliBeastTracker.java @@ -44,7 +44,7 @@ public final class MwonvuliBeastTracker extends CardImpl { this.toughness = new MageInt(1); // When Mwonvuli Beast Tracker enters the battlefield, search your library for a creature card with deathtouch, hexproof, reach, or trample and reveal it. Shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true))); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true))); } private MwonvuliBeastTracker(final MwonvuliBeastTracker card) { @@ -56,4 +56,3 @@ public final class MwonvuliBeastTracker extends CardImpl { return new MwonvuliBeastTracker(this); } } - diff --git a/Mage.Sets/src/mage/cards/m/MysticalTutor.java b/Mage.Sets/src/mage/cards/m/MysticalTutor.java index 616d271bc40..83019b8a1f6 100644 --- a/Mage.Sets/src/mage/cards/m/MysticalTutor.java +++ b/Mage.Sets/src/mage/cards/m/MysticalTutor.java @@ -28,7 +28,7 @@ public final class MysticalTutor extends CardImpl { // Search your library for an instant or sorcery card and reveal that card. Shuffle your library, then put the card on top of it. - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true)); } private MysticalTutor(final MysticalTutor card) { diff --git a/Mage.Sets/src/mage/cards/p/PersonalTutor.java b/Mage.Sets/src/mage/cards/p/PersonalTutor.java index 8539722c9e0..c91cd14a59a 100644 --- a/Mage.Sets/src/mage/cards/p/PersonalTutor.java +++ b/Mage.Sets/src/mage/cards/p/PersonalTutor.java @@ -24,7 +24,7 @@ public final class PersonalTutor extends CardImpl { // Search your library for a sorcery card and reveal that card. Shuffle your library, then put the card on top of it. - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true)); } private PersonalTutor(final PersonalTutor card) { diff --git a/Mage.Sets/src/mage/cards/s/SterlingGrove.java b/Mage.Sets/src/mage/cards/s/SterlingGrove.java index 3741623ba14..9a5c13da6c9 100644 --- a/Mage.Sets/src/mage/cards/s/SterlingGrove.java +++ b/Mage.Sets/src/mage/cards/s/SterlingGrove.java @@ -32,7 +32,7 @@ public final class SterlingGrove extends CardImpl { this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(ShroudAbility.getInstance(), Duration.WhileOnBattlefield, new FilterEnchantmentPermanent("enchantments"), true))); // {1}, Sacrifice Sterling Grove: Search your library for an enchantment card and reveal that card. Shuffle your library, then put the card on top of it. - Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterEnchantmentCard("enchantment card")), true, true), new GenericManaCost(1)); + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(new FilterEnchantmentCard("enchantment card")), true), new GenericManaCost(1)); ability.addCost(new SacrificeSourceCost()); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/cards/s/SylvanTutor.java b/Mage.Sets/src/mage/cards/s/SylvanTutor.java index e5c1aab7bbd..69f9824e830 100644 --- a/Mage.Sets/src/mage/cards/s/SylvanTutor.java +++ b/Mage.Sets/src/mage/cards/s/SylvanTutor.java @@ -18,7 +18,7 @@ public final class SylvanTutor extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); // Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it. - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true)); } private SylvanTutor(final SylvanTutor card) { diff --git a/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java b/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java index 3872df8e388..439aaac1952 100644 --- a/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java +++ b/Mage.Sets/src/mage/cards/t/TreefolkHarbinger.java @@ -33,7 +33,7 @@ public final class TreefolkHarbinger extends CardImpl { this.toughness = new MageInt(3); // When Treefolk Harbinger enters the battlefield, you may search your library for a Treefolk or Forest card, reveal it, then shuffle your library and put that card on top of it. - this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true, true), true)); + this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(filter), true), true)); } private TreefolkHarbinger(final TreefolkHarbinger card) { diff --git a/Mage.Sets/src/mage/cards/v/VampiricTutor.java b/Mage.Sets/src/mage/cards/v/VampiricTutor.java index c554daa50a2..800081f9398 100644 --- a/Mage.Sets/src/mage/cards/v/VampiricTutor.java +++ b/Mage.Sets/src/mage/cards/v/VampiricTutor.java @@ -20,7 +20,7 @@ public final class VampiricTutor extends CardImpl { // Search your library for a card, then shuffle your library and put that card on top of it. You lose 2 life. - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(), false, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(), false)); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2)); } diff --git a/Mage.Sets/src/mage/cards/w/WorldlyTutor.java b/Mage.Sets/src/mage/cards/w/WorldlyTutor.java index 312696d4d8b..4fa4423910e 100644 --- a/Mage.Sets/src/mage/cards/w/WorldlyTutor.java +++ b/Mage.Sets/src/mage/cards/w/WorldlyTutor.java @@ -18,7 +18,7 @@ public final class WorldlyTutor extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); // Search your library for a creature card and reveal that card. Shuffle your library, then put the card on top of it. - this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true, true)); + this.getSpellAbility().addEffect(new SearchLibraryPutOnLibraryEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), true)); } private WorldlyTutor(final WorldlyTutor card) { diff --git a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java index 006d6c4011d..f6e5a7f35c1 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/search/SearchLibraryPutOnLibraryEffect.java @@ -18,24 +18,21 @@ import mage.util.CardUtil; public class SearchLibraryPutOnLibraryEffect extends SearchEffect { private boolean reveal; - private boolean forceShuffle; public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target) { - this(target, false, true); + this(target, false); setText(); } - public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target, boolean reveal, boolean forceShuffle) { + public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target, boolean reveal) { super(target, Outcome.DrawCard); this.reveal = reveal; - this.forceShuffle = forceShuffle; setText(); } public SearchLibraryPutOnLibraryEffect(final SearchLibraryPutOnLibraryEffect effect) { super(effect); this.reveal = effect.reveal; - this.forceShuffle = effect.forceShuffle; } @Override @@ -55,16 +52,11 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect { if (reveal && !foundCards.isEmpty()) { controller.revealCards(sourceObject.getIdName(), foundCards, game); } - if (forceShuffle) { - controller.shuffleLibrary(source, game); - } + controller.shuffleLibrary(source, game); controller.putCardsOnTopOfLibrary(foundCards, game, source, reveal); return true; } - // shuffle - if (forceShuffle) { - controller.shuffleLibrary(source, game); - } + controller.shuffleLibrary(source, game); return false; }