congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ZoneChangeAllTriggeredAbility
Code IndexAdd Tabnine to your IDE (free)

How to use
ZoneChangeAllTriggeredAbility
in
mage.abilities.common

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

origin: magefree/mage

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

public FemerefEnchantress(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}{W}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.DRUID);
  this.power = new MageInt(1);
  this.toughness = new MageInt(2);
  // Whenever an enchantment is put into a graveyard from the battlefield, draw a card.
  this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      new DrawCardSourceControllerEffect(1), StaticFilters.FILTER_ENCHANTMENT_PERMANENT,
      "Whenever an enchantment is put into a graveyard from the battlefield, ", false));
}
origin: magefree/mage

public MythUnbound(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
  // Your commander costs {1} less to cast for each time it's been cast from the command zone this game.
  this.addAbility(new SimpleStaticAbility(
      Zone.BATTLEFIELD,
      new MythUnboundCostReductionEffect()
  ));
  // Whenever your commander is put into the command zone from anywhere, draw a card.
  this.addAbility(new ZoneChangeAllTriggeredAbility(
      Zone.BATTLEFIELD, Zone.ALL, Zone.COMMAND,
      new DrawCardSourceControllerEffect(1), filter,
      "Whenever your commander is put into "
      + "the command zone from anywhere, ", false
  ));
}
origin: magefree/mage

public FangrenMarauder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{G}");
  this.subtype.add(SubType.BEAST);
  this.power = new MageInt(5);
  this.toughness = new MageInt(5);
  // Whenever an artifact is put into a graveyard from the battlefield, you may gain 5 life.
  this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      new GainLifeEffect(5), new FilterArtifactPermanent(),
      "Whenever an artifact is put into a graveyard from the battlefield, ", true));
}
origin: magefree/mage

public NinthBridgePatrol(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
  this.subtype.add(SubType.DWARF);
  this.subtype.add(SubType.SOLDIER);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // Whenever another creature you control leaves the battlefield, put a +1/+1 counter on Ninth Bridge Patrol.
  this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null,
      new AddCountersSourceEffect(CounterType.P1P1.createInstance()), filter,
      "Whenever another creature you control leaves the battlefield, ", false));
}
origin: magefree/mage

public AkkiRaider(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
  this.subtype.add(SubType.GOBLIN);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(2);
  this.toughness = new MageInt(1);
  // Whenever a land is put into a graveyard from the battlefield, Akki Raider gets +1/+0 until end of turn.
  this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      new BoostSourceEffect(1,0,Duration.EndOfTurn), new FilterLandPermanent(),
      "Whenever a land is put into a graveyard from the battlefield, ", false));
}
origin: magefree/mage

public TabletOfEpityr(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
  // Whenever an artifact you control is put into a graveyard from the battlefield, you may pay {1}. If you do, you gain 1 life.
  Effect effect = new DoIfCostPaid(new GainLifeEffect(1), new GenericManaCost(1));
  effect.setText("you may pay {1}. If you do, you gain 1 life.");
  Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      effect, new FilterControlledArtifactPermanent(),
      "Whenever an artifact you control is put into a graveyard from the battlefield, ", true);
  this.addAbility(ability);
}
origin: magefree/mage

public UrzasMiter(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}");
  Watcher watcher = new UrzasMiterWatcher();        
  // Whenever an artifact you control is put into a graveyard from the battlefield, if it wasn't sacrificed, you may pay {3}. If you do, draw a card.
  Effect effect = new UrzasMiterDoIfCostPaid(new DrawCardSourceControllerEffect(1), new GenericManaCost(3));
  effect.setText("you may pay {3}. If you do, draw a card.");
  Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      effect, new FilterControlledArtifactPermanent(),
      "Whenever an artifact you control is put into a graveyard from the battlefield, ", true);
  this.addAbility(ability, watcher);
}
origin: magefree/mage

public MoriokRigger(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.ROGUE);
  this.subtype.add(SubType.RIGGER);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Whenever an artifact is put into a graveyard from the battlefield, you may put a +1/+1 counter on Moriok Rigger.
   Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      new AddCountersSourceEffect(CounterType.P1P1.createInstance(1)), new FilterArtifactPermanent(),
      "Whenever an artifact is put into a graveyard from the battlefield, ", true);
   this.addAbility(ability);
}
origin: magefree/mage

