Examples of TargetControlledCreaturePermanent


Examples of mage.target.common.TargetControlledCreaturePermanent

        this.expansionSetCode = "EXO";

        this.color.setBlack(true);

        // As an additional cost to cast Culling the Weak, sacrifice a creature.
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature"))));
       
        // Add {B}{B}{B}{B} to your mana pool.
        this.getSpellAbility().addEffect(new BasicManaEffect(new Mana(0, 0, 0, 0, 4, 0, 0)));
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        return new EldraziMonumentEffect(this);
    }

    @Override
    public boolean apply(Game game, Ability source) {
        TargetControlledPermanent target = new TargetControlledCreaturePermanent();
        Player player = game.getPlayer(source.getControllerId());
        if (target.canChoose(source.getControllerId(), game)) {
            player.choose(this.outcome, target, source.getSourceId(), game);
            Permanent permanent = game.getPermanent(target.getFirstTarget());
            if (permanent != null) {
                return permanent.sacrifice(source.getSourceId(), game);
            }
        }
        Permanent permanent = game.getPermanent(source.getSourceId());
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent();
        if (controller != null) {
            if (target.canChoose(source.getControllerId(), game)
                && controller.chooseUse(outcome, "Cipher this spell to a creature?", game)) {
                controller.chooseTarget(outcome, target, source, game);
                Card sourceCard = game.getCard(source.getSourceId());
                Permanent targetCreature = game.getPermanent(target.getFirstTarget());
                if (targetCreature != null && sourceCard != null) {
                    String ruleText = new StringBuilder("you may cast a copy of ").append(sourceCard.getLogName()).append(" without paying its mana cost").toString();
                    Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new CipherStoreEffect(source.getSourceId(), ruleText), true);
                    ContinuousEffect effect = new GainAbilityTargetEffect(ability, Duration.Custom);
                    effect.setTargetPointer(new FixedTarget(target.getFirstTarget()));
                    game.addEffect(effect, source);
                    game.informPlayers(new StringBuilder(sourceCard.getLogName()).append(": Spell ciphered to ").append(targetCreature.getLogName()).toString());
                    return sourceCard.moveToExile(null, "", source.getSourceId(), game);
                } else {
                    return false;
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

    @Override
    public boolean replaceEvent(GameEvent event, Ability source, Game game) {
        Permanent creature = game.getPermanent(event.getTargetId());
        Player controller = game.getPlayer(source.getControllerId());
        if (creature != null && controller != null) {
            Target target = new TargetControlledCreaturePermanent(1, Integer.MAX_VALUE, filter, true);
            target.setRequired(false);
            if (!target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
                return false;
            }
            if (controller.chooseUse(Outcome.Detriment, "Devour creatures?", game)) {
                controller.chooseTarget(Outcome.Detriment, target, source, game);
                if (target.getTargets().size() > 0) {
                    List<ArrayList<String>> cardSubtypes = new ArrayList<>();
                    int devouredCreatures = target.getTargets().size();
                    game.informPlayers(new StringBuilder(creature.getName()).append(" devours ").append(devouredCreatures).append(" creatures").toString());
                    for (UUID targetId: target.getTargets()) {
                        Permanent targetCreature = game.getPermanent(targetId);
                        if (targetCreature != null) {
                            cardSubtypes.add((ArrayList<String>) targetCreature.getSubtype());
                        }
                        if (targetCreature == null || !targetCreature.sacrifice(source.getSourceId(), game)) {
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        this.addAbility(new SpellCastControllerTriggeredAbility(new CreateTokenEffect(new BeastToken()), filterCreature, false));

        // Whenever you cast a noncreature spell, put three +1/+1 counters on target creature you control.
        Effect effect = new AddCountersTargetEffect(CounterType.P1P1.createInstance(3));
        Ability ability = new SpellCastControllerTriggeredAbility(effect, filterNonCreature, false);
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);

        // Whenever a land enters the battlefield under your control, you gain 3 life.
        effect = new GainLifeEffect(3);
        ability = new EntersBattlefieldControlledTriggeredAbility(effect, new FilterLandPermanent("a land"));
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        // A deck can have any number of cards named Shadowborn Apostle.
        this.addInfo("rule", "A deck can have any number of cards named Shadowborn Apostle.");
        // {B}, Sacrifice six creatures named Shadowborn Apostle: Search your library for a Demon creature and put it onto the battlefield. Then shuffle your library.
        Effect effect = new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter), false, true);
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, effect, new ManaCostsImpl("{B}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(6,6,filterApostle, false)));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        this.color.setRed(true);

        // {R}, Sacrifice a creature: Barrage of Expendables deals 1 damage to target creature or player.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        ability.addTarget(new TargetCreatureOrPlayer());
        this.addAbility(ability);
       
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        // Sacrifice another creature: Blood Bairn gets +2/+2 until end of turn.
        this.addAbility(new SimpleActivatedAbility(
                Zone.BATTLEFIELD,
                new BoostSourceEffect(2,2, Duration.EndOfTurn),
                new SacrificeTargetCost(new TargetControlledCreaturePermanent(1,1,filter, true))));

    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

    public SpontaneousCombustion(UUID ownerId) {
        super(ownerId, 348, "Spontaneous Combustion", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{B}{R}");
        this.expansionSetCode = "TMP";
        this.color.setRed(true);
        this.color.setBlack(true);
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        this.getSpellAbility().addEffect(new DamageAllEffect(3, new FilterCreaturePermanent()));
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        super(ownerId, 116, "Earthcraft", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
        this.expansionSetCode = "TMP";
        this.color.setGreen(true);

        // Tap an untapped creature you control: Untap target basic land.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new UntapTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filterCreature, true)));
        ability.addTarget(new TargetControlledPermanent(filterLand));
        this.addAbility(ability);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.