mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Fix AI not playing Sky Swallower trigger
This commit is contained in:
@@ -272,7 +272,16 @@ public class ControlGainAi extends SpellAbilityAi {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if(sa.hasParam("TargetingPlayer") || (!this.canPlayAI(ai, sa) && mandatory)) {
|
||||
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;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class AddPhaseEffect extends SpellAbilityEffect {
|
||||
extraPhaseList.addAll(PhaseType.PHASE_GROUPS.get(0));
|
||||
} else if (extra.equals("Combat")) {
|
||||
extraPhaseList.addAll(PhaseType.PHASE_GROUPS.get(2));
|
||||
} else { // Currently no effect will add End Phase
|
||||
} else { // Currently no effect will add End Phase
|
||||
extraPhaseList.add(PhaseType.smartValueOf(extra));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user