#46: sprint becomes a permanent speed upgrade
Owning the Sprint upgrade now multiplies the scarecrow's speed by
sprint_speed_mult (1.25) all the time, walking and running, on every
platform; the run clip speeds up to match. The hold-to-sprint burst is
gone: sprint_time, sprint_cooldown, the stamina state in PlayerCharacter
(can_sprint is now has_sprint), and the HUD's stamina bar. The upgrade
keeps its id, cost, and name; its text is "Run 25% faster, always".
The sprint input action stays in project.godot, unused.
Tests: test_scarecrow's sprint checks cover 1x without it, x1.25 with it
(run and walk, clip speed, network strength), 30 s with no time limit,
no cooldown, the next morning, and no platform dependence; test_nights
checks it after the retry and a loaded save; test_economy checks the
text matches the multiplier, the menu row, and that an old save's
{"sprint": 1} still owns it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f0291133fd
commit
962c7b0b93
9 changed files with 138 additions and 149 deletions
|
|
@ -15,8 +15,9 @@ extends RefCounted
|
|||
## the scarecrow's max health (FarmState) when a level is bought, and the Bigger pouch upgrade
|
||||
## raises pouch_capacity (ResourceStore, shared: every scarecrow's pouch grows) the same way. The
|
||||
## buyer pays from their own pouch and the shed (slot). Sprint, the weapons, and radar change no
|
||||
## stat: owning them (owned(): level 1 or more) unlocks sprinting (PlayerCharacter), the weapons
|
||||
## (ScarecrowCombat), and the minimap (RadarHud). Rapid fire and heavy seeds (bought at the
|
||||
## stat here; owning one (owned(): level 1 or more) is what counts: Sprint makes the scarecrow
|
||||
## faster for good (PlayerCharacter.speed_factor, by GameConfig.sprint_speed_mult), the weapons
|
||||
## unlock in ScarecrowCombat, and radar's minimap in RadarHud. Rapid fire and heavy seeds (bought at the
|
||||
## workbench) need the corn shooter (bought at the shed) first ("requires" crosses shops freely).
|
||||
|
||||
## Menu order, grouped by track.
|
||||
|
|
@ -31,8 +32,8 @@ static func level(state: FarmState, id: String) -> int:
|
|||
return int(state.upgrades.get(id, 0)) if state != null else 0
|
||||
|
||||
|
||||
## Owned at any level (level 1 or more): what "requires" and the unlocks (sprint, the weapons,
|
||||
## radar) ask.
|
||||
## Owned at any level (level 1 or more): what "requires" and the stat-less ones (sprint's speed,
|
||||
## the weapons, radar) ask.
|
||||
static func owned(state: FarmState, id: String) -> bool:
|
||||
return level(state, id) > 0
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue