Refactor command specifications to use availabilityArgs instead of args
- Updated multiple command specifications across various files to replace 'args' with 'availabilityArgs' for better clarity and consistency in argument handling. - Removed empty 'args' objects in several command specifications to streamline the code. - Ensured that all relevant commands in both general and nation action directories reflect these changes.
This commit is contained in:
@@ -50,7 +50,7 @@ interface CommandEntry {
|
||||
category: string;
|
||||
definition: GeneralActionDefinition;
|
||||
reqArg: boolean;
|
||||
args: unknown;
|
||||
availabilityArgs: Readonly<Record<string, unknown>>;
|
||||
evaluate?: (ctx: ConstraintContext, view: StateView) => AvailabilityCore;
|
||||
}
|
||||
|
||||
@@ -370,7 +370,7 @@ const buildEntries = (env: CommandEnv, specs: TurnCommandSpec[]): CommandEntry[]
|
||||
category: spec.category,
|
||||
definition,
|
||||
reqArg: spec.reqArg,
|
||||
args: spec.args,
|
||||
availabilityArgs: spec.reqArg ? spec.availabilityArgs : {},
|
||||
};
|
||||
|
||||
if (spec.key === 'che_포상') {
|
||||
@@ -401,7 +401,7 @@ const buildGroups = (entries: CommandEntry[], ctx: ConstraintContext, view: Stat
|
||||
for (const entry of entries) {
|
||||
const availability = entry.evaluate
|
||||
? entry.evaluate(ctx, view)
|
||||
: evaluateDefinition(entry.definition, ctx, view, entry.reqArg, entry.args);
|
||||
: evaluateDefinition(entry.definition, ctx, view, entry.reqArg, entry.availabilityArgs);
|
||||
const value: TurnCommandAvailability = {
|
||||
key: entry.definition.key,
|
||||
name: entry.definition.name,
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface TurnCommandSpecWithArgs<TKey extends string = string> {
|
||||
key: TKey;
|
||||
category: string;
|
||||
reqArg: true;
|
||||
args: Record<string, unknown>;
|
||||
availabilityArgs: Readonly<Record<string, unknown>>;
|
||||
argsSchema: ZodType<Record<string, unknown>>;
|
||||
createDefinition(env: TurnCommandEnv): GeneralActionDefinition;
|
||||
}
|
||||
@@ -16,7 +16,6 @@ export interface TurnCommandSpecWithoutArgs<TKey extends string = string> {
|
||||
key: TKey;
|
||||
category: string;
|
||||
reqArg: false;
|
||||
args: Record<string, unknown>;
|
||||
argsSchema?: undefined;
|
||||
createDefinition(env: TurnCommandEnv): GeneralActionDefinition;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_NPC능동',
|
||||
category: '특수', // Valid category? Legacy didn't specify category in static prop usually, handled by mapping. Defaulting to '특수'.
|
||||
reqArg: true,
|
||||
args: { optionText: '', destCityId: 0 },
|
||||
availabilityArgs: { optionText: '', destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -195,7 +195,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_강행',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -131,6 +131,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_거병',
|
||||
category: '전략',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -165,7 +165,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_건국',
|
||||
category: '전략',
|
||||
reqArg: true,
|
||||
args: {
|
||||
availabilityArgs: {
|
||||
nationName: 'string',
|
||||
nationType: 'string',
|
||||
colorType: 'number',
|
||||
|
||||
@@ -230,6 +230,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_견문',
|
||||
category: '개인',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -118,7 +118,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_군량매매',
|
||||
category: '개인',
|
||||
reqArg: true,
|
||||
args: {
|
||||
availabilityArgs: {
|
||||
buyRice: 'boolean',
|
||||
amount: 'number',
|
||||
},
|
||||
|
||||
@@ -187,6 +187,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_귀환',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_기술연구',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) =>
|
||||
new ActionDefinition({
|
||||
costGold: env.develCost,
|
||||
|
||||
@@ -65,6 +65,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_내정특기초기화',
|
||||
category: '개인',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -29,6 +29,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_농지개간',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -170,7 +170,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_단련',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) =>
|
||||
new ActionDefinition({
|
||||
develCost: env.develCost,
|
||||
|
||||
@@ -204,7 +204,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_등용',
|
||||
category: '인사',
|
||||
reqArg: true,
|
||||
args: { destGeneralId: 0 },
|
||||
availabilityArgs: { destGeneralId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -220,7 +220,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_등용수락',
|
||||
category: '인사',
|
||||
reqArg: true,
|
||||
args: {
|
||||
availabilityArgs: {
|
||||
destNationId: 'number',
|
||||
destGeneralId: 'number',
|
||||
},
|
||||
|
||||
@@ -26,7 +26,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_모병',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: {
|
||||
availabilityArgs: {
|
||||
crewType: 'number',
|
||||
amount: 'number',
|
||||
},
|
||||
|
||||
@@ -188,6 +188,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_물자조달',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -205,6 +205,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_방랑',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_사기진작',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) =>
|
||||
new ActionDefinition({
|
||||
atmosDelta: env.atmosDelta,
|
||||
|
||||
@@ -322,6 +322,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_상업투자',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? [], env),
|
||||
};
|
||||
|
||||
@@ -169,7 +169,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_선동',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -29,6 +29,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_성벽보수',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -57,6 +57,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_소집해제',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -29,6 +29,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_수비강화',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_숙련전환',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { srcArmType: 0, destArmType: 0 },
|
||||
availabilityArgs: { srcArmType: 0, destArmType: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -65,6 +65,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_요양',
|
||||
category: '개인',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -129,6 +129,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_은퇴',
|
||||
category: '개인',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -191,7 +191,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_이동',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -397,6 +397,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_인재탐색',
|
||||
category: '인사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? [], env),
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_임관',
|
||||
category: '전략',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0 },
|
||||
availabilityArgs: { destNationId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -65,6 +65,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_전투특기초기화',
|
||||
category: '개인',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -79,6 +79,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_정착장려',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -29,6 +29,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_주민선정',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -101,6 +101,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_집합',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -536,7 +536,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_징병',
|
||||
category: '내정',
|
||||
reqArg: true,
|
||||
args: {},
|
||||
availabilityArgs: {},
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? [], {}),
|
||||
};
|
||||
|
||||
@@ -166,7 +166,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_첩보',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -538,7 +538,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_출병',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.warActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -29,6 +29,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_치안강화',
|
||||
category: '내정',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition({ develCost: env.develCost }),
|
||||
};
|
||||
|
||||
@@ -239,7 +239,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_탈취',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -166,7 +166,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_파괴',
|
||||
category: '군사',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -120,6 +120,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: ACTION_KEY,
|
||||
category: '인사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_헌납',
|
||||
category: '내정',
|
||||
reqArg: true,
|
||||
args: { isGold: true, amount: 0 },
|
||||
availabilityArgs: { isGold: true, amount: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -393,7 +393,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_화계',
|
||||
category: '계략',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? [], env),
|
||||
};
|
||||
|
||||
@@ -72,7 +72,7 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: 'che_훈련',
|
||||
category: '군사',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) =>
|
||||
new ActionDefinition({
|
||||
trainDelta: env.trainDelta,
|
||||
|
||||
@@ -59,6 +59,6 @@ export const commandSpec: GeneralTurnCommandSpec = {
|
||||
key: '휴식',
|
||||
category: '개인',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -181,6 +181,6 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_감축',
|
||||
category: '국가',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_국기변경',
|
||||
category: '국가',
|
||||
reqArg: true,
|
||||
args: { colorType: 0 },
|
||||
availabilityArgs: { colorType: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -120,7 +120,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_국호변경',
|
||||
category: '국가',
|
||||
reqArg: true,
|
||||
args: { nationName: '' },
|
||||
availabilityArgs: { nationName: '' },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -228,7 +228,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_급습',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0 },
|
||||
availabilityArgs: { destNationId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_몰수',
|
||||
category: '인사',
|
||||
reqArg: true,
|
||||
args: { isGold: false, amount: 0, destGeneralID: 0 },
|
||||
availabilityArgs: { isGold: false, amount: 0, destGeneralID: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -205,6 +205,6 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_무작위수도이전',
|
||||
category: '국가',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -202,7 +202,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_물자원조',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0, amountList: [0, 0] },
|
||||
availabilityArgs: { destNationId: 0, amountList: [0, 0] },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -202,7 +202,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_발령',
|
||||
category: '인사',
|
||||
reqArg: true,
|
||||
args: { destGeneralId: 0, destCityId: 0 },
|
||||
availabilityArgs: { destGeneralId: 0, destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition({}),
|
||||
};
|
||||
|
||||
@@ -192,7 +192,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_백성동원',
|
||||
category: '전략',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -113,7 +113,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_부대탈퇴지시',
|
||||
category: '인사',
|
||||
reqArg: true,
|
||||
args: { destGeneralId: 0 },
|
||||
availabilityArgs: { destGeneralId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -138,7 +138,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_불가침제의',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0, year: 0, month: 0 },
|
||||
availabilityArgs: { destNationId: 0, year: 0, month: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -74,7 +74,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_불가침파기제의',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0 },
|
||||
availabilityArgs: { destNationId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -181,7 +181,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_선전포고',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0 },
|
||||
availabilityArgs: { destNationId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -226,7 +226,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_수몰',
|
||||
category: '전략',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -369,6 +369,6 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_의병모집',
|
||||
category: '전략',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? [], env),
|
||||
};
|
||||
|
||||
@@ -238,7 +238,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_이호경식',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0 },
|
||||
availabilityArgs: { destNationId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_종전제의',
|
||||
category: '외교',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0 },
|
||||
availabilityArgs: { destNationId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -184,6 +184,6 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_증축',
|
||||
category: '국가',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -217,7 +217,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_천도',
|
||||
category: '국가',
|
||||
reqArg: true,
|
||||
args: { destCityID: 0 },
|
||||
availabilityArgs: { destCityID: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -265,7 +265,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_초토화',
|
||||
category: '특수',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -239,7 +239,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_포상',
|
||||
category: '인사',
|
||||
reqArg: true,
|
||||
args: { isGold: true, amount: 1, destGeneralId: 0 },
|
||||
availabilityArgs: { isGold: true, amount: 1, destGeneralId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => {
|
||||
const maxAmount =
|
||||
|
||||
@@ -258,7 +258,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_피장파장',
|
||||
category: '전략',
|
||||
reqArg: true,
|
||||
args: { destNationId: 0, commandType: '' },
|
||||
availabilityArgs: { destNationId: 0, commandType: '' },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
@@ -187,6 +187,6 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_필사즉생',
|
||||
category: '전략',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -239,7 +239,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'che_허보',
|
||||
category: '전략',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0 },
|
||||
availabilityArgs: { destCityId: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env.generalActionModules ?? []),
|
||||
};
|
||||
|
||||
@@ -168,7 +168,7 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: 'cr_인구이동',
|
||||
category: '특수',
|
||||
reqArg: true,
|
||||
args: { destCityId: 0, amount: 0 },
|
||||
availabilityArgs: { destCityId: 0, amount: 0 },
|
||||
argsSchema: ARGS_SCHEMA,
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ export const createEventResearchCommand = (config: EventResearchConfig): {
|
||||
key: config.key as NationTurnCommandSpec['key'],
|
||||
category: CATEGORY,
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (env: TurnCommandEnv) => new ActionDefinition(env),
|
||||
};
|
||||
|
||||
|
||||
@@ -62,6 +62,6 @@ export const commandSpec: NationTurnCommandSpec = {
|
||||
key: '휴식',
|
||||
category: '휴식',
|
||||
reqArg: false,
|
||||
args: {},
|
||||
|
||||
createDefinition: (_env: TurnCommandEnv) => new ActionDefinition(),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user