mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Fix zone choosing when searching
This commit is contained in:
@@ -216,8 +216,9 @@ public class EffectAi extends SpellAbilityAi {
|
||||
} else if (logic.equals("Fight")) {
|
||||
return FightAi.canFightAi(ai, sa, 0, 0);
|
||||
} else if (logic.equals("Pump")) {
|
||||
List<Card> options = ai.getCreaturesInPlay();
|
||||
if (phase.isPlayerTurn(ai) && phase.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS) && !options.isEmpty()) {
|
||||
CardCollection options = CardLists.getValidCards(ai.getCardsIn(ZoneType.Battlefield), sa.getTargetRestrictions().getValidTgts(), ai, sa.getHostCard(), sa);
|
||||
options = CardLists.getTargetableCards(options, sa);
|
||||
if (!options.isEmpty() && phase.isPlayerTurn(ai) && phase.getPhase().isBefore(PhaseType.COMBAT_DECLARE_BLOCKERS)) {
|
||||
sa.getTargets().add(ComputerUtilCard.getBestCreatureAI(options));
|
||||
return true;
|
||||
}
|
||||
@@ -239,8 +240,7 @@ public class EffectAi extends SpellAbilityAi {
|
||||
}
|
||||
return true;
|
||||
} else if (logic.equals("ReplaySpell")) {
|
||||
CardCollection list = new CardCollection(game.getCardsIn(ZoneType.Graveyard));
|
||||
list = CardLists.getValidCards(list, sa.getTargetRestrictions().getValidTgts(), ai, sa.getHostCard(), sa);
|
||||
CardCollection list = CardLists.getValidCards(game.getCardsIn(ZoneType.Graveyard), sa.getTargetRestrictions().getValidTgts(), ai, sa.getHostCard(), sa);
|
||||
if (!ComputerUtil.targetPlayableSpellCard(ai, list, sa, false, false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user