wire buff consumers, sick penalty, multi-count cremation
A: Storyteller.multiply_drops() stochastic-rounding helper drives crop_growth, harvest_yield, chop, mine consumption sites. sleep_decay multiplied in Pawn sleep tick. B: Pawn._sick_speed_penalty() (0% healthy → 75% severity 3, clamped to 25% min speed). JobRunner._work_speed_mult coin-flips per-tick progress on INTERACT/BUILD/CRAFT toils. Sleep/eat/treat unaffected. C: CraftingProvider builds N deposit trips for ingredient2_count > 1. JobRunner._tick_craft validates+consumes the full count from buffer. Cremation now actually requires and consumes 5 wood. crop._stage_accum round-trips through save/load to preserve buff- accumulated fractional growth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d9638a4ea4
commit
2afca16299
9 changed files with 156 additions and 46 deletions
|
|
@ -117,11 +117,12 @@ func on_mine_tick() -> void:
|
|||
## Drop stone Item(s) and free this node. Called automatically by on_mine_tick()
|
||||
## but also accessible for scripted removal (debug, storyteller events).
|
||||
func mined() -> void:
|
||||
# Single drop lands on the rock's own tile.
|
||||
# Apply mine buff (veins_of_iron): multiply stone drops with stochastic rounding.
|
||||
var drop_count: int = Storyteller.multiply_drops(STONE_DROPS_ON_MINE, Storyteller.get_buff_multiplier(&"mine"))
|
||||
var item: Item = ITEM_SCENE.instantiate()
|
||||
get_parent().add_child(item)
|
||||
item.setup(Item.TYPE_STONE, 1, tile)
|
||||
Audit.log("rock", "mined at %s; %d stone drop" % [tile, STONE_DROPS_ON_MINE])
|
||||
item.setup(Item.TYPE_STONE, drop_count, tile)
|
||||
Audit.log("rock", "mined at %s; %d stone drop(s) (buff mult=%.2f)" % [tile, drop_count, Storyteller.get_buff_multiplier(&"mine")])
|
||||
if Audio != null:
|
||||
Audio.play_sfx(&"mine_tick")
|
||||
World.clear_designation_at(tile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue