Uses for every material (clay jar, bedroll, pelt rug, fang necklace, bear cloak, pemmican, bait), Q to drop, K/M bag rows on 1-8, help pages; protocol 14

This commit is contained in:
Paul Bailey
2026-11-06 11:49:42 +00:00
parent 5778d61763
commit 4b2e687188
29 changed files with 1457 additions and 40 deletions

View File

@@ -74,6 +74,8 @@ func _dawn_dusk() -> bool:
return (h > 5.0 and h < 8.5) or (h > 17.0 and h < 20.5)
## How long until the next bite (seconds), from data/fish.json.
var baited := false ## this wait was shortened by bait (rotten food)
func _next_wait() -> float:
var mods: Dictionary = ItemDB.fishing.modifiers
var w: Array = table.get("bite_wait", [5.0, 14.0])
@@ -82,6 +84,10 @@ func _next_wait() -> float:
k *= float(mods.get("dawn_dusk_wait", 0.6)) # fish feed at dawn and dusk
if world.weather.precip > 0.3:
k *= float(mods.get("rain_wait", 0.8))
# Rotten food in your bag is bait: the fish come sooner, and a bite takes one.
baited = player != null and player.get("inventory") != null and player.inventory.count(Actions.BAIT) > 0
if baited:
k *= Actions.BAIT_WAIT
return rng.randf_range(w[0], w[1]) * k
## A weighted pick from this water's fish (dawn/dusk weights when they apply).
@@ -139,6 +145,8 @@ func step(dt: float) -> void:
bite_left = BITE_WINDOW
Actions.tell(player, "Bite! Click to reel in")
Sfx.at("bite", global_position)
if baited and player.inventory.remove(Actions.BAIT, 1):
baited = false
"biting":
bite_left -= dt
# The float bobs hard and goes under.