Increase score given by kill

This commit is contained in:
rubenwardy 2017-10-13 02:05:21 +01:00
parent 13bd6fb832
commit 31ae819d0b

View file

@ -170,6 +170,7 @@ ctf_flag.register_on_precapture(function(name, flag)
end) end)
local good_weapons = { local good_weapons = {
"default:sword_stone",
"default:sword_steel", "default:sword_steel",
"shooter:grenade", "shooter:grenade",
"shooter:shotgun", "shooter:shotgun",
@ -194,21 +195,21 @@ local function calculateKillReward(victim, killer)
" score worth of kills since last death") " score worth of kills since last death")
-- 15 * kd ration, with variable based on player's score -- 15 * kd ration, with variable based on player's score
local kdreward = 20 * vmain.kills / (vmain.deaths + 1) local kdreward = 30 * vmain.kills / (vmain.deaths + 1)
local max = vmain.score / 10 local max = vmain.score / 6
if kdreward > max then if kdreward > max then
kdreward = max kdreward = max
end end
if kdreward > 40 then if kdreward > 80 then
kdreward = 40 kdreward = 80
end end
reward = reward + kdreward reward = reward + kdreward
-- Limited to 0 <= X <= 100 -- Limited to 0 <= X <= 100
if reward > 100 then if reward > 150 then
reward = 100 reward = 150
elseif reward < 10 then elseif reward < 14 then
reward = 10 reward = 14
end end
-- Half if no good weapons -- Half if no good weapons