From f395f25f07a17c65c3c9c5fe1f50ae0c9911c369 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 16:31:06 +0000 Subject: [PATCH] - The AI will now mulligan no-zero-mana-cost-hands down to 4. --- src/forge/Input_Mulligan.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/forge/Input_Mulligan.java b/src/forge/Input_Mulligan.java index 774cc9ce0c6..0c1c4243aec 100644 --- a/src/forge/Input_Mulligan.java +++ b/src/forge/Input_Mulligan.java @@ -52,7 +52,7 @@ public class Input_Mulligan extends Input { Card dummy = CHandList.get(0); //Computer mulligans if there are no cards with converted mana cost of 0 in its hand - if(CHandList.getValidCards("Card.cmcEQ0",AllZone.ComputerPlayer,dummy).size() == 0) { + while(CHandList.size() > 4 && CHandList.getValidCards("Card.cmcEQ0",AllZone.ComputerPlayer,dummy).size() == 0) { for(Card c : CHandList) AllZone.GameAction.moveToLibrary(c); @@ -62,6 +62,8 @@ public class Input_Mulligan extends Input { int newHand = CHandList.size() - 1; for(int i = 0; i < newHand; i++) AllZone.ComputerPlayer.drawCard(); + + CHandList = AllZoneUtil.getPlayerHand(AllZone.ComputerPlayer); } //Human Leylines