From 36d2b4573a164d5166ccf26b705eb3069badf697 Mon Sep 17 00:00:00 2001 From: Agetian Date: Fri, 30 Nov 2018 09:41:45 +0300 Subject: [PATCH] Revert "- Attempting to avoid an AI logic spec (needs testing)." This reverts commit 7703178 --- .../src/main/java/forge/ai/ability/ChangeZoneAi.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java index 05cbe47bdcf..ee8c766f31b 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ChangeZoneAi.java @@ -298,10 +298,8 @@ public class ChangeZoneAi extends SpellAbilityAi { } else { if (sa.hasParam("DefinedPlayer")) { pDefined = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("DefinedPlayer"), sa); - } else if (sa.hasParam("Defined")) { - pDefined = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("Defined"), sa); } else { - pDefined = ai.getGame().getPlayers(); // no Defined players, assume all player zones + pDefined = AbilityUtils.getDefinedPlayers(sa.getHostCard(), sa.getParam("Defined"), sa); } } @@ -316,7 +314,11 @@ public class ChangeZoneAi extends SpellAbilityAi { } for (final Player p : pDefined) { - CardCollectionView list = p.getCardsIn(origin); + // TODO: figure out how to make the AI properly establish which zones to look in for cards like Sisters of Stone Death + // without needing a separate AI logic for it (the issue is that there's no Defined/DefinedPlayer in cards like that, and + // the AI normally defaults to its own zone in these cases) + CardCollectionView list = "CheckAllPlayerZones".equals(sa.getParam("AILogic")) ? p.getGame().getCardsIn(origin) + : p.getCardsIn(origin); if (type != null && p == ai) { // AI only "knows" about his information