mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Changes to who starts the game: The process happens after players draw cards and mulligan and the cut to card is now placed on the bottom of the respectively libraries
This commit is contained in:
@@ -1160,7 +1160,7 @@ public class GameAction {
|
||||
AllZone.Computer_Library.setCards(AllZone.Computer_Library.getCards());
|
||||
this.shuffle(Constant.Player.Computer);
|
||||
}
|
||||
seeWhoPlaysFirst(); // New code to determine who goes first. Delete this if it doesn't work properly
|
||||
// seeWhoPlaysFirst(); // New code to determine who goes first. Delete this if it doesn't work properly
|
||||
for(int i = 0; i < 7; i++) {
|
||||
this.drawCard(Constant.Player.Computer);
|
||||
this.drawCard(Constant.Player.Human);
|
||||
@@ -1334,6 +1334,8 @@ public class GameAction {
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
AllZone.GameAction.moveTo(AllZone.getZone(Constant.Zone.Library, Constant.Player.Human),HumanCut);
|
||||
AllZone.GameAction.moveTo(AllZone.getZone(Constant.Zone.Library, Constant.Player.Computer),ComputerCut);
|
||||
sb.append("Human cuts his / her deck to : " + HumanCut.getName() + " (" + HumanCut.getManaCost() + ")" + "\r\n");
|
||||
sb.append("Computer cuts it's deck to : " + ComputerCut.getName() + " (" + ComputerCut.getManaCost() + ")" + "\r\n");
|
||||
if(CardUtil.getConvertedManaCost(ComputerCut.getManaCost()) > CardUtil.getConvertedManaCost(HumanCut.getManaCost()))
|
||||
|
||||
@@ -57,6 +57,32 @@ public class Input_Mulligan extends Input {
|
||||
|
||||
void end() {
|
||||
ButtonUtil.reset();
|
||||
CardList HHandList = new CardList(AllZone.getZone(Constant.Zone.Hand, Constant.Player.Human).getCards());
|
||||
PlayerZone HPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
|
||||
PlayerZone HHand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Human);
|
||||
for(int i = 0; i < HHandList.size() ; i++) {
|
||||
if(HHandList.get(i).getName().startsWith("Leyline")) {
|
||||
String[] choices = {"Yes", "No"};
|
||||
Object q = null;
|
||||
q = AllZone.Display.getChoiceOptional("Put " + HHandList.get(i).getName() + " into play?", choices);
|
||||
if(q == null || q.equals("No"));
|
||||
else {
|
||||
HPlay.add(HHandList.get(i));
|
||||
HHand.remove(HHandList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
CardList CHandList = new CardList(AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer).getCards());
|
||||
PlayerZone CPlay = AllZone.getZone(Constant.Zone.Play, Constant.Player.Computer);
|
||||
PlayerZone CHand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
|
||||
for(int i = 0; i < CHandList.size() ; i++) {
|
||||
if(CHandList.get(i).getName().startsWith("Leyline")) {
|
||||
CPlay.add(CHandList.get(i));
|
||||
CHand.remove(CHandList.get(i));
|
||||
}
|
||||
|
||||
}
|
||||
AllZone.GameAction.seeWhoPlaysFirst();
|
||||
stop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user