From 91bc3c62e1c3c2f55c40ea418ad6087f2d89935c Mon Sep 17 00:00:00 2001 From: Agetian Date: Mon, 21 Sep 2015 09:08:34 +0000 Subject: [PATCH] - improved the AI for Explorer's Scope (for now in a non-generalized manner + may not always be a good idea to activate the optional ability, feel free to improve) --- forge-ai/src/main/java/forge/ai/ability/DigAi.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/ability/DigAi.java b/forge-ai/src/main/java/forge/ai/ability/DigAi.java index c4b071e3f01..5fc243a2001 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DigAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DigAi.java @@ -115,8 +115,18 @@ public class DigAi extends SpellAbilityAi { */ @Override public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) { - // looks like perfect code for Delver of Secrets, but what about other cards? Card topc = player.getZone(ZoneType.Library).get(0); + + // AI actions for individual cards (until this AI can be generalized) + if (sa.getHostCard() != null) { + if (sa.getHostCard().getName().equals("Explorer's Scope")) { + // for Explorer's Scope, always put a land on the battlefield tapped + // (TODO: might not always be a good idea, e.g. when a land ETBing can have detrimental effects) + return true; + } + } + + // looks like perfect code for Delver of Secrets, but what about other cards? return topc.isInstant() || topc.isSorcery(); } }