feat: add special action modules for domestic and war triggers
- Implemented '발명' and '인덕' domestic special action modules with modifiers for technology research and population management. - Added '의술' and '징병' war special action modules to enhance healing and recruitment capabilities during battles. - Created a general trigger for city healing in '의술' and integrated it with the war action pipeline. - Developed a comprehensive registry and loader for special action modules to streamline their usage in the game logic. - Enhanced test coverage for special action modules, ensuring correct application of modifiers and trigger functionalities.
This commit is contained in:
@@ -3,6 +3,13 @@ import type { RandomGenerator } from '@sammo-ts/common';
|
||||
import type { WorldStateRepository } from '../ports/world.js';
|
||||
import { TriggerCaller, type Trigger } from './core.js';
|
||||
|
||||
export interface GeneralWorldView<
|
||||
TriggerState extends GeneralTriggerState = GeneralTriggerState
|
||||
> {
|
||||
listGenerals(): General<TriggerState>[];
|
||||
listGeneralsByCity?(cityId: number): General<TriggerState>[];
|
||||
}
|
||||
|
||||
export interface GeneralActionLogSink {
|
||||
push(message: string): void;
|
||||
}
|
||||
@@ -28,6 +35,7 @@ export const createGeneralSkillActivation = <
|
||||
export interface GeneralActionContext<TriggerState extends GeneralTriggerState = GeneralTriggerState> {
|
||||
general: General<TriggerState>;
|
||||
world?: WorldStateRepository;
|
||||
worldView?: GeneralWorldView<TriggerState>;
|
||||
log?: GeneralActionLogSink;
|
||||
rng?: RandomGenerator;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user