@Override public PutCardFromHandOntoBattlefieldEffect copy() { return new PutCardFromHandOntoBattlefieldEffect(this); }
@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); } }
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); }
@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; }
BurgeoningTriggeredAbility() { super(Zone.BATTLEFIELD, new PutCardFromHandOntoBattlefieldEffect(StaticFilters.FILTER_CARD_LAND_A)); }
@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; } }
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)); }
PutCardFromHandOntoBattlefieldEffect putIntoPlay = new PutCardFromHandOntoBattlefieldEffect(filter); putIntoPlay.apply(game, source);
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}"))); }
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)); }
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)); }
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); }
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); }
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)); }
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)); }
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() )); }
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() )); }
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)); }
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); }
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); }