From bafcc3a6673a1f21d0b7eae5bf489cd2afcad703 Mon Sep 17 00:00:00 2001 From: -sniper- <47271658+JostP@users.noreply.github.com> Date: Wed, 23 Dec 2020 18:29:38 +0100 Subject: [PATCH] Make bounties scale more (#720) * improve bounties * give players with less than 50k pts lower bounty * Update init.lua * Update init.lua --- mods/ctf/ctf_bounties/init.lua | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/mods/ctf/ctf_bounties/init.lua b/mods/ctf/ctf_bounties/init.lua index 7f78a91..ae4871f 100644 --- a/mods/ctf/ctf_bounties/init.lua +++ b/mods/ctf/ctf_bounties/init.lua @@ -23,15 +23,37 @@ local function bounty_player(target) local prev = bountied_player bountied_player = target - -- Score * K/D + -- Players with less than 20000 points --> bounty 50 + -- + -- ######################################################## + -- + -- Players between 20000 points and 50000 points: + -- + -- Score + -- bounty_score = ----------, or 500 (whichever is lesser) + -- deaths + -- + -- ######################################################## + -- + -- Players with more than 50000 points: + -- + -- Score * 2 -- bounty_score = -----------, or 500 (whichever is lesser) - -- 5000 + -- deaths local pstat = ctf_stats.player(target) if pstat.deaths == 0 then pstat.deaths = 1 end - bounty_score = (pstat.score * (pstat.kills / pstat.deaths)) / 10000 + + if pstat.score <= 20000 then + bounty_score = 50 + elseif pstat.score <= 50000 then + bounty_score = (pstat.score / pstat.deaths) + else + bounty_score = ((pstat.score * 2) / pstat.deaths) + end + if bounty_score > 500 then bounty_score = 500 end