Cleanup SearchLibraryPutOnLibraryEffect

This commit is contained in:
xenohedron 2023-05-13 23:03:11 -04:00
parent f5cbb2e224
commit a4616bc7ee
31 changed files with 33 additions and 45 deletions

View file

@ -35,7 +35,7 @@ public final class AinokGuide extends CardImpl {
Ability ability = new EntersBattlefieldTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance())); 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. // * 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); ability.addMode(mode);
this.addAbility(ability); this.addAbility(ability);

View file

@ -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, // 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. // then shuffle your library and put that card on top of it.
TargetCardInLibrary target = new TargetCardInLibrary(filter); 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) { private BoggartHarbinger(final BoggartHarbinger card) {

View file

@ -45,7 +45,7 @@ public final class BrutalizerExarch extends CardImpl {
// When Brutalizer Exarch enters the battlefield, choose one // 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; // - 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")); 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. // or put target noncreature permanent on the bottom of its owner's library.
Mode mode = new Mode(new BrutalizerExarchEffect2()); Mode mode = new Mode(new BrutalizerExarchEffect2());
mode.addTarget(new TargetPermanent(filter)); mode.addTarget(new TargetPermanent(filter));

View file

@ -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. // 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( this.addAbility(new EntersBattlefieldTriggeredAbility(new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true
), true)); ), true));
} }

View file

@ -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. // 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); 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. // The first creature spell you cast each turn costs {2} less to cast.
Effect effect = new SpellsCostReductionControllerEffect(filterCost, 2); Effect effect = new SpellsCostReductionControllerEffect(filterCost, 2);

View file

@ -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. // 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(); 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)); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
} }

View file

@ -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. // 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( 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)); ), true));
} }

View file

@ -33,7 +33,7 @@ public final class ElvishHarbinger extends CardImpl {
this.toughness = new MageInt(2); 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. // 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. // {tap}: Add one mana of any color.
this.addAbility(new AnyColorManaAbility(new TapSourceCost())); this.addAbility(new AnyColorManaAbility(new TapSourceCost()));
} }

View file

@ -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. // 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) { private EnlightenedTutor(final EnlightenedTutor card) {

View file

@ -37,7 +37,7 @@ public final class FaerieHarbinger extends CardImpl {
// Flying // Flying
this.addAbility(FlyingAbility.getInstance()); 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. // 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) { private FaerieHarbinger(final FaerieHarbinger card) {

View file

@ -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, // 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. // reveal it, then shuffle your library and put that card on top of it.
TargetCardInLibrary target = new TargetCardInLibrary(filter); 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) { private FlamekinHarbinger(final FlamekinHarbinger card) {

View file

@ -41,7 +41,7 @@ public final class ForerunnerOfTheCoalition extends CardImpl {
this.addAbility(new EntersBattlefieldTriggeredAbility( this.addAbility(new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutOnLibraryEffect( new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(new FilterBySubtypeCard(SubType.PIRATE)), 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. // Whenever another Pirate enters the battlefield under your control, each opponent loses 1 life.
Ability ability = new EntersBattlefieldControlledTriggeredAbility( Ability ability = new EntersBattlefieldControlledTriggeredAbility(

View file

@ -43,7 +43,6 @@ public final class ForerunnerOfTheEmpire extends CardImpl {
new EntersBattlefieldTriggeredAbility( new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutOnLibraryEffect( new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(new FilterBySubtypeCard(SubType.DINOSAUR)), new TargetCardInLibrary(new FilterBySubtypeCard(SubType.DINOSAUR)),
true,
true true
), ),
true true

View file

@ -45,7 +45,6 @@ public final class ForerunnerOfTheHeralds extends CardImpl {
new EntersBattlefieldTriggeredAbility( new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutOnLibraryEffect( new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(new FilterBySubtypeCard(SubType.MERFOLK)), new TargetCardInLibrary(new FilterBySubtypeCard(SubType.MERFOLK)),
true,
true true
), ),
true true
@ -65,4 +64,4 @@ public final class ForerunnerOfTheHeralds extends CardImpl {
public ForerunnerOfTheHeralds copy() { public ForerunnerOfTheHeralds copy() {
return new ForerunnerOfTheHeralds(this); return new ForerunnerOfTheHeralds(this);
} }
} }

View file

@ -42,7 +42,6 @@ public final class ForerunnerOfTheLegion extends CardImpl {
new EntersBattlefieldTriggeredAbility( new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutOnLibraryEffect( new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(new FilterBySubtypeCard(SubType.VAMPIRE)), new TargetCardInLibrary(new FilterBySubtypeCard(SubType.VAMPIRE)),
true,
true true
), ),
true true
@ -63,4 +62,4 @@ public final class ForerunnerOfTheLegion extends CardImpl {
public ForerunnerOfTheLegion copy() { public ForerunnerOfTheLegion copy() {
return new ForerunnerOfTheLegion(this); return new ForerunnerOfTheLegion(this);
} }
} }

View file

@ -31,7 +31,7 @@ public final class GiantHarbinger extends CardImpl {
this.toughness = new MageInt(4); 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. // 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) { private GiantHarbinger(final GiantHarbinger card) {

View file

@ -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. // 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( 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)); ), true));
} }

View file

@ -32,7 +32,7 @@ public final class KithkinHarbinger extends CardImpl {
this.toughness = new MageInt(3); 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. // 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) { private KithkinHarbinger(final KithkinHarbinger card) {

View file

@ -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. // 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); 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) { private LoamLarva(final LoamLarva card) {

View file

@ -36,7 +36,7 @@ public final class MerrowHarbinger extends CardImpl {
// Islandwalk // Islandwalk
this.addAbility(new IslandwalkAbility()); 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. // 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) { private MerrowHarbinger(final MerrowHarbinger card) {

View file

@ -50,7 +50,7 @@ public final class MomirVigSimicVisionary extends CardImpl {
this.toughness = new MageInt(2); 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. // 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"); 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)); this.addAbility(new SpellCastControllerTriggeredAbility(effect, filter, true));

View file

@ -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. // 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( this.addAbility(new EntersBattlefieldTriggeredAbility(
new SearchLibraryPutOnLibraryEffect( new SearchLibraryPutOnLibraryEffect(
new TargetCardInLibrary(filter), true, true new TargetCardInLibrary(filter), true
), true ), true
).withFlavorWord("Divine Intervention")); ).withFlavorWord("Divine Intervention"));
} }

View file

@ -44,7 +44,7 @@ public final class MwonvuliBeastTracker extends CardImpl {
this.toughness = new MageInt(1); 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. // 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) { private MwonvuliBeastTracker(final MwonvuliBeastTracker card) {
@ -56,4 +56,3 @@ public final class MwonvuliBeastTracker extends CardImpl {
return new MwonvuliBeastTracker(this); return new MwonvuliBeastTracker(this);
} }
} }

View file

@ -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. // 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) { private MysticalTutor(final MysticalTutor card) {

View file

@ -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. // 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) { private PersonalTutor(final PersonalTutor card) {

View file

@ -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))); 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. // {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()); ability.addCost(new SacrificeSourceCost());
this.addAbility(ability); this.addAbility(ability);
} }

