@Override public boolean apply(Card input, Game game) { return input.isFaceDown(game); }
@Override public boolean apply(Card input, Game game) { return !input.isFaceDown(game); }
@Override public boolean apply(MageObject input, Game game) { boolean isFaceDown = false; Abilities<Ability> abilities; if (input instanceof Card) { abilities = ((Card) input).getAbilities(game); isFaceDown = ((Card) input).isFaceDown(game); } else { abilities = input.getAbilities(); } if (isFaceDown) { for (Ability ability : abilities) { if (!ability.getSourceId().equals(input.getId()) && !ability.getClass().equals(JohanVigilanceAbility.class)) { return false; } } return true; } for (Ability ability : abilities) { if (!Objects.equals(ability.getClass(), SpellAbility.class) && !ability.getClass().equals(JohanVigilanceAbility.class)) { return false; } } return true; }
@Override public boolean apply(Game game, Ability source) { MageObject mageObject = game.getObject(source.getSourceId()); if (mageObject != null) { if (mageObject instanceof Permanent) { return ((Permanent)mageObject).isFaceDown(game); } if (mageObject instanceof Card) { return ((Card)mageObject).isFaceDown(game); } } return false; } }
MageObject mageObject = game.getObject(uuid); if (mageObject != null) { if ((mageObject instanceof Card) && ((Card) mageObject).isFaceDown(game)) { continue;
@Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { if (affectedControllerId.equals(source.getControllerId())) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Card card = game.getCard(objectId); return (card != null && card.isFaceDown(game) && game.getExile().containsId(card.getId(), game) && (Boolean) game.getState().getValue("Exiled_IntetTheDreamer" + card.getId())); } } return false; } }
@Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { if (affectedControllerId.equals(source.getControllerId()) && game.getState().getZone(objectId) == Zone.EXILED) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { Card card = game.getCard(objectId); if (card != null && card.isFaceDown(game)) { Set<UUID> exileZones = (Set<UUID>) game.getState().getValue(GrimoireThief.VALUE_PREFIX + source.getSourceId().toString()); if (exileZones != null) { for (ExileZone exileZone : game.getExile().getExileZones()) { if (exileZone.contains(objectId)) { if (!exileZones.contains(exileZone.getId())) { return false; } } } return true; } } } } return false; } }
@Override public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) { if (affectedControllerId.equals(source.getControllerId()) && game.getState().getZone(objectId) == Zone.EXILED) { Player controller = game.getPlayer(source.getControllerId()); MageObject sourceObject = source.getSourceObject(game); if (controller != null && sourceObject != null) { Card card = game.getCard(objectId); if (card != null && card.isFaceDown(game)) { Set<UUID> exileZones = (Set<UUID>) game.getState().getValue(GontiLordOfLuxury.VALUE_PREFIX + source.getSourceId().toString()); if (exileZones != null) { for (ExileZone exileZone : game.getExile().getExileZones()) { if (exileZone.contains(objectId)) { if (!exileZones.contains(exileZone.getId())) { return false; } } } return true; } } } } return false; } }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (!event.getTargetId().equals(getSourceId())) { MageObject sourceObj = this.getSourceObject(game); if (sourceObj != null) { if (sourceObj instanceof Card && ((Card)sourceObj).isFaceDown(game)) { // if face down and it's not itself that is turned face up, it does not trigger return false; } } else { // Permanent is and was not on the battlefield return false; } } Permanent permanent = game.getPermanent(event.getTargetId()); if (filter.match(permanent, getSourceId(), getControllerId(), game)) { if (setTargetPointer) { for (Effect effect: getEffects()) { effect.setTargetPointer(new FixedTarget(event.getTargetId())); } } return true; } return false; }
fromZone = game.getState().getZone(card.getId()); boolean hideCard = fromZone == Zone.LIBRARY || (card.isFaceDown(game) && fromZone != Zone.STACK && fromZone != Zone.BATTLEFIELD); if (moveCardToHandWithInfo(card, source == null ? null : source.getSourceId(), game, !hideCard)) { successfulMovedCards.add(card); for (Card card : cards) { fromZone = game.getState().getZone(card.getId()); boolean withName = (fromZone == Zone.BATTLEFIELD || fromZone == Zone.STACK) || !card.isFaceDown(game); if (moveCardToExileWithInfo(card, null, "", source == null ? null : source.getSourceId(), game, fromZone, withName)) { successfulMovedCards.add(card);
@Override public boolean moveCardToHandWithInfo(Card card, UUID sourceId, Game game, boolean withName ) { boolean result = false; Zone fromZone = game.getState().getZone(card.getId()); if (fromZone == Zone.BATTLEFIELD && !(card instanceof Permanent)) { card = game.getPermanent(card.getId()); } if (card.moveToZone(Zone.HAND, sourceId, game, false)) { if (card instanceof PermanentCard && game.getCard(card.getId()) != null) { card = game.getCard(card.getId()); } if (!game.isSimulation()) { game.informPlayers(getLogName() + " puts " + (withName ? card.getLogName() : (card.isFaceDown(game) ? "a face down card" : "a card")) + " from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + ' ' + (card.isOwnedBy(this.getId()) ? "into their hand" : "into its owner's hand") ); } result = true; } return result; }
MageObject mageObject = game.getObject(uuid); if (mageObject != null) { if ((mageObject instanceof Card) && ((Card) mageObject).isFaceDown(game)) { continue;
Card card = game.getCard(objectId); if (card != null && card.isFaceDown(game)) { ExileZone zone = game.getExile().getExileZone( CardUtil.getExileZoneId(game,
for (UUID targetId : source.getTargets().get(1).getTargets()) { Card card = game.getCard(targetId); if (card != null && !card.isFaceDown(game)) { Player player = game.getPlayer(card.getOwnerId()); if (player != null) {
if (zone != null) { if (object instanceof Card && ((Card) object).isFaceDown(game) && lookAtFaceDownCard((Card) object, game)) { result = true;
if (game != null) { Zone cardZone = game.getState().getZone(card.getId()); if (card.isFaceDown(game)) { showFaceUp = false; if (Zone.BATTLEFIELD != cardZone) {
if (card.isFaceDown(game)) { return false;