Package mage.filter.common

Examples of mage.filter.common.FilterControlledCreaturePermanent


        this.expansionSetCode = "AVR";

        this.color.setWhite(true);

        // Whenever a creature enters the battlefield under your control, put a +1/+1 counter on each creature you control.
        this.addAbility(new CreatureEntersBattlefieldTriggeredAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent())));
    }
View Full Code Here


        this.power = new MageInt(2);
        this.toughness = new MageInt(2);

        // Each creature you control is unblockable as long as defending player controls an artifact land.
        Effect effect = new ConditionalRestrictionEffect(
                new UnblockableAllEffect(new FilterControlledCreaturePermanent("Creatures you control"), Duration.WhileOnBattlefield),
                new DefendingPlayerControlsCondition(filter));
        effect.setText("Each creature you control is unblockable as long as defending player controls an artifact land");
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
    }
View Full Code Here

        }
        if (player == null || sourcePermanent == null) {
            return false;
        }

        FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature other than " + sourcePermanent.getName());
        filter.add(new AnotherPredicate());

        Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
        if (target.canChoose(source.getSourceId(), player.getId(), game)) {
            player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
            Permanent permanent = game.getPermanent(target.getFirstTarget());
View Full Code Here

        ability.addEffect(effect);
        ability.addTarget(new TargetCreaturePermanent(0,1));
        this.addAbility(ability);
       
        // -2: Put a +1/+1 counter on each creature you control and a loyalty counter on each other planeswalker you control.
        ability = new LoyaltyAbility(new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent()), -2);
        effect = new AddCountersAllEffect(CounterType.LOYALTY.createInstance(), filter);
        effect.setText("and a loyalty counter on each other planeswalker you control");
        ability.addEffect(effect);
        this.addAbility(ability);
       
View Full Code Here

        this.expansionSetCode = "MMQ";

        this.color.setGreen(true);

        // Draw a card for each creature you control.
        this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent())));
    }
View Full Code Here

        this.expansionSetCode = "KTK";

        this.color.setWhite(true);

        // Creatures you control have vigilance.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityControlledEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield, new FilterControlledCreaturePermanent("Creatures"))));
       
        // Each creature you control can block an additional creature.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAdditionalCreatureAllEffect(1, new FilterControlledCreaturePermanent("Each creature you control"), Duration.WhileOnBattlefield)));
    }
View Full Code Here

        this.color.setGreen(true);
        this.power = new MageInt(2);
        this.toughness = new MageInt(3);

        // {3}{G}: Target creature gets +X/+X until end of turn, where X is the number of creatures you control.
        PermanentsOnBattlefieldCount amount = new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent());
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                new BoostTargetEffect(amount, amount, Duration.EndOfTurn, true),
                new ManaCostsImpl("{3}{G}"));
        ability.addTarget(new TargetCreaturePermanent());
        this.addAbility(ability);
View Full Code Here

                        if (numberOfCreatures == 1) {
                            if (permanentToSacrifice != null) {
                                toSacrifice.add(permanentToSacrifice);
                            }
                        } else if (greatestPower != Integer.MIN_VALUE) {
                            FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature to sacrifice with power equal to " + greatestPower);
                            filter.add(new PowerPredicate(Filter.ComparisonType.Equal, greatestPower));
                            Target target = new TargetControlledCreaturePermanent(filter);
                            if (opponent.choose(outcome, target, playerId, game)) {
                                Permanent permanent = game.getPermanent(target.getFirstTarget());
                                if (permanent != null) {
                                    toSacrifice.add(permanent);
View Full Code Here

        // Strive - Twinflame costs 2R more to cast for each target beyond the first.
        this.addAbility(new StriveAbility("{2}{R}"));
        // Choose any number of target creatures you control. For each of them, put a token that's a copy of that creature onto the battlefield. Those tokens have haste. Exile them at the beginning of the next end step.
        this.getSpellAbility().addEffect(new TwinflameCopyEffect());
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, new FilterControlledCreaturePermanent(), false));
               
    }
View Full Code Here

        this.expansionSetCode = "ONS";

        this.color.setRed(true);

        // {3}{R}{R}: Untap all creatures you control. After this main phase, there is an additional combat phase followed by an additional main phase. Activate this ability only any time you could cast a sorcery.
        Ability ability = new ActivateAsSorceryActivatedAbility(Zone.BATTLEFIELD, new UntapAllControllerEffect(new FilterControlledCreaturePermanent(), "Untap all creatures you control"), new ManaCostsImpl<>("{3}{R}{R}"));
        ability.addEffect(new AdditionalCombatPhaseEffect());
        this.addAbility(ability);
    }
View Full Code Here

TOP

Related Classes of mage.filter.common.FilterControlledCreaturePermanent

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.