merge: 최신 main 변경을 Web Push 작업에 반영한다

This commit is contained in:
2026-08-23 13:17:00 +00:00
9 changed files with 107 additions and 17 deletions
+32 -3
View File
@@ -213,9 +213,10 @@ describe('buildTurnCommandTable', () => {
for (const field of command.inputFields) {
expect(supportedKinds.has(field.kind), `${scope}:${command.key}:${field.key}`).toBe(true);
if (field.kind === 'select') {
expect(Boolean(field.options?.length || field.optionSource), `${scope}:${command.key}:${field.key}`).toBe(
true
);
expect(
Boolean(field.options?.length || field.optionSource),
`${scope}:${command.key}:${field.key}`
).toBe(true);
}
}
}
@@ -340,6 +341,34 @@ describe('buildTurnCommandTable', () => {
});
});
it('hides founding at the Ref maxnation boundary without counting Core id=0', async () => {
const worldState = buildWorldState();
worldState.meta = {
...((worldState.meta ?? {}) as Record<string, unknown>),
refGameEnv: { maxnation: '2' },
};
const buildAtCount = (realNationCount: number) =>
buildTurnCommandTable({
worldState,
general: buildGeneral(),
city: buildCity(),
nation: buildNation(),
nationGenerals: null,
realNationCount,
});
const findFounding = (table: Awaited<ReturnType<typeof buildAtCount>>) =>
table.general.flatMap((group) => group.values).find((command) => command.key === 'che_건국');
expect(findFounding(await buildAtCount(1))).not.toMatchObject({
reason: '더 이상 건국은 불가능합니다.',
});
expect(findFounding(await buildAtCount(2))).toMatchObject({
possible: false,
status: 'blocked',
reason: '더 이상 건국은 불가능합니다.',
});
});
it('projects Ref recruitment availability, combat values, descriptions, and adjusted costs', () => {
const general = buildGeneral();
general.injury = 3;