diff --git a/src/forge/ComputerAI_General.java b/src/forge/ComputerAI_General.java index a6f9861ae20..432bb20a92d 100644 --- a/src/forge/ComputerAI_General.java +++ b/src/forge/ComputerAI_General.java @@ -13,18 +13,18 @@ public class ComputerAI_General implements Computer { } public void main1() { - ComputerUtil.chooseLandsToPlay(); - if(AllZone.Stack.size() != 0) - { + if (!ComputerUtil.chooseLandsToPlay()){ + if (AllZone.Phase.getPriorityPlayer().isComputer()) + stackResponse(); return; } playCards(Constant.Phase.Main1); }//main1() public void main2() { - ComputerUtil.chooseLandsToPlay(); // in case we can play more lands now, or drew cards since first main phase - if(AllZone.Stack.size() != 0) - { + if (!ComputerUtil.chooseLandsToPlay()){ // in case we can play more lands now, or drew cards since first main phase + if (AllZone.Phase.getPriorityPlayer().isComputer()) + stackResponse(); return; } playCards(Constant.Phase.Main2); diff --git a/src/forge/ComputerUtil.java b/src/forge/ComputerUtil.java index f0c133bd72c..9226193f85f 100644 --- a/src/forge/ComputerUtil.java +++ b/src/forge/ComputerUtil.java @@ -528,7 +528,7 @@ public class ComputerUtil }//getAvailableMana() //plays a land if one is available - static public void chooseLandsToPlay() + static public boolean chooseLandsToPlay() { Player computer = AllZone.ComputerPlayer; ArrayList landList = PlayerZoneUtil.getCardType(AllZone.Computer_Hand, "Land"); @@ -553,7 +553,10 @@ public class ComputerUtil computer.playLand(land); AllZone.GameAction.checkStateEffects(); + if (AllZone.Stack.size() != 0) + return false; } + return true; } static public Card getCardPreference(Card activate, String pref, CardList typeList){