mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-08 17:16:00 -05:00
Add the ability to define starting life total during game creation. (#5174)
* Have the server respect gameType info when setting up zones. * ServerPlayer::setupZones is now passed the room->getGameTypes(); * ServerPlayer::setupZones now checks if the GameType String includes "Commander" and then sets the life total to 40 instead. * Formatting. * Remove debug logging imports. * Move game option value declarations to dlg_create_game. * Lint. * Fix mocks. * Add a default for backwards compatibility. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
@@ -178,7 +178,7 @@ void Server_Player::setupZones()
|
||||
addZone(new Server_CardZone(this, "grave", false, ServerInfo_Zone::PublicZone));
|
||||
addZone(new Server_CardZone(this, "rfg", false, ServerInfo_Zone::PublicZone));
|
||||
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user