Thunderdome no longer allows unfair fights (#20981)

* Thunderdome no longer allows unfair fights

* surplus candidate warning
This commit is contained in:
Henri215
2023-05-08 18:44:47 -03:00
committed by GitHub
parent 910d07561e
commit 8809ada03e
+4 -1
View File
@@ -301,7 +301,10 @@
return FALSE
// Time to set up our team structure
if(length(thunderdome_candidates) > max_thunderdome_players)
thunderdome_candidates.Cut(max_thunderdome_players)
thunderdome_candidates.Cut(max_thunderdome_players + 1)
if(ISODD(length(thunderdome_candidates))) // We want fair fights
var/surplus_candidate = pick_n_take(thunderdome_candidates)
to_chat(surplus_candidate, "<span class='warning'>You were not chosen due to an odd number of participants.</span>")
for(var/mob/dead/observer/candidate_to_spawn in thunderdome_candidates)
if(!candidate_to_spawn || !candidate_to_spawn.key || !candidate_to_spawn.client)
continue