Package mage.target.common

Examples of mage.target.common.TargetNonlandPermanent


        this.expansionSetCode = "RTR";
        this.subtype.add("Aura");
        this.color.setWhite(true);

        // Enchant nonland permanent
        TargetPermanent auraTarget = new TargetNonlandPermanent();
        this.getSpellAbility().addTarget(auraTarget);
        this.getSpellAbility().addEffect(new AttachEffect(Outcome.Detriment));
        Ability ability = new EnchantAbility(auraTarget.getTargetName());
        this.addAbility(ability);

        // At the beginning of the upkeep of enchanted permanent's controller,
        // that player sacrifices it unless he or she pays {X},
        // where X is its converted mana cost.
View Full Code Here


        if (ability instanceof SpellAbility) {
            ability.getTargets().clear();
            int xValue = ability.getManaCostsToPay().getX();
            FilterNonlandPermanent filter = new FilterNonlandPermanent(new StringBuilder("nonland permanent with converted mana cost ").append(xValue).toString());
            filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.Equal, xValue));
            ability.addTarget(new TargetNonlandPermanent(filter));
        }
    }
View Full Code Here

        this.addAbility(FlyingAbility.getInstance());
       
        // When Lyev Skyknight enters the battlefield, detain target nonland permanent an opponent controls.
        // (Until your next turn, that permanent can't attack or block and its activated abilities can't be activated.)
        Ability ability = new EntersBattlefieldTriggeredAbility(new DetainTargetEffect(), false);
        TargetNonlandPermanent target = new TargetNonlandPermanent(filter);
        ability.addTarget(target);
        this.addAbility(ability);
    }
View Full Code Here

        ability.setRuleAtTheTop(true);
        this.addAbility(ability);

        // Destroy target nonland permanent with converted mana cost 3 or less.
        this.getSpellAbility().addEffect(new DestroyTargetEffect());
        this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
    }
View Full Code Here

    public MaelstromPulse(UUID ownerId) {
        super(ownerId, 92, "Maelstrom Pulse", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{1}{B}{G}");
        this.expansionSetCode = "ARB";
        this.color.setBlack(true);
        this.color.setGreen(true);
        this.getSpellAbility().addTarget(new TargetNonlandPermanent());
        this.getSpellAbility().addEffect(new DestroyAllNamedPermanentsEffect());
    }
View Full Code Here

    }

    @Override
    public boolean apply(Game game, Ability source) {
        List<Permanent> permanents = new ArrayList<>();
        Target target = new TargetNonlandPermanent();
        target.setNotTarget(false);
        PlayerList playerList = game.getPlayerList().copy();
        playerList.setCurrent(game.getActivePlayerId());
        Player player = game.getPlayer(game.getActivePlayerId());
        do {
            target.clearChosen();
            if (player.chooseTarget(outcome, target, source, game)) {
                Permanent permanent = game.getPermanent(target.getFirstTarget());
                if (permanent != null) {
                    permanents.add(permanent);
                    game.informPlayers((new StringBuilder(player.getName()).append(" chooses ").append(permanent.getName()).toString()));
                }
            }
View Full Code Here

    public Disperse (UUID ownerId) {
        super(ownerId, 31, "Disperse", Rarity.COMMON, new CardType[]{CardType.INSTANT}, "{1}{U}");
        this.expansionSetCode = "SOM";
        this.color.setBlue(true);

        this.getSpellAbility().addTarget(new TargetNonlandPermanent());
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
    }
View Full Code Here

        this.color.setBlue(true);

        // Return up to two target nonland permanents to their owners' hands.
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
        this.getSpellAbility().addTarget(new TargetNonlandPermanent(0, 2, false));
    }
View Full Code Here

        this.expansionSetCode = "RTR";

        this.color.setBlue(true);

        // Return target nonland permanent you don't control to its owner's hand.
        this.getSpellAbility().addTarget(new TargetNonlandPermanent(filter));
        this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());

        // Overload {6}{U} (You may cast this spell for its overload cost. If you do, change its text by replacing all instances of "target" with "each.")
        this.addAbility(new OverloadAbility(this, new CyclonicRiftEffect(), new ManaCostsImpl("{6}{U}")));
    }
View Full Code Here

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

        // When AEthersnipe enters the battlefield, return target nonland permanent to its owner's hand.
        Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect());
        Target target = new TargetNonlandPermanent();
        ability.addTarget(target);
        this.addAbility(ability);

        // Evoke {1}{U}{U}
        this.addAbility(new EvokeAbility(this, "{1}{U}{U}"));
View Full Code Here

TOP

Related Classes of mage.target.common.TargetNonlandPermanent

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.