Fix Chained to the Rocks crash

This commit is contained in:
Bug Hunter
2022-01-30 22:39:13 +00:00
committed by Anthony Calosa
parent a7773a34f1
commit b3b777b487
4 changed files with 7 additions and 6 deletions

View File

@@ -125,8 +125,9 @@ public class AttachAi extends SpellAbilityAi {
if (ComputerUtilAbility.getAbilitySourceName(sa).equals("Chained to the Rocks")) {
final SpellAbility effectExile = AbilityFactory.getAbility(source.getSVar("TrigExile"), source);
effectExile.setActivatingPlayer(ai);
final TargetRestrictions exile_tgt = effectExile.getTargetRestrictions();
final CardCollection targets = CardLists.filter(CardUtil.getValidCardsToTarget(exile_tgt, effectExile), CardPredicates.canBeAttached(source));
final List<Card> targets = CardUtil.getValidCardsToTarget(exile_tgt, effectExile);
return !targets.isEmpty();
}