@Override public EntersBattlefieldControlledTriggeredAbility copy() { return new EntersBattlefieldControlledTriggeredAbility(this); } }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (super.checkTrigger(event, game)) { Permanent permanent = game.getPermanent(event.getTargetId()); return permanent != null && permanent.isControlledBy(this.getControllerId()); } return false; }
public AjanisWelcome(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}"); // Whenever a creature enters the battlefield under your control, you gain 1 life. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( new GainLifeEffect(1), StaticFilters.FILTER_PERMANENT_CREATURE )); }
public PathOfDiscovery(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}"); // Whenever a creature enters the battlefield under your control, it explores. (Reveal the top card of your library. Put that card into your hand if it's a land. Otherwise, put a +1/+1 counter on the creature, then put the card back or put it into your graveyard.) this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new ExploreTargetEffect(), StaticFilters.FILTER_CONTROLLED_A_CREATURE, false, SetTargetPointer.PERMANENT, null)); }
public ElementalBond(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}"); // Whenever a creature with power 3 or greater enters the battlefield under your control, draw a card. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new DrawCardSourceControllerEffect(1), filter)); }
public ValorInAkros(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}"); // Whenever a creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new BoostControlledEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_PERMANENT_CREATURE_A, false) ); }
public MirrorMarch(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{5}{R}"); // Whenever a nontoken creature enters the battlefield under your control, flip a coin until you lose a flip. For each flip you won, create a token that's a copy of that creature. Those tokens gain haste. Exile them at the beginning of the next end step. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new MirrorMarchEffect(), filter, false, SetTargetPointer.PERMANENT, "Whenever a nontoken creature enters the battlefield under your control, " + "flip a coin until you lose a flip. For each flip you won, " + "create a token that's a copy of that creature. Those tokens gain haste. " + "Exile them at the beginning of the next end step." )); }
public CreamOfTheCrop(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); // Whenever a creature enters the battlefield under your control, you may look at the top X cards of your library, where X is that creature's power. If you do, put one of those cards on top of your library and the rest on the bottom of your library in any order. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new CreamOfTheCropEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, true, SetTargetPointer.PERMANENT, "Whenever a creature enters the battlefield under your control, you may look at the top X cards of your library, where X is that creature's power. If you do, put one of those cards on top of your library and the rest on the bottom of your library in any order")); }
public WhereAncientsTread(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{R}"); // Whenever a creature with power 5 or greater enters the battlefield under your control, you may have Where Ancients Tread deal 5 damage to any target. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DamageTargetEffect(5), filter, true); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); }
public AuraShards(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}{W}"); // Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), StaticFilters.FILTER_PERMANENT_CREATURE, true, "Whenever a creature enters the battlefield under your control, you may destroy target artifact or enchantment"); ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT)); this.addAbility(ability); }
public VigilanteJustice(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}"); // Whenever a Human enters the battlefield under your control, Vigilante Justice deals 1 damage to any target. Ability ability = new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new DamageTargetEffect(1), filter, false ); ability.addTarget(new TargetAnyTarget()); this.addAbility(ability); }
public TrailOfMystery(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{1}{G}"); // Whenever a face-down creature enters the battlefield under your control, you may search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. Effect effect = new SearchLibraryPutInHandEffect(new TargetCardInLibrary(0,1, StaticFilters.FILTER_CARD_BASIC_LAND), true, true); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, effect, filter, true)); // Whenever a permanent you control is turned face up, if it's a creature, it gets +2/+2 until end of turn. this.addAbility(new TrailOfMysteryTriggeredAbility()); }
public HerdGnarr(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(2); this.toughness = new MageInt(2); // Whenever another creature enters the battlefield under your control, Herd Gnarr gets +2/+2 until end of turn. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new BoostSourceEffect(2, 2, Duration.EndOfTurn), filter)); }
public HuatliRadiantChampionEmblem() { this.setName("Emblem Huatli"); // Whenever a creature enters the battlefield under your control, you may draw a card. Ability ability = new EntersBattlefieldControlledTriggeredAbility(Zone.COMMAND, new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_CONTROLLED_A_CREATURE, true); this.getAbilities().add(ability); this.setExpansionSetCodeForImage("RIX"); } }
public EldraziMimic(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}"); this.subtype.add(SubType.ELDRAZI); this.power = new MageInt(2); this.toughness = new MageInt(1); // Whenever another colorless creature enters the battlefield under your control, you may have the base power and toughness of Eldrazi Mimic // become that creature's power and toughness until end of turn. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new EldraziMimicEffect(), FILTER, true, SetTargetPointer.PERMANENT, null)); }
public GarruksPackleader(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{G}"); this.subtype.add(SubType.BEAST); this.power = new MageInt(4); this.toughness = new MageInt(4); this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), filter, true)); }
public ZendikarsRoil(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}{G}"); // Whenever a land enters the battlefield under your control, create a 2/2 green Elemental creature token. Effect effect = new CreateTokenEffect(new ZendikarsRoilElementalToken()); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(effect, new FilterLandPermanent("a land"))); }
public CatharsCrusade(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}{W}"); // Whenever a creature enters the battlefield under your control, put a +1/+1 counter on each creature you control. this.addAbility(new EntersBattlefieldControlledTriggeredAbility( Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), StaticFilters.FILTER_PERMANENT_CREATURE_A, false) ); }
public StaffOfTheDeathMagus(UUID ownerId, CardSetInfo setInfo) { super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}"); // Whenever you cast a black spell or a Swamp enters the battlefield under your control, you gain 1 life. this.addAbility(new SpellCastControllerTriggeredAbility(new GainLifeEffect(1), filterSpell,false)); this.addAbility(new EntersBattlefieldControlledTriggeredAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), filterLand, false)); }
public TrialOfKnowledge(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); // When Trial of Knowledge enters the battlefield, draw three cards, then discard a card. this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawDiscardControllerEffect(3, 1), false)); // When a Cartouche enters the battlefield under your control, return Trial of Knowledge to its owner's hand. this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new ReturnToHandSourceEffect(), filter, "When a Cartouche enters the battlefield under your control, return {this} to its owner's hand")); }