Package mage.abilities.effects.common.discard

Examples of mage.abilities.effects.common.discard.DiscardTargetEffect.apply()


        Player you = game.getPlayer(source.getControllerId());
        Player targetedPlayer = game.getPlayer(source.getFirstTarget());
        if (you != null) {
            Effect discardEffect = new DiscardTargetEffect(1, true, true);
            discardEffect.setTargetPointer(new FixedTarget(you.getId()));
            if (discardEffect.apply(game, source)) {
                Card discardedCard = game.getCard(this.getTargetPointer().getFirst(game, source));
                if (discardedCard != null
                        && discardedCard.getCardType().contains(CardType.CREATURE)) {
                    int damage = discardedCard.getPower().getValue();
                    if (targetedPlayer != null) {
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.