랜덤 임관 기수의 등용 실행을 차단

This commit is contained in:
2026-09-01 23:39:14 +00:00
parent 89a33a8349
commit 77299ffe41
4 changed files with 101 additions and 12 deletions
+10 -8
View File
@@ -595,15 +595,17 @@ describe('buildTurnCommandTable', () => {
nationGenerals: null,
});
const appointment = table.general
.flatMap((group) => group.values)
.find((command) => command.key === 'che_임관');
for (const commandKey of ['che_임관', 'che_등용']) {
const command = table.general
.flatMap((group) => group.values)
.find((candidate) => candidate.key === commandKey);
expect(appointment).toMatchObject({
possible: false,
status: 'blocked',
reason: '랜덤 임관만 가능합니다',
});
expect(command).toMatchObject({
possible: false,
status: 'blocked',
reason: '랜덤 임관만 가능합니다',
});
}
});
it('hides founding at the Ref maxnation boundary without counting Core id=0', async () => {
+14
View File
@@ -1418,6 +1418,20 @@ describe('appRouter', () => {
message: expect.stringContaining('랜덤 임관만 가능합니다'),
});
expect(randomOnlyWrites).toHaveLength(0);
await expect(
randomOnlyCaller.turns.reserved.setGeneral({
generalId: general.id,
turnIndex: 0,
action: 'che_등용',
args: { destGeneralId: 2 },
expectedRevision: 0,
})
).rejects.toMatchObject({
code: 'PRECONDITION_FAILED',
message: expect.stringContaining('랜덤 임관만 가능합니다'),
});
expect(randomOnlyWrites).toHaveLength(0);
});
it('checks nation treaty-term reservation permission but not full diplomacy state', async () => {