Hoard
The gold pile, the nest scrape beside it, and the clutch in the scrape.
Hoard
The gold pile, the nest scrape beside it, and the clutch in the scrape.
The pile is a thermal battery: Sim.hoardStep integrates its temperature
against the air (sheltered when Game.inCave says so), the sun, and any
dragon lying on it. A cold pile steals body heat; a charged one pays it back
and its thermal mass rides out the night. Its rendered size comes from
dragon.fauna's hoard(mass), whose hemisphere radius is the same one
Sim.hoardSurfaceArea integrates — the geometry you see IS the geometry the
physics reads.
The clutch: Sim.nestStep + Sim.incubationRate. A dragon standing within
~6 m of the scrape broods it (its core temperature drives the brood patch);
an unguarded clutch drifts toward the pile/air and progress decays.
Incubation progress is clamped to [0, 1]; at 1.0 the clutch fledges —
Game.milestones.clutch is set and the roster lays a fresh clutch after a
quiet interval. Raptors and wolves remove eggs through stealEgg().
Publishes the flight-controller contract Game.nearestHoard(x, z)
(contact-gated: returns the pile only when (x, z) is actually on it) and
Game.hoards for the egg thieves.
Multiplayer/persistence: the lowest peer id integrates; state mirrors through
runtime_data.world under dragon/hoard/main, so every peer converges on
one ledger and the hoard survives restarts.
Scoped to this part · feeds back into the world's score.