public DiscipleOfTheVault(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.CLERIC);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // Whenever an artifact is put into a graveyard from the battlefield, you may have target opponent lose 1 life.
  Effect effect = new LoseLifeTargetEffect(1);
  effect.setText("you may have target opponent lose 1 life");
  Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD,
      effect, new FilterArtifactPermanent(),
      "Whenever an artifact is put into a graveyard from the battlefield, ", true);
  ability.addTarget(new TargetOpponent());
  this.addAbility(ability);
}
origin: magefree/mage

public KothophedSoulHoarder(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{B}{B}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.DEMON);
  this.power = new MageInt(6);
  this.toughness = new MageInt(6);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // Whenever a permanent owned by another player is put into the graveyard from the battlefield, you draw one card and lose 1 life.
  Effect effect = new DrawCardSourceControllerEffect(1);
  effect.setText("you draw one card");
  Ability ability = new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.GRAVEYARD, effect, filter,
      "Whenever a permanent owned by another player is put into the graveyard from the battlefield, ", false);
  effect = new LoseLifeSourceControllerEffect(1);
  effect.setText("and lose 1 life");
  ability.addEffect(effect);
  this.addAbility(ability);
}
origin: magefree/mage

public OutpostSiege(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}");
  // As Outpost Siege enters the battlefield, choose Khans or Dragons.
  this.addAbility(new EntersBattlefieldAbility(new ChooseModeEffect("Khans or Dragons?", "Khans", "Dragons"), null,
      "As {this} enters the battlefield, choose Khans or Dragons.", ""));
  // * Khans - At the beginning of your upkeep, exile the top card of your library. Until end of turn, you may play that card.
  this.addAbility(new ConditionalTriggeredAbility(
      new BeginningOfUpkeepTriggeredAbility(new OutpostSiegeExileEffect(), TargetController.YOU, false),
      new ModeChoiceSourceCondition("Khans"),
      ruleTrigger1));
  // * Dragons - Whenever a creature you control leaves the battlefield, Outpost Siege deals 1 damage to any target.
  Ability ability2 = new ConditionalTriggeredAbility(
      new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, null, new DamageTargetEffect(1),
          new FilterControlledCreaturePermanent(), "", false),
      new ModeChoiceSourceCondition("Dragons"),
      ruleTrigger2);
  ability2.addTarget(new TargetAnyTarget());
  this.addAbility(ability2);
}
origin: magefree/mage

public StormfrontRiders(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.SOLDIER);
  this.power = new MageInt(4);
  this.toughness = new MageInt(3);
  // Flying
  this.addAbility(FlyingAbility.getInstance());
  // When Stormfront Riders enters the battlefield, return two creatures you control to their owner's hand.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(new FilterControlledCreaturePermanent("creatures you control"), 2)));
  // Whenever Stormfront Riders or another creature is returned to your hand from the battlefield, create a 1/1 white Soldier creature token.
  this.addAbility(new ZoneChangeAllTriggeredAbility(Zone.BATTLEFIELD, Zone.BATTLEFIELD, Zone.HAND, new CreateTokenEffect(new SoldierToken()),
      filter, "Whenever {this} or another creature is returned to your hand from the battlefield, ", false));
}
origin: magefree/mage

public VelaTheNightClad(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}{B}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.WIZARD);
  this.color.setBlue(true);
  this.color.setBlack(true);
  this.power = new MageInt(4);
  this.toughness = new MageInt(4);
  // Intimidate
  this.addAbility(IntimidateAbility.getInstance());
  // Other creatures you control have intimidate.
  this.addAbility(new SimpleStaticAbility(
      Zone.BATTLEFIELD,
      new GainAbilityControlledEffect(IntimidateAbility.getInstance(),
          Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE, true)));
  // Whenever Vela the Night-Clad or another creature you control leaves the battlefield, each opponent loses 1 life.
  Ability ability = new ZoneChangeAllTriggeredAbility(
      Zone.BATTLEFIELD,
      Zone.BATTLEFIELD, null,
      new LoseLifeOpponentsEffect(1),
      filter, rule, false);
  this.addAbility(ability);
}
mage.abilities.commonZoneChangeAllTriggeredAbility

Javadoc

Is applied when a Permanent matching the filter changes zones.

Most used methods

  • <init>

Popular in Java

  • Reading from database using SQL prepared statement
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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