Package mage.abilities.effects.common

Examples of mage.abilities.effects.common.PutTopCardOfLibraryIntoGraveTargetEffect.apply()


        if (player != null) {
            if (player.getHand().isEmpty()) {
                // he or she puts the top card of his or her library into his or her graveyard
                Effect effect = new PutTopCardOfLibraryIntoGraveTargetEffect(1);
                effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
                effect.apply(game, source);
                return true;
            } else  {
                // discards a card instead. If the player discards a card this way, he or she draws a card.
                player.discard(1, source, game);
                return false; // because player draws a card, the draw event is kept
View Full Code Here


            }
            if (xSum > 0) {
                for(UUID playerId : controller.getInRange()) {
                    Effect effect = new PutTopCardOfLibraryIntoGraveTargetEffect(xSum);
                    effect.setTargetPointer(new FixedTarget(playerId));
                    effect.apply(game, source);
                }

            }
            // prevent undo
            controller.resetStoredBookmark(game);
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.