Package mage.game.permanent

Examples of mage.game.permanent.Permanent.moveToZone()


                }
                target.clearChosen();
            }
            if (cards.size() == 1) {
                Permanent permanent = game.getPermanent(cards.iterator().next());
                permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            }
        }

        return true;
    }
View Full Code Here


            Card card = null;
            if (owner.getLibrary().size() > 0) {
                card = owner.getLibrary().removeFromTop(game);
            }

            permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            if (card != null) {
                owner.getLibrary().putOnTop(card, game);
            }
            controller.gainLife(3, game);
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            return permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
        }
        return false;
    }
}
View Full Code Here

            Player pl = game.getPlayer(p.getControllerId());
            if (pl != null)
                pl.shuffleLibrary(game);
        }
        if (s != null) {
            s.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
            Player pl = game.getPlayer(s.getControllerId());
            if (pl != null)
                pl.shuffleLibrary(game);
        }
        return true;
View Full Code Here

                    // return cards back to library
                    game.informPlayers(new StringBuilder(controller.getName())
                            .append(" puts ").append(permanent.getName())
                            .append(" beneath the top ").append(xValue)
                            .append(" cards of ").append(owner.getName()).append("'s library").toString());
                    permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
                    while(!cardIds.isEmpty()) {
                        UUID cardId = cardIds.poll();
                        Card card = cards.get(cardId, game);
                        if (card != null) {
                            card.moveToZone(Zone.LIBRARY, source.getSourceId(), game, true);
View Full Code Here

            }

            for (UUID targetId: target.getTargets()) {
                Permanent permanent = game.getPermanent(targetId);
                if (permanent != null) {
                    result |= permanent.moveToZone(Zone.HAND, source.getSourceId(), game, false);
                }
            }
        }
        return result;
    }
View Full Code Here

            Player player = game.getPlayer(permanent.getOwnerId());
            if (player == null) {
                return false;
            }

            return permanent.moveToZone(Zone.LIBRARY, source.getSourceId(), game, false);
        }
        return false;
    }
}
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.