Package mage.filter.common

Examples of mage.filter.common.FilterNonlandPermanent


    @Override
    public boolean apply(Game game, Ability source) {
        Permanent sourcePermanent = game.getPermanent(source.getSourceId());
        if (sourcePermanent != null) {
            if (sourcePermanent.sacrifice(source.getSourceId(), game)) {
                return new DestroyAllEffect(new FilterNonlandPermanent()).apply(game, source);
            }
        }
        return false;
    }
View Full Code Here


        // Trample
        this.addAbility(TrampleAbility.getInstance());
       
        // When Child of Alara dies, destroy all nonland permanents. They can't be regenerated.
        this.addAbility(new DiesTriggeredAbility(new DestroyAllEffect(new FilterNonlandPermanent("nonland permanents"), true)));
       
    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
        // When Brago, King Eternal deals combat damage to a player, exile any number of target nonland permanents you control, then return those cards to the battlefield under their owner's control.
        Effect effect = new ExileTargetEffect(this.getId(), this.getName(), Zone.BATTLEFIELD);
        effect.setText("exile any number of target nonland permanents you control");
        Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(effect, false);
        ability.addTarget(new TargetControlledPermanent(0, Integer.MAX_VALUE, new FilterNonlandPermanent(), false));
        ability.addEffect(new ReturnFromExileEffect(this.getId(), Zone.BATTLEFIELD, ", then return those cards to the battlefield under their owner's control"));
        this.addAbility(ability);
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Random random = new Random();
        PlayerList players = game.getPlayerList();
        int count = players.size();
        if (count > 1) {
            FilterNonlandPermanent nonLand = new FilterNonlandPermanent();
            for (Permanent permanent : game.getBattlefield().getActivePermanents(nonLand, source.getControllerId(), source.getSourceId(), game)) {
                ContinuousEffect effect = new ScrambleverseControlEffect(players.get(random.nextInt(count)));
                effect.setTargetPointer(new FixedTarget(permanent.getId()));
                game.addEffect(effect, source);
            }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterNonlandPermanent

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.