test: expand nation command differential matrix

This commit is contained in:
2026-07-26 01:28:11 +00:00
parent 00a6ed2bdb
commit a55c190e4e
5 changed files with 169 additions and 13 deletions
@@ -1229,10 +1229,15 @@ export const createReservedTurnHandler = async (options: {
const hasNationChange = (resolution.patches?.cities ?? []).some((patch) =>
Object.prototype.hasOwnProperty.call(patch.patch ?? {}, 'nationId')
);
// 레거시 건국 계열은 도시의 nation만 바꾸고 supply/front를
// 즉시 재계산하지 않는다. 다음 월 처리 전까지 그 상태를 보존한다.
const preservesFoundingFrontState = ['che_건국', 'cr_건국', 'che_무작위건국'].includes(actionKey);
if (hasNationChange && !preservesFoundingFrontState) {
// 레거시 건국 계열과 무작위 수도 이전은 명령이 직접 지정한
// front 값만 바꾸고 전체 전선을 즉시 재계산하지 않는다.
const preservesImmediateFrontState = [
'che_건국',
'cr_건국',
'che_무작위건국',
'che_무작위수도이전',
].includes(actionKey);
if (hasNationChange && !preservesImmediateFrontState) {
const worldView = worldOverlay?.view ?? worldRef;
if (worldView && options.map) {
const frontPatches = buildFrontStatePatches({