merge: cover nation research commands
This commit is contained in:
@@ -62,8 +62,8 @@ normalized to the core `*Id` spelling before command identity comparison.
|
|||||||
The matrix includes the four-call `전투태세` path, lifecycle and
|
The matrix includes the four-call `전투태세` path, lifecycle and
|
||||||
appointment commands, troop assembly, rebellion and all three founding
|
appointment commands, troop assembly, rebellion and all three founding
|
||||||
variants.
|
variants.
|
||||||
- `turnCommandNationMatrix.integration.test.ts`: 8 successful nation
|
- `turnCommandNationMatrix.integration.test.ts`: 26 successful nation
|
||||||
command paths.
|
command paths, including all nine unit-research commands.
|
||||||
- `turnCommandCoreReference.integration.test.ts`: declaration and live
|
- `turnCommandCoreReference.integration.test.ts`: declaration and live
|
||||||
sortie fixtures.
|
sortie fixtures.
|
||||||
|
|
||||||
@@ -168,11 +168,11 @@ Compatibility is established per case only when:
|
|||||||
4. live sortie also passes the battle trace comparison;
|
4. live sortie also passes the battle trace comparison;
|
||||||
5. any ignored path is documented in the case evidence.
|
5. any ignored path is documented in the case evidence.
|
||||||
|
|
||||||
As of 2026-07-25, 54 general matrix cases, 8 nation matrix cases, declaration
|
As of 2026-07-26, 54 general matrix cases, 26 nation matrix cases, declaration
|
||||||
and live sortie pass this boundary. Live sortie is the remaining general
|
and live sortie pass this boundary. Live sortie is the remaining general
|
||||||
command key and covers battle entry, conquest, defeated-general neutralization
|
command key and covers battle entry, conquest, defeated-general neutralization
|
||||||
and last-city nation collapse. Thus all 55 general command keys have a
|
and last-city nation collapse. Thus all 55 general command keys have a
|
||||||
completed success-path comparison. This is 64 executable comparison cases;
|
completed success-path comparison. This is 82 executable comparison cases;
|
||||||
it is not yet a claim that failure/boundary paths or all 38 nation commands
|
it is not yet a claim that failure/boundary paths or all 38 nation commands
|
||||||
have been dynamically compared.
|
have been dynamically compared.
|
||||||
|
|
||||||
|
|||||||
@@ -137,16 +137,9 @@ export class ActionDefinition<
|
|||||||
: {};
|
: {};
|
||||||
const recvKey = `n${nation.id}`;
|
const recvKey = `n${nation.id}`;
|
||||||
const priorEntry =
|
const priorEntry =
|
||||||
typeof recvAssist[recvKey] === 'object' &&
|
typeof recvAssist[recvKey] === 'object' && recvAssist[recvKey] !== null ? recvAssist[recvKey] : {};
|
||||||
recvAssist[recvKey] !== null &&
|
const priorAmount = Number(Array.isArray(priorEntry) ? priorEntry[1] : (priorEntry['1'] ?? 0));
|
||||||
!Array.isArray(recvAssist[recvKey])
|
recvAssist[recvKey] = [nation.id, (Number.isFinite(priorAmount) ? priorAmount : 0) + actualGold + actualRice];
|
||||||
? recvAssist[recvKey]
|
|
||||||
: {};
|
|
||||||
const priorAmount = Number(priorEntry['1'] ?? 0);
|
|
||||||
recvAssist[recvKey] = {
|
|
||||||
0: nation.id,
|
|
||||||
1: (Number.isFinite(priorAmount) ? priorAmount : 0) + actualGold + actualRice,
|
|
||||||
};
|
|
||||||
|
|
||||||
const effects: Array<GeneralActionEffect<TriggerState>> = [
|
const effects: Array<GeneralActionEffect<TriggerState>> = [
|
||||||
createNationPatchEffect(
|
createNationPatchEffect(
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ describe('Nation Missing Actions', () => {
|
|||||||
gold: 200,
|
gold: 200,
|
||||||
rice: 150,
|
rice: 150,
|
||||||
meta: expect.objectContaining({
|
meta: expect.objectContaining({
|
||||||
recv_assist: { n1: { 0: 1, 1: 150 } },
|
recv_assist: { n1: [1, 150] },
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -69,6 +69,22 @@ interface FixturePatches {
|
|||||||
randomFoundingCandidateCityIds?: number[];
|
randomFoundingCandidateCityIds?: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type NationMatrixCase = [string, Record<string, unknown> | undefined, FixturePatches?];
|
||||||
|
|
||||||
|
const researchCase = (action: string, command: string, term: number): NationMatrixCase => [
|
||||||
|
action,
|
||||||
|
undefined,
|
||||||
|
{
|
||||||
|
nations: {
|
||||||
|
1: {
|
||||||
|
turnLastByOfficerLevel: {
|
||||||
|
12: { command, term },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const buildRequest = (
|
const buildRequest = (
|
||||||
action: string,
|
action: string,
|
||||||
args?: Record<string, unknown>,
|
args?: Record<string, unknown>,
|
||||||
@@ -192,7 +208,7 @@ const buildRequest = (
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const cases: Array<[string, Record<string, unknown> | undefined, FixturePatches?]> = [
|
const cases: NationMatrixCase[] = [
|
||||||
['휴식', undefined],
|
['휴식', undefined],
|
||||||
['che_포상', { isGold: true, amount: 100, destGeneralID: 3 }],
|
['che_포상', { isGold: true, amount: 100, destGeneralID: 3 }],
|
||||||
['che_선전포고', { destNationID: 2 }],
|
['che_선전포고', { destNationID: 2 }],
|
||||||
@@ -282,6 +298,15 @@ const cases: Array<[string, Record<string, unknown> | undefined, FixturePatches?
|
|||||||
randomFoundingCandidateCityIds: [70],
|
randomFoundingCandidateCityIds: [70],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
researchCase('event_원융노병연구', '원융노병 연구', 23),
|
||||||
|
researchCase('event_화시병연구', '화시병 연구', 11),
|
||||||
|
researchCase('event_음귀병연구', '음귀병 연구', 11),
|
||||||
|
researchCase('event_대검병연구', '대검병 연구', 11),
|
||||||
|
researchCase('event_화륜차연구', '화륜차 연구', 23),
|
||||||
|
researchCase('event_산저병연구', '산저병 연구', 11),
|
||||||
|
researchCase('event_극병연구', '극병 연구', 23),
|
||||||
|
researchCase('event_상병연구', '상병 연구', 23),
|
||||||
|
researchCase('event_무희연구', '무희 연구', 23),
|
||||||
];
|
];
|
||||||
|
|
||||||
integration('nation command success matrix', () => {
|
integration('nation command success matrix', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user