Make a Capture Rate of 33% and 10 captures a requirement for pro players
This commit is contained in:
parent
380a252c7e
commit
011fc7f573
3 changed files with 6 additions and 4 deletions
|
@ -100,9 +100,10 @@ for _, chest_color in pairs(colors) do
|
|||
"label[5,-0.2;" ..
|
||||
minetest.formspec_escape("Pro players only") .. "]"
|
||||
else
|
||||
formspec = formspec .. "label[4.75,3;" ..
|
||||
formspec = formspec .. "label[4.5,2.75;" ..
|
||||
minetest.formspec_escape("You need at least 10000" ..
|
||||
"\nscore and 1.5+ KD to\naccess the pro section") .. "]"
|
||||
"\nscore and 1.3+ KD, 10+\ncaptures and a Capture\nRate of at least 33%" ..
|
||||
"\nto access the pro section") .. "]"
|
||||
end
|
||||
|
||||
formspec = formspec ..
|
||||
|
|
|
@ -207,7 +207,8 @@ end
|
|||
function ctf_stats.is_pro(name)
|
||||
local stats = ctf_stats.player(name)
|
||||
local kd = stats.kills / (stats.deaths == 0 and 1 or stats.deaths)
|
||||
return stats.score >= 10000 and kd >= 1.5
|
||||
local ca = stats.captures / (stats.attempts == 0 and 1 or stats.attempts)
|
||||
return stats.score >= 10000 and kd >= 1.3 and ca >= 0.33 and stats.captures >= 10
|
||||
end
|
||||
|
||||
ctf.register_on_join_team(function(name, tname, oldteam)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue