From fa83d73135ef9aa325921d354ba832205dc35dfb Mon Sep 17 00:00:00 2001 From: IonicCheese Date: Tue, 9 Dec 2025 23:49:27 -0800 Subject: [PATCH] Make the sniper alot stronger and other changes --- mods/game/main/init.lua | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/mods/game/main/init.lua b/mods/game/main/init.lua index ab7517e..9aba7e7 100644 --- a/mods/game/main/init.lua +++ b/mods/game/main/init.lua @@ -43,7 +43,7 @@ function give_player_items(player) inv:set_list("main", {}) if class == "sniper" then - inv:add_item("main", "ctf_ranged:svd_loaded") + inv:add_item("main", "ctf_ranged:m200_loaded") inv:add_item("main", "default:sword_steel") inv:add_item("main", "ctf_ranged:ammo 100") elseif class == "assault" then @@ -155,6 +155,12 @@ function start_match() player:set_hp(20) end + for i = 10, 1, -1 do -- count down from 10 to 1 (yes you are free to set me on fire for this horrible solution) + core.after(20 + i, function() + core.chat_send_all(core.colorize("green", "Match starts in " .. (11 - i) .. " seconds.")) + end) + end + core.after(30, function() set_match_state("in_progress") core.chat_send_all(core.colorize("green", "Match started!")) @@ -309,6 +315,18 @@ core.register_on_respawnplayer(function(player) return true end) +local timer = 0 +core.register_globalstep(function(dtime) + timer = timer + dtime + + if timer >= 10 then + timer = 0 + for _, player in pairs(core.get_connected_players()) do + player:set_hp(math.min(player:get_hp() + 2, 20)) + end + end +end) + core.register_on_player_receive_fields(function(player, formname, fields) if match_state ~= "pre_match" then