Package mage.filter.common

Examples of mage.filter.common.FilterLandPermanent


    public int calculate(Game game, Ability sourceAbility, Effect effect) {
        if (sourceAbility.getFirstTarget() == null) {
            return 0;
        }

        FilterLandPermanent filter = new FilterLandPermanent();
        filter.add(Predicates.not(new SupertypePredicate("Basic")));
        filter.add(new ControllerIdPredicate(sourceAbility.getFirstTarget()));

        return game.getBattlefield().count(filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game);
    }
View Full Code Here


        this.color.setGreen(true);

        // Enchant land
       
        TargetPermanent auraTarget = new TargetLandPermanent(new FilterLandPermanent());
        this.getSpellAbility().addTarget(auraTarget);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.PutCreatureInPlay));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);
        // Enchanted land is a 5/6 green Treefolk creature that's still a land.
View Full Code Here

        return new StormtideLeviathanEffect(this);
    }

    @Override
    public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
        for (Permanent land : game.getBattlefield().getActivePermanents(new FilterLandPermanent(), source.getControllerId(), game)) {
            switch (layer) {
                case TypeChangingEffects_4:
                    if (!land.getSubtype().contains("Island")) {
                        land.getSubtype().add("Island");
                    }
View Full Code Here

        // Play with the top card of your library revealed.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayWithTheTopCardRevealedEffect()));
        // You may play the top card of your library if it's a land card.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new PlayTheTopCardEffect(new FilterLandCard())));
        // Whenever a land enters the battlefield under your control, you gain 1 life.
        this.addAbility(new EntersBattlefieldControlledTriggeredAbility(new GainLifeEffect(1), new FilterLandPermanent("a land")));
    }
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.