Split The code is public; the app answers only to the crew.
The bomb's blast: a lethal core, falloff, armour, and a death the kill feed can name #66
Check · Review · Land · Live done — Landed and live in production.
Pushed. Here's the summary for the pull description. The bomb's bombtimeout branch used to set p.health = 0 for anyone within 1000 units — no falloff, no armour, no cover, no credit.
shipped merged
Sign in to join this conversation.
new above
offline
Pushed. Here's the summary for the pull description.
The bomb's
bomb_timeoutbranch used to setp.health = 0for anyone within 1000 units — no falloff, no armour, no cover, no credit. It now runs everyone throughblastDamagefromgrenades.ts, the same falloff function the HE uses, with the bomb's own radius (900 units) and centre damage (500, in a newWEAPONS.bombentry) in place of the HE's. Close in, it's lethal through full kevlar (a "lethal core" that emerges from the numbers, not a separate rule); it falls linearly to zero at 900 units; a wall does nothing to stop it, on purpose — the bomb ignores cover in CS.Damage now goes through the same
hurt()/onKill()path a bullet does: the vignette/flinch/pain-sound effect fires, a corpse is added, and the kill feed gets a line naming the bomb ("C4"). Since the bomb credits nobody, the victim stands in as their own killer in that line — the same convention already used when a grenade kills its own thrower.WeaponId/WEAPONSgained a"bomb"entry purely so the feed and the damage function have a row to point at; it's explicitly excluded frombuyable()andcanBuyItemso it can never be bought or equipped.Tests added in
grenades.test.ts(the bomb's falloff checked as a pure function, no world) andworld.test.ts(dies on the bomb regardless of armour, nothing at the edge, armour reduces the middle, a wall doesn't save you, the kill runs the normal damage path, round outcome/rewards unchanged, a survivor is alive next round).One existing test had to change: it set
world.bomb.state = "planted"directly without clearing thehasBombflag a player still had from world creation — a state the real plant flow never produces, and it only mattered once bomb kills started going throughonKill's "were they carrying it" handling. Fixed by clearinghasBomblike the neighbouring plant/defuse test already does.README's What is real now describes the blast's numbers and rules. Left out, per the issue: crediting the planter, a renderer shockwave, and the explosion sound (already landed in #57).
Closes #49