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

@ -70,13 +70,13 @@ public class AttachedToCounterCondition implements Condition {
return false;
}
if (from != -1) { //range compare
int count = attachedTo.getCounters().getCount(counterType);
int count = attachedTo.getCounters(game).getCount(counterType);
if (to == Integer.MAX_VALUE) {
return count >= from;
}
return count >= from && count <= to;
} else { // single compare (lte)
return attachedTo.getCounters().getCount(counterType) >= amount;
return attachedTo.getCounters(game).getCount(counterType) >= amount;
}
}
}