Phase 5: N-player ELO, spectator-for-eliminated, turn-limit/concede N-player paths
- GameEngine: GetNPlayerTurnLimitWinners() ranks surviving players by ArchSpirit HP; highest-HP player(s) win, rest lose - GameConcedeHandler: N-player path — conceder is loser, remaining non-eliminated players are winners; delegates to FinalizeMultiPlayerGameAsync - GameForceConcedeHandler: same N-player/1v1 branch split for inactivity forfeit - GameEndTurnHandler: N-player path uses GetNPlayerTurnLimitWinners + FinalizeMultiPlayerGameAsync on turn-limit game-over - GameTurnTimerService: same N-player/1v1 branch on timer-expiry game-over - Game.gd: player_eliminated signal + game.player_eliminated push handler - game_screen.gd: _on_player_eliminated shows AcceptDialog; sets _is_spectating=true for the local player so they can watch the rest of the game Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -37,6 +37,9 @@ signal inactive_warning(session_id: String)
|
||||
## Both players must wait — no concede or force-concede is allowed.
|
||||
signal both_idle_warning(session_id: String)
|
||||
|
||||
## Emitted when a player is knocked out mid-game (game continues for others).
|
||||
signal player_eliminated(session_id: String, eliminated_account_id: String, seat_index: int, team_index: int)
|
||||
|
||||
## Emitted when a game session starts or ends (from game.activity pushes).
|
||||
## Used by game_screen.gd to drive the live-star skybox.
|
||||
## event_type: "started" | "ended"
|
||||
@@ -576,6 +579,14 @@ func _on_server_push(type: String, payload: Variant) -> void:
|
||||
print("[Game] PUSH both_idle_warning session=", sid)
|
||||
both_idle_warning.emit(sid)
|
||||
|
||||
"game.player_eliminated":
|
||||
var d := payload as Dictionary
|
||||
player_eliminated.emit(
|
||||
str(d.get("sessionId", "")),
|
||||
str(d.get("eliminatedAccountId", "")),
|
||||
int(d.get("seatIndex", -1)),
|
||||
int(d.get("teamIndex", -1)))
|
||||
|
||||
"game.activity":
|
||||
var d := payload as Dictionary
|
||||
var ev_type : String = str(d.get("eventType", ""))
|
||||
|
||||
Reference in New Issue
Block a user