@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(controllerId)) { UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && game.getOpponents(getControllerId()).contains(sourceControllerId)) { return true; } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(controllerId)) { UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && game.getOpponents(getControllerId()).contains(sourceControllerId)) { return true; } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { return !event.getFlag() && game.getOpponents(game.getControllerId(getSourceId())).contains(event.getPlayerId()); }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER) { if (event.getTargetId().equals(source.getControllerId()) && !Objects.equals(game.getControllerId(event.getSourceId()), source.getControllerId())) { return super.applies(event, source, game); } } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getControllerId())) { UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && game.getOpponents(source.getControllerId()).contains(sourceControllerId)) { return super.applies(event, source, game); } } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(source.getControllerId())) { UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && game.getOpponents(source.getControllerId()).contains(sourceControllerId)) { return super.applies(event, source, game); } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { boolean weAreDoingIt = isControlledBy(game.getControllerId(event.getSourceId())); boolean isM1M1Counters = event.getData().equals(CounterType.M1M1.getName()); if (weAreDoingIt && isM1M1Counters && event.getTargetId().equals(this.getSourceId())) { return true; } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (game.getOpponents(getControllerId()).contains(event.getTargetId())) { return isControlledBy(game.getControllerId(event.getSourceId())); } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { return source.isControlledBy(event.getTargetId()) || source.isControlledBy(game.getControllerId(event.getTargetId())); }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getPlayerId().equals(game.getControllerId(event.getSourceId()))) { for (Effect effect : this.getEffects()) { effect.setTargetPointer(new FixedTarget(event.getPlayerId())); } return true; } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { Card card = game.getCard(event.getTargetId()); if (card != null && event.getPlayerId().equals(game.getControllerId(sourceId)) && card.isCreature() && game.getState().getZone(card.getId()) == Zone.GRAVEYARD && event.getData().equals("repair")) { return true; } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(getControllerId())) { UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && game.getOpponents(getControllerId()).contains(sourceControllerId)) { getEffects().get(0).setValue("damageAmount", event.getAmount()); return true; } } return false; }
@Override public boolean apply(ObjectSourcePlayer<MageObject> input, Game game) { return input.getObject().getConvertedManaCost() <= game.getBattlefield().countAll(filter, game.getControllerId(input.getSourceId()), game); } }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (source != null && source.getControllerId() != null) { if (source.isControlledBy(game.getControllerId(event.getTargetId())) && event.getData() != null && event.getData().equals(CounterType.M1M1.getName()) && event.getAmount() > 0) { return true; } } return false; } }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(getControllerId())) { UUID sourceControllerId = game.getControllerId(event.getSourceId()); if (sourceControllerId != null && game.getOpponents(getControllerId()).contains(sourceControllerId)) { getEffects().get(0).setTargetPointer(new FixedTarget(sourceControllerId)); return true; } } return false; }
@Override public boolean checkTrigger(GameEvent event, Game game) { if (event.getTargetId().equals(this.sourceId)) { UUID controller = game.getControllerId(event.getSourceId()); if (controller != null) { Player player = game.getPlayer(controller); if (player != null) { getEffects().get(0).setTargetPointer(new FixedTarget(player.getId())); return true; } } } return false; }
@Override public boolean applies(GameEvent event, Ability source, Game game) { Player player = game.getPlayer(source.getControllerId()); if (player == null) { return false; } return player.hasOpponent(event.getTargetId(), game) || player.hasOpponent(game.getControllerId(event.getTargetId()), game); }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (source.isControlledBy(game.getControllerId(event.getSourceId()))) { MageObject object = game.getObject(event.getSourceId()); return object != null && (object.isInstant() || object.isSorcery()); } return false; }
@Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(game.getControllerId(source.getFirstTarget())); if (player == null) { return false; } player.moveCards(player.getLibrary().getTopCards(game, 3), Zone.GRAVEYARD, source, game); return new CounterTargetEffect().apply(game, source); } }
@Override public boolean applies(GameEvent event, Ability source, Game game) { if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) { if (game.getControllerId(redirectToObject.getSourceId()) != null) { if (redirectToObject.equals(new MageObjectReference(source.getTargets().get(1).getFirstTarget(), game))) { redirectTarget = source.getTargets().get(1); return true; } } } return false; } }