File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,16 @@ function ctf_modebase.bounty_algo.kd.get_next_bounty(team_members)
28
28
end
29
29
30
30
function ctf_modebase .bounty_algo .kd .bounty_reward_func (pname )
31
- local recent = ctf_modebase :get_current_mode ().recent_rankings .players ()[pname ] or {}
32
- local kd = (recent .kills or 1 ) / (recent .deaths or 1 )
31
+ local recent = ctf_modebase :get_current_mode ().recent_rankings .players ()
32
+ local sum = 0
33
+ for _ , tname in ipairs (team_members ) do
34
+ local stats = recent [tname ]
35
+ if stats then
36
+ sum = sum + (stats .kills or 0 ) / (stats .deaths or 1 )
37
+ end
38
+ end
39
+ local pstats = recent [pname ] or {}
40
+ local kd = (pstats .kills or 1 ) / (pstats .deaths or 1 )
33
41
34
- return {bounty_kills = 1 , score = math.pow (kd * 1.5 , 2.3 )}
42
+ return {bounty_kills = 1 , score = math.pow (kd , ) )}
35
43
end
You can’t perform that action at this time.
0 commit comments