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
|
|
@ -142,11 +142,17 @@ func on_mine_tick() -> void:
|
|||
## Drop four stone Items (one per footprint tile) and free this node. Called
|
||||
## by on_mine_tick() automatically; can also be called for scripted removal.
|
||||
func mined() -> void:
|
||||
for ft in footprint_tiles():
|
||||
# Apply mine buff (veins_of_iron): multiply total stone drops with stochastic rounding,
|
||||
# then distribute one item per footprint tile (first N tiles get 1 each; extras stack
|
||||
# on the origin tile for simple overflow handling).
|
||||
var total_drops: int = Storyteller.multiply_drops(STONE_DROPS_ON_MINE, Storyteller.get_buff_multiplier(&"mine"))
|
||||
var tiles := footprint_tiles()
|
||||
for i in total_drops:
|
||||
var drop_tile: Vector2i = tiles[mini(i, tiles.size() - 1)]
|
||||
var item: Item = ITEM_SCENE.instantiate()
|
||||
get_parent().add_child(item)
|
||||
item.setup(Item.TYPE_STONE, 1, ft)
|
||||
Audit.log("big_rock", "mined 2×2 at %s; %d stone drops" % [origin_tile, STONE_DROPS_ON_MINE])
|
||||
item.setup(Item.TYPE_STONE, 1, drop_tile)
|
||||
Audit.log("big_rock", "mined 2×2 at %s; %d stone drops (buff mult=%.2f)" % [origin_tile, total_drops, Storyteller.get_buff_multiplier(&"mine")])
|
||||
if Audio != null:
|
||||
Audio.play_sfx(&"mine_tick")
|
||||
# BigRocks span 2×2 — clear the designation stamp from every footprint tile.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue