Verdigris Cloister
README.md
Garden — the growing floor, on screen
The referee decides that a round has closed. This component is what you SEE happen next: every plant easing into its next stage, a root-knot heaving its flagstone up a step, a lightwood rising until the lane behind it is gone, and the Blight taking the tiles it took.
It lives on garden_keeper, a child of the scene's Garden anchor, and owns
the bodies under it plus the HEIGHT of the tile plates under Board. It owns
no unit and no rule.
local G = entity.find("garden_keeper").component.get("Garden")
The round
G:gardenTurn(round?) -- the garden's turn; returns the changes it animated
G:blightTurn(round?) -- then the Blight's
G:runRound() -- both, and the round number they belong to
It also listens for the referee's own signals and needs no call at all:
roundEnded { round }runs both phases;phaseChanged { phase = "garden" | "blight", round }runs the matching one.
Each phase is guarded by the round number, so a phase delivered twice — by both
signals, or by a signal and a direct call — resolves once. Pass the round
when calling directly; without one it reads state.round, and a referee that
never advances it will see the second call decline.
What the garden did to whoever is standing in it is handed to the Director
component's gardenEffect(effect) if it declares one, and emitted as a
unitDamaged signal otherwise. The garden never writes a unit.
Gardening
G:sow(x, y, kind) -- { ok, reason } — reason is written to be shown as-is
G:burn(x, y)
G:flood(x, y, rounds?)
G:cut(x, y) -- Anselm's Cut Back
G:floodRow(y) -- Cassian's Open the Line
G:seedBlight(x, y, stage?)
Reading
G:describeTile(x, y) -- the tile inspector: terrain, detail, NEXT growth stage, cover, elevation, marks
G:coverAt(x, y) -- 0 none / 1 half / 2 full
G:blocksSight(x, y) -- true when a sightline dies on this tile
G:hazardAt(x, y) -- damage for ending a turn there
G:snapshot() -- every occupied tile + blightShare + threshold
G:blightState() -- { share, tiles, threshold }
Rebuilding
G:layoutMission("heart_chamber") -- clear the floor and plant a room's opening garden
G:rebuild() -- rebuild every body from the board, no animation
rebuild throws the mesh cache away too, so it is also how a change to the
plant geometry reaches what is already standing on the board.
Fields
| field | default | what it does |
|---|---|---|
autoLayout | true | lay the mission's opening garden out on wake, when nothing is growing yet |
mission | "" | which room to open with; empty means whatever state.mission says |
sway | true | cosmetic sway on the living plants — the Blight never moves |
growTime | 0.75 | seconds a growth animation takes |
The clock it does not have
update / editorUpdate move cosmetic tweens only — a stalk easing into its
new size, a plate rising, a vine breathing. No game state changes on a tick.
While the simulation is frozen no tick arrives, so growth started then arrives
at full size instead of leaving a half-grown plant standing on the board.