fix: NPC 빙의 seed를 Ref 논리 tick과 일치시킨다

This commit is contained in:
2026-08-24 09:18:08 +00:00
parent 90d43547fe
commit 821b8a0723
5 changed files with 90 additions and 21 deletions
@@ -3,9 +3,9 @@ import { describe, expect, it } from 'vitest';
import { buildNpcSelectionTokenSeed } from '../src/turn/npcPossessionService.js';
describe('NPC possession legacy token contracts', () => {
it('builds the Ref SelectNPCToken seed from the Seoul whole-second timestamp', () => {
expect(buildNpcSelectionTokenSeed('seed', 42, new Date('2026-07-30T23:59:58.987Z'))).toBe(
'str(4,seed)|str(14,SelectNPCToken)|int(42)|str(19,2026-07-31 08:59:58)'
it('builds the Ref SelectNPCToken seed from the accepted game tick', () => {
expect(buildNpcSelectionTokenSeed('seed', 42, 72_000_001)).toBe(
'str(4,seed)|str(14,SelectNPCToken)|int(42)|int(72000001)'
);
});
});