Package mage.target.common

Examples of mage.target.common.TargetControlledPermanent


    public TrashForTreasure(UUID ownerId) {
        super(ownerId, 109, "Trash for Treasure", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{2}{R}");
        this.expansionSetCode = "MRD";
        this.color.setRed(true);
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(filterPermanent)));
        this.getSpellAbility().addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect());
        this.getSpellAbility().addTarget(new TargetCardInYourGraveyard(filterCard));
    }
View Full Code Here


        // Sacrifice an artifact: Target artifact is indestructible this turn.
        Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.EndOfTurn);
        effect.setText("Target artifact is indestructible this turn");
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
                effect, new SacrificeTargetCost(new TargetControlledPermanent(filterControlled)));
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here

        this.subtype.add("Beast");
        this.power = new MageInt(0);
        this.toughness = new MageInt(0);

        // Sacrifice an artifact: Put a +1/+1 counter on Arcbound Ravager.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()), new SacrificeTargetCost(new TargetControlledPermanent(filter))));
        // Modular 1
        this.addAbility(new ModularAbility(this, 1));
    }
View Full Code Here

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

        // {T}, Sacrifice an artifact: Add {R}{R} to your mana pool.
        Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, Mana.RedMana(2), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(new FilterControlledArtifactPermanent("an artifact"))));
        this.addAbility(ability);
    }
View Full Code Here

    public WandOfTheElements(UUID ownerId) {
        super(ownerId, 158, "Wand of the Elements", Rarity.RARE, new CardType[]{CardType.ARTIFACT}, "{4}");
        this.expansionSetCode = "DST";
        Ability firstAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WandOfTheElementsFirstToken()), new TapSourceCost());
        firstAbility.addCost(new SacrificeTargetCost(new TargetControlledPermanent(islandFilter)));
        this.addAbility(firstAbility);
        Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new WandOfTheElementsSecondToken()), new TapSourceCost());
        secondAbility.addCost(new SacrificeTargetCost(new TargetControlledPermanent(mountainFilter)));
        this.addAbility(secondAbility);

    }
View Full Code Here

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

        // {T}, Sacrifice an artifact: Draw a card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);
    }
View Full Code Here

            return false;
        }
        //Sacrifice an artifact.
        int convertedManaCost = 0;
        boolean sacrifice = false;
        TargetControlledPermanent targetArtifact = new TargetControlledPermanent(new FilterControlledArtifactPermanent());
        if(controller.chooseTarget(Outcome.Sacrifice, targetArtifact, source, game)){
            Permanent permanent = game.getPermanent(targetArtifact.getFirstTarget());
            if(permanent != null){
                convertedManaCost = permanent.getManaCost().convertedManaCost();
                sacrifice = permanent.sacrifice(source.getSourceId(), game);
            }
        }
View Full Code Here

        this.subtype.add("Goblin");
        this.subtype.add("Shaman");
        this.color.setRed(true);
        this.power = new MageInt(1);
        this.toughness = new MageInt(1);
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new DamageAllEffect(1, filterTargetedCreatures), new SacrificeTargetCost(new TargetControlledPermanent(filterSacrificed))));
    }
View Full Code Here

    public ShrapnelBlast(UUID ownerId) {
        super(ownerId, 106, "Shrapnel Blast", Rarity.UNCOMMON, new CardType[]{CardType.INSTANT}, "{1}{R}");
        this.expansionSetCode = "MRD";

        this.color.setRed(true);
        this.getSpellAbility().addCost(new SacrificeTargetCost(new TargetControlledPermanent(1, 1, filter, true)));
        this.getSpellAbility().addEffect(new DamageTargetEffect(5));
        this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());
    }
View Full Code Here

        Token token = new NahiriTheLithomancerKorSoldierToken();
        if (token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId())) {
            Permanent tokenPermanent = game.getPermanent(token.getLastAddedToken());
            if (tokenPermanent != null) {
                //TODO: Make sure the Equipment can legally enchant the token, preferably on targetting.
                Target target = new TargetControlledPermanent(0, 1, filter, true);
                if (target.choose(Outcome.Neutral, source.getControllerId(), source.getSourceId(), game)) {
                    Permanent equipmentPermanent = game.getPermanent(target.getFirstTarget());
                    if (equipmentPermanent != null) {
                        Permanent attachedTo = game.getPermanent(equipmentPermanent.getAttachedTo());
                        if (attachedTo != null) {
                            attachedTo.removeAttachment(equipmentPermanent.getId(), game);
                        }
View Full Code Here

TOP

Related Classes of mage.target.common.TargetControlledPermanent

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.