* Fix Gleam of Authority

Fixes #867
This commit is contained in:
FenrisulfrX 2015-03-31 18:02:17 -03:00
parent a878d4879b
commit 4d47183fbc

View file

@ -108,8 +108,9 @@ class CountersOnControlledCount implements DynamicValue {
@Override @Override
public int calculate(Game game, Ability sourceAbility, Effect effect) { public int calculate(Game game, Ability sourceAbility, Effect effect) {
int count = 0; int count = 0;
Permanent enchantment = game.getPermanent(sourceAbility.getSourceId());
for (Permanent permanent : game.getState().getBattlefield().getAllActivePermanents(filter, sourceAbility.getControllerId(), game)) { for (Permanent permanent : game.getState().getBattlefield().getAllActivePermanents(filter, sourceAbility.getControllerId(), game)) {
if (!permanent.getId().equals(sourceAbility.getSourceId())) { if (!permanent.getId().equals(enchantment.getAttachedTo())) {
count += permanent.getCounters().getCount(CounterType.P1P1); count += permanent.getCounters().getCount(CounterType.P1P1);
} }
} }