Package mage.target.common

Examples of mage.target.common.TargetDiscard


    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            player.drawCards(3, game);
            TargetDiscard target = new TargetDiscard(player.getId());
            if (target.canChoose(source.getSourceId(), player.getId(), game)) {
                player.choose(Outcome.Discard, target, source.getSourceId(), game);
                Card card = player.getHand().get(target.getFirstTarget(), game);
                if (card != null) {
                    player.discard(card, source, game);
                    int damage = card.getManaCost().convertedManaCost();
                    Permanent creature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
                    if (creature != null) {
View Full Code Here

TOP

Related Classes of mage.target.common.TargetDiscard

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.