Package mage.filter.common

Examples of mage.filter.common.FilterLandPermanent


        return new ExileAllEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        List<Permanent> permanents = game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game);
        for (Permanent permanent: permanents) {
            permanent.moveToExile(source.getSourceId(), "Realm Razer", source.getSourceId(), game);
        }
        return true;
    }
View Full Code Here


class LiegeOfTheTangleTriggeredAbility extends TriggeredAbilityImpl {
    LiegeOfTheTangleTriggeredAbility() {
        super(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.AWAKENING.createInstance()));
        this.addEffect(new LiegeOfTheTangleEffect());
        Target target = new TargetLandPermanent(0, Integer.MAX_VALUE, new FilterLandPermanent(), true);
        this.addTarget(target);
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            if (controller.chooseUse(outcome, "Destroy all lands? (otherwise all creatures are destroyed)", game)) {
                for (Permanent permanent:  game.getBattlefield().getActivePermanents(new FilterLandPermanent(), controller.getId(), source.getSourceId(), game)) {
                    permanent.destroy(source.getSourceId(), game, permanent.getCardType().contains(CardType.CREATURE));
                }
            } else {
                for (Permanent permanent:  game.getBattlefield().getActivePermanents(new FilterCreaturePermanent(), controller.getId(), source.getSourceId(), game)) {
                    permanent.destroy(source.getSourceId(), game, true);
View Full Code Here

        return new BoundlessRealmsEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        FilterLandPermanent filter = new FilterLandPermanent();
        filter.add(new ControllerPredicate(TargetController.YOU));

        int amount = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
        TargetCardInLibrary target = new TargetCardInLibrary(0, amount, new FilterBasicLandCard());

        Player player = game.getPlayer(source.getControllerId());
View Full Code Here

        this.power = new MageInt(4);
        this.toughness = new MageInt(5);

        // <i>Heroic</i> - Whenever you cast a spell that targets Anthousa, Setessan Hero, up to three target lands you control each become 2/2 Warrior creatures until end of turn. They're still lands.
        Ability ability = new HeroicAbility(new BecomesCreatureTargetEffect(new AnthousaWarriorToken(), "lands", Duration.EndOfTurn));
        ability.addTarget(new TargetControlledPermanent(0,3,new FilterLandPermanent("lands"), false));
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setGreen(true);

        // Put two target lands on top of their owners' libraries.
        this.getSpellAbility().addEffect(new PutOnLibraryTargetEffect(true));
        this.getSpellAbility().addTarget(new TargetLandPermanent(2,2, new FilterLandPermanent("lands"), false));
    }
View Full Code Here

        super(effect);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        List<Permanent> permanents = game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), source.getSourceId(), game);
        for (UUID playerId : game.getPlayer(source.getControllerId()).getInRange()) {
            Player player = game.getPlayer(playerId);
            if (player != null) {
                int amount = 0;
                for (Permanent permanent : permanents) {
View Full Code Here

        this.expansionSetCode = "USG";

        this.color.setRed(true);

        // As an additional cost to cast Raze, sacrifice a land.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1,1, new FilterLandPermanent(), true)));
        // Destroy target land.
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetLandPermanent());
    }
View Full Code Here

        return "If an opponent controls seven or more lands, Avatar of Fury costs {6} less to cast";
    }

    @Override
    public void adjustCosts(Ability ability, Game game) {
        FilterPermanent filter = new FilterLandPermanent();
        for (UUID playerId: game.getOpponents(ability.getControllerId())) {
            if (game.getBattlefield().countAll(filter, playerId, game) > 6) {
                CardUtil.adjustCost((SpellAbility)ability, 6);
                break;
            }
View Full Code Here

        this.color.setRed(true);
        this.power = new MageInt(6);
        this.toughness = new MageInt(4);

        // Whenever Lesser Gargadon attacks or blocks, sacrifice a land.
        this.addAbility(new AttacksOrBlocksTriggeredAbility(new SacrificeControllerEffect(new FilterLandPermanent(), 1, ""), false));
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterLandPermanent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.