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:
parent
6a9575dfe4
commit
192a89770a
9 changed files with 259 additions and 22 deletions
|
|
@ -147,6 +147,11 @@ How enemies steal (the enemy types are in **The enemies**, below):
|
|||
|
||||
Implemented in Step 9. The type table is `GameConfig.enemy_types`.
|
||||
|
||||
**Per-night scales.** A night's plan can make its enemies faster and tougher than the table:
|
||||
`enemy_speed_scale` multiplies every enemy's speed that night (fleeing and carrying included), and
|
||||
`enemy_hp_scale` its HP, rounded down but never below the table's (a crow stays one hit; at 1.6 a
|
||||
thief has 4, a breaker 9). Both are 1 unless the plan says otherwise.
|
||||
|
||||
| | Crow | Thief | Fence breaker |
|
||||
|---|---|---|---|
|
||||
| Moves | Flies at 5.5 m/s | Walks at 3 m/s | Walks at 1.9 m/s |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue