MC/docs/design/POL-MENTOR-REWARDS.md
2026-11-27 23:43:05 +00:00

2.6 KiB

Scoped Mentat bonuses and funded Reputation rewards

Ticket 412. The existing POL QST claim engine owns awards. No third XP currency, alternate ledger or NPC player permission is introduced. Personal claims and the level-70 seasonal policy remain unchanged.

An ordinary consumed progression-policy key, scope policy:POL:S01:v3, records a 10% eligible Mentat XP bonus and a 10% bonus on explicitly configured DM rewards. Policy validation caps a bonus at 25%; existing custom configuration is never overwritten. A current unrevoked questmaster SID with quest.issue and quest.reward-bonus is required. Gurney/Esmar retain their issue-only scope. Integer bonuses round upward once at the final award, with safe-integer overflow rejection. Continuing-episode base growth remains separately capped by its existing policy.

The journal displays the actual bonus-inclusive XP. The claim transaction rechecks the bound issuer and policy, then writes the final award and its base/bonus basis to the existing claim/history receipt. Replay returns the original receipt and cannot add another bonus. Completed earlier claims are never rewritten or retroactively paid.

Money is explicit and funded

No DM reward is enabled by default. An intentionally configured existing POL quest reward must use exactly {schema: 'pol-dm-reward-v1', amountMinor: N}, with positive N at most 1,000,000 minor units. No PDF reward proposal is adopted automatically. The claim records a bound pol-funded-reward-v1 receipt with recipient, definition, season, original base amount, issuer/policy keys and final bonus-inclusive amount.

The existing central scheduler drains only these queued typed POL reward jobs. It verifies the consumed unrevoked QST, current ordinary player, claim/job equality, current original issuer and policy, and pays only the matching ordinary personal bank account. The shared private treasury payment primitive debits existing sys_web_treasury funds and posts the existing balanced Postbank entries and audit. No mint, privileged player transfer, new finance ledger or personal/loser funding account is used. Bank order identity is the original QST UUID; a lost central acknowledgement reuses the posted order without charging again. Insufficient funds, frozen account, invalid proof or failed ledger/audit transaction retain the queued receipt for review.

No real-money transaction, production game event, contract or payout is generated as a test. Isolated fixtures cover bonus/replay, Personal isolation, funded double entry, concurrent retries, lost acknowledgement, missing funds, frozen recipient, revoked QST/SID, altered beneficiary and atomic audit failure.