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:
parent
787b36a1c2
commit
5fcb87941e
6 changed files with 26 additions and 19 deletions
|
|
@ -258,7 +258,8 @@ Implemented in Step 4. The numbers are in `GameConfig`.
|
||||||
- Fence breakers hit for 2 HP every 1.5 s, but only while fighting the scarecrow. Crows
|
- Fence breakers hit for 2 HP every 1.5 s, but only while fighting the scarecrow. Crows
|
||||||
never fight.
|
never fight.
|
||||||
- **Weapons**, in two slots; hold a button to keep attacking. Every scarecrow starts with the
|
- **Weapons**, in two slots; hold a button to keep attacking. Every scarecrow starts with the
|
||||||
**pitchfork**; the **corn shooter** and **pumpkin bombs** are bought at the workbench (below).
|
**pitchfork**; the **corn shooter**, **pumpkin bombs**, and the other weapons are bought at the
|
||||||
|
supply shed, each from the day it arrives there (Upgrades, below).
|
||||||
- **Main weapon** (left mouse / RT): the pitchfork or the corn shooter, in the right hand.
|
- **Main weapon** (left mouse / RT): the pitchfork or the corn shooter, in the right hand.
|
||||||
Switch with **Tab / d-pad down** (the next one owned) or **1 / 2**, outside build mode (there
|
Switch with **Tab / d-pad down** (the next one owned) or **1 / 2**, outside build mode (there
|
||||||
those keys pick structures).
|
those keys pick structures).
|
||||||
|
|
|
||||||
|
|
@ -211,8 +211,8 @@ func _totals_text(t: Dictionary, finished: bool) -> String:
|
||||||
_count(t["crops_recovered"], "crop"), _count(t["animals_recovered"], "animal"), int(t["supplies_recovered"]),
|
_count(t["crops_recovered"], "crop"), _count(t["animals_recovered"], "animal"), int(t["supplies_recovered"]),
|
||||||
_count(t["crops_lost"], "crop"), _count(t["animals_lost"], "animal"), int(t["supplies_lost"])])
|
_count(t["crops_lost"], "crop"), _count(t["animals_lost"], "animal"), int(t["supplies_lost"])])
|
||||||
lines.append("Built %d, repaired %d, broken %d. Upgrades: %d of %d. Patched up %s, %d damage taken." % [
|
lines.append("Built %d, repaired %d, broken %d. Upgrades: %d of %d. Patched up %s, %d damage taken." % [
|
||||||
int(t["structures_built"]), int(t["repairs"]), int(t["structures_destroyed"]), s.upgrades.size(),
|
int(t["structures_built"]), int(t["repairs"]), int(t["structures_destroyed"]), Upgrades.levels_bought(campaign.config, s),
|
||||||
Upgrades.ORDER.size(), _count(t["patches"], "time"), int(t["scarecrow_damage"])])
|
Upgrades.levels_total(campaign.config), _count(t["patches"], "time"), int(t["scarecrow_damage"])])
|
||||||
lines.append("Gathered %s. Spent %s." % [Assessment.materials_line(t, "gathered_"), Assessment.materials_line(t, "spent_")])
|
lines.append("Gathered %s. Spent %s." % [Assessment.materials_line(t, "gathered_"), Assessment.materials_line(t, "spent_")])
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ func refresh() -> void:
|
||||||
_title.text = "The farmers are away"
|
_title.text = "The farmers are away"
|
||||||
lines.append("Keep the farm safe for %d nights until they come home: the crops, the animals in the pen, and the supplies in the shed." % nights)
|
lines.append("Keep the farm safe for %d nights until they come home: the crops, the animals in the pen, and the supplies in the shed." % nights)
|
||||||
lines.append("By day, gather wood, scrap, and straw (hold E), store them at the barn, and build defenses (B). There's more to gather off the farm, to the north, east, and south.")
|
lines.append("By day, gather wood, scrap, and straw (hold E), store them at the barn, and build defenses (B). There's more to gather off the farm, to the north, east, and south.")
|
||||||
lines.append("At night, stab aliens with your pitchfork (left mouse), scare them off (Q), and pick up anything they drop. Animals roam loose until you lead them into the pen: walk up to one and it follows you. The supply shed sells a corn shooter (switch weapons with Tab or 1-2) and pumpkin bombs (throw them with right mouse).")
|
lines.append("At night, stab aliens with your pitchfork (left mouse), scare them off (Q), and pick up anything they drop. Animals roam loose until you lead them into the pen: walk up to one and it follows you. The supply shed sells a corn shooter (switch weapons with Tab or 1-2), and more weapons arrive there over the days.")
|
||||||
else:
|
else:
|
||||||
var e: Dictionary = s.night_log[s.night_log.size() - 1]
|
var e: Dictionary = s.night_log[s.night_log.size() - 1]
|
||||||
_title.text = "Morning of day %d of %d" % [s.night, nights]
|
_title.text = "Morning of day %d of %d" % [s.night, nights]
|
||||||
|
|
@ -136,7 +136,8 @@ func refresh() -> void:
|
||||||
var plan := waves.tonight() if waves != null else null
|
var plan := waves.tonight() if waves != null else null
|
||||||
if plan != null and plan.title != "":
|
if plan != null and plan.title != "":
|
||||||
if structures != null and structures.has_workbench():
|
if structures != null and structures.has_workbench():
|
||||||
lines.append("Tonight: %s. Upgrades at the work area: %d of %d done." % [plan.title, _upgrades_done(), Upgrades.ORDER.size()])
|
lines.append("Tonight: %s. Upgrades: %d of %d levels." % [plan.title, Upgrades.levels_bought(campaign.config, s),
|
||||||
|
Upgrades.levels_total(campaign.config)])
|
||||||
else: # #9: the Workbench hasn't been granted yet -- it arrives once Night 1 is survived
|
else: # #9: the Workbench hasn't been granted yet -- it arrives once Night 1 is survived
|
||||||
lines.append("Tonight: %s. The work area will be set up once you survive tonight." % plan.title)
|
lines.append("Tonight: %s. The work area will be set up once you survive tonight." % plan.title)
|
||||||
_body.text = "\n".join(lines)
|
_body.text = "\n".join(lines)
|
||||||
|
|
@ -210,14 +211,6 @@ func _damage_line() -> String:
|
||||||
return "Needs repair (marked with health bars): %s." % ", ".join(parts)
|
return "Needs repair (marked with health bars): %s." % ", ".join(parts)
|
||||||
|
|
||||||
|
|
||||||
func _upgrades_done() -> int:
|
|
||||||
var n := 0
|
|
||||||
for id in Upgrades.ORDER:
|
|
||||||
if Upgrades.owned(campaign.state, id):
|
|
||||||
n += 1
|
|
||||||
return n
|
|
||||||
|
|
||||||
|
|
||||||
func _label(parent: Node, font_size: int, color: Color = Color(0.92, 0.92, 0.88)) -> Label:
|
func _label(parent: Node, font_size: int, color: Color = Color(0.92, 0.92, 0.88)) -> Label:
|
||||||
var l := Label.new()
|
var l := Label.new()
|
||||||
l.add_theme_font_size_override("font_size", font_size)
|
l.add_theme_font_size_override("font_size", font_size)
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ const TEXT := {
|
||||||
"store": "Your pouch only holds so much: walk onto the barn's apron (the Supply Shed) to store what you carry.",
|
"store": "Your pouch only holds so much: walk onto the barn's apron (the Supply Shed) to store what you carry.",
|
||||||
"build": "Press [B / d-pad up] to build. Pick a fence [1], place it with left mouse / RT. Aliens have to break through fences.",
|
"build": "Press [B / d-pad up] to build. Pick a fence [1], place it with left mouse / RT. Aliens have to break through fences.",
|
||||||
"dusk": "Dusk: aliens come at nightfall, from every side of the farm.",
|
"dusk": "Dusk: aliens come at nightfall, from every side of the farm.",
|
||||||
"shoot": "Aim with the mouse or the right stick and hold left mouse / RT to stab with your pitchfork. The supply shed sells a corn shooter (switch with [Tab / 1-2]) and pumpkin bombs for your off-hand: throw them with [right mouse / LT].",
|
"shoot": "Aim with the mouse or the right stick and hold left mouse / RT to stab with your pitchfork. The supply shed sells a corn shooter (switch with [Tab / 1-2]); more weapons arrive there over the days, like pumpkin bombs for your off-hand (throw them with [right mouse / LT]).",
|
||||||
"fear": "Crowded? [Q / LB] Fear scares off everything nearby, and they drop what they carry.",
|
"fear": "Crowded? [Q / LB] Fear scares off everything nearby, and they drop what they carry.",
|
||||||
"recover": "Something was dropped! Walk over it to bring it home. A dropped animal follows you back to the pen.",
|
"recover": "Something was dropped! Walk over it to bring it home. A dropped animal follows you back to the pen.",
|
||||||
"patch": "Hurt? Hold [F / Y] to patch up with straw. Health carries over to the next night.",
|
"patch": "Hurt? Hold [F / Y] to patch up with straw. Health carries over to the next night.",
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,22 @@ static func maxed(cfg: GameConfig, state: FarmState, id: String) -> bool:
|
||||||
return level(state, id) >= max_level(cfg, id)
|
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
|
## 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.
|
## 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.
|
## next_cost() is the one the farm would buy now.
|
||||||
|
|
|
||||||
|
|
@ -42,9 +42,6 @@ func show_state(campaign: CampaignController, show: bool, focused: bool, broken:
|
||||||
_label.text = "Broken -- repair it" if focused else "Broken"
|
_label.text = "Broken -- repair it" if focused else "Broken"
|
||||||
return
|
return
|
||||||
_label.modulate = NORMAL_COLOR
|
_label.modulate = NORMAL_COLOR
|
||||||
var done := 0
|
|
||||||
for id in Upgrades.ORDER:
|
|
||||||
if Upgrades.owned(campaign.state, id):
|
|
||||||
done += 1
|
|
||||||
var hint := ("[E / X] Upgrades" if campaign.is_daytime() else "Upgrades by day") if focused else "Upgrades"
|
var hint := ("[E / X] Upgrades" if campaign.is_daytime() else "Upgrades by day") if focused else "Upgrades"
|
||||||
_label.text = "%s\n%d of %d done" % [hint, done, Upgrades.ORDER.size()]
|
_label.text = "%s\n%d of %d levels" % [hint, Upgrades.levels_bought(campaign.config, campaign.state),
|
||||||
|
Upgrades.levels_total(campaign.config)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue