use of mage.abilities.effects.common.ExileAllEffect in project mage by magefree.
the class MoratoriumStoneEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getCard(source.getFirstTarget());
if (card == null) {
return false;
}
String cardName = card.getName();
FilterCard filter1 = new FilterCard();
filter1.add(new NamePredicate(cardName));
FilterPermanent filter2 = new FilterPermanent();
filter2.add(new NamePredicate(cardName));
return new ExileGraveyardAllPlayersEffect(filter1).apply(game, source) && new ExileAllEffect(filter2).apply(game, source);
}
use of mage.abilities.effects.common.ExileAllEffect in project mage by magefree.
the class AjaniStrengthOfThePrideEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null || player.getLife() < game.getStartingLife() + 15) {
return false;
}
new ExileSourceEffect().apply(game, source);
return new ExileAllEffect(filter).apply(game, source);
}
use of mage.abilities.effects.common.ExileAllEffect in project mage by magefree.
the class NightmareUnmakingEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
FilterPermanent filter = new FilterCreaturePermanent();
filter.add(new PowerPredicate(comparisonType, player.getHand().size()));
return new ExileAllEffect(filter).apply(game, source);
}
use of mage.abilities.effects.common.ExileAllEffect in project mage by magefree.
the class DualNatureExileEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
Permanent creature = getTargetPointer().getFirstTargetPermanentOrLKI(game, source);
if (creature != null) {
FilterPermanent filter = new FilterPermanent();
filter.add(TokenPredicate.TRUE);
filter.add(new NamePredicate(creature.getName()));
new ExileAllEffect(filter).apply(game, source);
return true;
}
return false;
}
Aggregations