Polish Hot Point progress and guidance

This commit is contained in:
Leshyi committed 2026-11-29 23:56:23 +05:00
1 parent d3648c485b
commit 522344e34b
9 files changed
+88 -16

No files matched your search

+13 -2
View File
@@ -9,6 +9,8 @@ local Sites = require(Runtime.Parent.ArenaObjectiveSites)
local function start(ctx: Types.ModeContext): Types.ModeInstance
local path = Sites.hotPath(ctx.arena, assert(ctx.map), HotPoint.Radius)
local nowAt = ctx.liveAt
local wasContested = false
local capture = HotPoint.start({
state = ctx.state, geometry = ctx.geometry, sites = path, startedAt = ctx.liveAt,
marker = function(site)
@@ -17,12 +19,21 @@ local function start(ctx: Types.ModeContext): Types.ModeInstance
end,
score = function(side, points)
ctx.scoring.add(side, points, Kinds.ZoneCaptured)
ctx.events.fire(Kinds.ZoneCaptured, {side = side, text = Strings.hotPoint})
ctx.events.fire(Kinds.ZoneCaptured, {side = side, text = Strings.hotPoint, value = nowAt - ctx.liveAt})
end,
status = ctx.status, contribute = ctx.contribute,
})
return Common.instance(ctx, {
step = function(now, dt, fighters, elapsed) capture.step(fighters, now, elapsed or dt); return false end,
step = function(now, dt, fighters, elapsed)
nowAt = now
capture.step(fighters, now, elapsed or dt)
local contested = ctx.state:GetAttribute("HotPointPhase") == "Contested"
if contested and not wasContested then
ctx.events.fire(Kinds.ZoneContested, {text = Strings.hotPoint})
end
wasContested = contested
return false
end,
hit = capture.hit, death = capture.death, leaving = capture.death, destroy = capture.destroy,
})
end