Package mage.cards

Examples of mage.cards.Card.addCounters()


            }
            if (card.moveToExile(exileId, new StringBuilder("Suspended cards of ").append(controller.getName()).toString() , source.getSourceId(), game)) {
                if (suspend == Integer.MAX_VALUE) {
                    suspend = source.getManaCostsToPay().getX();
                }
                card.addCounters(CounterType.TIME.createInstance(suspend), game);
                game.informPlayers(new StringBuilder(controller.getName()).append(" suspends (").append(suspend).append(") ").append(card.getName()).toString());
                return true;
            }
        }
        return false;
View Full Code Here


                    int countersToAdd = amount.calculate(game, source, this);
                    if (countersToAdd > 0 && newCounter.getCount() == 1) {
                        countersToAdd--;
                    }
                    newCounter.add(countersToAdd);
                    card.addCounters(newCounter, game);
                    if (informPlayers) {
                        Player player = game.getPlayer(source.getControllerId());
                        if (player != null) {
                            game.informPlayers(new StringBuilder(player.getName()).append(" puts ").append(newCounter.getCount()).append(" ").append(newCounter.getName().toLowerCase()).append(" counter on ").append(card.getLogName()).toString());
                        }
View Full Code Here

            if (exileId == null) {
                exileId = UUID.randomUUID();
                game.getState().setValue("SuspendExileId" + source.getControllerId().toString(), exileId);
            }
            if (card.moveToExile(exileId, new StringBuilder("Suspended cards of ").append(controller.getName()).toString() , source.getSourceId(), game)) {
                card.addCounters(CounterType.TIME.createInstance(4), game);
                if (!hasSuspend) {
                    // add suspend ability
                    // TODO: Find a better solution for giving suspend to a card.
                    // If the exiled card leaves exile by another way, the abilites won't be removed from the card
                    Abilities oldAbilities = card.getAbilities().copy();
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
        Card sourceCard = game.getCard(source.getSourceId());
        if (opponent != null && sourceCard != null) {
            if (opponent.chooseUse(outcome, new StringBuilder("Put a time counter on ").append(sourceCard.getName()).append("?").toString(), game)) {
                sourceCard.addCounters(CounterType.TIME.createInstance(), 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.