@Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { Player controller = game.getPlayer(controllerId); if (controller != null) { card = controller.getLibrary().getFromTop(game); if (card != null) { paid = controller.moveCards(card, Zone.EXILED, ability, game); } } return paid; }
@Override public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { Player controller = game.getPlayer(controllerId); if (controller != null) { card = controller.getLibrary().getFromTop(game); if (card != null) { paid = controller.moveCards(card, Zone.EXILED, ability, game); } } return paid; }
private int checkIfNextLibCardIsNonLandAndExile(Player controller, Ability source, Game game) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.LIBRARY, true); return card.isLand() ? 0 : 1; } return 0; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { 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) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.putCardsOnBottomOfLibrary(new CardsImpl(card), game, source, true); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { return card.getColor(game).isBlack(); } } return false; } }
@Override public boolean apply(Game game, Ability source) { Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source)); if (targetPlayer != null) { Card card = targetPlayer.getLibrary().getFromTop(game); if (card != null) { targetPlayer.moveCards(card, Zone.EXILED, source, game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { for (UUID opponentId: game.getOpponents(source.getControllerId())) { Player player = game.getPlayer(opponentId); if (player != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { player.moveCards(card, Zone.EXILED, source, game); } } } return true; } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(targetPointer.getFirst(game, source)); if (player != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { player.moveCardsToExile(card, source, game, true, CardUtil.getCardExileZoneId(game, source), CardUtil.createObjectRealtedWindowTitle(source, game, null)); return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { player.moveCards(card, Zone.GRAVEYARD, source, game); } } } return true; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card topCard = controller.getLibrary().getFromTop(game); if (topCard != null) { MageObject vizierOfTheMenagerie = source.getSourceObject(game); if (vizierOfTheMenagerie != null) { controller.lookAtCards("Top card of " + vizierOfTheMenagerie.getIdName() + " controller's library", topCard, game); } } } return true; }
@Override public boolean apply(Game game, Ability source) { boolean result = false; Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { int cmc = card.getConvertedManaCost(); controller.moveCards(card, Zone.GRAVEYARD, source, game); controller.drawCards(cmc, game); } } return result; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card topCard = controller.getLibrary().getFromTop(game); if (topCard != null) { MageObject precognitionField = source.getSourceObject(game); if (precognitionField != null) { controller.lookAtCards("Top card of " + precognitionField.getIdName() + " controller's library", topCard, game); } } } return true; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.revealCards(source, new CardsImpl(card), game); controller.moveCards(card, Zone.HAND, source, game); controller.gainLife(card.getConvertedManaCost(), game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.revealCards(source, new CardsImpl(card), game); card.moveToZone(Zone.HAND, source.getSourceId(), game, false); controller.loseLife(card.getConvertedManaCost(), game, false); return true; } } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); controller.moveCardsToExile(card, source, game, true, exileId, sourceObject.getIdName()); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null && controller.getLibrary().hasCards()) { Card card = controller.getLibrary().getFromTop(game); controller.moveCards(card, Zone.GRAVEYARD, source, game); if (card.isInstant() || card.isSorcery()) { new TransformSourceEffect(true).apply(game, source); } return true; } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Card sourceCard = game.getCard(source.getSourceId()); if (controller != null && sourceCard != null) { Card card = controller.getLibrary().getFromTop(game); if (card != null) { controller.revealCards(sourceCard.getName(), new CardsImpl(card), game); controller.drawCards(card.getConvertedManaCost(), game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(getTargetPointer().getFirst(game, source)); if (player != null) { Card card = player.getLibrary().getFromTop(game); if (card != null) { if (player.moveCards(card, Zone.GRAVEYARD, source, game)) { int cmc = card.getConvertedManaCost(); MinionToken2 token = new MinionToken2(); token.putOntoBattlefield(cmc, game, source.getSourceId(), player.getId()); } } } return true; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); Player playerTargetLibrary = game.getPlayer(getTargetPointer().getFirst(game, source)); Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId()); if (controller != null && playerTargetLibrary != null && sourcePermanent != null) { UUID exileId = CardUtil.getCardExileZoneId(game, source); controller.moveCardToExileWithInfo(playerTargetLibrary.getLibrary().getFromTop(game), exileId, sourcePermanent.getIdName() + " (" + sourcePermanent.getZoneChangeCounter(game) + ')', source.getSourceId(), game, Zone.BATTLEFIELD, true); return true; } return false; } }