Package mage.game.permanent

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


        if (player != null && permanent != null) {
            ChoiceColor colorChoice = new ChoiceColor();
            if (player.choose(Outcome.Detriment, colorChoice, game)) {
                game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
                game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
                permanent.addInfo("chosen color", CardUtil.addToolTipMarkTags("Chosen color: " + colorChoice.getColor().getDescription()));
            }
            return true;
        }
        return false;
    }
View Full Code Here


    public void init(Ability source, Game game) {
        super.init(source, game);
        for(FixedTarget fixedTarget :this.detainedObjects) {
            Permanent permanent = game.getPermanent(fixedTarget.getFirst(game, source));
            if (permanent != null) {
                permanent.addInfo(new StringBuilder("detain").append(getId()).toString(),"[Detained]");
            }
        }
    }

    @Override
View Full Code Here

        {
            if (game.getActivePlayerId().equals(source.getControllerId()) || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) {
                for(FixedTarget fixedTarget :this.detainedObjects) {
                    Permanent permanent = game.getPermanent(fixedTarget.getFirst(game, source));
                    if (permanent != null) {
                        permanent.addInfo(new StringBuilder("detain").append(getId()).toString(),"");
                    }
                }
                return true;
            }
        }
View Full Code Here

                if (card.moveToExile(source.getSourceId(), "Haunting", source.getSourceId(), game)) {
                    // remember the haunted creature
                    String key = new StringBuilder("Haunting_").append(source.getSourceId().toString()).append("_").append(card.getZoneChangeCounter()).toString();
                    game.getState().setValue(key, new FixedTarget(targetPointer.getFirst(game, source)));
                    card.addInfo("hauntinfo", new StringBuilder("Haunting ").append(hauntedCreature.getLogName()).toString());
                    hauntedCreature.addInfo("hauntinfo", new StringBuilder("Haunted by ").append(card.getLogName()).toString());
                    game.informPlayers(new StringBuilder(card.getName()).append(" haunting ").append(hauntedCreature.getLogName()).toString());
                }
                return true;
            }
        }
View Full Code Here

        if (player != null && permanent != null) {
            ChoiceColor colorChoice = new ChoiceColor();
            if (player.choose(outcome, colorChoice, game)) {
                game.informPlayers(new StringBuilder(permanent.getLogName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString());
                game.getState().setValue(source.getSourceId() + "_color", colorChoice.getColor());
                permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
            }
        }
        return false;
    }
View Full Code Here

    public void init(Ability source, Game game) {
        super.init(source, game);
        for(UUID targetId :this.getTargetPointer().getTargets(game, source)) {
            Permanent permanent = game.getPermanent(targetId);
            if (permanent != null) {
                permanent.addInfo(new StringBuilder("detain").append(getId()).toString(),"[Detained]");
            }
        }
    }

    @Override
View Full Code Here

        {
            if (game.getActivePlayerId().equals(source.getControllerId()) || game.getPlayer(source.getControllerId()).hasReachedNextTurnAfterLeaving()) {
                for(UUID targetId :this.getTargetPointer().getTargets(game, source)) {
                    Permanent permanent = game.getPermanent(targetId);
                    if (permanent != null) {
                        permanent.addInfo(new StringBuilder("detain").append(getId()).toString(),"");
                    }
                }
                return true;
            }
        }
View Full Code Here

                    return false;
                }
            }
            game.informPlayers(permanent.getName() + ": " + controller.getName() + " has chosen " + typeChoice.getChoice());
            game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
            permanent.addInfo("chosen type", CardUtil.addToolTipMarkTags("Chosen type: " + typeChoice.getChoice()));
        }
        return false;
    }

    @Override
View Full Code Here

                    return false;
                }
            }
            game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
            game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice());
            permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice().toString() + "</i>");
        }
        return false;
    }

    @Override
View Full Code Here

                        return false;
                    }
                }
                game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + typeChoice.getChoice());
                game.getState().setValue(permanent.getId() + "_type", typeChoice.getChoice().toString());
                permanent.addInfo("chosen type", "<i>Chosen type: " + typeChoice.getChoice() + "</i>");
                permanent.getSubtype().add(typeChoice.getChoice());
            }
            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.