VB-1910: What lies out degrades: a share a game day in the wet and after the frost, not all at the frost
Status: ready
Priority: 2
Size: M
Design ref: design.md, Goods and the farming year (Risk, 27 Nov); Crops and rotations (Crops and the weather); sim/lying frost
Touches: sim/lying (frost, decay); sim/clock; sim/rules; sim/outlook; new tests/lyingdecay.js; docs/tuning.md
Goal: A late harvest or a wet autumn costs a household part of what lies out, more each game day it waits, so that bringing in is weighed against other work day by day (Kim, 27 Nov: degrade over time, without tracking the condition of every item).
Acceptance criteria:
A lying load’s amount (sim/lying) falls by LYING.wetLoss a wet game day and by LYING.frostLoss a game day once the frost has come (Proposed first values 0.05 and 0.25; the task may try others, at most five short runs), the loss booked through the stores’ reasons as spoilage is; a load under its quantum is dropped. No field is added to a load but what the amount already is.
Which game days are wet comes from the season’s weather the sim has; if the sim has no wet day yet the task says so, builds the frost’s share only and leaves the wet share as a line of a named follow-up task.
A head’s estimate of what will be lost is reckoned by the same function as the loss (One quantity, one reckoning) and the outlook shows it.
The crop still standing at the frost is unchanged by this task.
Tests: the shares, a load dropped at its quantum, a save from before.
Numbers before and after (founders small seeds 4 and 7, populous small seeds 7 and 42, 20 years): sheaves and hay lost a year, hungry household-days, growth; a shortfall goes to docs/tuning.md.