* Alternative costs - fixed that it can be activated on free cast (example: cascade with overload, #6925, #7410, #7741, #6342);

This commit is contained in:
Oleg Agafonov 2021-09-21 14:22:46 +04:00
parent 6aaf461362
commit 6bc5a00e8a
7 changed files with 151 additions and 44 deletions

View file

@ -3002,7 +3002,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
@Override
public SpellAbility chooseAbilityForCast(Card card, Game game, boolean noMana) {
Map<UUID, ActivatedAbility> useable = PlayerImpl.getSpellAbilities(this.getId(), card, game.getState().getZone(card.getId()), game);
Map<UUID, ActivatedAbility> useable = PlayerImpl.getCastableSpellAbilities(game, this.getId(), card, game.getState().getZone(card.getId()), noMana);
return (SpellAbility) useable.values().stream().findFirst().orElse(null);
}