mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
Merge pull request #2602 from Dilnu/master
Fix AlternativeCostSourceAbility
This commit is contained in:
commit
f9fcd7e4bf
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue