Task #24: nights by count, per-night enemy speed and HP

- Plans load by count: FarmSim.night_plan_path(n) ("res://game/resources/nights/night_%d.tres")
  for n in 1..campaign_nights (FarmSim.load_night_plans). A missing file is a push_error and
  that night plays the last plan that loaded. FarmSim.NIGHT_PLANS is gone. campaign_nights
  stays 5.
- NightPlan.enemy_speed_scale / enemy_hp_scale (default 1; problems() flags non-positive ones).
  At nightfall WaveDirector._on_phase_changed hands tonight's plan (or the F2 debug plan) to
  EnemySystem.night_speed_scale / night_hp_scale, and the morning puts them back to 1.
  EnemySystem.full_hp(type) = maxi(t_hp, floori(t_hp * night_hp_scale)) at spawn; steering
  and max_speed() use t_speed * night_speed_scale (fleeing and carrying are shares of it).
  Enemies have no HP bar (only structures do), and the co-op replica never simulates enemy HP,
  so the wire format and CoopSession.PROTOCOL (5) are unchanged.
- Debug F3 / Shift+F3 (CampaignDebug.jump_morning; debug builds, morning review only, not on
  a co-op partner's machine): next / previous day's morning with the farm as it is and
  nights_survived = night - 1. It grants the Workbench and grows crops_total as a night's end
  does, then re-enters the morning through CampaignController.load_state with save_path
  blanked, so there's no autosave.
- test_nights: plan paths load in order (and a missing one repeats the last), spawn HP and
  speed at default and 1.6 scales, and the F3 / Shift+F3 jump.
- RULES.md (The enemies: per-night scales), PLAYTEST.md (NIGHT_PLANS note), GameConfig
  campaign_nights comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-06 16:05:12 -04:00
parent 6a9575dfe4
commit 192a89770a
9 changed files with 259 additions and 22 deletions

View file

@ -304,8 +304,10 @@ From the user (2026-10-03): the game is "extraordinarily easy". There are too fe
come too spread out, and the game feels slow. The vacation should grow from 5 days to 30, with
the scale following. That rework comes next, before or as part of Step 12. Step 11's screens
read the night count from `GameConfig.campaign_nights` (range now 1–60): the menus, results,
saves, and ending aren't tied to five nights. The night plans are still a list of five files in
`FarmSim.NIGHT_PLANS`, and the last one repeats for any nights after it.
saves, and ending aren't tied to five nights. The night plans were then still a list of five
files in `FarmSim.NIGHT_PLANS`, and the last one repeated for any nights after it. (Since #24 they
load by count: `FarmSim.night_plan_path(n)`, `game/resources/nights/night_<n>.tres` for n in
1..`campaign_nights`. A missing file is an error, and that night plays the last plan that loaded.)
## After Step 11: 5x enemies, outside gathering, co-op, music (2026-10-03)