@@ -81,18 +81,30 @@ func tallyRun() runTally {
8181}
8282
8383func modeCleared (mode string , matches int ) bool {
84- switch mode {
85- case "survival" , "survivalcoop" , "netplaysurvivalcoop" :
86- // P1 wins OR reached configured rounds to win
84+ // Survival-like: P1 wins OR reached configured rounds-to-win.
85+ modeLower := strings . ToLower ( mode )
86+ if strings . Contains ( modeLower , "survival" ) {
8787 if sys .winnerTeam () == 1 {
8888 return true
8989 }
90- rtw := int (sys .motif .SurvivalResultsScreen .RoundsToWin )
91- return matches >= rtw && rtw > 0
92- default :
93- // Arcade / Timeattack / TeamCoop etc.
94- return sys .winnerTeam () == 1
90+ // Pull rounds-to-win from the unified ResultsScreen map.
91+ // Prefer the exact mode entry; if not present, fall back to plain "survival"
92+ // so modes like "survivalcoop"/"netplaysurvivalcoop" can reuse [Survival Results Screen].
93+ rs , _ := sys .motif .wi .findResultsScreenForMode (& sys .motif , modeLower )
94+ if rs == nil {
95+ rs , _ = sys .motif .wi .findResultsScreenForMode (& sys .motif , "survival" )
96+ }
97+ if rs != nil {
98+ rtw := int (rs .RoundsToWin )
99+ return matches >= rtw && rtw > 0
100+ }
101+
102+ // No results screen config available -> can't use rounds-to-win rule.
103+ return false
95104 }
105+
106+ // Arcade / Timeattack / TeamCoop etc.
107+ return sys .winnerTeam () == 1
96108}
97109
98110func rankingTypeFor (mode string ) (string , bool ) {
0 commit comments