fix: 단일 잔존 국가 임관 금지를 연결한다
마지막 도시 점령으로 국가가 삭제되면 destroy_nation 시나리오 이벤트를 같은 턴 경계에서 실행한다. Ref와 같이 잔존국 scout를 금지로 바꾸고 일회성 이벤트를 삭제하되 정책 변경 잠금은 설정하지 않는다.
This commit is contained in:
@@ -101,6 +101,7 @@ export interface GeneralActionOutcome<TriggerState extends GeneralTriggerState =
|
||||
effects: GeneralActionEffect<TriggerState>[];
|
||||
completed?: boolean;
|
||||
deletedTroopIds?: number[];
|
||||
destroyedNationIds?: NationId[];
|
||||
reservedGeneralTurnPlans?: Array<{
|
||||
generalId: number;
|
||||
joinTurn: number;
|
||||
@@ -125,6 +126,7 @@ export interface GeneralActionResolution {
|
||||
nextTurnAt: Date;
|
||||
logs: LogEntryDraft[];
|
||||
effects: GeneralActionEffect[];
|
||||
destroyedNationIds?: NationId[];
|
||||
created?: {
|
||||
generals: General[];
|
||||
nations?: Nation[];
|
||||
@@ -406,6 +408,7 @@ export const resolveGeneralAction = <TriggerState extends GeneralTriggerState =
|
||||
effects: accumulator.pendingEffects,
|
||||
...(outcome?.alternative ? { alternative: outcome.alternative } : {}),
|
||||
...(outcome?.deletedTroopIds?.length ? { deletedTroopIds: outcome.deletedTroopIds } : {}),
|
||||
...(outcome?.destroyedNationIds?.length ? { destroyedNationIds: outcome.destroyedNationIds } : {}),
|
||||
...(outcome?.reservedGeneralTurnPlans?.length
|
||||
? { reservedGeneralTurnPlans: outcome.reservedGeneralTurnPlans }
|
||||
: {}),
|
||||
|
||||
@@ -749,6 +749,9 @@ export class ActionDefinition<
|
||||
|
||||
return {
|
||||
effects,
|
||||
...(aftermath.conquest?.nationCollapsed && defenderNation
|
||||
? { destroyedNationIds: [defenderNation.id] }
|
||||
: {}),
|
||||
...(aftermath.conquest?.ruinedNpcJoinPlans.length
|
||||
? { reservedGeneralTurnPlans: aftermath.conquest.ruinedNpcJoinPlans }
|
||||
: {}),
|
||||
|
||||
Reference in New Issue
Block a user