Examples of TargetControlledCreaturePermanent


Examples of mage.target.common.TargetControlledCreaturePermanent

            Card card = player.getLibrary().getCard(target.getFirstTarget(), game);
            if (card != null) {
                card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
                Permanent equipment = game.getPermanent(card.getId());

                Target targetCreature = new TargetControlledCreaturePermanent();
                if (equipment != null && player.choose(Outcome.BoostCreature, targetCreature, source.getSourceId(), game)) {
                    Permanent permanent = game.getPermanent(targetCreature.getFirstTarget());
                    permanent.addAttachment(equipment.getId(), game);
                }
            }
        }
        player.shuffleLibrary(game);
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        this.expansionSetCode = "ZEN";

        this.color.setWhite(true);

        // Two target creatures you control each get +2/+2 and gain flying until end of turn.
        this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(2));
        this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2, Duration.EndOfTurn));
        this.getSpellAbility().addEffect(new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

    public CarnageAltar(UUID ownerId) {
        super(ownerId, 198, "Carnage Altar", Rarity.UNCOMMON, new CardType[]{CardType.ARTIFACT}, "{2}");
        this.expansionSetCode = "ZEN";

        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(3));
        ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent()));
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

* @author BetaSteward_at_googlemail.com
*/
public class EquipAbility extends ActivatedAbilityImpl {

    public EquipAbility(Outcome outcome, Cost cost) {
        this(outcome, cost, new TargetControlledCreaturePermanent());
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        // Whenever a spell or ability you control counters a spell, you may put a 1/1 blue Merfolk creature token onto the battlefield.
        this.addAbility(new LullmageMentorTriggeredAbility());
        this.addWatcher(new CastedSpellsWithSpellTarget());
        // Tap seven untapped Merfolk you control: Counter target spell.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(7, 7, filter, true)));
        ability.addTarget(new TargetSpell());
        this.addAbility(ability);

    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

    public void adjustCosts(Ability ability, Game game) {
        Player player = game.getPlayer(controllerId);
        if (player == null || !(ability instanceof SpellAbility)) {
            return;
        }
        Target target = new TargetControlledCreaturePermanent(1, Integer.MAX_VALUE, filter,true);
        target.setTargetName("creatures to convoke");
        if (!target.canChoose(sourceId, controllerId, game)) {
            return;
        }
        if (player.chooseUse(Outcome.Detriment, "Convoke creatures?", game)) {
            player.chooseTarget(Outcome.Tap, target, ability, game);
            if (target.getTargets().size() > 0) {
                for (UUID creatureId: target.getTargets()) {
                    Permanent perm = game.getPermanent(creatureId);
                    if (perm == null || ability.getManaCostsToPay().convertedManaCost() == 0) {
                        continue;
                    }
                    if (!perm.isTapped() && perm.tap(game)) {
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

     * @param manaCost ninjutsu mana cost
     */
    public NinjutsuAbility(ManaCost manaCost) {
        super(Zone.HAND,new NinjutsuEffect(), manaCost);
        this.addCost(new RevealNinjutsuCardCost());
        this.addCost(new ReturnAttackerToHandTargetCost(new TargetControlledCreaturePermanent(1,1,filter,false)));
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

                FilterControlledCreaturePermanent filter = ((OfferingAbility) source).getFilter();
                Card spellToCast = game.getCard(source.getSourceId());
                Player player = game.getPlayer(source.getControllerId());
                if (player != null &&  !CardUtil.isCheckPlayableMode(affectedAbility) &&
                        player.chooseUse(Outcome.Benefit, "Offer a " + filter.getMessage() + " to cast " + spellToCast.getName() + "?", game)) {
                    Target target = new TargetControlledCreaturePermanent(1,1,filter,true);
                    player.chooseTarget(Outcome.Sacrifice, target, source, game);
                    if (!target.isChosen()) {
                        return false;
                    }
                    game.getState().setValue("offering_" + card.getId(), true);
                    Permanent offer = game.getPermanent(target.getFirstTarget());
                    if (offer != null) {
                        UUID activationId = UUID.randomUUID();
                        OfferingCostReductionEffect effect = new OfferingCostReductionEffect(spellToCast.getSpellAbility().getId(), offer.getSpellAbility().getManaCosts(), activationId);
                        game.addEffect(effect, source);
                        offer.sacrifice(source.getSourceId(), game);
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

        this.toughness = new MageInt(2);

        // When Kor Outfitter enters the battlefield, you may attach target Equipment you control to target creature you control.
        Ability ability = new EntersBattlefieldTriggeredAbility(new EquipEffect(), true);
        ability.addTarget(new TargetControlledPermanent(filter));
        ability.addTarget(new TargetControlledCreaturePermanent());
        this.addAbility(ability);
    }
View Full Code Here

Examples of mage.target.common.TargetControlledCreaturePermanent

    public ToothAndClaw(UUID ownerId) {
        super(ownerId, 210, "Tooth and Claw", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}");
        this.expansionSetCode = "TMP";
        this.color.setRed(true);
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new CarnivoreToken(), 1), new SacrificeTargetCost(new TargetControlledCreaturePermanent(2))));
    }
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.