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;" ..
|
"label[5,-0.2;" ..
|
||||||
minetest.formspec_escape("Pro players only") .. "]"
|
minetest.formspec_escape("Pro players only") .. "]"
|
||||||
else
|
else
|
||||||
formspec = formspec .. "label[4.75,3;" ..
|
formspec = formspec .. "label[4.5,2.75;" ..
|
||||||
minetest.formspec_escape("You need at least 10000" ..
|
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
|
end
|
||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
|
|
|
@ -207,7 +207,8 @@ end
|
||||||
function ctf_stats.is_pro(name)
|
function ctf_stats.is_pro(name)
|
||||||
local stats = ctf_stats.player(name)
|
local stats = ctf_stats.player(name)
|
||||||
local kd = stats.kills / (stats.deaths == 0 and 1 or stats.deaths)
|
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
|
end
|
||||||
|
|
||||||
ctf.register_on_join_team(function(name, tname, oldteam)
|
ctf.register_on_join_team(function(name, tname, oldteam)
|
||||||
|
|
|
@ -56,7 +56,7 @@ function random_messages.read_messages()
|
||||||
"You gain more score the better the opponent you defeat.",
|
"You gain more score the better the opponent you defeat.",
|
||||||
"Find weapons in chests or mine and use furnaces to make stronger swords.",
|
"Find weapons in chests or mine and use furnaces to make stronger swords.",
|
||||||
"Players are immune to attack for 5 seconds after they respawn.",
|
"Players are immune to attack for 5 seconds after they respawn.",
|
||||||
"Access the pro section of the chest by achieving a 10k+ score and killing 3 people for every 2 deaths.",
|
"Access the pro section of the chest by achieving a 10k+ score, killing 4 people for every 3 deaths, capturing the flag on every 3rd attempt and at least 10 times.",
|
||||||
"Use team doors (steel) to stop the enemy walking into your base.",
|
"Use team doors (steel) to stop the enemy walking into your base.",
|
||||||
"Craft 6 cobbles and 1 steel ingot together to make reinforced cobble.",
|
"Craft 6 cobbles and 1 steel ingot together to make reinforced cobble.",
|
||||||
"Sprint by pressing the fast key (E) when you have stamina.",
|
"Sprint by pressing the fast key (E) when you have stamina.",
|
||||||
|
|
Loading…
Reference in a new issue