Package mage.counters

Examples of mage.counters.PlusOneCounter


  @Override
  public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getSourceId());
    if (permanent != null) {
      permanent.addCounters(new PlusOneCounter(amount));
    }
    return true;
  }
View Full Code Here


  }

  @Override
  public boolean apply(Game game, Ability source) {
    for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, source.getControllerId())) {
      perm.getCounters().addCounter(new PlusOneCounter(amount));    }
    return true;
  }
View Full Code Here

  public boolean apply(Game game, Ability source) {
    Permanent enchantment = game.getPermanent(source.getSourceId());
    if (enchantment != null && enchantment.getAttachedTo() != null) {
      Permanent creature = game.getPermanent(enchantment.getAttachedTo());
      if (creature != null) {
        creature.addCounters(new PlusOneCounter(amount));
      }
    }
    return true;
  }
View Full Code Here

    FilterPermanent filter = new FilterPermanent();
    filter.getCardType().add(CardType.CREATURE);
    filter.getColor().setGreen(true);
    for (Permanent permanent: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
      if (permanent.getTurnsOnBattlefield() == 0) {
        permanent.addCounters(new PlusOneCounter());
      }
    }
    return true;
  }
View Full Code Here

    @Override
    public boolean apply(Game game, Ability source) {
      Permanent permanent = game.getPermanent(source.getSourceId());
      if (permanent != null) {
        int amount = source.getManaCosts().getVariableCosts().get(0).getAmount();
        permanent.addCounters(new PlusOneCounter(amount));
      }
      return true;
    }
View Full Code Here

TOP

Related Classes of mage.counters.PlusOneCounter

Copyright © 2018 www.massapicom. 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.