230 lines
16 KiB
Markdown
230 lines
16 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.
|
||
|
||
- [x] **#3 Pouch capacity rework (8 base, 16 upgraded).** *(merged 5b72e83 — "Bigger pouch",
|
||
10 wood + 8 straw, Scarecrow track)*
|
||
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.
|
||
|
||
- [x] **#9 Workbench: auto-grant after Night 1 + destructible/repairable.** *(merged 4e3692b —
|
||
`StructureSystem.grant_workbench()` at night 1's end; `workbench_hp` 50; broken at 0 HP until
|
||
repaired; always a fence-breaker goal while unbroken)*
|
||
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.
|
||
|
||
- [x] **#10 Per-instance Turret/Tar Patch leveling (L1–L3).** *(merged 4b78004 — hold interact
|
||
near a full-HP turret/tar patch by day; costs in `GameConfig.structure_level_costs`; save v6;
|
||
co-op PROTOCOL 3)*
|
||
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.
|
||
|
||
- [x] **#11 Animal Pen boundary becomes player-built.** Blocks #12. *(merged 43300a1; test helper
|
||
`game/tests/pen_ring.gd` (PenRing) rebuilds the old 24-piece ring through the normal path)*
|
||
*(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.
|
||
|
||
- [x] **#13 Two new crop fields with staged growth (Night 2 / Night 4).** *(merged 930647c — units
|
||
31–40 lettuce, 41–50 corn; `LootSystem.Status.DORMANT`; `crops_total` grows 30→40→50)*
|
||
Add 2 new FarmZone crop fields (lettuce/cabbage field, corn field). *Placement (user,
|
||
2026-10-05):* side by side in the open south-west ground (LAYOUT.md's x −13…14, z −1…15) —
|
||
lettuce/cabbage field x −11…−1, z 2…12; corn field x 2…12, z 2…12 (≈10×10 m each, a 3 m
|
||
walkway between, clear of the Animal Pen rect and the Crop Field). 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.
|
||
|
||
- [x] **#15 UFO enemy: new flying-fast attacker type.** *(merged ae89494; night 5 gets 7 UFOs from 140 s)*
|
||
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
|
||
|
||
- [x] **#5 Hidden/reveal shop item system.** Blocked by #4. Blocks #6. *(merged d68d37b — item key
|
||
`"hidden": true` (+ optional `"reveal_goop": N`), default `GameConfig.hidden_reveal_goop = 5`;
|
||
helpers `Upgrades.revealed(state, cfg, id)`, `Upgrades.goop_collected(state)`)*
|
||
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.
|
||
|
||
- [x] **#6 Supply Shed as a real purchase surface.** Blocked by #5. Blocks #7, #8. *(merged
|
||
86755d8 — add a shed item with `"shop": "shed"` in GameConfig.upgrades (+ its costs entry) and
|
||
its id in Upgrades.ORDER; `Upgrades.shop_of(cfg, id)`; ShedCounter at (1, −15.5), daytime only)*
|
||
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.
|
||
|
||
- [x] **#7 New weapons: Potato Cannon, Shurikens, Propane Torch, Alien Ray.** Blocked by #6.
|
||
*(merged 72e84f1 — all four main-hand, sold at the shed; Alien Ray hidden, costs 6 goop + 10 scrap)*
|
||
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.
|
||
|
||
- [x] **#8 Radar item (minimap reveal).** Blocked by #6. *(merged 94ac350 — hidden shed item
|
||
"radar" (8 scrap + 6 wood); RadarHud top-right, `radar_range` 40 m, `radar_refresh` 0.25 s)*
|
||
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.
|
||
|
||
- [x] **#12 Animals start loose; herd into the player-built pen.** Blocked by #11. *(merged b2eae67 —
|
||
`LootSystem.Status.LOOSE`, `GameConfig.animal_loose_spots`, `FarmState.penned_animals`, save v5)*
|
||
*(Reworked 2026-10-05: reusing DROPPED as-is doesn't work — DROPPED animals inside the pen rect
|
||
flip straight back to HOME, and outside it they walk to the map edge and are lost in any phase.
|
||
User chose "calm grazing outside".)* Add a new calm loose status (e.g. `LootSystem.Status.LOOSE`):
|
||
animals start scattered in open farmyard outside the pen rect and graze in place (HOME-style
|
||
wandering around their spot, not down `escape_field`) until the player leads them in with the
|
||
existing follow-trail mechanic (start_following/_follow) — entering the pen makes them HOME.
|
||
Aliens can still claim/steal loose animals; an animal an Alien drops stays DROPPED (unchanged:
|
||
runs for the edge). Persist which animals are penned in FarmState (to_dict/from_dict, morning
|
||
snapshot) so `sync_from_state()` restores penned animals HOME and the rest LOOSE each morning,
|
||
instead of resetting everyone into the pen. 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.
|
||
|
||
# Post-overhaul fix batch (2026-10-06)
|
||
|
||
Root causes, approach, files, and decisions live in `docs/plan.md` (#16–#22). Wave 1 runs in
|
||
parallel; wave 2 waits on the task named.
|
||
|
||
## Wave 1
|
||
|
||
- [x] **#16 Per-player pouch in co-op.** [user item 1] Blocks #22. *(merged 2fc09ca — save key
|
||
`partner_pouch` (FarmState v7), PROTOCOL 4; every pouch/pay method takes `slot` (default 0);
|
||
kill attribution `enemies.attacker` / `killer_of(handle)` for goop)*
|
||
Shed stays shared; pouch becomes one per avatar slot (shared `pouch_capacity`, so one
|
||
`pouch_upgrade` grows both). Every gather/deposit/pay path takes the acting slot. HUD shows the
|
||
local pouch. FarmState v7 + migration, CoopSession PROTOCOL 4.
|
||
*Acceptance:* test_coop proves separate pouches, no cross-banking in the shed, own-pouch paying;
|
||
v6 save migrates; solo unchanged; no new FAIL lines.
|
||
|
||
- [x] **#17 Propane Torch sprays a band of fire.** [user item 2] Blocks #18. *(merged 51b553b —
|
||
`_band_hit`, `TorchFlame` CPUParticles3D; reusable `WeaponModels.add_held_effect()` for #18;
|
||
band starts at the scarecrow, not the muzzle, so a thief in melee range still burns)*
|
||
Rectangular band hit test from the muzzle (`torch_width`, longer `torch_range`, drop
|
||
`torch_arc`); particle flame lit while fire is held (also on the partner's screen via the
|
||
existing attack events); own sound.
|
||
*Acceptance:* test_weapons band in/out/behind checks, sustained hold ticks and stops on release,
|
||
flame visible only while held.
|
||
|
||
- [x] **#19 UFO model built from primitives.** [user item 4] *(merged 91b71b5 — `EnemySystem.build_ufo_mesh()`,
|
||
`ufo_renderer` + `game/resources/ufo.gdshader`; UFO arrival cue `ufo_arrive`)*
|
||
Merged primitive saucer ArrayMesh drawn by a second HordeRenderer with its own shader (vertex
|
||
colors, no flap, keeps hit flash/night glow).
|
||
*Acceptance:* test_roster: UFOs render in the UFO renderer, not the bird one; crows unchanged.
|
||
|
||
- [x] **#20 New crop fields on the south soil, with their own plant models.** [user item 5]
|
||
*(merged 11d19d8 — playable `Rect2(-13, -45, 60, 80)`; lettuce x −6…4 / corn x 24…34, z 20…30;
|
||
plant_004/005 cabbages, plant_001 corn; `ThiefBehavior.field_rects`)*
|
||
Lettuce field → SW soil, corn field → SE soil; playable map extends south (z −45…35); SouthFields
|
||
hay points move out; per-field thief rects; lettuce/corn use their own plant prefabs and crop
|
||
tokens; LAYOUT.md updated.
|
||
*Acceptance:* test_farm_layout (fields on soil, inside map, no overlaps, not sunflower models);
|
||
test_theft staged-field cases pass.
|
||
|
||
- [x] **#21 Animals roam the whole farm, never lost on their own.** [user item 6] *(merged 9d26f29;
|
||
integration fix 55ebae4: thieves go straight for loose loot in clear view at any distance)*
|
||
No self-escape to the edge; dropped/leash-broken animals and animals leaving an open pen become
|
||
LOOSE; loose animals roam the playable map day and night; only an Alien carrying one off the
|
||
map loses it.
|
||
*Acceptance:* reworked test_targets loose/drop/breach cases; test_structures pen checks pass.
|
||
|
||
## Wave 2
|
||
|
||
- [ ] **#18 Alien Ray fires a beam.** [user item 3] Blocked by #17.
|
||
Held beam, ticked damage, clipped at walls, pierces enemies along it; emissive beam mesh; config
|
||
range/width/tick/pierce replace speed/lifetime.
|
||
*Acceptance:* test_weapons same-step far hit, wall blocks, two-in-line both hit, beam visible
|
||
only while held.
|
||
|
||
- [ ] **#22 Joining player can open the store.** [user item 7] Blocked by #16.
|
||
Failing test_coop case first (both shops), then fix: client shop prompt (`_gather_node`),
|
||
host keeps a partner's press pending until focus is valid, interact closes the client menu,
|
||
partner purchases equip on the buyer's slot and pay from the buyer's pouch.
|
||
*Acceptance:* new test_coop cases pass for shed and Workbench; two-process smoke opens the shed.
|