mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 17:58:01 +00:00
Fix AI not playing Sky Swallower trigger
This commit is contained in:
@@ -273,6 +273,15 @@ public class ControlGainAi extends SpellAbilityAi {
|
||||
}
|
||||
} else {
|
||||
if (sa.hasParam("TargetingPlayer") || (!this.canPlayAI(ai, sa) && mandatory)) {
|
||||
if (sa.getTargetRestrictions().canOnlyTgtOpponent()) {
|
||||
List<Player> oppList = ai.getOpponents().filter(PlayerPredicates.isTargetableBy(sa));
|
||||
if (oppList.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
sa.getTargets().add(Aggregates.random(oppList));
|
||||
return true;
|
||||
}
|
||||
|
||||
List<Card> list = CardLists.getTargetableCards(ai.getCardsIn(ZoneType.Battlefield), sa);
|
||||
if (list.isEmpty()) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user