From 595739699bc6072516b724b66d56cf288ec3e2cc Mon Sep 17 00:00:00 2001 From: Sloth Date: Sun, 19 Jul 2015 08:15:32 +0000 Subject: [PATCH] - Improved Mulligan AI: It will now ship hands of five cards without any lands. --- forge-ai/src/main/java/forge/ai/ComputerUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/ComputerUtil.java b/forge-ai/src/main/java/forge/ai/ComputerUtil.java index 99b2fc6ac82..188ccfece3e 100644 --- a/forge-ai/src/main/java/forge/ai/ComputerUtil.java +++ b/forge-ai/src/main/java/forge/ai/ComputerUtil.java @@ -1452,7 +1452,7 @@ public class ComputerUtil { final AiController aic = ((PlayerControllerAi)ai.getController()).getAi(); // don't mulligan when already too low - if (handList.size() <= aic.getIntProperty(AiProps.MULLIGAN_THRESHOLD)) { + if (handList.size() < aic.getIntProperty(AiProps.MULLIGAN_THRESHOLD)) { return false; } @@ -1466,6 +1466,11 @@ public class ComputerUtil { return true; } }); + + // mulligan when at the threshold, with a no land hand + if (handList.size() == aic.getIntProperty(AiProps.MULLIGAN_THRESHOLD) && lands.isEmpty()) { + return true; + } return lands.size() < 2 ; }