Package mage.game.permanent

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


                // check not to transform twice the same side
                if (permanent.isTransformed() != fromDayToNight) {
                    if (withoutTrigger) {                       
                        permanent.setTransformed(fromDayToNight);
                    } else {
                        permanent.transform(game);
                    }
                    if (fromDayToNight) {
                        game.informPlayers(new StringBuilder(permanent.getName()).append(" transforms into ").append(permanent.getSecondCardFace().getName()).toString());                   
                    } else {
                        game.informPlayers(new StringBuilder(permanent.getSecondCardFace().getName()).append(" transforms into ").append(permanent.getName()).toString());                   
View Full Code Here


                player.discard(card, source, game);
                if (card.getCardType().contains(CardType.CREATURE)) {
                    Permanent permanent = game.getPermanent(source.getSourceId());
                    if (permanent != null) {
                        permanent.untap(game);
                        permanent.transform(game);
                    }
                }
                return true;
            }
            return false;
View Full Code Here

            //gain 1 life
            player.gainLife(1, game);

            // if you have at least 10 life more than your starting life total, transform Chalice of Life.
            if (player.getLife() >= game.getLife() + 10) {
                permanent.transform(game);
            }
        }
        return false;
    }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null && permanent.canTransform()) {
            if (permanent.transform(game)) {
                Permanent attachTo = game.getPermanent(targetPointer.getFirst(game, source));
                if (attachTo != null) {
                    return attachTo.addAttachment(source.getSourceId(), game);
                }
            }
View Full Code Here

        Card card = game.getCard(cardId);
        if (card != null) {
            card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getSourceId(), source.getControllerId());
            Permanent perm = game.getPermanent(cardId);
            if (perm != null && perm.canTransform()) {
                perm.transform(game);
                return true;
            }
        }
        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.