Make the Counters API for card and permanent consistent.

This commit is contained in:
Samuel Sandeen 2016-09-03 10:33:54 -04:00
parent 277dc19fec
commit 148f633672
176 changed files with 272 additions and 277 deletions

View file

@ -64,7 +64,7 @@ public class RemoveCountersSourceCost extends CostImpl {
@Override
public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null && permanent.getCounters().getCount(name) >= amount) {
if (permanent != null && permanent.getCounters(game).getCount(name) >= amount) {
return true;
}
return false;
@ -73,7 +73,7 @@ public class RemoveCountersSourceCost extends CostImpl {
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
Permanent permanent = game.getPermanent(sourceId);
if (permanent != null && permanent.getCounters().getCount(name) >= amount) {
if (permanent != null && permanent.getCounters(game).getCount(name) >= amount) {
permanent.removeCounters(name, amount, game);
this.paid = true;
}