Package mage.filter.common

Examples of mage.filter.common.FilterAttackingCreature


        this.expansionSetCode = "GTC";

        this.color.setBlue(true);

        // Return all attacking creatures to their owners' hands.
        this.getSpellAbility().addEffect(new ReturnToHandFromBattlefieldAllEffect(new FilterAttackingCreature("attacking creatures")));
    }
View Full Code Here


       
        // protection from black
        this.addAbility(new ProtectionAbility(filter));
       
        // Spirit of the Night has first strike as long as it's attacking.
        ConditionalContinousEffect effect = new ConditionalContinousEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), new SourceMatchesFilterCondition(new FilterAttackingCreature()), rule);
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

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

        // Whenever Fangren Pathcutter attacks, attacking creatures gain trample until end of turn.
        this.addAbility(new AttacksTriggeredAbility(new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterAttackingCreature()), false));
    }
View Full Code Here

        this.color.setWhite(true);

        // Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures.
        this.getSpellAbility().addEffect(new DamageMultiEffect(new ManacostVariableValue()));
        this.getSpellAbility().addTarget(new TargetAttackingCreature(0, Integer.MAX_VALUE, new FilterAttackingCreature(), true));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (UUID playerId : controller.getInRange()) {
                final int amount = game.getBattlefield().getAllActivePermanents(new FilterAttackingCreature(), playerId, game).size();
                if (amount > 0) {
                    Player player = game.getPlayer(playerId);
                    if (player != null) {
                        player.loseLife(amount, game);
                    }
View Full Code Here

        this.color.setWhite(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(1);

        // {1}{RW}, {untap}: Attacking creatures get +1/+0 until end of turn.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostAllEffect(1, 0, Duration.EndOfTurn, new FilterAttackingCreature(), false), new ManaCostsImpl("{1}{R/W}"));
        ability.addCost(new UntapSourceCost());
        this.addAbility(ability);
       
    }
View Full Code Here

        // Defender
        this.addAbility(DefenderAbility.getInstance());
        // Sacrifice Tinder Wall: Add {R}{R} to your mana pool.
        this.addAbility(new SimpleManaAbility(Zone.BATTLEFIELD, new BasicManaEffect(Mana.RedMana(2)), new SacrificeSourceCost()));
        // {R}, Sacrifice Tinder Wall: Tinder Wall deals 2 damage to target creature it's blocking.
        FilterAttackingCreature filter = new FilterAttackingCreature("creature it's blocking");
        filter.add(new BlockingByPredicate(this.getId()));
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new ManaCostsImpl("{R}"));
        ability.addTarget(new TargetCreaturePermanent(filter));
        ability.addCost(new SacrificeSourceCost());
        this.addAbility(ability);
       
View Full Code Here

        // Ends
        // Target player sacrifices two attacking creatures.
        getRightHalfCard().getColor().setRed(true);
        getRightHalfCard().getColor().setWhite(true);
        getRightHalfCard().getSpellAbility().addEffect(new SacrificeEffect(new FilterAttackingCreature(), 2, "Target player"));
        getRightHalfCard().getSpellAbility().addTarget(new TargetPlayer());

    }
View Full Code Here

        this.subtype.add("Human");
        this.subtype.add("Wizard");
        this.color.setBlack(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(2);
        this.addAbility(new AttacksTriggeredAbility(new GainAbilityControlledEffect(FearAbility.getInstance(), Duration.EndOfTurn, new FilterAttackingCreature(), true), false));
    }
View Full Code Here

        this.getSpellAbility().addTarget(new TargetAttackingCreature());
        // Cycling {5}{G}{W}{U}
        this.addAbility(new CyclingAbility(new ManaCostsImpl("{5}{G}{W}{U}")));
        // When you cycle Resounding Silence, exile up to two target attacking creatures.
        Ability ability = new CycleTriggeredAbility(new ExileTargetEffect());
        TargetPermanent target = new TargetAttackingCreature(0, 2, new FilterAttackingCreature("up to two target attacking creatures"), false);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterAttackingCreature

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.