Refactor import paths to use absolute paths from '@sammo-ts/logic' for consistency and clarity across the codebase. This includes updates to various modules related to actions, triggers, constraints, and world management, ensuring that all imports are correctly pointing to the new structure.
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
import type { Constraint, ConstraintContext } from '../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from './engine.js';
|
} from './engine.js';
|
||||||
import type { GeneralTriggerState } from '../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
|
|
||||||
export interface GeneralActionDefinition<
|
export interface GeneralActionDefinition<
|
||||||
TriggerState extends GeneralTriggerState = GeneralTriggerState,
|
TriggerState extends GeneralTriggerState = GeneralTriggerState,
|
||||||
|
|||||||
@@ -8,15 +8,15 @@ import type {
|
|||||||
GeneralId,
|
GeneralId,
|
||||||
Nation,
|
Nation,
|
||||||
NationId,
|
NationId,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { GeneralActionContext } from '../triggers/general.js';
|
import type { GeneralActionContext } from '@sammo-ts/logic/triggers/general.js';
|
||||||
import { getNextTurnAt, type TurnSchedule } from '../turn/calendar.js';
|
import { getNextTurnAt, type TurnSchedule } from '@sammo-ts/logic/turn/calendar.js';
|
||||||
import {
|
import {
|
||||||
LogCategory,
|
LogCategory,
|
||||||
type LogEntryDraft,
|
type LogEntryDraft,
|
||||||
LogFormat,
|
LogFormat,
|
||||||
LogScope,
|
LogScope,
|
||||||
} from '../logging/types.js';
|
} from '@sammo-ts/logic/logging/types.js';
|
||||||
|
|
||||||
enablePatches();
|
enablePatches();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
beChief,
|
beChief,
|
||||||
destGeneralInDestNation,
|
destGeneralInDestNation,
|
||||||
@@ -9,15 +9,15 @@ import {
|
|||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
occupiedCity,
|
occupiedCity,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import { allow, unknownOrDeny } from '../../../constraints/helpers.js';
|
import { allow, unknownOrDeny } from '@sammo-ts/logic/constraints/helpers.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { createDiplomacyPatchEffect, createLogEffect } from '../../engine.js';
|
import { createDiplomacyPatchEffect, createLogEffect } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
|
|
||||||
export interface NonAggressionAcceptArgs {
|
export interface NonAggressionAcceptArgs {
|
||||||
destNationId: number;
|
destNationId: number;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
allowDiplomacyBetweenStatus,
|
allowDiplomacyBetweenStatus,
|
||||||
beChief,
|
beChief,
|
||||||
@@ -7,15 +7,15 @@ import {
|
|||||||
existsDestGeneral,
|
existsDestGeneral,
|
||||||
existsDestNation,
|
existsDestNation,
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import { allow, unknownOrDeny } from '../../../constraints/helpers.js';
|
import { allow, unknownOrDeny } from '@sammo-ts/logic/constraints/helpers.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { createDiplomacyPatchEffect, createLogEffect } from '../../engine.js';
|
import { createDiplomacyPatchEffect, createLogEffect } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
|
|
||||||
export interface NonAggressionCancelAcceptArgs {
|
export interface NonAggressionCancelAcceptArgs {
|
||||||
destNationId: number;
|
destNationId: number;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { City, General, Nation } from '../../domain/entities.js';
|
import type { City, General, Nation } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ScenarioConfig } from '../../scenario/types.js';
|
import type { ScenarioConfig } from '@sammo-ts/logic/scenario/types.js';
|
||||||
import type { ScenarioMeta } from '../../world/types.js';
|
import type { ScenarioMeta } from '@sammo-ts/logic/world/types.js';
|
||||||
import type { MapDefinition, UnitSetDefinition } from '../../world/types.js';
|
import type { MapDefinition, UnitSetDefinition } from '@sammo-ts/logic/world/types.js';
|
||||||
|
|
||||||
export interface ActionRandomSource {
|
export interface ActionRandomSource {
|
||||||
nextFloat(): number;
|
nextFloat(): number;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import type { General } from '../../domain/entities.js';
|
import type { General } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ScenarioConfig } from '../../scenario/types.js';
|
import type { ScenarioConfig } from '@sammo-ts/logic/scenario/types.js';
|
||||||
import type { ScenarioMeta } from '../../world/types.js';
|
import type { ScenarioMeta } from '@sammo-ts/logic/world/types.js';
|
||||||
import type { WarAftermathConfig, WarEngineConfig, WarTimeContext } from '../../war/types.js';
|
import type { WarAftermathConfig, WarEngineConfig, WarTimeContext } from '@sammo-ts/logic/war/types.js';
|
||||||
import type { UnitSetDefinition } from '../../world/types.js';
|
import type { UnitSetDefinition } from '@sammo-ts/logic/world/types.js';
|
||||||
import type {
|
import type {
|
||||||
ActionContextWorldRef,
|
ActionContextWorldRef,
|
||||||
ActionContextWorldState,
|
ActionContextWorldState,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { GeneralActionModule } from '../../triggers/general-action.js';
|
import type { GeneralActionModule } from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
|
|
||||||
export interface TurnCommandEnv {
|
export interface TurnCommandEnv {
|
||||||
develCost: number;
|
develCost: number;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { GeneralActionDefinition } from '../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type { GeneralActionResolver } from '../engine.js';
|
import type { GeneralActionResolver } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { ActionContextBuilder } from './actionContext.js';
|
import type { ActionContextBuilder } from './actionContext.js';
|
||||||
import type { TurnCommandEnv } from './commandEnv.js';
|
import type { TurnCommandEnv } from './commandEnv.js';
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import type { GeneralTriggerState, TriggerValue } from '../../../domain/entities.js';
|
import type { GeneralTriggerState, TriggerValue } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import { beNeutral } from '../../../constraints/presets.js';
|
import { beNeutral } from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat } from '../../../logging/types.js';
|
import { LogCategory, LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface UprisingArgs {}
|
export interface UprisingArgs {}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import type { GeneralTriggerState, TriggerValue } from '../../../domain/entities.js';
|
import type { GeneralTriggerState, TriggerValue } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import { beNeutral } from '../../../constraints/presets.js';
|
import { beNeutral } from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat } from '../../../logging/types.js';
|
import { LogCategory, LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface FoundingArgs {}
|
export interface FoundingArgs {}
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
import type {
|
import type {
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
notWanderingNation,
|
notWanderingNation,
|
||||||
occupiedCity,
|
occupiedCity,
|
||||||
reqGeneralGold,
|
reqGeneralGold,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface TechResearchArgs {}
|
export interface TechResearchArgs {}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export class ActionDefinition<
|
export class ActionDefinition<
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import type {
|
import type {
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import { notBeNeutral, reqGeneralGold } from '../../../constraints/presets.js';
|
import { notBeNeutral, reqGeneralGold } from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface BoostMoraleArgs {}
|
export interface BoostMoraleArgs {}
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
RequirementKey,
|
RequirementKey,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
notWanderingNation,
|
notWanderingNation,
|
||||||
@@ -19,20 +19,20 @@ import {
|
|||||||
reqGeneralGold,
|
reqGeneralGold,
|
||||||
reqGeneralRice,
|
reqGeneralRice,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionContext } from '../../../triggers/general.js';
|
import type { GeneralActionContext } from '@sammo-ts/logic/triggers/general.js';
|
||||||
import {
|
import {
|
||||||
GeneralActionPipeline,
|
GeneralActionPipeline,
|
||||||
type GeneralActionModule,
|
type GeneralActionModule,
|
||||||
} from '../../../triggers/general-action.js';
|
} from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export type DomesticCriticalPick = 'fail' | 'normal' | 'success';
|
export type DomesticCriticalPick = 'fail' | 'normal' | 'success';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export class ActionDefinition<
|
export class ActionDefinition<
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export class ActionDefinition<
|
export class ActionDefinition<
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import type {
|
import type {
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import { notBeNeutral, reqGeneralGold } from '../../../constraints/presets.js';
|
import { notBeNeutral, reqGeneralGold } from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface RecoveryArgs {}
|
export interface RecoveryArgs {}
|
||||||
|
|||||||
@@ -5,34 +5,34 @@ import type {
|
|||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
StatBlock,
|
StatBlock,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
reqGeneralGold,
|
reqGeneralGold,
|
||||||
reqGeneralRice,
|
reqGeneralRice,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import {
|
import {
|
||||||
GeneralActionPipeline,
|
GeneralActionPipeline,
|
||||||
type GeneralActionModule,
|
type GeneralActionModule,
|
||||||
} from '../../../triggers/general-action.js';
|
} from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import {
|
import {
|
||||||
createGeneralAddEffect,
|
createGeneralAddEffect,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { buildRecruitmentGeneral } from './recruitment.js';
|
import { buildRecruitmentGeneral } from './recruitment.js';
|
||||||
import { JosaUtil } from '@sammo-ts/common';
|
import { JosaUtil } from '@sammo-ts/common';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import { buildWorldSummary } from '../actionContextHelpers.js';
|
import { buildWorldSummary } from '@sammo-ts/logic/actions/turn/actionContextHelpers.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface TalentScoutArgs {}
|
export interface TalentScoutArgs {}
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import { beNeutral, existsDestNation } from '../../../constraints/presets.js';
|
import { beNeutral, existsDestNation } from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat } from '../../../logging/types.js';
|
import { LogCategory, LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface AppointmentArgs {
|
export interface AppointmentArgs {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export class ActionDefinition<
|
export class ActionDefinition<
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ import type {
|
|||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
RequirementKey,
|
RequirementKey,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
occupiedCity,
|
occupiedCity,
|
||||||
@@ -19,28 +19,28 @@ import {
|
|||||||
reqGeneralCrewMargin,
|
reqGeneralCrewMargin,
|
||||||
reqGeneralGold,
|
reqGeneralGold,
|
||||||
reqGeneralRice,
|
reqGeneralRice,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import {
|
import {
|
||||||
GeneralActionPipeline,
|
GeneralActionPipeline,
|
||||||
type GeneralActionModule,
|
type GeneralActionModule,
|
||||||
} from '../../../triggers/general-action.js';
|
} from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { MapDefinition, UnitSetDefinition } from '../../../world/types.js';
|
import type { MapDefinition, UnitSetDefinition } from '@sammo-ts/logic/world/types.js';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import { resolveStartYear } from '../actionContextHelpers.js';
|
import { resolveStartYear } from '@sammo-ts/logic/actions/turn/actionContextHelpers.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
import {
|
import {
|
||||||
type CrewTypeAvailabilityContext,
|
type CrewTypeAvailabilityContext,
|
||||||
findCrewTypeById,
|
findCrewTypeById,
|
||||||
getTechCost,
|
getTechCost,
|
||||||
isCrewTypeAvailable,
|
isCrewTypeAvailable,
|
||||||
} from '../../../world/unitSet.js';
|
} from '@sammo-ts/logic/world/unitSet.js';
|
||||||
|
|
||||||
export interface RecruitArgs {
|
export interface RecruitArgs {
|
||||||
crewType: number;
|
crewType: number;
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
existsDestCity,
|
existsDestCity,
|
||||||
hasRouteWithEnemy,
|
hasRouteWithEnemy,
|
||||||
@@ -20,44 +20,44 @@ import {
|
|||||||
reqGeneralCrew,
|
reqGeneralCrew,
|
||||||
reqGeneralRice,
|
reqGeneralRice,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import { readGeneral } from '../../../constraints/helpers.js';
|
import { readGeneral } from '@sammo-ts/logic/constraints/helpers.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionEffect,
|
GeneralActionEffect,
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import {
|
import {
|
||||||
createCityPatchEffect,
|
createCityPatchEffect,
|
||||||
createDiplomacyPatchEffect,
|
createDiplomacyPatchEffect,
|
||||||
createGeneralPatchEffect,
|
createGeneralPatchEffect,
|
||||||
createNationPatchEffect,
|
createNationPatchEffect,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { JosaUtil, LiteHashDRBG } from '@sammo-ts/common';
|
import { JosaUtil, LiteHashDRBG } from '@sammo-ts/common';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
import type {
|
import type {
|
||||||
WarAftermathConfig,
|
WarAftermathConfig,
|
||||||
WarEngineConfig,
|
WarEngineConfig,
|
||||||
WarTimeContext,
|
WarTimeContext,
|
||||||
} from '../../../war/types.js';
|
} from '@sammo-ts/logic/war/types.js';
|
||||||
import { resolveWarAftermath } from '../../../war/aftermath.js';
|
import { resolveWarAftermath } from '@sammo-ts/logic/war/aftermath.js';
|
||||||
import { resolveWarBattle } from '../../../war/engine.js';
|
import { resolveWarBattle } from '@sammo-ts/logic/war/engine.js';
|
||||||
import {
|
import {
|
||||||
increaseMetaNumber,
|
increaseMetaNumber,
|
||||||
simpleSerialize,
|
simpleSerialize,
|
||||||
} from '../../../war/utils.js';
|
} from '@sammo-ts/logic/war/utils.js';
|
||||||
import type {
|
import type {
|
||||||
MapDefinition,
|
MapDefinition,
|
||||||
UnitSetDefinition,
|
UnitSetDefinition,
|
||||||
} from '../../../world/types.js';
|
} from '@sammo-ts/logic/world/types.js';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import {
|
import {
|
||||||
buildWarAftermathConfig,
|
buildWarAftermathConfig,
|
||||||
buildWarConfig,
|
buildWarConfig,
|
||||||
buildWarTime,
|
buildWarTime,
|
||||||
} from '../actionContextHelpers.js';
|
} from '@sammo-ts/logic/actions/turn/actionContextHelpers.js';
|
||||||
|
|
||||||
export interface DispatchArgs {
|
export interface DispatchArgs {
|
||||||
destCityId: number;
|
destCityId: number;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
import { CityDevelopmentActionDefinition } from './cityDevelopment.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export class ActionDefinition<
|
export class ActionDefinition<
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import type {
|
|||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
disallowDiplomacyBetweenStatus,
|
disallowDiplomacyBetweenStatus,
|
||||||
existsDestCity,
|
existsDestCity,
|
||||||
@@ -17,26 +17,26 @@ import {
|
|||||||
reqGeneralGold,
|
reqGeneralGold,
|
||||||
reqGeneralRice,
|
reqGeneralRice,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionContext } from '../../../triggers/general.js';
|
import type { GeneralActionContext } from '@sammo-ts/logic/triggers/general.js';
|
||||||
import {
|
import {
|
||||||
GeneralActionPipeline,
|
GeneralActionPipeline,
|
||||||
type GeneralActionModule,
|
type GeneralActionModule,
|
||||||
} from '../../../triggers/general-action.js';
|
} from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionEffect,
|
GeneralActionEffect,
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import {
|
import {
|
||||||
createCityPatchEffect,
|
createCityPatchEffect,
|
||||||
createGeneralPatchEffect,
|
createGeneralPatchEffect,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface FireAttackArgs {
|
export interface FireAttackArgs {
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import type {
|
import type {
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import { notBeNeutral, reqGeneralGold } from '../../../constraints/presets.js';
|
import { notBeNeutral, reqGeneralGold } from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface TrainingArgs {}
|
export interface TrainingArgs {}
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import type {
|
import type {
|
||||||
City,
|
City,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
notWanderingNation,
|
notWanderingNation,
|
||||||
@@ -14,12 +14,12 @@ import {
|
|||||||
remainCityCapacityByMax,
|
remainCityCapacityByMax,
|
||||||
reqGeneralGold,
|
reqGeneralGold,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
|
|
||||||
export interface CityDevelopmentArgs {}
|
export interface CityDevelopmentArgs {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { TurnCommandModule, TurnCommandSpecBase } from '../commandModule.js';
|
import type { TurnCommandModule, TurnCommandSpecBase } from '@sammo-ts/logic/actions/turn/commandModule.js';
|
||||||
|
|
||||||
export const GENERAL_TURN_COMMAND_KEYS = [
|
export const GENERAL_TURN_COMMAND_KEYS = [
|
||||||
'che_거병',
|
'che_거병',
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type {
|
|||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
StatBlock,
|
StatBlock,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
|
|
||||||
export interface GeneralRecruitmentInput<
|
export interface GeneralRecruitmentInput<
|
||||||
TriggerState extends GeneralTriggerState = GeneralTriggerState
|
TriggerState extends GeneralTriggerState = GeneralTriggerState
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
import type {
|
import type {
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat } from '../../../logging/types.js';
|
import { LogCategory, LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { GeneralTurnCommandSpec } from './index.js';
|
import type { GeneralTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface RestArgs {}
|
export interface RestArgs {}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
alwaysFail,
|
alwaysFail,
|
||||||
beChief,
|
beChief,
|
||||||
@@ -18,20 +18,20 @@ import {
|
|||||||
occupiedDestCity,
|
occupiedDestCity,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
suppliedDestCity,
|
suppliedDestCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionEffect,
|
GeneralActionEffect,
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { createGeneralPatchEffect, createLogEffect } from '../../engine.js';
|
import { createGeneralPatchEffect, createLogEffect } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { JosaUtil } from '@sammo-ts/common';
|
import { JosaUtil } from '@sammo-ts/common';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import { resolveTurnTermMinutes } from '../actionContextHelpers.js';
|
import { resolveTurnTermMinutes } from '@sammo-ts/logic/actions/turn/actionContextHelpers.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface AssignmentArgs {
|
export interface AssignmentArgs {
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
beChief,
|
beChief,
|
||||||
differentDestNation,
|
differentDestNation,
|
||||||
disallowDiplomacyBetweenStatus,
|
disallowDiplomacyBetweenStatus,
|
||||||
existsDestNation,
|
existsDestNation,
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import { allow, unknownOrDeny } from '../../../constraints/helpers.js';
|
import { allow, unknownOrDeny } from '@sammo-ts/logic/constraints/helpers.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { createLogEffect } from '../../engine.js';
|
import { createLogEffect } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface NonAggressionProposalArgs {
|
export interface NonAggressionProposalArgs {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
allowDiplomacyBetweenStatus,
|
allowDiplomacyBetweenStatus,
|
||||||
beChief,
|
beChief,
|
||||||
@@ -7,16 +7,16 @@ import {
|
|||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
occupiedCity,
|
occupiedCity,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { createLogEffect } from '../../engine.js';
|
import { createLogEffect } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface NonAggressionCancelProposalArgs {
|
export interface NonAggressionCancelProposalArgs {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { GeneralTriggerState } from '../../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { Constraint, ConstraintContext } from '../../../constraints/types.js';
|
import type { Constraint, ConstraintContext } from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
beChief,
|
beChief,
|
||||||
disallowDiplomacyBetweenStatus,
|
disallowDiplomacyBetweenStatus,
|
||||||
@@ -7,16 +7,16 @@ import {
|
|||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
occupiedCity,
|
occupiedCity,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { createDiplomacyPatchEffect, createLogEffect } from '../../engine.js';
|
import { createDiplomacyPatchEffect, createLogEffect } from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface DeclareWarArgs {
|
export interface DeclareWarArgs {
|
||||||
|
|||||||
@@ -3,42 +3,42 @@ import type {
|
|||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
StatBlock,
|
StatBlock,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
availableStrategicCommand,
|
availableStrategicCommand,
|
||||||
beChief,
|
beChief,
|
||||||
notBeNeutral,
|
notBeNeutral,
|
||||||
notOpeningPart,
|
notOpeningPart,
|
||||||
occupiedCity,
|
occupiedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import {
|
import {
|
||||||
GeneralActionPipeline,
|
GeneralActionPipeline,
|
||||||
type GeneralActionModule,
|
type GeneralActionModule,
|
||||||
} from '../../../triggers/general-action.js';
|
} from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionEffect,
|
GeneralActionEffect,
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import {
|
import {
|
||||||
createGeneralAddEffect,
|
createGeneralAddEffect,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { buildRecruitmentGeneral } from '../general/recruitment.js';
|
import { buildRecruitmentGeneral } from '@sammo-ts/logic/actions/turn/general/recruitment.js';
|
||||||
import { JosaUtil } from '@sammo-ts/common';
|
import { JosaUtil } from '@sammo-ts/common';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import {
|
import {
|
||||||
buildAverageNationGeneralCount,
|
buildAverageNationGeneralCount,
|
||||||
buildNationSummary,
|
buildNationSummary,
|
||||||
resolveStartYear,
|
resolveStartYear,
|
||||||
} from '../actionContextHelpers.js';
|
} from '@sammo-ts/logic/actions/turn/actionContextHelpers.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface VolunteerRecruitArgs {}
|
export interface VolunteerRecruitArgs {}
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
RequirementKey,
|
RequirementKey,
|
||||||
StateView,
|
StateView,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import {
|
import {
|
||||||
alwaysFail,
|
alwaysFail,
|
||||||
beChief,
|
beChief,
|
||||||
@@ -19,24 +19,24 @@ import {
|
|||||||
reqNationGold,
|
reqNationGold,
|
||||||
reqNationRice,
|
reqNationRice,
|
||||||
suppliedCity,
|
suppliedCity,
|
||||||
} from '../../../constraints/presets.js';
|
} from '@sammo-ts/logic/constraints/presets.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionEffect,
|
GeneralActionEffect,
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import {
|
import {
|
||||||
createGeneralPatchEffect,
|
createGeneralPatchEffect,
|
||||||
createLogEffect,
|
createLogEffect,
|
||||||
createNationPatchEffect,
|
createNationPatchEffect,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import { LogCategory, LogFormat, LogScope } from '../../../logging/types.js';
|
import { LogCategory, LogFormat, LogScope } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
import { JosaUtil } from '@sammo-ts/common';
|
import { JosaUtil } from '@sammo-ts/common';
|
||||||
import type { ActionContextBuilder } from '../actionContext.js';
|
import type { ActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
|
|
||||||
export interface AwardArgs {
|
export interface AwardArgs {
|
||||||
isGold: boolean;
|
isGold: boolean;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { TurnCommandModule, TurnCommandSpecBase } from '../commandModule.js';
|
import type { TurnCommandModule, TurnCommandSpecBase } from '@sammo-ts/logic/actions/turn/commandModule.js';
|
||||||
|
|
||||||
export const NATION_TURN_COMMAND_KEYS = [
|
export const NATION_TURN_COMMAND_KEYS = [
|
||||||
'휴식',
|
'휴식',
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
import type {
|
import type {
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../../../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
Constraint,
|
Constraint,
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
} from '../../../constraints/types.js';
|
} from '@sammo-ts/logic/constraints/types.js';
|
||||||
import type { GeneralActionDefinition } from '../../definition.js';
|
import type { GeneralActionDefinition } from '@sammo-ts/logic/actions/definition.js';
|
||||||
import type {
|
import type {
|
||||||
GeneralActionOutcome,
|
GeneralActionOutcome,
|
||||||
GeneralActionResolveContext,
|
GeneralActionResolveContext,
|
||||||
GeneralActionResolver,
|
GeneralActionResolver,
|
||||||
} from '../../engine.js';
|
} from '@sammo-ts/logic/actions/engine.js';
|
||||||
import type { TurnCommandEnv } from '../commandEnv.js';
|
import type { TurnCommandEnv } from '@sammo-ts/logic/actions/turn/commandEnv.js';
|
||||||
import { defaultActionContextBuilder } from '../actionContext.js';
|
import { defaultActionContextBuilder } from '@sammo-ts/logic/actions/turn/actionContext.js';
|
||||||
import type { NationTurnCommandSpec } from './index.js';
|
import type { NationTurnCommandSpec } from './index.js';
|
||||||
|
|
||||||
export interface NationRestArgs {}
|
export interface NationRestArgs {}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { City, General } from '../domain/entities.js';
|
import type { City, General } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { MapDefinition } from '../world/types.js';
|
import type { MapDefinition } from '@sammo-ts/logic/world/types.js';
|
||||||
import {
|
import {
|
||||||
allow,
|
allow,
|
||||||
parsePercent,
|
parsePercent,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { General } from '../domain/entities.js';
|
import type { General } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import {
|
import {
|
||||||
allow,
|
allow,
|
||||||
readDestGeneral,
|
readDestGeneral,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { City, General, Nation, TriggerValue } from '../domain/entities.js';
|
import type { City, General, Nation, TriggerValue } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
ConstraintContext,
|
ConstraintContext,
|
||||||
ConstraintResult,
|
ConstraintResult,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { General, Nation } from '../domain/entities.js';
|
import type { General, Nation } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import {
|
import {
|
||||||
allow,
|
allow,
|
||||||
readGeneral,
|
readGeneral,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import type {
|
|||||||
GeneralId,
|
GeneralId,
|
||||||
Nation,
|
Nation,
|
||||||
NationId,
|
NationId,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
|
|
||||||
export interface GeneralRepository<GeneralType extends General = General> {
|
export interface GeneralRepository<GeneralType extends General = General> {
|
||||||
getById(id: GeneralId): Promise<GeneralType | null>;
|
getById(id: GeneralId): Promise<GeneralType | null>;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { City, General, Nation, Troop } from '../domain/entities.js';
|
import type { City, General, Nation, Troop } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ScenarioConfig } from '../scenario/types.js';
|
import type { ScenarioConfig } from '@sammo-ts/logic/scenario/types.js';
|
||||||
import type { ScenarioMeta } from '../world/types.js';
|
import type { ScenarioMeta } from '@sammo-ts/logic/world/types.js';
|
||||||
|
|
||||||
// DB에서 월드 상태를 로드할 때 사용하는 조회 인터페이스.
|
// DB에서 월드 상태를 로드할 때 사용하는 조회 인터페이스.
|
||||||
export interface WorldStateSnapshotSource<
|
export interface WorldStateSnapshotSource<
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { GeneralTriggerState } from '../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { type GeneralActionContext, GeneralTriggerCaller } from './general.js';
|
import { type GeneralActionContext, GeneralTriggerCaller } from './general.js';
|
||||||
|
|
||||||
export interface GeneralActionModule<TriggerState extends GeneralTriggerState = GeneralTriggerState> {
|
export interface GeneralActionModule<TriggerState extends GeneralTriggerState = GeneralTriggerState> {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { General, GeneralTriggerState } from '../domain/entities.js';
|
import type { General, GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { RandomGenerator } from '@sammo-ts/common';
|
import type { RandomGenerator } from '@sammo-ts/common';
|
||||||
import type { WorldStateRepository } from '../ports/world.js';
|
import type { WorldStateRepository } from '@sammo-ts/logic/ports/world.js';
|
||||||
import { TriggerCaller, type Trigger } from './core.js';
|
import { TriggerCaller, type Trigger } from './core.js';
|
||||||
|
|
||||||
export interface GeneralWorldView<
|
export interface GeneralWorldView<
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { JosaUtil } from '@sammo-ts/common';
|
import { JosaUtil } from '@sammo-ts/common';
|
||||||
|
|
||||||
import type { General, GeneralTriggerState } from '../../domain/entities.js';
|
import type { General, GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { TriggerPriority } from '../core.js';
|
import { TriggerPriority } from '@sammo-ts/logic/triggers/core.js';
|
||||||
import {
|
import {
|
||||||
BaseGeneralTrigger,
|
BaseGeneralTrigger,
|
||||||
type GeneralTriggerContext,
|
type GeneralTriggerContext,
|
||||||
} from '../general.js';
|
} from '@sammo-ts/logic/triggers/general.js';
|
||||||
|
|
||||||
const HEAL_PROBABILITY = 0.5;
|
const HEAL_PROBABILITY = 0.5;
|
||||||
const MIN_HEAL_INJURY = 10;
|
const MIN_HEAL_INJURY = 10;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { SpecialActionModule } from '../types.js';
|
import type { SpecialActionModule } from '@sammo-ts/logic/triggers/special/types.js';
|
||||||
|
|
||||||
// 내정 특기: 발명
|
// 내정 특기: 발명
|
||||||
export const specialModule: SpecialActionModule = {
|
export const specialModule: SpecialActionModule = {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { SpecialActionModule } from '../types.js';
|
import type { SpecialActionModule } from '@sammo-ts/logic/triggers/special/types.js';
|
||||||
|
|
||||||
// 내정 특기: 인덕
|
// 내정 특기: 인덕
|
||||||
export const specialModule: SpecialActionModule = {
|
export const specialModule: SpecialActionModule = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type {
|
import type {
|
||||||
SpecialActionModule,
|
SpecialActionModule,
|
||||||
SpecialActionModuleExport,
|
SpecialActionModuleExport,
|
||||||
} from '../types.js';
|
} from '@sammo-ts/logic/triggers/special/types.js';
|
||||||
|
|
||||||
export const DOMESTIC_SPECIAL_KEYS = [
|
export const DOMESTIC_SPECIAL_KEYS = [
|
||||||
'che_인덕',
|
'che_인덕',
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import type { GeneralTriggerState } from '../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { GeneralActionContext } from '../general.js';
|
import type { GeneralActionContext } from '@sammo-ts/logic/triggers/general.js';
|
||||||
import type { GeneralActionModule } from '../general-action.js';
|
import type { GeneralActionModule } from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { WarActionContext, WarActionModule } from '../../war/actions.js';
|
import type { WarActionContext, WarActionModule } from '@sammo-ts/logic/war/actions.js';
|
||||||
import type { WarUnit } from '../../war/units.js';
|
import type { WarUnit } from '@sammo-ts/logic/war/units.js';
|
||||||
import type { WarTriggerCaller } from '../../war/triggers.js';
|
import type { WarTriggerCaller } from '@sammo-ts/logic/war/triggers.js';
|
||||||
import type {
|
import type {
|
||||||
SpecialActionKind,
|
SpecialActionKind,
|
||||||
SpecialActionModule,
|
SpecialActionModule,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { GeneralTriggerState } from '../../domain/entities.js';
|
import type { GeneralTriggerState } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { GeneralActionModule } from '../general-action.js';
|
import type { GeneralActionModule } from '@sammo-ts/logic/triggers/general-action.js';
|
||||||
import type { WarActionModule } from '../../war/actions.js';
|
import type { WarActionModule } from '@sammo-ts/logic/war/actions.js';
|
||||||
|
|
||||||
export type SpecialActionKind = 'domestic' | 'war';
|
export type SpecialActionKind = 'domestic' | 'war';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { GeneralTriggerCaller } from '../../general.js';
|
import { GeneralTriggerCaller } from '@sammo-ts/logic/triggers/general.js';
|
||||||
import type { WarActionContext } from '../../../war/actions.js';
|
import type { WarActionContext } from '@sammo-ts/logic/war/actions.js';
|
||||||
import { CheUisulCityHealTrigger } from '../../generalTriggers/che_도시치료.js';
|
import { CheUisulCityHealTrigger } from '@sammo-ts/logic/triggers/generalTriggers/che_도시치료.js';
|
||||||
import { triggerModule as cheUisulTriggerModule } from '../../../war/triggers/che_의술.js';
|
import { triggerModule as cheUisulTriggerModule } from '@sammo-ts/logic/war/triggers/che_의술.js';
|
||||||
import type { SpecialActionModule } from '../types.js';
|
import type { SpecialActionModule } from '@sammo-ts/logic/triggers/special/types.js';
|
||||||
|
|
||||||
// 전투 특기: 의술
|
// 전투 특기: 의술
|
||||||
export const specialModule: SpecialActionModule = {
|
export const specialModule: SpecialActionModule = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { GeneralActionContext } from '../../general.js';
|
import type { GeneralActionContext } from '@sammo-ts/logic/triggers/general.js';
|
||||||
import type { WarActionContext } from '../../../war/actions.js';
|
import type { WarActionContext } from '@sammo-ts/logic/war/actions.js';
|
||||||
import type { SpecialActionModule } from '../types.js';
|
import type { SpecialActionModule } from '@sammo-ts/logic/triggers/special/types.js';
|
||||||
|
|
||||||
const RECRUIT_TRAIN = 70;
|
const RECRUIT_TRAIN = 70;
|
||||||
const CONSCRIPT_TRAIN = 84;
|
const CONSCRIPT_TRAIN = 84;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type {
|
import type {
|
||||||
SpecialActionModule,
|
SpecialActionModule,
|
||||||
SpecialActionModuleExport,
|
SpecialActionModuleExport,
|
||||||
} from '../types.js';
|
} from '@sammo-ts/logic/triggers/special/types.js';
|
||||||
|
|
||||||
export const WAR_SPECIAL_KEYS = [
|
export const WAR_SPECIAL_KEYS = [
|
||||||
'che_의술',
|
'che_의술',
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ActionLogger } from '../logging/actionLogger.js';
|
import type { ActionLogger } from '@sammo-ts/logic/logging/actionLogger.js';
|
||||||
import type { WarUnit } from './units.js';
|
import type { WarUnit } from './units.js';
|
||||||
import { WarTriggerCaller } from './triggers.js';
|
import { WarTriggerCaller } from './triggers.js';
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { ActionLogger } from '../logging/actionLogger.js';
|
import { ActionLogger } from '@sammo-ts/logic/logging/actionLogger.js';
|
||||||
import { LogFormat, type LogEntryDraft } from '../logging/types.js';
|
import { LogFormat, type LogEntryDraft } from '@sammo-ts/logic/logging/types.js';
|
||||||
import {
|
import {
|
||||||
buildCrewTypeIndex,
|
buildCrewTypeIndex,
|
||||||
getTechCost,
|
getTechCost,
|
||||||
getTechLevel,
|
getTechLevel,
|
||||||
} from '../world/unitSet.js';
|
} from '@sammo-ts/logic/world/unitSet.js';
|
||||||
import type { WarUnitReport } from './types.js';
|
import type { WarUnitReport } from './types.js';
|
||||||
import type {
|
import type {
|
||||||
ConquerCityOutcome,
|
ConquerCityOutcome,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { CrewTypeDefinition } from '../world/types.js';
|
import type { CrewTypeDefinition } from '@sammo-ts/logic/world/types.js';
|
||||||
|
|
||||||
// 전투 계산에 필요한 병종 정보 래퍼.
|
// 전투 계산에 필요한 병종 정보 래퍼.
|
||||||
export class WarCrewType {
|
export class WarCrewType {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import type {
|
|||||||
City,
|
City,
|
||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import { ActionLogger } from '../logging/actionLogger.js';
|
import { ActionLogger } from '@sammo-ts/logic/logging/actionLogger.js';
|
||||||
import { LogFormat } from '../logging/types.js';
|
import { LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { buildCrewTypeIndex as buildCrewTypeDefinitionIndex } from '../world/unitSet.js';
|
import { buildCrewTypeIndex as buildCrewTypeDefinitionIndex } from '@sammo-ts/logic/world/unitSet.js';
|
||||||
import { WarActionPipeline } from './actions.js';
|
import { WarActionPipeline } from './actions.js';
|
||||||
import { WarCrewType } from './crewType.js';
|
import { WarCrewType } from './crewType.js';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { RandUtil } from '@sammo-ts/common';
|
import type { RandUtil } from '@sammo-ts/common';
|
||||||
|
|
||||||
import { TriggerCaller, type Trigger } from '../triggers/core.js';
|
import { TriggerCaller, type Trigger } from '@sammo-ts/logic/triggers/core.js';
|
||||||
import type { WarUnit } from './units.js';
|
import type { WarUnit } from './units.js';
|
||||||
|
|
||||||
export interface WarTriggerContext {
|
export interface WarTriggerContext {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { LogFormat } from '../../logging/types.js';
|
import { LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { TriggerPriority } from '../../triggers/core.js';
|
import { TriggerPriority } from '@sammo-ts/logic/triggers/core.js';
|
||||||
import { BaseWarUnitTrigger, WarTriggerCaller } from '../triggers.js';
|
import { BaseWarUnitTrigger, WarTriggerCaller } from '@sammo-ts/logic/war/triggers.js';
|
||||||
import { WarUnitGeneral, type WarUnit } from '../units.js';
|
import { WarUnitGeneral, type WarUnit } from '@sammo-ts/logic/war/units.js';
|
||||||
import type { WarTriggerModule } from './types.js';
|
import type { WarTriggerModule } from './types.js';
|
||||||
|
|
||||||
// 의술: 치료 시도
|
// 의술: 치료 시도
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { LogFormat } from '../../logging/types.js';
|
import { LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { TriggerPriority } from '../../triggers/core.js';
|
import { TriggerPriority } from '@sammo-ts/logic/triggers/core.js';
|
||||||
import { BaseWarUnitTrigger, WarTriggerCaller } from '../triggers.js';
|
import { BaseWarUnitTrigger, WarTriggerCaller } from '@sammo-ts/logic/war/triggers.js';
|
||||||
import { WarUnitGeneral, type WarUnit } from '../units.js';
|
import { WarUnitGeneral, type WarUnit } from '@sammo-ts/logic/war/units.js';
|
||||||
import type { WarTriggerModule } from './types.js';
|
import type { WarTriggerModule } from './types.js';
|
||||||
|
|
||||||
// 기본 필살: 시도 단계
|
// 기본 필살: 시도 단계
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { WarTriggerModule, WarTriggerModuleExport } from './types.js';
|
import type { WarTriggerModule, WarTriggerModuleExport } from './types.js';
|
||||||
import type { WarTriggerRegistry } from '../triggers.js';
|
import type { WarTriggerRegistry } from '@sammo-ts/logic/war/triggers.js';
|
||||||
|
|
||||||
export const WAR_TRIGGER_KEYS = [
|
export const WAR_TRIGGER_KEYS = [
|
||||||
'che_필살',
|
'che_필살',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { WarTriggerCaller } from '../triggers.js';
|
import type { WarTriggerCaller } from '@sammo-ts/logic/war/triggers.js';
|
||||||
import type { WarUnit } from '../units.js';
|
import type { WarUnit } from '@sammo-ts/logic/war/units.js';
|
||||||
|
|
||||||
export interface WarTriggerModule {
|
export interface WarTriggerModule {
|
||||||
key: string;
|
key: string;
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import type {
|
|||||||
General,
|
General,
|
||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ActionLogger } from '../logging/actionLogger.js';
|
import type { ActionLogger } from '@sammo-ts/logic/logging/actionLogger.js';
|
||||||
import type { LogEntryDraft } from '../logging/types.js';
|
import type { LogEntryDraft } from '@sammo-ts/logic/logging/types.js';
|
||||||
import type { UnitSetDefinition } from '../world/types.js';
|
import type { UnitSetDefinition } from '@sammo-ts/logic/world/types.js';
|
||||||
import type { WarActionModule } from './actions.js';
|
import type { WarActionModule } from './actions.js';
|
||||||
import type { WarTriggerRegistry } from './triggers.js';
|
import type { WarTriggerRegistry } from './triggers.js';
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import type {
|
|||||||
Nation,
|
Nation,
|
||||||
StatBlock,
|
StatBlock,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ActionLogger } from '../logging/actionLogger.js';
|
import type { ActionLogger } from '@sammo-ts/logic/logging/actionLogger.js';
|
||||||
import { LogFormat } from '../logging/types.js';
|
import { LogFormat } from '@sammo-ts/logic/logging/types.js';
|
||||||
import { getTechAbility, getTechCost } from '../world/unitSet.js';
|
import { getTechAbility, getTechCost } from '@sammo-ts/logic/world/unitSet.js';
|
||||||
import { WarActionPipeline, type WarActionContext } from './actions.js';
|
import { WarActionPipeline, type WarActionContext } from './actions.js';
|
||||||
import type { WarEngineConfig } from './types.js';
|
import type { WarEngineConfig } from './types.js';
|
||||||
import { WarCrewType } from './crewType.js';
|
import { WarCrewType } from './crewType.js';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { TriggerValue } from '../domain/entities.js';
|
import type { TriggerValue } from '@sammo-ts/logic/domain/entities.js';
|
||||||
|
|
||||||
const DEX_LEVEL_THRESHOLDS = [
|
const DEX_LEVEL_THRESHOLDS = [
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import type {
|
|||||||
GeneralTriggerState,
|
GeneralTriggerState,
|
||||||
Nation,
|
Nation,
|
||||||
TriggerValue,
|
TriggerValue,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
ScenarioDefinition,
|
ScenarioDefinition,
|
||||||
ScenarioGeneral,
|
ScenarioGeneral,
|
||||||
} from '../scenario/types.js';
|
} from '@sammo-ts/logic/scenario/types.js';
|
||||||
import type {
|
import type {
|
||||||
CitySeed,
|
CitySeed,
|
||||||
GeneralSeed,
|
GeneralSeed,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { City, General, Nation, Troop } from '../domain/entities.js';
|
import type { City, General, Nation, Troop } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type { ScenarioConfig, ScenarioDiplomacy } from '../scenario/types.js';
|
import type { ScenarioConfig, ScenarioDiplomacy } from '@sammo-ts/logic/scenario/types.js';
|
||||||
import type { ScenarioConfigSource, WorldStateSnapshotSource } from '../ports/worldSnapshot.js';
|
import type { ScenarioConfigSource, WorldStateSnapshotSource } from '@sammo-ts/logic/ports/worldSnapshot.js';
|
||||||
import type {
|
import type {
|
||||||
MapDefinition,
|
MapDefinition,
|
||||||
ScenarioMeta,
|
ScenarioMeta,
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import type {
|
|||||||
Nation,
|
Nation,
|
||||||
StatBlock,
|
StatBlock,
|
||||||
Troop,
|
Troop,
|
||||||
} from '../domain/entities.js';
|
} from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
ScenarioConfig,
|
ScenarioConfig,
|
||||||
ScenarioDiplomacy,
|
ScenarioDiplomacy,
|
||||||
} from '../scenario/types.js';
|
} from '@sammo-ts/logic/scenario/types.js';
|
||||||
|
|
||||||
export interface ScenarioMeta {
|
export interface ScenarioMeta {
|
||||||
title: string;
|
title: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { City, General, Nation } from '../domain/entities.js';
|
import type { City, General, Nation } from '@sammo-ts/logic/domain/entities.js';
|
||||||
import type {
|
import type {
|
||||||
CrewTypeDefinition,
|
CrewTypeDefinition,
|
||||||
CrewTypeRequirement,
|
CrewTypeRequirement,
|
||||||
|
|||||||
Reference in New Issue
Block a user