neon-sprawl/docs/decomposition/modules/E7_M2_RewardAndUnlockRouter.md

2.1 KiB

E7.M2 — RewardAndUnlockRouter

Summary

Field Value
Module ID E7.M2
Epic Epic 7 — Quest / Faction
Stage target Prototype
Status Planned (see dependency register). NEO-43 prep: server MissionRewardSkillXpGrant for scripted skill XP from bundles (mission_reward); full router + QuestRewardBundle apply still TBD.

Purpose

Route quest and encounter outputs to XP, items, unlocks, and flags with idempotent delivery (E7.M1 completion, E2.M2, E3.M3). Party: Per-character idempotent grants when party credit completes multiple characters.

Responsibilities

  • Apply QuestRewardBundle; grant UnlockGrant; emit RewardDeliveryEvent for audit.

Key contracts

Contract Role
QuestRewardBundle Composite rewards for a step or completion.
UnlockGrant Blueprints, gates, cosmetics.
RewardDeliveryEvent Idempotency key and outcome.

Module dependencies

  • E2.M2 — XpAwardAndLevelEngine.
  • E3.M3 — ItemizationAndInventorySchema.
  • E7.M1 — QuestStateMachine.

Dependents (by design)

  • E5.M3 — EncounterAndRewardTables.
  • E6.M4 — RewardParityEnforcer.

Epic 7 Slice 2reward_delivery, unlock_granted; no double-claim on replay.

Source anchors

Implementation anchor (server)

NEO-43: When applying scripted skill XP from a mission/quest reward bundle, call MissionRewardSkillXpGrant.GrantFromMissionReward (server/NeonSprawl.Server/Game/Skills/) — fixed sourceKind: mission_reward, skillId and amount from reward data — NEO-43 implementation plan.