Swarm
The baby spiders, as rules. No entities and no input — the event's arithmetic, on its own.
game.monsters.Swarm
The baby spiders, as rules. No entities and no input — the event's arithmetic, on its own.
The first one teaches. Every later swarm is a scramble; the first runs the world at a fifth speed, gives twice the time and hurts a quarter as much, because a player who has never been told which key to press must not die learning it.
local state = Swarm.new(now, tutorial)
Swarm.press(state) -- one press of E; true when it counted
Swarm.tick(state, dt) -- real seconds -> "ongoing" | "cleared" | "failed"
Swarm.damagePerSecond(state)
Swarm.prompt(state), Swarm.counter(state), Swarm.spidersLeft(state)
The clock runs on real seconds, so a slow-motion swarm is never given more wall-clock time than a normal one — the slowdown exists to give the player time to read, not to give the swarm time to bite.
Numbers come from GameRules.SPIDERS: five presses, six seconds, the prompts, the
cooldown, the damage.
Scoped to this part · feeds back into the world's score.