Package mage.players

Examples of mage.players.Player.addAttachment()


            return permanent.addAttachment(source.getSourceId(), game);
        }
        else {
            Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
            if (player != null) {
                return player.addAttachment(source.getSourceId(), game);
            }
        }
        return false;
    }
View Full Code Here


            if (targetPermanent != null) {
                targetPermanent.addAttachment(permanent.getId(), game);
            }
            if (targetPlayer != null) {
                targetPlayer.addAttachment(permanent.getId(), game);
            }
        }
        return true;
    }
View Full Code Here

            if (player.searchLibrary(targetCard, game)) {
                Card card = game.getCard(targetCard.getFirstTarget());
                if (card != null) {
                    game.getState().setValue("attachTo:" + card.getId(), targetPlayer.getId());
                    card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
                    targetPlayer.addAttachment(card.getId(), game);
                }
                player.shuffleLibrary(game);
                return true;
            }
            player.shuffleLibrary(game);
View Full Code Here

                            Permanent targetPermanent = game.getPermanent(targetId);
                            Player targetPlayer = game.getPlayer(targetId);
                            if (targetPermanent != null) {
                                targetPermanent.addAttachment(sourcePermanent.getId(), game);
                            } else if (targetPlayer != null) {
                                targetPlayer.addAttachment(sourcePermanent.getId(), game);
                            } else {
                                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.