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
public boolean isAvailable(Ability source, Game game) {
if (condition != null) {
return condition.apply(game, source);
}
return true;
boolean conditionApplies = condition == null || condition.apply(game, source);
boolean filterApplies = filter == null || filter.match(game.getCard(source.getSourceId()), game);
return conditionApplies && filterApplies;
}
@Override