a couple of checks to concede correctly during 'play or draw' and mulligan prompts

This commit is contained in:
Maxmtg
2013-05-29 19:02:04 +00:00
parent 1cc1518ae2
commit 724e4e87ac

View File

@@ -1478,6 +1478,8 @@ public class GameAction {
public void startGame(final Player firstPlayer) { public void startGame(final Player firstPlayer) {
Player first = firstPlayer; Player first = firstPlayer;
do { do {
if ( game.isGameOver() ) break; // conceded during "play or draw"
// Draw <handsize> cards // Draw <handsize> cards
for (final Player p1 : game.getPlayers()) { for (final Player p1 : game.getPlayers()) {
p1.drawCards(p1.getMaxHandSize()); p1.drawCards(p1.getMaxHandSize());
@@ -1486,10 +1488,12 @@ public class GameAction {
game.setAge(GameAge.Mulligan); game.setAge(GameAge.Mulligan);
performMulligans(first, game.getType() == GameType.Commander); performMulligans(first, game.getType() == GameType.Commander);
if ( game.isGameOver() ) break; // conceded during "mulligan" prompt
// should I restore everyting exiled by Karn here, or before Mulligans is fine? // should I restore everyting exiled by Karn here, or before Mulligans is fine?
game.setAge(GameAge.Play); game.setAge(GameAge.Play);
// THIS CODE WILL WORK WITH PHASE = NULL { // THIS CODE WILL WORK WITH PHASE = NULL {
if(game.getType() == GameType.Planechase) if(game.getType() == GameType.Planechase)
firstPlayer.initPlane(); firstPlayer.initPlane();