Save Point: Profiles, Levels and Unlocks Kit
README.md
profile
The rules applied to one saved record, as pure functions with no engine calls.
- XP and levels:
view,addXP,relevel. - Stats and unlocks:
addStat,unlock,ruleMet,checkUnlocks(rules by level, by stat, by event) andbuy(rules with acost, paid in meta currency). - Roguelite:
endRunresets the run's XP and level, keeps unlocks, currency and lifetime stats, and banks part of the run's XP as currency. - Public card:
cardbuilds what other players see,sanitizeCardmakes a card read from another player safe to draw,titlepicks the besttitle_unlock.
DEFAULT_UNLOCKS is the unlock list used when a game names none.
Internal: saveKit.save drives these for the local player. Tests and tools can call them on any record.