Allow replay of the recovered physical Hajr

Count one movement grant per accepted Hajr play after original paid Box recovery. Preserve physical card custody, Basic timing and fresh Advanced post-movement opportunities. Carry unused counts through Guild Cunning with counted declarations and signed final history while retaining legacy receipt compatibility.

Validation: frozen12-file102/102, types/lint/build and two original-action/rendered-table programmes; four minimal policies retain third moves in both modes. Real cache and normal purchases, paid shipment and Box2 recovery reuse the single original Hajr. Replay is an explicit source interpretation. Native Cunning replay has pure/related evidence; wider combinations, final assurance and deployed acceptance remain open. No saved-game, reset, restart or deployment operation.
This commit is contained in:
Quintine committed 2026-10-18 12:33:50 +11:00
1 parent 72e77d7f4d
commit b82441c834
17 files changed
+679 -65

No files matched your search

+4 -3
View File
@@ -9,9 +9,10 @@ type Counts = Readonly<Record<string, number>>;
/** A two-group flight replaces one ordinary entitlement. Only its completed
* extra group earns a physical-move credit; Hajr remains an independent move. */
export function ordinaryMovementAllowance(hajrUsed: boolean, extraMoves = 0): number {
const limit = 1 + Number(hajrUsed) + extraMoves;
if (typeof hajrUsed !== 'boolean' || !Number.isSafeInteger(extraMoves) || extraMoves < 0 ||
export function ordinaryMovementAllowance(hajr: boolean | number, extraMoves = 0): number {
const plays = typeof hajr === 'boolean' ? Number(hajr) : hajr;
const limit = 1 + plays + extraMoves;
if (!Number.isSafeInteger(plays) || plays < 0 || !Number.isSafeInteger(extraMoves) || extraMoves < 0 ||
!Number.isSafeInteger(limit)) throw new RangeError('Movement credits must be nonnegative safe integers.');
return limit;
}