Fix AlternativeCostSourceAbility at the moment it doesn't apply it's filter early enough and so it has strange effects in certain edge cases. Specifically it allows Hypergenesis to be cast with Aluren and Kentaro.

This commit is contained in:
Dilnu 2016-11-16 21:20:37 -05:00
parent c37b782b75
commit 0caaaa4205

View file

@ -131,10 +131,10 @@ public class AlternativeCostSourceAbility extends StaticAbility implements Alter
@Override @Override
public boolean isAvailable(Ability source, Game game) { public boolean isAvailable(Ability source, Game game) {
if (condition != null) { boolean conditionApplies = condition == null || condition.apply(game, source);
return condition.apply(game, source); boolean filterApplies = filter == null || filter.match(game.getCard(source.getSourceId()), game);
}
return true; return conditionApplies && filterApplies;
} }
@Override @Override