@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player != null) { return player.scry(scryNumber, source, game); } return false; }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int x = RemovedCountersForCostValue.instance.calculate(game, source, this); if (x > 0) { return controller.scry(x, source, game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int x = source.getManaCostsToPay().getX(); if (x > 0) { return controller.scry(x, source, game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller == null) { return false; } if (AddendumCondition.instance.apply(game, source)) { controller.scry(3, source, game); } controller.drawCards(3, game); return true; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int planeswalker = game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_PLANESWALKER, source.getControllerId(), game); if (planeswalker > 0) { controller.scry(planeswalker, source, game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int highCMC = new HighestConvertedManaCostValue().calculate(game, source, this); if (highCMC > 0) { controller.scry(highCMC, source, game); } controller.drawCards(3, game); return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); Permanent permanent = game.getPermanent(source.getFirstTarget()); if (permanent != null) { boolean isLittle = permanent.getConvertedManaCost() < 3; permanent.moveToZone(Zone.HAND, source.getSourceId(), game, true); if (isLittle && player != null) { player.scry(2, source, game); } } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { Player player = game.getPlayer(playerId); if (player != null) { if (player.chooseUse(outcome, "Scry 1? <i>(Look at the top card of your library. You may put that card on the bottom of your library.)</i>", source, game)) { player.scry(1, source, game); } } } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int numZombies = game.getBattlefield().countAll(filter, source.getControllerId(), game); if (numZombies > 0) { for (UUID playerId : game.getOpponents(source.getControllerId())) { Player opponent = game.getPlayer(playerId); if (opponent != null) { opponent.loseLife(numZombies, game, false); } } controller.scry(numZombies, source, game); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); if (player == null) { return false; } player.scry(1, source, game); if (!player.chooseUse( outcome, "Reveal the top card of your library?", source, game )) { return true; } Card card = player.getLibrary().getFromTop(game); player.revealCards(source, new CardsImpl(card), game); if (card.isBasic() && card.isLand()) { player.moveCards( card, Zone.BATTLEFIELD, source, game, true, false, true, null ); } return true; } }
@Override public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { controller.scry(3, source, game); Cards cards = new CardsImpl(); Card card = controller.getLibrary().getFromTop(game); if (card != null) { cards.add(card); controller.revealCards(sourceObject.getIdName(), cards, game); controller.gainLife(card.getConvertedManaCost(), game, source); } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { MageObject sourceObject = game.getObject(source.getSourceId()); if (sourceObject != null) { for (UUID targetId : getTargetPointer().getTargets(game, source) ) { Spell spell = game.getStack().getSpell(targetId); if (spell != null) { game.getStack().counter(targetId, source.getSourceId(), game); Player controller = game.getPlayer(source.getControllerId()); // If it was a Jace planeswalker, you may discard a card. If you do, draw a card if (filter.match(spell, game) && controller != null) { controller.scry(2, source, game); } } } return true; } return false; } }
@Override public boolean apply(Game game, Ability source) { Permanent permanent = game.getPermanent(source.getSourceId()); Player player = game.getPlayer(source.getControllerId()); if (player != null) { player.scry(1, source, game); if (permanent != null) { permanent.addCounters(CounterType.LANDMARK.createInstance(), source, game); int counters = permanent.getCounters(game).getCount(CounterType.LANDMARK); if (counters > 2) { permanent.removeCounters("landmark", counters, game); new TransformSourceEffect(true).apply(game, source); new CreateTokenEffect(new TreasureToken("XLN"), 3).apply(game, source); } return true; } } return false; } }
Player player = getPlayer(playerId); if (player != null && player.getHand().size() < startingHandSize) { player.scry(1, null, this);