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

How to use
PutCardFromHandOntoBattlefieldEffect
in
mage.abilities.effects.common

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

origin: magefree/mage

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

  @Override
  public boolean apply(Game game, Ability source) {
    if (AddendumCondition.instance.apply(game, source)) {
      new PutCardFromHandOntoBattlefieldEffect(filter).apply(game, source);
    }
    return ExileSpellEffect.getInstance().apply(game, source);
  }
}
origin: magefree/mage

public ThranTemporalGateway(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
  this.addSuperType(SuperType.LEGENDARY);
  // {4}, {t}: You may put a historic permanent card from your hand onto the battlefield. (Artifacts, legendaries, and Sagas are historic.)
  SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new PutCardFromHandOntoBattlefieldEffect(filter)
          .setText("You may put a historic permanent card from your hand onto the battlefield. "
              + "<i>(Artifacts, legendaries, and Sagas are historic.)</i>"),
      new ManaCostsImpl("{4}"));
  ability.addCost(new TapSourceCost());
  this.addAbility(ability);
}
origin: magefree/mage

@Override
public boolean apply(Game game, Ability source) {
  Player player;
  if (useTargetController) {
    player = game.getPlayer(getTargetPointer().getFirst(game, source));
  } else {
    player = game.getPlayer(source.getControllerId());
  }
  if (player == null) {
    return false;
  }
  if (player.chooseUse(Outcome.PutCardInPlay, "Put " + filter.getMessage() + " from your hand onto the battlefield?", source, game)) {
    TargetCardInHand target = new TargetCardInHand(filter);
    if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
      Card card = game.getCard(target.getFirstTarget());
      if (card != null) {
        return player.moveCards(card, Zone.BATTLEFIELD, source, game, tapped, false, false, null);
      }
    }
  }
  return false;
}
origin: magefree/mage

BurgeoningTriggeredAbility() {
  super(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A));
}
origin: magefree/mage

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getControllerId());
    if (player == null) {
      return false;
    }
    int xValue = source.getManaCostsToPay().getX();
    FilterCreatureCard filter = new FilterCreatureCard("a creature with converted mana cost " + xValue);
    filter.add(new ConvertedManaCostPredicate(ComparisonType.EQUAL_TO, xValue));
    if (new PutCardFromHandOntoBattlefieldEffect(filter).apply(game, source)) {
      return new ReturnToHandSourceEffect(true).apply(game, source);
    }
    return false;
  }
}
origin: magefree/mage

public DramaticEntrance(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{G}{G}");
  // You may put a green creature card from your hand onto the battlefield.
  this.getSpellAbility().addEffect(new PutCardFromHandOntoBattlefieldEffect(filter));
}
origin: magefree/mage

PutCardFromHandOntoBattlefieldEffect putIntoPlay = new PutCardFromHandOntoBattlefieldEffect(filter);
putIntoPlay.apply(game, source);
origin: magefree/mage

public Didgeridoo(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
  // {3}: You may put a Minotaur permanent card from your hand onto the battlefield.
  this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(filter), new ManaCostsImpl("{3}")));
}
origin: magefree/mage

public GoblinLackey(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}");
  this.subtype.add(SubType.GOBLIN);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // Whenever Goblin Lackey deals damage to a player, you may put a Goblin permanent card from your hand onto the battlefield.
  this.addAbility(new DealsDamageToAPlayerTriggeredAbility(new PutCardFromHandOntoBattlefieldEffect(filter), false));
}
origin: magefree/mage

public LoamDweller(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
  this.subtype.add(SubType.SPIRIT);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // Whenever you cast a Spirit or Arcane spell, you may put a land card from your hand onto the battlefield tapped.
  this.addAbility(new SpellCastControllerTriggeredAbility(
      new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A, false, true),
      StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
}
origin: magefree/mage

public DragonArch(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}");
  // {2}, {T}: You may put a multicolored creature card from your hand onto the battlefield.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(filter),
    new ManaCostsImpl("{2}"));
  ability.addCost(new TapSourceCost());
  this.addAbility(ability);
}
origin: magefree/mage

public QuicksilverAmulet(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
  // {4}, {tap}: You may put a creature card from your hand onto the battlefield.
  SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A),
      new ManaCostsImpl("{4}"));
  ability.addCost(new TapSourceCost());
  this.addAbility(ability);
}
origin: magefree/mage

public ElvishPioneer(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
  this.subtype.add(SubType.ELF);
  this.subtype.add(SubType.DRUID);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // When Elvish Pioneer enters the battlefield, you may put a basic land card from your hand onto the battlefield tapped.
  this.addAbility(new EntersBattlefieldTriggeredAbility(new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_BASIC_LAND_A, false, true), false));
}
origin: magefree/mage

public BraidsConjurerAdept(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
  addSuperType(SuperType.LEGENDARY);
  this.subtype.add(SubType.HUMAN, SubType.WIZARD);
  this.power = new MageInt(2);
  this.toughness = new MageInt(2);
  // At the beginning of each player's upkeep, that player may put an artifact, creature, or land card from their hand onto the battlefield.
  this.addAbility(new BeginningOfUpkeepTriggeredAbility(new PutCardFromHandOntoBattlefieldEffect(filter, true), TargetController.ANY, false));
}
origin: magefree/mage

public SkyshroudRanger(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
  this.subtype.add(SubType.ELF);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // {tap}: You may put a land card from your hand onto the battlefield. Activate this ability only any time you could cast a sorcery.
  this.addAbility(new ActivateAsSorceryActivatedAbility(
      Zone.BATTLEFIELD,
      new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A), 
      new TapSourceCost()
  ));
}
origin: magefree/mage

public WalkingAtlas(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}");
  this.subtype.add(SubType.CONSTRUCT);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // {tap}: You may put a land card from your hand onto the battlefield.
  this.addAbility(new SimpleActivatedAbility(
      Zone.BATTLEFIELD,
      new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A),
      new TapSourceCost()
  ));
}
origin: magefree/mage

public ChampionOfRhonas(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
  this.subtype.add(SubType.JACKAL);
  this.subtype.add(SubType.WARRIOR);
  this.power = new MageInt(3);
  this.toughness = new MageInt(3);
  // You may exert Champion of Rhonas as it attacks. When you do, you may put a creature card from your hand onto the battlefield.
  BecomesExertSourceTriggeredAbility ability = new BecomesExertSourceTriggeredAbility(new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A));
  this.addAbility(new ExertAbility(ability));
}
origin: magefree/mage

public TimmyPowerGamer(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}");
  this.supertype.add(SuperType.LEGENDARY);
  this.subtype.add(SubType.HUMAN);
  this.subtype.add(SubType.GAMER);
  this.power = new MageInt(1);
  this.toughness = new MageInt(1);
  // {4}: You may put a creature card from your hand onto the battlefield.
  SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_CREATURE_A),
      new ManaCostsImpl("{4}"));
  this.addAbility(ability);
}
origin: magefree/mage

public TerrainGenerator(UUID ownerId, CardSetInfo setInfo) {
  super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
  // {tap}: Add {C}.
  this.addAbility(new ColorlessManaAbility());
  // {2}, {T}: You may put a basic land card from your hand onto the battlefield tapped.
  Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
      new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_BASIC_LAND_A, false, true), new ManaCostsImpl("{2}"));
  ability.addCost(new TapSourceCost());
  this.addAbility(ability);
}
mage.abilities.effects.commonPutCardFromHandOntoBattlefieldEffect

Most used methods

  • <init>
  • apply
  • getTargetPointer
  • setText

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JCheckBox (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best plugins for Eclipse
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