Version 1.6.1 M1 Released


Implement the first four Version 1.6.1 work packages:

  • 161-001 - authoritative resource-limit registry
  • 161-002 - persistent numeric save-roundtrip coverage
  • 161-003 - legacy hard-code and direct-grant scan
  • 161-004 - Reward Bundle and deduplication hardening

Implementation

persistence.js

A browser-independent module now owns numeric field definitions, bounds, fallback values and dynamic-map rules. It exposes:

  • limit(id, state)
  • normalizeValue(id, value, state)
  • normalizeState(state)
  • set(state, id, value)
  • grant(state, id, amount)
  • audit(state)
  • runSelfTest()

The module contains 78 fixed definitions and 9 dynamic-map definitions.

Game integration

  • game.js fails clearly if the registry is missing.
  • Card merge maximum is obtained from card.merge.
  • Arena Token and Raid Key maxima are obtained from the registry.
  • Player numeric migration uses registry normalization.
  • Full-state normalization runs after the existing domain-specific migration.
  • Full-state normalization also runs immediately before JSON serialization.
  • Reward Bundle currencies use the centralized player-resource grant path.
  • Supported Reward Bundle materials use fixed-field or dynamic-map bounded grants.

Regression protection

m161_core_regression_test.js covers:

  • every fixed field at fallback, below-minimum, minimum, maximum and above-maximum inputs;
  • JSON roundtrip idempotency;
  • dynamic-map normalization;
  • full game.js migration and second reload;
  • capped currency/material bundles;
  • duplicate Reward Bundle application;
  • 750 deterministic malformed-save samples;
  • static module, cache, cap and reward-path checks.

legacy_persistence_scan.js adds 12 hard gates for known regression patterns.

Compatibility decisions

  • Save Schema stays at 38 because the registry normalizes existing fields without changing the save shape.
  • The historical save key remains unchanged.
  • The Nexus definition version remains 1.
  • No balance values were intentionally changed.

Result

The first persistence-hardening milestone is complete and suitable for controlled development testing. Story/Tutorial, localization, performance and broader UX work remain in later 1.6.1 milestones.

Get Knights of Crystalis

Leave a comment

Log in with itch.io to leave a comment.