Merge pull request #5248 from tamaroth/bug-forge-of-hearos-not-activating

Forge of Heroes ability not working.
This commit is contained in:
Oleg Agafonov 2018-08-20 15:39:44 +04:00 committed by GitHub
commit 9003ebb883
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -86,11 +86,12 @@ class ForgeOfHeroesEffect extends OneShotEffect {
new AddCountersTargetEffect(
CounterType.P1P1.createInstance()
).apply(game, source);
}
if (permanent.isPlaneswalker()) {
} else if (permanent.isPlaneswalker()) {
new AddCountersTargetEffect(
CounterType.LOYALTY.createInstance()
).apply(game, source);
} else {
return false;
}
return true;
}

View file

@ -19,13 +19,12 @@ public class CommanderPredicate implements Predicate<Permanent> {
@Override
public boolean apply(Permanent input, Game game) {
Player owner = game.getPlayer(input.getOwnerId());
return input.isCreature()
&& owner != null
return owner != null
&& owner.getCommandersIds().contains(input.getId());
}
@Override
public String toString() {
return "Commander creature";
return "Commander";
}
}