Move game option value declarations to dlg_create_game.

This commit is contained in:
Lukas Brübach 2024-12-19 12:38:21 +01:00
parent 3b2421f695
commit 59b6fef512
10 changed files with 52 additions and 16 deletions

View file

@ -162,7 +162,7 @@ int Server_Player::newArrowId() const
return id + 1;
}
void Server_Player::setupZones(const QStringList &gameTypes)
void Server_Player::setupZones()
{
// This may need to be customized according to the game rules.
// ------------------------------------------------------------------
@ -178,11 +178,7 @@ void Server_Player::setupZones(const QStringList &gameTypes)
addZone(new Server_CardZone(this, "grave", false, ServerInfo_Zone::PublicZone));
addZone(new Server_CardZone(this, "rfg", false, ServerInfo_Zone::PublicZone));
if (gameTypes.contains(QString("Commander"))) {
addCounter(new Server_Counter(0, "life", makeColor(255, 255, 255), 25, 40));
} else {
addCounter(new Server_Counter(0, "life", makeColor(255, 255, 255), 25, 20));
}
addCounter(new Server_Counter(0, "life", makeColor(255, 255, 255), 25, game->getStartingLifeTotal()));
addCounter(new Server_Counter(1, "w", makeColor(255, 255, 150), 20, 0));
addCounter(new Server_Counter(2, "u", makeColor(150, 150, 255), 20, 0));
addCounter(new Server_Counter(3, "b", makeColor(150, 150, 150), 20, 0));
@ -908,7 +904,7 @@ Server_Player::cmdUnconcede(const Command_Unconcede & /*cmd*/, ResponseContainer
ges.enqueueGameEvent(event, playerId);
ges.setGameEventContext(Context_Unconcede());
setupZones(game->getRoom()->getGameTypes());
setupZones();
game->sendGameStateToPlayers();