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>
233 lines
4.6 KiB
Text
233 lines
4.6 KiB
Text
[gd_resource type="Resource" script_class="GameConfig" format=3 uid="uid://cqvl4hhgydj86"]
|
|
|
|
[ext_resource type="Script" uid="uid://bow5a4dimtdto" path="res://game/scripts/game_config.gd" id="1_cfg"]
|
|
|
|
[resource]
|
|
script = ExtResource("1_cfg")
|
|
costs = {
|
|
"alien_ray": {
|
|
"alien_goop": 6,
|
|
"scrap": 10
|
|
},
|
|
"automated_defense": {
|
|
"scrap": 6,
|
|
"straw": 2,
|
|
"wood": 2
|
|
},
|
|
"corn_shooter": {
|
|
"scrap": 10,
|
|
"wood": 4
|
|
},
|
|
"fence": {
|
|
"wood": 2
|
|
},
|
|
"gate": {
|
|
"scrap": 1,
|
|
"wood": 4
|
|
},
|
|
"heavy_seeds": {
|
|
"scrap": 14,
|
|
"straw": 10
|
|
},
|
|
"long_range": {
|
|
"scrap": 14,
|
|
"wood": 10
|
|
},
|
|
"patch": {
|
|
"straw": 2
|
|
},
|
|
"potato_cannon": {
|
|
"scrap": 14,
|
|
"wood": 8
|
|
},
|
|
"pouch_upgrade": {
|
|
"straw": 8,
|
|
"wood": 10
|
|
},
|
|
"propane_torch": {
|
|
"scrap": 12,
|
|
"straw": 4,
|
|
"wood": 6
|
|
},
|
|
"pumpkin_bomb": {
|
|
"scrap": 6,
|
|
"straw": 12
|
|
},
|
|
"quick_fear": {
|
|
"scrap": 6,
|
|
"straw": 16
|
|
},
|
|
"radar": {
|
|
"scrap": 8,
|
|
"wood": 6
|
|
},
|
|
"rapid_fire": {
|
|
"scrap": 12,
|
|
"straw": 12,
|
|
"wood": 8
|
|
},
|
|
"reinforced_fences": {
|
|
"scrap": 6,
|
|
"wood": 20
|
|
},
|
|
"shurikens": {
|
|
"scrap": 6,
|
|
"straw": 4
|
|
},
|
|
"slowing_trap": {
|
|
"scrap": 3,
|
|
"wood": 1
|
|
},
|
|
"sprint": {
|
|
"straw": 6,
|
|
"wood": 8
|
|
},
|
|
"sticky_tar": {
|
|
"scrap": 6,
|
|
"straw": 14
|
|
},
|
|
"straw_stuffing": {
|
|
"straw": 12,
|
|
"wood": 4
|
|
},
|
|
"wide_fear": {
|
|
"straw": 20,
|
|
"wood": 4
|
|
},
|
|
"workbench": {
|
|
"scrap": 4,
|
|
"wood": 6
|
|
}
|
|
}
|
|
upgrades = {
|
|
"alien_ray": {
|
|
"from_day": 14,
|
|
"hidden": true,
|
|
"name": "Alien ray",
|
|
"shop": "shed",
|
|
"text": "A salvaged alien weapon: a long beam that pierces everything in its line while held",
|
|
"track": "Weapon"
|
|
},
|
|
"corn_shooter": {
|
|
"from_day": 1,
|
|
"name": "Corn shooter",
|
|
"shop": "shed",
|
|
"text": "A gun that fires corn kernels, from afar",
|
|
"track": "Weapon"
|
|
},
|
|
"heavy_seeds": {
|
|
"add": [1, 1, 1],
|
|
"levels": 3,
|
|
"name": "Heavy seeds",
|
|
"requires": "corn_shooter",
|
|
"stat": "shot_damage",
|
|
"texts": ["Each kernel does 2 damage", "Each kernel does 3 damage", "Each kernel does 4 damage"],
|
|
"track": "Weapon"
|
|
},
|
|
"long_range": {
|
|
"levels": 3,
|
|
"mult": [1.3, 1.15, 1.15],
|
|
"name": "Long-range defenses",
|
|
"stat": "turret_range",
|
|
"texts": ["Turrets reach 30% farther", "Turrets reach another 15% farther", "Turrets reach 15% farther again"],
|
|
"track": "Defenses"
|
|
},
|
|
"potato_cannon": {
|
|
"from_day": 6,
|
|
"name": "Potato cannon",
|
|
"shop": "shed",
|
|
"text": "A slow heavy potato shot that hits hard from afar",
|
|
"track": "Weapon"
|
|
},
|
|
"pouch_upgrade": {
|
|
"add": [8, 4, 4],
|
|
"levels": 3,
|
|
"name": "Bigger pouch",
|
|
"stat": "pouch_capacity",
|
|
"texts": ["+8 pouch capacity (16 total)", "+4 pouch capacity (20 total)", "+4 pouch capacity (24 total)"],
|
|
"track": "Scarecrow"
|
|
},
|
|
"propane_torch": {
|
|
"from_day": 10,
|
|
"name": "Propane torch",
|
|
"shop": "shed",
|
|
"text": "A jet of flame that burns everything in a band ahead of you while held",
|
|
"track": "Weapon"
|
|
},
|
|
"pumpkin_bomb": {
|
|
"from_day": 3,
|
|
"name": "Pumpkin bombs",
|
|
"shop": "shed",
|
|
"text": "Throw a pumpkin that bursts, hurting everything within 3 m (one every 4 s)",
|
|
"track": "Weapon"
|
|
},
|
|
"quick_fear": {
|
|
"levels": 3,
|
|
"mult": [0.8, 0.9, 0.9],
|
|
"name": "Quick fear",
|
|
"stat": "fear_cooldown",
|
|
"texts": ["Fear recharges 20% faster", "Fear recharges another 10% faster", "Fear recharges 10% faster again"],
|
|
"track": "Fear"
|
|
},
|
|
"radar": {
|
|
"from_day": 8,
|
|
"hidden": true,
|
|
"name": "Radar",
|
|
"shop": "shed",
|
|
"text": "A minimap showing nearby enemy positions",
|
|
"track": "Item"
|
|
},
|
|
"rapid_fire": {
|
|
"levels": 3,
|
|
"mult": [3.0, 1.25, 1.25],
|
|
"name": "Rapid fire",
|
|
"requires": "corn_shooter",
|
|
"stat": "fire_rate",
|
|
"texts": ["The corn shooter fires 3x faster!!!!!", "The corn shooter fires another 25% faster", "The corn shooter fires 25% faster again"],
|
|
"track": "Weapon"
|
|
},
|
|
"reinforced_fences": {
|
|
"levels": 3,
|
|
"mult": [1.5, 1.25, 1.25],
|
|
"name": "Reinforced fences",
|
|
"stat": "barrier_hp",
|
|
"texts": ["Fences and gates +50% health", "Fences and gates another +25% health", "Fences and gates +25% health again"],
|
|
"track": "Defenses"
|
|
},
|
|
"shurikens": {
|
|
"from_day": 2,
|
|
"name": "Shurikens",
|
|
"shop": "shed",
|
|
"text": "Fast, cheap throws for a quick hit",
|
|
"track": "Weapon"
|
|
},
|
|
"sprint": {
|
|
"name": "Sprint",
|
|
"text": "Sprint 80% faster for 4 s at a time, every 10 s",
|
|
"track": "Scarecrow"
|
|
},
|
|
"sticky_tar": {
|
|
"levels": 3,
|
|
"mult": [1.5, 1.25, 1.25],
|
|
"name": "Sticky tar",
|
|
"stat": "trap_slow_time",
|
|
"texts": ["Tar patches hold 50% longer", "Tar patches hold another 25% longer", "Tar patches hold 25% longer again"],
|
|
"track": "Defenses"
|
|
},
|
|
"straw_stuffing": {
|
|
"add": [2, 2, 2],
|
|
"levels": 3,
|
|
"name": "Straw stuffing",
|
|
"stat": "scarecrow_max_hp",
|
|
"texts": ["+2 max health", "+2 more max health", "+2 more max health"],
|
|
"track": "Scarecrow"
|
|
},
|
|
"wide_fear": {
|
|
"levels": 3,
|
|
"mult": [1.3, 1.15, 1.15],
|
|
"name": "Wide fear",
|
|
"stat": "fear_radius",
|
|
"texts": ["Fear reaches 30% farther", "Fear reaches another 15% farther", "Fear reaches 15% farther again"],
|
|
"track": "Fear"
|
|
}
|
|
}
|