View file

@ -18,7 +18,7 @@ public final class SylvanTutor extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}"); 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. // 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) { private SylvanTutor(final SylvanTutor card) {

View file

@ -33,7 +33,7 @@ public final class TreefolkHarbinger extends CardImpl {
this.toughness = new MageInt(3); 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. // 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) { private TreefolkHarbinger(final TreefolkHarbinger card) {

View file

@ -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. // 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)); this.getSpellAbility().addEffect(new LoseLifeSourceControllerEffect(2));
} }

View file

@ -18,7 +18,7 @@ public final class WorldlyTutor extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}"); 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. // 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) { private WorldlyTutor(final WorldlyTutor card) {

View file

@ -18,24 +18,21 @@ import mage.util.CardUtil;
public class SearchLibraryPutOnLibraryEffect extends SearchEffect { public class SearchLibraryPutOnLibraryEffect extends SearchEffect {
private boolean reveal; private boolean reveal;
private boolean forceShuffle;
public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target) { public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target) {
this(target, false, true); this(target, false);
setText(); setText();
} }
public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target, boolean reveal, boolean forceShuffle) { public SearchLibraryPutOnLibraryEffect(TargetCardInLibrary target, boolean reveal) {
super(target, Outcome.DrawCard); super(target, Outcome.DrawCard);
this.reveal = reveal; this.reveal = reveal;
this.forceShuffle = forceShuffle;
setText(); setText();
} }
public SearchLibraryPutOnLibraryEffect(final SearchLibraryPutOnLibraryEffect effect) { public SearchLibraryPutOnLibraryEffect(final SearchLibraryPutOnLibraryEffect effect) {
super(effect); super(effect);
this.reveal = effect.reveal; this.reveal = effect.reveal;
this.forceShuffle = effect.forceShuffle;
} }
@Override @Override
@ -55,16 +52,11 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect {
if (reveal && !foundCards.isEmpty()) { if (reveal && !foundCards.isEmpty()) {
controller.revealCards(sourceObject.getIdName(), foundCards, game); controller.revealCards(sourceObject.getIdName(), foundCards, game);
} }
if (forceShuffle) { controller.shuffleLibrary(source, game);
controller.shuffleLibrary(source, game);
}
controller.putCardsOnTopOfLibrary(foundCards, game, source, reveal); controller.putCardsOnTopOfLibrary(foundCards, game, source, reveal);
return true; return true;
} }
// shuffle controller.shuffleLibrary(source, game);
if (forceShuffle) {
controller.shuffleLibrary(source, game);
}
return false; return false;
} }