148 lines
10 KiB
Markdown
148 lines
10 KiB
Markdown
# Alien overhaul — task list
|
||
|
||
Recovered from the planning session's Task-tool entries (#1–#15). Narrative, decisions, and open
|
||
assumptions live in `alien-overhaul-plan.md`; where the two disagree, the plan wins (its corrections
|
||
are newer and verified against code — see notes on #9, #11, #12).
|
||
|
||
Tests: `godot --headless --path . --script res://game/tests/run_tests.gd` (exit code = failures;
|
||
`-- --suite=test_x` for one suite). The suite already had ~22–23 failing checks from tuning before
|
||
this overhaul; judge tasks by *new* FAIL lines versus the baseline, not by a zero exit code.
|
||
|
||
## Independent
|
||
|
||
- [x] **#1 Rename Turret/Tar Patch display labels.** *(merged 7fce796)*
|
||
Rename automated_defense->"Turret" and slowing_trap->"Tar Patch" in UI display text only
|
||
(build_hud.gd, structure_system.gd NAMES). Keep internal IDs unchanged for save compatibility.
|
||
*Acceptance:* test_structures.gd/test_targets.gd pass unmodified; only displayed names change.
|
||
|
||
- [x] **#2 Sprint rebalance to spec values.** *(merged 47b860b)*
|
||
Change sprint_speed_mult 1.6->1.8 and sprint_time 3.0->4.0 in game_config.gd (sprint_cooldown
|
||
stays 10.0, already matches). Update upgrade description text in game_config.tres.
|
||
*Acceptance:* test_scarecrow.gd sprint checks pass with new values.
|
||
|
||
- [ ] **#3 Pouch capacity rework (8 base, 16 upgraded).**
|
||
Change base pouch_capacity from 16 to 8 in game_config.gd. Add a new "pouch_upgrade" entry to
|
||
Upgrades (stat: pouch_capacity, target 16) purchasable once via Workbench, following the existing
|
||
stat/mult upgrade pattern.
|
||
*Acceptance:* new test asserting base capacity 8, capacity 16 after purchase, persists across
|
||
retry/save.
|
||
|
||
- [x] **#4 Alien Goop resource + drop-on-kill.** Blocks #5. *(merged 2fa3aa3 — goop is credited
|
||
straight into the pouch on kill, like gathering; cumulative total is
|
||
`state.totals()["gathered_alien_goop"]`)*
|
||
Add "alien_goop" as a 4th material in resource_store.gd alongside wood/scrap/straw. Add a drop
|
||
hook in enemy_system.gd's kill/removal path for the "thief" (soon "Alien") enemy type only:
|
||
config-tunable alien_goop_drop_chance (default 0.33) and alien_goop_drop_qty (default 1) in
|
||
GameConfig. Dropped goop should behave like other gathered materials (pouch/shed storage,
|
||
stealable from shed).
|
||
*Acceptance:* new test killing N thief enemies and asserting goop drop rate roughly matches config
|
||
over many trials, or a deterministic seeded test; goop persists in save/retry.
|
||
|
||
- [ ] **#9 Workbench: auto-grant after Night 1 + destructible/repairable.**
|
||
Gate Workbench visibility/availability to auto-appear after Night 1 completes (campaign
|
||
controller's phase/night-advance signal), not buildable/placeable by the player. Once present,
|
||
give it HP and make it targetable by enemies, repairable via the existing proportional
|
||
repair-cost pattern. Repair-only (no full-destroy-then-rebuild state).
|
||
*Wiring (decided 2026-10-05, plan option (a)):* inject the Workbench into
|
||
`StructureSystem.structures` through a non-purchased, unvalidated variant of `place()` so it
|
||
reuses the existing damage/repair/targeting/save pipeline — no bespoke HP logic in workbench.gd.
|
||
*Acceptance:* new test confirming Workbench is absent/inaccessible before Night 1, appears after,
|
||
can be damaged and repaired, state persists in save/retry.
|
||
|
||
- [ ] **#10 Per-instance Turret/Tar Patch leveling (L1–L3).**
|
||
Add a `level` field (1-3) to each placed structure's record in StructureSystem, upgraded
|
||
independently per instance (not account-wide) via a new interaction when the player is near a
|
||
specific turret/tar-patch, charging config-tunable per-level costs. Turret L2: fire rate 3x (same
|
||
multiplier as player's Rapid Fire). Turret L3: 3 projectiles fired simultaneously in a triangle
|
||
spread pattern, retaining L2's 3x fire rate (plan default). Tar Patch L2: footprint size doubles
|
||
vs L1 original. Tar Patch L3: triples vs L1 original (plan default).
|
||
*Acceptance:* new tests per level verifying fire-interval/projectile-count and trap
|
||
footprint/slow-area values, independently for two separately-placed structures of the same type.
|
||
|
||
- [ ] **#11 Animal Pen boundary becomes player-built.** Blocks #12.
|
||
*(Task-tool text said "new buildable type in ORDER"; superseded by the plan's corrected
|
||
Decision 4.)* Not a new structure type and no new `ORDER` entry. `FarmZone.Kind.ANIMAL_PEN`
|
||
already exists and drives nav/flow-fields; `AnimalSystem.update_pen_open()` already implements
|
||
"open if there's a way out crossing no structure". Delete the 23 `fence_024` instances under
|
||
`Zones/AnimalPen` in farm.tscn (they are collidable, so today they form a permanent wall) and let
|
||
players build ordinary `fence`/`gate` structures around the existing pen rect.
|
||
*Starting gate (decided 2026-10-05):* remove the `gate` from `GameConfig.start_structures` too —
|
||
the pen is fully player-built.
|
||
*Existing pen tests:* tests that assume the pre-built pen (`test_targets.gd` "the pen's gate shuts
|
||
the pen", `_pen_by_day`, `_breach`; `test_structures.gd` fence-on-pen-edge "Blocked" check,
|
||
`_pen_breach`) must build a fence/gate ring in their setup so they keep covering the same behavior.
|
||
*Acceptance:* new test that builds fence/gate structures around the pen rect (charging normal
|
||
costs, passing normal placement validation) and verifies the pen-open/closed gap check works for
|
||
the player-built boundary — closed when fully enclosed, open with a gap — not for fixed scene
|
||
geometry. Reworked pen tests pass; no new FAIL lines versus baseline.
|
||
|
||
- [ ] **#13 Two new crop fields with staged growth (Night 2 / Night 4).**
|
||
Add 2 new FarmZone crop fields (lettuce/cabbage field, corn field) at confirmed in-map locations
|
||
— no "dirt field" zones exist; default to two open farmyard areas inside the perimeter fence
|
||
(defendable like the existing Crop Field), pending user confirmation of the exact rects. Add
|
||
crop-type field and growth-stage/visibility logic to crop_unit.gd: field A sprouts automatically
|
||
after Night 2 completes, field B after Night 4, triggered off the campaign controller's
|
||
night-advance signal. Wire theft to new fields reusing existing crow/loot_system logic.
|
||
*Acceptance:* new test_farm_layout.gd and test_theft.gd cases confirming fields are
|
||
empty/non-interactable before their night threshold and fully active (stealable, scored) after.
|
||
|
||
- [x] **#14 Enemy roster reskin: Crow / Alien / Alien Robot.** *(merged 814449a)*
|
||
Rename display text/narrative framing only for existing enemy types: crow keeps its name/role
|
||
(add alien-mind-control narrative), thief -> "Alien" (display name), breaker -> "Alien Robot"
|
||
(display name). Zero behavior changes. No 3D model/texture/visual work (placeholders stay).
|
||
*Acceptance:* existing test_roster.gd/test_theft.gd pass unmodified; only UI-facing names/text
|
||
change.
|
||
|
||
- [ ] **#15 UFO enemy: new flying-fast attacker type.**
|
||
Add a 4th enemy_types entry (flying:true) reusing existing generic flying-nav infrastructure
|
||
(ignores fences/gates/traps, straight-line+altitude nav). Needs new FIGHT-capable flying behavior
|
||
in thief_behavior.gd since crow's land-and-flee logic never fights — default to a
|
||
strafing/diving attack pattern with config-tunable speed/hp/damage/attack-interval. Wire into
|
||
NightPlan/WaveDirector spawn composition. *Scheduling (user, 2026-10-05):* UFOs appear in night 5
|
||
only (one modest group added to night_5.tres; other nights unchanged).
|
||
*Acceptance:* new test_roster.gd case spawning a UFO, confirming it ignores barriers,
|
||
engages/damages the scarecrow or structures per its aggression setting, and stats are read from
|
||
GameConfig.
|
||
|
||
## Dependent
|
||
|
||
- [ ] **#5 Hidden/reveal shop item system.** Blocked by #4. Blocks #6.
|
||
Build a generic "hidden until condition" flag for shop item definitions: shows a "?" icon with no
|
||
name/stats until a reveal condition is met (total Alien Goop collected >= config-tunable
|
||
threshold), then shows full details and becomes purchasable at its defined cost. Used by Alien
|
||
Ray and Radar.
|
||
*Acceptance:* test verifying item is hidden below threshold, revealed+purchasable at/above
|
||
threshold, state persists across save/retry.
|
||
|
||
- [ ] **#6 Supply Shed as a real purchase surface.** Blocked by #5. Blocks #7, #8.
|
||
Build a new shop panel (separate from the Workbench's UpgradePanel) at the Supply Shed zone,
|
||
triggered by player interaction, selling weapons: Corn Shooter, Pumpkin Bombs (moved from
|
||
Workbench), plus new weapons, plus hidden items once revealed. Workbench keeps player/weapon stat
|
||
upgrades and buildable-related upgrades.
|
||
*Acceptance:* new/updated test confirming weapon purchases happen via Supply Shed interaction,
|
||
not Workbench, and existing Workbench upgrade tests still pass for retained upgrades.
|
||
|
||
- [ ] **#7 New weapons: Potato Cannon, Shurikens, Propane Torch, Alien Ray.** Blocked by #6.
|
||
Add 4 new weapons to the combat system (scarecrow_combat.gd/weapon enum pattern): Potato Cannon
|
||
(ranged, standard inventory), Shurikens (fast melee/thrown, standard inventory), Propane Torch
|
||
(short-range sustained/DoT, standard inventory), Alien Ray (ranged, hidden/revealed via Alien
|
||
Goop threshold). Costs and damage/fire-rate/cooldown: sensible defaults, all GameConfig-tunable.
|
||
No ammo/consumable system — cooldown-based like existing weapons. Placeholder visuals only.
|
||
*Acceptance:* each weapon purchasable, equippable, deals damage in a new test_weapons.gd case per
|
||
weapon.
|
||
|
||
- [ ] **#8 Radar item (minimap reveal).** Blocked by #6.
|
||
Add Radar as a purchasable hidden/revealed item via the Supply Shed. Function (confirmed):
|
||
minimap reveal — adds a minimap/map overlay showing enemy positions once purchased. Config-tunable
|
||
minimap range/refresh rate.
|
||
*Acceptance:* new test/UI check confirming minimap becomes visible after purchase and shows
|
||
active enemy positions, hidden before purchase.
|
||
|
||
- [ ] **#12 Animals start loose; herd into the player-built pen.** Blocked by #11.
|
||
Set animals' initial status to the existing DROPPED/loose state (not HOME — that already means
|
||
in-pen grazing in animal_system.gd) in setup()/sync_from_state(), so they start loose across the
|
||
open farm rather than resetting into a fixed pen each morning. Reuse the existing follow-trail
|
||
mechanic (start_following/_follow) so the player can herd them into the pen once its boundary is
|
||
built (#11). Handle the "no pen built yet" state for escape/theft logic.
|
||
*Acceptance:* new test confirming animals spawn loose at campaign start, can be led into a
|
||
freshly-enclosed pen, and behave per existing containment/escape/theft rules once penned.
|