Package mage.filter.common

Examples of mage.filter.common.FilterControlledCreaturePermanent


    this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
    Ability ability = new EnchantAbility(auraTarget.getTargetName());
    this.addAbility(ability);
        // At the beginning of your upkeep, sacrifice a creature.
        Ability ability2 = new BeginningOfUpkeepTriggeredAbility(new SacrificeTargetEffect("sacrifice a creature"), TargetController.YOU, false);
        ability2.addTarget(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent(),false));
        this.addAbility(ability2);
        // Enchanted creature gets +3/+3 and has trample.
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEnchantedEffect(3, 3, Duration.WhileOnBattlefield)));
        this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.AURA)));
        // Enchanted creature is a Demon Spirit.
View Full Code Here


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

        // {R}{G}: Creatures you control gain trample until end of turn.
        this.addAbility(new SimpleActivatedAbility(
                Zone.BATTLEFIELD, new GainAbilityAllEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, new FilterControlledCreaturePermanent(), "Creatures you control gain trample until end of turn"),
                new ManaCostsImpl("{R}{G}")));
        // {1}{R}{G}: Target land you control becomes a 4/4 Elemental creature until end of turn. It's still a land.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureTargetEffect(new SkarrgGuildmageToken(), "land", Duration.EndOfTurn), new ManaCostsImpl("{1}{R}{G}") );
        ability.addTarget(new TargetLandPermanent(filter));
        this.addAbility(ability);
View Full Code Here

        // First strike
        this.addAbility(FirstStrikeAbility.getInstance());

        // Soulsurge Elemental's power is equal to the number of creatures you control.
        Effect effect = new SetPowerSourceEffect(new PermanentsOnBattlefieldCount(new FilterControlledCreaturePermanent("creatures you control")), Duration.EndOfGame);
        this.addAbility(new SimpleStaticAbility(Zone.ALL, effect));
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            Target target = new TargetControlledPermanent(new FilterControlledCreaturePermanent());

            if (target.canChoose(player.getId(), game) && player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
                Permanent permanent = game.getPermanent(target.getFirstTarget());
                if (permanent != null) {
                    return permanent.sacrifice(source.getSourceId(), game);
View Full Code Here

        this.expansionSetCode = "SHM";

        this.color.setBlack(true);

        // As an additional cost to cast Rite of Consumption, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,new FilterControlledCreaturePermanent("a creature"), false)));
        // Rite of Consumption deals damage equal to the sacrificed creature's power to target player. You gain life equal to the damage dealt this way.
        this.getSpellAbility().addEffect(new RiteOfConsumptionEffect());
        this.getSpellAbility().addTarget(new TargetPlayer());
    }
View Full Code Here

        this.expansionSetCode = "MMQ";

        this.color.setGreen(true);

        // Exile a creature you control: Add X mana of any one color to your mana pool, where X is the exiled creature's converted mana cost plus one. Spend this mana only to cast creature spells.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(), new ExileTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature you control"), true)));
        ability.addChoice(new ChoiceColor());
        this.addAbility(ability);
    }
View Full Code Here

        // Morph {4}{G}
        this.addAbility(new MorphAbility(this, new ManaCostsImpl("{4}{G}")));
        // Whenever Pine Walker or another creature you control is turned face up, untap that creature.
        Effect effect = new UntapTargetEffect();
        effect.setText("untap that creature");
        this.addAbility(new TurnedFaceUpAllTriggeredAbility(effect, new FilterControlledCreaturePermanent("{this} or another creature you control"), true));

    }
View Full Code Here

    public GavonyTownship(UUID ownerId) {
        super(ownerId, 239, "Gavony Township", Rarity.RARE, new CardType[]{CardType.LAND}, null);
        this.expansionSetCode = "ISD";

        this.addAbility(new ColorlessManaAbility());
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersAllEffect(CounterType.P1P1.createInstance(), new FilterControlledCreaturePermanent("creature you control")), new ManaCostsImpl("{2}{G}{W}"));
        ability.addCost(new TapSourceCost());
        this.addAbility(ability);
    }
View Full Code Here

        // Flying
        this.addAbility(FlyingAbility.getInstance());
       
        // Whenever Butcher of Malakir or another creature you control dies, each opponent sacrifices a creature.
        this.addAbility(new DiesThisOrAnotherCreatureTriggeredAbility(new SacrificeOpponentsEffect(new FilterControlledCreaturePermanent("a creature")), false, filter));
    }
View Full Code Here

        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, filter, false)));
        ability.addTarget(new TargetPlayer());
        this.addAbility(ability);
        // {1}{B}, Sacrifice a creature: Return Tymaret from your graveyard to your hand.
        ability = new SimpleActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), new ManaCostsImpl("{1}{B}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1, new FilterControlledCreaturePermanent("a creature"), false)));
        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.