@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Card card = game.getCard(getTargetPointer().getFirst(game, source)); if (controller != null && card != null) { if (controller.chooseUse(Outcome.PlayForFree, "Play " + card.getIdName() + " without paying its mana cost?", source, game)) { controller.playCard(card, game, true, true, new MageObjectReference(source.getSourceObject(game), game)); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = game.getCard(getTargetPointer().getFirst(game, source)); if (card != null && controller.chooseUse(outcome, "Play " + card.getName() + " from your graveyard for free?", source, game)) { controller.playCard(card, game, true, true, new MageObjectReference(source.getSourceObject(game), game)); } return true; } return false; } }
@Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Spell spell = game.getStack().getSpell(event.getTargetId()); Player controller = game.getPlayer(source.getControllerId()); if (spell != null && controller != null) { controller.moveCards(spell, Zone.EXILED, source, game); if (!spell.isCopy()) { Card spellCard = spell.getCard(); if (spellCard != null && controller.chooseUse(Outcome.PlayForFree, "Cast " + spellCard.getIdName() + " for free?", source, game)) { controller.playCard(spellCard, game, true, true, new MageObjectReference(source.getSourceObject(game), game)); } return true; } } return false; }
if (!controller.playCard(card, game, true, true, new MageObjectReference(source.getSourceObject(game), game))) { if (card.getZoneChangeCounter(game) == zcc) { card.setFaceDown(true, game);
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = game.getObject(source.getSourceId()); if (controller != null && sourceObject != null && controller.getLibrary().hasCards()) { Card card = controller.getLibrary().getFromTop(game); Cards cards = new CardsImpl(card); controller.revealCards(sourceObject.getIdName(), cards, game); if (!controller.chooseUse(Outcome.PlayForFree, "Play " + card.getName() + " without paying its mana cost?", source, game) || !controller.playCard(card, game, true, true, new MageObjectReference(source.getSourceObject(game), game))) { controller.moveCards(card, Zone.EXILED, source, game); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { ExileZone exileZone = game.getExile().getExileZone(CardUtil.getCardExileZoneId(game, source)); if (exileZone != null && exileZone.count(new FilterInstantOrSorceryCard(), game) > 0) { if (controller.chooseUse(outcome, "Cast an instant or sorcery card from exile?", source, game)) { TargetCardInExile target = new TargetCardInExile(new FilterInstantOrSorceryCard(), CardUtil.getCardExileZoneId(game, source)); if (controller.choose(Outcome.PlayForFree, exileZone, target, game)) { Card card = game.getCard(target.getFirstTarget()); if (card != null) { return controller.playCard(card, game, true, false, new MageObjectReference(source.getSourceId(), game)); } } } } return true; } return false; } }
Card card = selectedPile.get(targetExiledCard.getFirstTarget(), game); controller.canPlayLand(); if (controller.playCard(card, game, true, true, new MageObjectReference(source.getSourceObject(game), game))) { selectedPileCards.remove(card); selectedPile.remove(card);
while (canPlay && targetPlayer.canRespond() && !targetPlayer.playCard(card, game, false, true, new MageObjectReference(source.getSourceObject(game), game))) { SpellAbility spellAbility = card.getSpellAbility(); if (spellAbility != null) {