fix: match random capital move semantics

This commit is contained in:
2026-07-26 08:17:13 +00:00
parent 72e765e693
commit da836c319d
7 changed files with 329 additions and 23 deletions
+3
View File
@@ -105,6 +105,7 @@ export type GeneralActionEffect<TriggerState extends GeneralTriggerState = Gener
export interface GeneralActionOutcome<TriggerState extends GeneralTriggerState = GeneralTriggerState> {
effects: GeneralActionEffect<TriggerState>[];
completed?: boolean;
alternative?: {
commandKey: string;
args: unknown;
@@ -120,6 +121,7 @@ export interface GeneralActionResolution {
general: General;
city?: City;
nation?: Nation | null;
completed: boolean;
nextTurnAt: Date;
logs: LogEntryDraft[];
effects: GeneralActionEffect[];
@@ -381,6 +383,7 @@ export const resolveGeneralAction = <TriggerState extends GeneralTriggerState =
const resolution: GeneralActionResolution = {
general: nextWorld.general as General,
nation: nextWorld.nation as Nation | null,
completed: outcome?.completed !== false,
nextTurnAt,
logs,
effects: pendingEffects,