Package mage.target.common

Examples of mage.target.common.TargetControlledPermanent


        // Defender
        this.addAbility(DefenderAbility.getInstance());
        // {G}, Sacrifice a Wall: Draw a card.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl("G"));
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);
       
    }
View Full Code Here


        boolean abilityApplied = false;
       
        int realCount = game.getBattlefield().countAll(filter, player.getId(), game);
        int amount = Math.min(4, realCount);

        Target target = new TargetControlledPermanent(amount, amount, filter, true);
        if (amount > 0 && target.canChoose(source.getSourceId(), player.getId(), game)) {
            while (!target.isChosen() && target.canChoose(player.getId(), game) && player.isInGame()) {
                player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
            }

            for ( int idx = 0; idx < target.getTargets().size(); idx++) {
                Permanent permanent = game.getPermanent((UUID)target.getTargets().get(idx));

                if ( permanent != null ) {
                    abilityApplied |= permanent.destroy(source.getSourceId(), game, false);
                }
            }
View Full Code Here

        // Prowess
        this.addAbility(new ProwessAbility());
       
        // Return three lands you control to their owner's hand: Return Pearl Lake Ancient to its owner's hand.
        this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new ReturnToHandSourceEffect(true),
                new ReturnToHandTargetCost(new TargetControlledPermanent(3, 3, new FilterControlledLandPermanent("lands"), true))));
    }
View Full Code Here

        // {W}, {tap}: Exile target land you control, then return it to the battlefield under your control.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetForSourceEffect("Exile Ruin Ghost"), new ManaCostsImpl("{W"));
        ability.addCost(new TapSourceCost());
        ability.addEffect(new ReturnToBattlefieldUnderYourControlTargetEffect());
        ability.addTarget(new TargetControlledPermanent(filter));
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "WWK";

        this.color.setBlue(true);

        // Return target permanent you control and target permanent you don't control to their owners' hands.
        this.getSpellAbility().addTarget(new TargetControlledPermanent());
        this.getSpellAbility().addTarget(new TargetPermanent(filter));
        this.getSpellAbility().addEffect(new AEtherTradewindsEffect());
       
    }
View Full Code Here

            FilterControlledPermanent filter = new FilterControlledPermanent(cardType + " permanent you control");
            filter.add(new CardTypePredicate(cardType));

            for (UUID playerId : controller.getInRange()) {
                int amount = Math.min(count, game.getBattlefield().countAll(filter, playerId, game));
                TargetControlledPermanent target = new TargetControlledPermanent(amount, amount, filter, false);
                Player player = game.getPlayer(playerId);
                if (player != null && player.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
                    sacrifices.addAll(target.getTargets());
                }
            }

            for (UUID targetId : sacrifices) {
                Permanent permanent = game.getPermanent(targetId);
View Full Code Here

        this.expansionSetCode = "NPH";

        this.addAbility(new ColorlessManaAbility());
        SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(1), new TapSourceCost());
        ability.addCost(new GenericManaCost(1));
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);
    }
View Full Code Here

        this.expansionSetCode = "AVR";

        this.color.setBlue(true);

        // Exile two target artifacts, creatures, and/or lands you control, then return those cards to the battlefield under your control.
        this.getSpellAbility().addTarget(new TargetControlledPermanent(2, 2, filter, false));
        this.getSpellAbility().addEffect(new GhostlyFlickerEffect());
    }
View Full Code Here

        Effect effect = new AddCountersSourceEffect(CounterType.P1P1.createInstance(2), true);
        effect.setText("with two +1/+1 counters on it");
        this.addAbility(new EntersBattlefieldAbility(effect));
        // {T}, Sacrifice another creature: Put a number of +1/+1 counters on Scourge of Skola Vale equal to the sacrificed creature's toughness.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScourgeOfSkolaValeEffect(), new TapSourceCost());
        ability.addCost(new SacrificeTargetCost(new TargetControlledPermanent(filter)));
        this.addAbility(ability);
    }
View Full Code Here

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

        // {tap}, Tap two untapped Humans you control: Exile target artifact or enchantment.
        Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileTargetEffect(), new TapSourceCost());
        ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, 2, humanFilter, false)));
        ability.addTarget(new TargetPermanent(filter));
        this.addAbility(ability);
    }
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.