Fix /makepro

This commit is contained in:
philipmi 2021-02-25 17:48:15 +01:00
parent 9de5000fb8
commit a189946d82

View file

@ -236,8 +236,14 @@ minetest.register_chatcommand("makepro", {
local stats = ctf_stats.player(param)
local deaths = math.max(stats.deaths, 1)
if stats.kills < 1.5 * deaths then
stats.kills = math.ceil(1.51 * deaths)
if stats.kills < 1.3 * deaths then
stats.kills = math.ceil(1.31 * deaths)
modified = true
end
local attempts = math.max(stats.attempts, 1)
if stats.captures < 0.33 * attempts then
stats.captures = math.ceil(0.331 * attempts)
modified = true
end