Director
The director never spawns enemies. It reads a single tension number, picks a phase (build-up → peak → relax), and then, within its budget, picks actions that seed only conditions into the world.
One seed action — SeedAction
Intent ties to a phase — Prepare (build-up), Trigger (peak), Calm (relax). Each action
first checks CanSeed ("is it OK to seed now?") and only calls the world's entry points
(ApplyElement / SetWind).
The four built-ins:
The director's brain — DirectorBrain
Use DefaultDirectorBrain to run with no overrides.
Phases and budget
Each phase gives the director a different budget, declared in PhaseData.
- BuildUp — stack only good-spread conditions (dry grass, charge, fuel). Small budget, nothing dangerous.
- Peak — on top of what's stacked, throw an ember so it all goes up. Spend a lot.
- Relax — rain to quench and catch a breath while budget recovers. Calming actions only.
The default PickActions picks actions whose Intent matches the phase, within budget, that pass
CanSeed. Override it when you need finer policy.
No flicker — PhaseFsm
With a single threshold the phase flickers at the boundary. So the enter and exit thresholds differ (hysteresis), and a minimum relax time is guaranteed.