Upgrade counts are in levels; day-1 text no longer promises pumpkin bombs

The workbench label, the morning screen and the end screen counted an
upgrade as done at level 1 ("N of 17"); they now count levels bought
(Upgrades.levels_bought / levels_total). Pumpkin bombs arrive at the shed
on day 3, so the first-morning text and the shoot tip say more weapons
arrive over the days instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-06 16:24:30 -04:00
parent 787b36a1c2
commit 5fcb87941e
6 changed files with 26 additions and 19 deletions

View file

@ -47,6 +47,22 @@ static func maxed(cfg: GameConfig, state: FarmState, id: String) -> bool:
return level(state, id) >= max_level(cfg, id)
## Levels bought across both shops, and how many there are in all (the "N of M" counts on the
## workbench, the morning screen, and the end screen).
static func levels_bought(cfg: GameConfig, state: FarmState) -> int:
var n := 0
for id in ORDER:
n += mini(level(state, id), max_level(cfg, id))
return n
static func levels_total(cfg: GameConfig) -> int:
var n := 0
for id in ORDER:
n += max_level(cfg, id)
return n
## What buying this level costs: costs[id] for level 1, and upgrade_cost_growth times as much
## for each level after it (costs[id] x growth^(level - 1)), each material rounded up.
## next_cost() is the one the farm would buy now.