Task #25: arrivals wait for a free character

A planned ground arrival whose type has no free character used to be
skipped (spawn_skipped) and lost. Now it waits and comes in as soon as
one frees, without holding back other types; any still waiting at
sunrise are dropped and counted.

- EnemySystem.can_spawn(type): room and, on foot, a free character
  (EnemyCharacters.has_free; a corpse counts), no side effects.
- WaveDirector.step: due arrivals that can't spawn go to a per-type
  FIFO; waiting ones are admitted first each tick. waited / dropped
  counters next to spawned, reset at nightfall; waiting() for tests.
- GameConfig.character_pool {"thief": 48, "breaker": 20} replaces
  EnemyCharacters.POOL; the pools are built from it at setup.
- RULES.md, Night plans: the real limits and the waiting rule.
- test_roster: full thief pool -> the thief waits, crows stay on time,
  a freed character (corpse) lets it in, sunrise drops and counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-06 16:17:31 -04:00
parent 3bb835f7c3
commit af48cff80d
6 changed files with 201 additions and 13 deletions

View file

@ -65,8 +65,12 @@ is a few crows at a time to learn the stab on. The counts below are as played:
| 4 | From both sides | Dividing attention | 3 moments when two groups arrive at once: 77 crows, 42 thieves, 14 breakers |
| 5 | The last night | The whole farm layout | 3 announced waves over a 180 s night: 84 crows, 56 thieves, 21 breakers |
Up to 160 enemies can be on the farm at once (`enemy_capacity`): 48 thieves and 20 fence
breakers on foot (the character pool), and the rest in the air.
**How many at once.** Up to 800 enemies can be on the farm at once, all types together
(`enemy_capacity`). Enemies on foot are also limited by their characters (`character_pool`): at
most 48 thieves and 20 fence breakers at a time. Crows and UFOs only count toward the 800. An
enemy that's due while its type is at its limit **waits**. It arrives as soon as one of its kind
leaves or is killed (the body left lying there doesn't keep it waiting). Other enemies due
meanwhile still arrive on time. Any still waiting at sunrise never come.
Every kind of enemy in tonight's plan shows up in the dusk warning in the phase HUD, so nothing
unannounced arrives (the last night's hint spells out its three waves). Nothing marks where they'll