mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Tweaks for AI passing priority in between land plays.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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<Card> 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){
|
||||
|
||||
Reference in New Issue
Block a user