feat(#60): nuclear/WMD — capability flag + strikes (region → no-man's-land, nation collapse + war capitulation, MAD retaliation) (v0.37.0)
CI / build + unit + e2e (pull_request) Successful in 2m33s
CI / build + unit + e2e (pull_request) Successful in 2m33s
This commit is contained in:
+13
-1
@@ -13,7 +13,13 @@ export interface StubPayload {
|
||||
turn: number;
|
||||
date: string;
|
||||
playerNationId: string;
|
||||
nations: Record<string, { stats: Record<string, number>; territory?: string[] }>;
|
||||
// `nuclear` (v0.37.0, #60) is the per-nation nuclear capability stamped by
|
||||
// the engine (its `nuclear` flag OR a `rocket` marker); the stub ignores
|
||||
// it — it never arms or strikes (see deterministicTurn).
|
||||
nations: Record<
|
||||
string,
|
||||
{ stats: Record<string, number>; territory?: string[]; nuclear?: boolean }
|
||||
>;
|
||||
};
|
||||
/** The raw pending round the engine emitted (one entry per queued item). */
|
||||
pending?: RoundItem[];
|
||||
@@ -141,6 +147,11 @@ function truncate(s: string, n: number): string {
|
||||
* (v0.36.0, #59) The stub likewise NEVER declares an industry project (it
|
||||
* always returns `industry: { projects: [] }`) — the per-region industry
|
||||
* path is covered by unit tests only, keeping the e2e assertions untouched.
|
||||
*
|
||||
* (v0.37.0, #60) The stub likewise NEVER arms a nation or fires a nuclear
|
||||
* strike (it always returns `nuclear: { arm: [], strikes: [] }`) — the
|
||||
* nuclear / WMD path is covered by unit tests only, keeping the e2e
|
||||
* assertions untouched.
|
||||
*/
|
||||
export function deterministicTurn(p: StubPayload): TurnResult {
|
||||
const state = p.state;
|
||||
@@ -212,6 +223,7 @@ export function deterministicTurn(p: StubPayload): TurnResult {
|
||||
hybrid: { ops: [] }, // the stub never runs hybrid/covert ops (see doc comment)
|
||||
economy: { trade: [], embargo: [] }, // the stub never touches trades/embargoes (see doc comment)
|
||||
industry: { projects: [] }, // the stub never declares industry projects (see doc comment)
|
||||
nuclear: { arm: [], strikes: [] }, // the stub never arms or strikes (see doc comment)
|
||||
markers: { add: [], remove: [] }, // the stub never touches markers (see doc comment)
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user