Tabnine Logo
EntersBattlefieldControlledTriggeredAbility
Code IndexAdd Tabnine to your IDE (free)

How to use
EntersBattlefieldControlledTriggeredAbility
in
mage.abilities.common

Best Java code snippets using mage.abilities.common.EntersBattlefieldControlledTriggeredAbility (Showing top 20 results out of 315)

origin: magefree/mage

  @Override
  public EntersBattlefieldControlledTriggeredAbility copy() {
    return new EntersBattlefieldControlledTriggeredAbility(this);
  }
}
origin: magefree/mage

@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;
}
origin: magefree/mage

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
  ));
}
origin: magefree/mage

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));
}
origin: magefree/mage

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));
}
origin: magefree/mage

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)
  );
}
origin: magefree/mage

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."
  ));
}
origin: magefree/mage

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"));
}
origin: magefree/mage

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);
}
origin: magefree/mage

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);
}
origin: magefree/mage

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);
}
origin: magefree/mage

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());
}
origin: magefree/mage

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));
}
origin: magefree/mage

  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");
  }
}
origin: magefree/mage

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));
}
origin: magefree/mage

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));
}
origin: magefree/mage

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")));
}
origin: magefree/mage

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)
  );
}
origin: magefree/mage

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));
}
origin: magefree/mage

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"));
}
mage.abilities.commonEntersBattlefieldControlledTriggeredAbility

Most used methods

  • <init>
  • getControllerId

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • Menu (java.awt)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now