mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
a couple of checks to concede correctly during 'play or draw' and mulligan prompts
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user