forked from External/mage
Make the handling of counters more consistent.
This dramatically reduces the code duplication around counters handling.
This commit is contained in:
parent
148f633672
commit
bec11804f5
11 changed files with 116 additions and 134 deletions
|
|
@ -23,7 +23,7 @@ public class CountersSourceCount implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(sourceAbility.getSourceId());
|
||||
if (permanent != null) {
|
||||
return permanent.getCounters().getCount(counter);
|
||||
return permanent.getCounters(game).getCount(counter);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue