mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Added F7 to skip until next main phase. Added some preference options to skip handling. Clicking on phase bar opens now phase bar preferences.
This commit is contained in:
parent
af4fa9d542
commit
7f46323f67
10 changed files with 655 additions and 325 deletions
|
|
@ -521,7 +521,7 @@ public class TableController {
|
|||
String creator = null;
|
||||
StringBuilder opponent = new StringBuilder();
|
||||
int activePlayers = 0;
|
||||
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) {
|
||||
for (Entry<UUID, UUID> entry: userPlayerMap.entrySet()) { // no AI players
|
||||
if (!match.getPlayer(entry.getValue()).hasQuit()) {
|
||||
activePlayers++;
|
||||
User user = UserManager.getInstance().getUser(entry.getKey());
|
||||
|
|
@ -544,8 +544,7 @@ public class TableController {
|
|||
}
|
||||
opponent.append(user.getName());
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
logger.error("Unable to find user: " + entry.getKey() + " playerId: " + entry.getValue());
|
||||
MatchPlayer matchPlayer = match.getPlayer(entry.getValue());
|
||||
if (matchPlayer != null && !matchPlayer.hasQuit()) {
|
||||
|
|
@ -554,18 +553,19 @@ public class TableController {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (activePlayers < 2) {
|
||||
throw new MageException("Can't start game - Less than two players active - " +activePlayers);
|
||||
}
|
||||
// Append AI opponents to the log file
|
||||
for (MatchPlayer mPlayer :match.getPlayers()) {
|
||||
if (!mPlayer.getPlayer().isHuman()) {
|
||||
activePlayers++;
|
||||
if (opponent.length() > 0) {
|
||||
opponent.append(" - ");
|
||||
}
|
||||
opponent.append(mPlayer.getName());
|
||||
}
|
||||
}
|
||||
if (activePlayers < 2) {
|
||||
throw new MageException("Can't start game - Less than two players active - " +activePlayers);
|
||||
}
|
||||
ServerMessagesUtil.getInstance().incGamesStarted();
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue