feat: 사령부 명령 필요 턴을 표시한다
Ref처럼 여러 턴이 필요한 국가 명령의 소요 턴을 명령명 아래에 표시한다. 실행 getPreReqTurn을 기준으로 삼고 천도는 거리 기반 공식을 노출한다.
This commit is contained in:
@@ -16,14 +16,11 @@ export interface GeneralActionDefinition<
|
||||
// 커맨드 입력 단계에서 최소 조건만 평가할 때 사용한다.
|
||||
buildMinConstraints?(ctx: ConstraintContext, args: Args): Constraint[];
|
||||
buildConstraints(ctx: ConstraintContext, args: Args): Constraint[];
|
||||
formatConstraintFailure?(
|
||||
reason: string,
|
||||
ctx: ConstraintContext,
|
||||
args: Args,
|
||||
view: StateView
|
||||
): string | null;
|
||||
formatConstraintFailure?(reason: string, ctx: ConstraintContext, args: Args, view: StateView): string | null;
|
||||
// NationCommand::addTermStack()/setNextAvailable() 호환 실행 메타데이터.
|
||||
getPreReqTurn?(context: Context, args: Args): number;
|
||||
// 입력 시점에 대상이 정해져야 소요 턴을 계산할 수 있는 명령의 Ref 표시 문구.
|
||||
getTurnDurationHint?(): string;
|
||||
getPostReqTurn?(context: Context, args: Args): number;
|
||||
getStackSequence?(context: Context, args: Args): number | null;
|
||||
getProgressText?(context: Context, args: Args, term: number, termMax: number): string;
|
||||
|
||||
@@ -179,6 +179,10 @@ export class ActionDefinition<
|
||||
return (calcDistance(context.nation.capitalCityId, args.destCityID, context.map, allowedCityIds) ?? 0) * 2;
|
||||
}
|
||||
|
||||
getTurnDurationHint(): string {
|
||||
return '1+거리×2턴';
|
||||
}
|
||||
|
||||
getStackSequence(context: MoveCapitalResolveContext<TriggerState>): number {
|
||||
const value = context.nation?.meta.capset;
|
||||
return typeof value === 'number' && Number.isFinite(value) ? Math.floor(value) : 0;
|
||||
|
||||
Reference in New Issue
Block a user