Package mage.filter.common

Examples of mage.filter.common.FilterEnchantmentPermanent


        this.color.setGreen(true);
        this.color.setWhite(true);

        // Destroy target enchantment.
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
        // Put X 1/1 green Saproling creature tokens onto the battlefield, where X is that enchantment's converted mana cost.
        this.getSpellAbility().addEffect(new CreateTokenEffect(new SaprolingToken(), new TargetConvertedManaCost()));
    }
View Full Code Here


        // If you control a Forest, rather than pay Reverent Silence's mana cost, you may have each other player gain 6 life.
        this.addAbility(new AlternativeCostSourceAbility(new GainLifePlayersCost(6), new PermanentsOnTheBattlefieldCondition(filter)));
       
        // Destroy all enchantments.
        this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent("enchantments")));
    }
View Full Code Here

        this.toughness = new MageInt(1);

        // {3}{W}, Sacrifice Priest of Iroas: Destroy target enchantment.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{3}{W}"));
        ability.addCost(new SacrificeSourceCost());
        Target target = new TargetPermanent(new FilterEnchantmentPermanent());
        ability.addTarget(target);
        this.addAbility(ability);

    }
View Full Code Here

                    && game.getBattlefield().countAll(new FilterArtifactPermanent(), opponent.getId(), game)
                        > game.getBattlefield().countAll(new FilterArtifactPermanent(), source.getControllerId(), game)) {
                return true;
            }
            if (card.getCardType().contains(CardType.ENCHANTMENT)
                    && game.getBattlefield().countAll(new FilterEnchantmentPermanent(), opponent.getId(), game)
                        > game.getBattlefield().countAll(new FilterEnchantmentPermanent(), source.getControllerId(), game)) {
                return true;
            }
            final int yourLands = game.getBattlefield().countAll(new FilterLandPermanent(), source.getControllerId(), game);
            if (card.getCardType().contains(CardType.LAND)
                    && game.getBattlefield().countAll(new FilterLandPermanent(), opponent.getId(), game) > yourLands) {
View Full Code Here

        this.toughness = new MageInt(3);

        // Haunt (When this creature dies, exile it haunting target creature.)
        // When Absolver Thrull enters the battlefield or the creature it haunts dies, destroy target enchantment.
        Ability ability = new HauntAbility(this, new DestroyTargetEffect());
        Target target = new TargetPermanent(new FilterEnchantmentPermanent());
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        this.color.setBlue(true);

        // You may have Copy Enchantment enter the battlefield as a copy of any enchantment on the battlefield.
        Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new EntersBattlefieldEffect(
                new CopyEnchantmentEffect(new FilterEnchantmentPermanent()),
                "You may have {this} enter the battlefield as a copy of any enchantment on the battlefield",
                true));
        this.addAbility(ability);       
    }
View Full Code Here

        Target target = new TargetArtifactPermanent();
        this.getSpellAbility().addTarget(target);
        // or destroy target enchantment;
        Mode mode = new Mode();
        mode.getEffects().add(new DestroyTargetEffect());
        target = new TargetPermanent(new FilterEnchantmentPermanent());
        mode.getTargets().add(target);
        this.getSpellAbility().addMode(mode);
        // or destroy target artifact and target enchantment.
        mode = new Mode();
        mode.getEffects().add(new DestroyTargetEffect());
        target = new TargetArtifactPermanent();
        mode.getTargets().add(target);
        Effect effect = new DestroyTargetEffect();
        effect.setTargetPointer(new SecondTargetPointer());
        effect.setText("and target enchantment");
        mode.getEffects().add(effect);
        target = new TargetPermanent(new FilterEnchantmentPermanent());
        mode.getTargets().add(target);
        this.getSpellAbility().addMode(mode);


    }
View Full Code Here

        // {G}, {tap}, Sacrifice Elvish Lyrist: Destroy target enchantment.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{G}"));
        ability.addCost(new TapSourceCost());
        ability.addCost(new SacrificeSourceCost());
        ability.addTarget(new TargetPermanent(new FilterEnchantmentPermanent()));
        this.addAbility(ability);
    }
View Full Code Here

        // If you've cast another white spell this turn, you may cast Patrician's Scorn without paying its mana cost.
        this.addAbility(new AlternativeCostSourceAbility(new CastWhiteSpellThisTurnCondition()));
        this.addWatcher(new PatriciansScornWatcher());
        // Destroy all enchantments.
        this.getSpellAbility().addEffect(new DestroyAllEffect(new FilterEnchantmentPermanent()));
    }
View Full Code Here

        this.toughness = new MageInt(2);

        // When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life.
        Ability ability = new ConditionalTriggeredAbility(
                new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3), false),
                new PermanentsOnTheBattlefieldCondition(new FilterEnchantmentPermanent(), PermanentsOnTheBattlefieldCondition.CountType.MORE_THAN, 0),
                "When Lagonna-Band Elder enters the battlefield, if you control an enchantment, you gain 3 life");
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterEnchantmentPermanent

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.