Skip to content

Commit

Permalink
Add more factors to capture score, decrease score slope
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Aug 27, 2024
1 parent 18e72d3 commit 2592626
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mods/ctf/ctf_modebase/features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,15 @@ return {
end

local score = team_score / math.max(1, ctf_teams.online_players[lost_team].count)
score = math.max(10, score * (2.6 + ctf_teams.online_players[lost_team].count/20))
score = math.max(
8 * ((player_scores[pname].flag_attempts or 0) + math.min(
(os.time() - ctf_map.start_time) / 60,
10
)),
score * (2.4 + ctf_teams.online_players[lost_team].count/30)
)

score = math.max(score, #ctf_teams.get_connected_players() * 1.4)

capture_reward = capture_reward + score

Expand Down

0 comments on commit 2592626

Please sign in to comment.