Package mage.filter.common

Examples of mage.filter.common.FilterEnchantment


        this.getSpellAbility().getModes().setMaxModes(1);
        this.getSpellAbility().getModes().setMaxModes(3);

        Mode mode1 = new Mode();
        mode1.getEffects().add(new DestroyTargetEffect());
        mode1.getTargets().add(new TargetPermanent(new FilterEnchantment()));
        this.getSpellAbility().addMode(mode1);

        Mode mode2 = new Mode();
        mode2.getEffects().add(new DestroyTargetEffect());
        mode2.getTargets().add(new TargetPermanent(new FilterLandPermanent()));
View Full Code Here


    }

    @Override
    public boolean apply(Game game, Ability source) {
        int count = 0;
        for (Permanent permanent : game.getBattlefield().getActivePermanents(new FilterEnchantment(), source.getControllerId(), source.getSourceId(), game)) {
            if (permanent.destroy(source.getSourceId(), game, false)) {
                count++;
            }
        }
        if (count > 0) {
View Full Code Here

        this.color.setWhite(true);

        // Destroy two target enchantments.
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetPermanent(2, new FilterEnchantment()));
    }
View Full Code Here

        this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // Enchanted creature gets +1/+1 for each enchantment you control and has first strike.
        PermanentsOnBattlefieldCount countEnchantments = new PermanentsOnBattlefieldCount(new FilterEnchantment(filter));
        SimpleStaticAbility ability2 = new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(countEnchantments, countEnchantments, Duration.WhileOnBattlefield));
        ability2.addEffect(new GainAbilityAttachedEffect(FirstStrikeAbility.getInstance(), AttachmentType.AURA));
        this.addAbility(ability2);
    }
View Full Code Here

        this.getSpellAbility().addEffect(new BoostAllEffect(-1,-1, Duration.EndOfTurn,new FilterCreaturePermanent("All creatures"), false));

        // or destroy target enchantment;
        Mode mode = new Mode();
        mode.getEffects().add(new DestroyTargetEffect());
        mode.getTargets().add(new TargetPermanent(new FilterEnchantment()));
        this.getSpellAbility().addMode(mode);

        // or regenerate each creature you control.
        mode = new Mode();
        mode.getEffects().add(new RegenerateAllEffect(new FilterControlledCreaturePermanent()));
View Full Code Here

        return new HarmonicConvergenceEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        List<Permanent> enchantments = game.getBattlefield().getActivePermanents(new FilterEnchantment(),
                source.getControllerId(),
                source.getSourceId(),
                game);

        HashMap<UUID, List<Permanent>> moveList = new HashMap<UUID, List<Permanent>>();
View Full Code Here

        // Tear
        // Destroy target enchantment.
        getRightHalfCard().getColor().setWhite(true);
        getRightHalfCard().getSpellAbility().addEffect(new DestroyTargetEffect());
        target = new TargetPermanent(new FilterEnchantment());
        getRightHalfCard().getSpellAbility().addTarget(target);
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterEnchantment

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.