Examples of removeCounters()


Examples of mage.cards.Card.removeCounters()

                    .append(" counter from ").append(p.getName()).toString());
            return true;
        }
        Card c = game.getCard(source.getSourceId());
        if (c != null && c.getCounters().getCount(counter.getName()) >= counter.getCount()) {
            c.removeCounters(counter.getName(), counter.getCount(), game);
            game.informPlayers(new StringBuilder("Removed ").append(counter.getCount()).append(" ").append(counter.getName())
                    .append(" counter from ").append(c.getName())
                    .append(" (").append(c.getCounters().getCount(counter.getName())).append(" left)").toString());
            return true;
        }   
View Full Code Here

Examples of mage.cards.Card.removeCounters()

                    .append(" counter from ").append(p.getName()).toString());
            return true;
        }
        Card c = game.getCard(targetPointer.getFirst(game, source));
        if (c != null && c.getCounters().getCount(counter.getName()) >= counter.getCount()) {
            c.removeCounters(counter.getName(), counter.getCount(), game);
            game.informPlayers(new StringBuilder("Removed ").append(counter.getCount()).append(" ").append(counter.getName())
                    .append(" counter from ").append(c.getName())
                    .append(" (").append(c.getCounters().getCount(counter.getName())).append(" left)").toString());
            return true;
        }
View Full Code Here

Examples of mage.cards.Card.removeCounters()

                                    }
                                }
                            }
                        }
                        if (counterName != null) {
                            card.removeCounters(counterName, 1, game);
                            if (card.getCounters().getCount(counterName) == 0 ){
                                card.getCounters().removeCounter(counterName);
                            }
                            this.paid = true;
                            game.informPlayers(new StringBuilder(controller.getName()).append(" removes a ").append(counterName).append(" counter from ").append(card.getName()).toString());
View Full Code Here

Examples of mage.cards.Card.removeCounters()

            permanent.removeCounters(CounterType.TIME.getName(), 2,  game);
            return true;
        }
        Card card = game.getCard(this.getTargetPointer().getFirst(game, source));
        if (card != null) {
            card.removeCounters(CounterType.TIME.getName(), 2,  game);
            return true;
        }
        return false;
    }
}
View Full Code Here

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

  @Override
  public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
    Permanent permanent = game.getPermanent(sourceId);
    if (permanent != null && permanent.getCounters().getCount(name) >= amount) {
      permanent.removeCounters(name, amount, game);
      this.paid = true;
    }
    return paid;
  }
View Full Code Here

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

        game.fireEvent(GameEvent.getEvent(GameEvent.EventType.PREVENTED_DAMAGE, source.getFirstTarget(), source.getId(), source.getControllerId(), damage));
        retValue = true;
      }
      Permanent permanent = game.getPermanent(source.getSourceId());
      if (permanent != null) {
        permanent.removeCounters("+1/+1", damage, game);
      }
      return retValue;
    }

    @Override
View Full Code Here

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

    public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana) {
        Permanent permanent = game.getPermanent(ability.getSourceId());
        if (permanent != null) {
            this.removedCounters = permanent.getCounters().getCount(CounterType.ELIXIR);
            if (this.removedCounters > 0) {
                permanent.removeCounters(CounterType.ELIXIR.createInstance(this.removedCounters), game);
            }
        }
        this.paid = true;
        return true;
    }
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent p = game.getPermanent(source.getSourceId());
        if (p != null && p.getCounters().getCount(counter.getName()) >= counter.getCount()) {
            p.removeCounters(counter.getName(), counter.getCount(), game);
            game.informPlayers(new StringBuilder("Removed ").append(counter.getCount()).append(" ").append(counter.getName())
                    .append(" counter from ").append(p.getName()).toString());
            return true;
        }
        Card c = game.getCard(source.getSourceId());
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Permanent p = game.getPermanent(source.getSourceId());
        if (p != null) {
            int amount = p.getCounters().getCount(CounterType.FADE);
            if (amount > 0) {
                p.removeCounters(CounterType.FADE.createInstance(), game);
            }
            else
            {
                p.sacrifice(source.getSourceId(), game);
            }
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Permanent p = game.getPermanent(source.getSourceId());
        if (p != null) {
            int amount = p.getCounters().getCount(CounterType.TIME);
            if (amount > 0) {
                p.removeCounters(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.