From 123695cd0ea04469cb4fbfca4c2230ce932e39e8 Mon Sep 17 00:00:00 2001 From: ANAND Date: Fri, 27 Dec 2019 19:10:27 +0530 Subject: [PATCH] ctf_stats: Tweak scoring algorithm a bit (#538) --- mods/ctf/ctf_stats/init.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mods/ctf/ctf_stats/init.lua b/mods/ctf/ctf_stats/init.lua index 12646a3..74fc529 100644 --- a/mods/ctf/ctf_stats/init.lua +++ b/mods/ctf/ctf_stats/init.lua @@ -351,20 +351,20 @@ local function calculateKillReward(victim, killer) -- 30 * K/D ratio, with variable based on player's score local kdreward = 30 * vmain.kills / (vmain.deaths + 1) - local max = vmain.score / 6 + local max = vmain.score / 5 if kdreward > max then kdreward = max end - if kdreward > 80 then - kdreward = 80 + if kdreward > 100 then + kdreward = 100 end reward = reward + kdreward - -- Limited to 0 <= X <= 200 - if reward > 200 then - reward = 200 - elseif reward < 14 then - reward = 14 + -- Limited to 5 <= X <= 250 + if reward > 250 then + reward = 250 + elseif reward < 5 then + reward = 5 end -- Half if no good weapons