Module pity

Source
Expand description

Bound unlucky reward droughts without reroll loops or hidden probability changes.

PityCounter retains its immediate, Copy behavior. PityDelivery adds one outstanding reward offer, without changing the legacy counter’s storage. Neither API owns or consumes randomness. Callers authorize and deduplicate gameplay events before admission; offer IDs do not authenticate those events.

Structs§

PityCounter
PityDelivery
Allocation-free delivery with exactly one pending offer and no history list.
PityOffer
A reward owed, retaining its original natural/guaranteed reason on retry. The host must retain the corresponding reward payload until settlement/reset.
PityOfferId
Locally issued token: a caller-owned nonzero stream and nonzero sequence. Fields cannot be constructed directly. Tokens are not security credentials.

Enums§

PityAttempt
Admission of one gameplay event. Skipped events never advance the drought.
PityDeliveryError
Rejections leave the delivery instance unchanged.
PityOfferOutcome
Admission result; a reward is only offered, not yet delivered.
PityOutcome
Immediate accepted-attempt result. Natural success wins at the boundary.
PitySettlement
Destination refusal retains the exact offer; acceptance commits once.