forked from External/mage
Merge pull request #10369 from xenohedron/refactor-search
Refactor search library effect classes to clean up text generation
This commit is contained in:
commit
807a6c95f1
286 changed files with 377 additions and 469 deletions
|
|
@ -4,7 +4,6 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
|
|
@ -23,7 +22,7 @@ public final class GarrukCallerOfBeastsEmblem extends Emblem {
|
|||
*/
|
||||
public GarrukCallerOfBeastsEmblem() {
|
||||
super("Emblem Garruk");
|
||||
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterCreatureCard("creature card")), false, true, Outcome.PutCreatureInPlay);
|
||||
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(new FilterCreatureCard("creature card")), false);
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, effect, StaticFilters.FILTER_SPELL_A_CREATURE, true, false);
|
||||
this.getAbilities().add(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package mage.game.command.emblems;
|
|||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
|
@ -14,7 +13,7 @@ public class GarrukUnleashedEmblem extends Emblem {
|
|||
// At the beginning of your end step, you may search your library for a creature card, put it onto the battlefield, then shuffle your library.
|
||||
public GarrukUnleashedEmblem() {
|
||||
super("Emblem Garruk");
|
||||
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), false, true, Outcome.PutCreatureInPlay)
|
||||
Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_CREATURE), false)
|
||||
.setText("search your library for a creature card, put it onto the battlefield, then shuffle");
|
||||
this.getAbilities().add(new BeginningOfYourEndStepTriggeredAbility(Zone.COMMAND, effect, true));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class TrailOfTheMageRingsPlane extends Plane {
|
|||
this.getAbilities().add(ability);
|
||||
|
||||
// Active player can roll the planar die: Whenever you roll {CHAOS}, you may search your library for an instant or sorcery card, reveal it, put it into your hand, then shuffle your library
|
||||
Effect chaosEffect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterInstantOrSorceryCard()), true, true);
|
||||
Effect chaosEffect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0, 1, new FilterInstantOrSorceryCard()), true);
|
||||
Target chaosTarget = null;
|
||||
|
||||
List<Effect> chaosEffects = new ArrayList<Effect>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue