Examples of StackObject


Examples of mage.game.stack.StackObject

    }

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        StackObject sourceStackObject = game.getStack().getStackObject(source.getSourceId());
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && sourceStackObject != null && permanent != null) {
            ChoiceColor colorChoice = new ChoiceColor();
            if (player.choose(Outcome.BoostCreature, colorChoice, game)) {
                game.informPlayers(sourceStackObject.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
                game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
                permanent.addInfo("chosen color", new StringBuilder("<font color='blue'>Chosen color: ").append(colorChoice.getColor().getDescription()).append("</font>").toString());
            }
        }
        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.