Log inGet started
World

Nine Bells

Branchmain
Branchesmain
Commit5e921c28b2

README.md

bells

The clock of Ashcross: nine tolls, NB.RULES.secondsPerBell apart, and the pressure they put on everything else.

game.rounds owns this module and drives it — nothing here runs a loop of its own, so the night stops when the round stops.

local Bells = require("game.bells")

Bells.begin()            -- start counting
Bells.update(dt)         -- once a frame from the rounds director
Bells.toll()             -- ring the next one now (tests, a scripted beat)
Bells.halt()             -- stop without losing the count
Bells.reset()            -- back to the top of the night

Bells.count()            -- 0..9
Bells.untilNext()        -- seconds to the next toll
Bells.pressure()         -- 0..1, how late it is
Bells.miasmaRise()       -- extra contagion/second the air itself costs
Bells.boldness()         -- range and speed multiplier the infected read
Bells.line(n)            -- the Bellman's line for bell n

Every toll emits "bell" { n }, plays NB.sfx("bell", { n, pressure }), and speaks the Bellman's line through NB.say. It also mirrors the count into NB.state.bell / NB.state.bellClock, which is what the field kit's HUD reads.