harvest/game/tests
Forrest 91b9e52e96 Task #26: upgrade tiers and timed shed stock
Workbench stat upgrades get 3 levels: level L costs costs[id] x
upgrade_cost_growth (1.8) ^ (L - 1), each material rounded up, and opens on
day upgrade_level_days[L - 1] ([1, 8, 16]). Each owned level's "mult"/"add"
entry stacks. Level 1 keeps the user's values and costs (rapid fire 3.0x).
Shed items arrive on set days ("from_day"): corn shooter 1, shurikens 2,
pumpkin bombs 3, potato cannon 6, radar 8, propane torch 10, alien ray 14.

- Upgrades: level(), max_level(), maxed(), cost(cfg, id, level),
  next_cost(), per_level(), text_at(), name_at() (roman numerals),
  from_day(), level_day(), arrived(). owned() stays "level >= 1". blocker()
  adds "Arrives on day N" and "Level N opens on day D"; buy() takes the next
  level and applies that level's side effect; upgrades_bought counts every
  level. FarmState.upgrades keeps id -> level, so saves don't change shape.
- UpgradePanel: "Rapid fire II" with the next level's text and cost, the
  blocker reason, "Max" at the last level; a shed item before its day shows
  its name greyed with "Arrives on day N" ("?" plus the day if hidden). The
  title counts items at their last level. Every level bought jingles.
- Co-op: the host sends "bought" for any level (no wire change; PROTOCOL
  stays 5).
- soak_night.gd buys the lowest next level first across UPGRADE_ORDER.
- Tests: level costs, day gates, stacking, from_day, save/morning/retry/co-op,
  an old {"rapid_fire": 1} save as level 1. Existing tests set the day where
  they buy stock that now arrives later.
- RULES.md Upgrades: per-level effects and costs, stock schedule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 16:20:05 -04:00
..
pen_ring.gd Task #11: Animal Pen boundary becomes player-built 2026-10-05 14:34:02 -04:00
pen_ring.gd.uid Task #11: Animal Pen boundary becomes player-built 2026-10-05 14:34:02 -04:00
run_tests.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
run_tests.gd.uid init 2026-10-03 12:14:28 -04:00
test_campaign.gd updates 2026-10-04 12:07:36 -04:00
test_campaign.gd.uid init 2026-10-03 12:14:28 -04:00
test_coop.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_coop.gd.uid updates 2026-10-04 12:07:36 -04:00
test_cycle.gd Task #9: Workbench auto-grants after Night 1, destructible/repairable 2026-10-05 16:27:55 -04:00
test_cycle.gd.uid updates 2026-10-04 12:07:36 -04:00
test_economy.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_economy.gd.uid updates 2026-10-04 12:07:36 -04:00
test_farm_layout.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
test_farm_layout.gd.uid init 2026-10-03 12:14:28 -04:00
test_farm_state.gd Task #12: animals start loose; herd into the player-built pen 2026-10-05 15:13:20 -04:00
test_farm_state.gd.uid init 2026-10-03 12:14:28 -04:00
test_flow.gd Enemy roster reskin: thief -> Alien, breaker -> Alien Robot display names 2026-10-05 13:48:00 -04:00
test_flow.gd.uid updates 2026-10-04 12:07:36 -04:00
test_nights.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_nights.gd.uid updates 2026-10-04 12:07:36 -04:00
test_outcome.gd updates 2026-10-04 12:07:36 -04:00
test_outcome.gd.uid init 2026-10-03 12:14:28 -04:00
test_radar.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_radar.gd.uid Task #8: Radar item, a Supply Shed minimap reveal 2026-10-05 16:08:54 -04:00
test_roster.gd Task #19: UFO model built from primitives 2026-10-06 12:55:14 -04:00
test_roster.gd.uid updates 2026-10-04 12:07:36 -04:00
test_save.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
test_save.gd.uid updates 2026-10-04 12:07:36 -04:00
test_scarecrow.gd updates 2026-10-04 12:07:36 -04:00
test_scarecrow.gd.uid updates 2026-10-04 12:07:36 -04:00
test_structures.gd Task #9 follow-up: make the Workbench genuinely targetable (Decision 3) 2026-10-05 16:46:04 -04:00
test_structures.gd.uid updates 2026-10-04 12:07:36 -04:00
test_targets.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
test_targets.gd.uid updates 2026-10-04 12:07:36 -04:00
test_theft.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
test_theft.gd.uid updates 2026-10-04 12:07:36 -04:00
test_weapons.gd Task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:05 -04:00
test_weapons.gd.uid updates 2026-10-04 12:07:36 -04:00