Consider captures as a requirement for pro players (#541)

Co-authored-by: LoneWolfHT <lonewolf04361@gmail.com>
This commit is contained in:
MinetestSam 2021-02-24 22:23:07 +05:30 committed by GitHub
parent 216aa1d856
commit e9487c6bde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -102,7 +102,7 @@ for _, chest_color in pairs(colors) do
else
formspec = formspec .. "label[4.75,3;" ..
minetest.formspec_escape("You need at least 10000" ..
"\nscore and 1.5+ KD to\naccess the pro section") .. "]"
"\nscore, 1.5+ KD and 10+\ncaptures to access the\npro section") .. "]"
end
formspec = formspec ..

View file

@ -207,7 +207,7 @@ 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
return stats.score >= 10000 and kd >= 1.5 and stats.captures >= 10
end
ctf.register_on_join_team(function(name, tname, oldteam)