Skip to content

Commit

Permalink
Give extra points to medics when thief captures the flag.
Browse files Browse the repository at this point in the history
Update init.lua
  • Loading branch information
mrtechtroid authored and LoneWolfHT committed Aug 17, 2024
1 parent 9a28a95 commit 3079fd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions mods/ctf/ctf_modebase/features.lua
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,11 @@ return {

teams_left = teams_left - #teamnames

local healers = ctf_combat_mode.get_healers(pname)
for _, healer in ipairs(healers) do
recent_rankings.add(healer, {score = math.min(math.ceil(capture_reward / 3),math.ceil(capture_reward / #healers))})
end

if teams_left <= 1 then
local capture_text = "Player %s captured and got %d points"
if many_teams then
Expand Down
6 changes: 3 additions & 3 deletions mods/ctf/ctf_teams/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ctf_teams = {
tname = {
color = "#ffffff",
color_hex = 0x000, -- Generated from 'color' above
irc_color = 16, -- optional, default: 16
irc_color = 16, -- optional, default: 16 | See https://modern.ircdocs.horse/formatting.html#colors
not_playing = false, --optional, default: false
}
]]
Expand All @@ -26,7 +26,7 @@ ctf_teams = {
orange = {
color = "#ff4e00",
color_hex = 0x000,
irc_color = 8,
irc_color = 7,
},
purple = {
color = "#6f00a7",
Expand All @@ -36,7 +36,7 @@ ctf_teams = {
yellow = {
color = "#ffff00",
color_hex = 0x000,
irc_color = 16,
irc_color = 8,
}
},
teamlist = {},
Expand Down

0 comments on commit 3079fd2

Please sign in to comment.