NationEntity 추가 정의
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import type { CityID, NationID, NationName, NationType } from "../defs.js";
|
import type { CityID, ColorType, IntYearMonth, NationCmdType, NationID, NationLevel, NationName, NationType, RemainMonth, ReservedTurn, StaffLevel, StrategicCmd } from "../defs.js";
|
||||||
|
|
||||||
export interface INationEntity{
|
export interface INationEntity{
|
||||||
id: NationID;
|
id: NationID;
|
||||||
@@ -6,4 +6,56 @@ export interface INationEntity{
|
|||||||
type: NationType;
|
type: NationType;
|
||||||
|
|
||||||
capitalID: CityID;
|
capitalID: CityID;
|
||||||
|
color: ColorType;
|
||||||
|
|
||||||
|
level: NationLevel;
|
||||||
|
|
||||||
|
lastExecutedYearMonth: Record<
|
||||||
|
'capitalSet'
|
||||||
|
,number>;
|
||||||
|
|
||||||
|
//TODO: 이게 뭐더라
|
||||||
|
capset: IntYearMonth;
|
||||||
|
|
||||||
|
strategicCmdLimit: Record<StrategicCmd, IntYearMonth>;
|
||||||
|
|
||||||
|
//세율
|
||||||
|
taxRate: number;
|
||||||
|
//지급율
|
||||||
|
payRate: number;
|
||||||
|
|
||||||
|
gold: number;
|
||||||
|
rice: number;
|
||||||
|
|
||||||
|
blockScout: boolean;
|
||||||
|
blockWar: boolean;
|
||||||
|
|
||||||
|
//특수외교커맨드 제한
|
||||||
|
specialDiplomacyCmdLimit: IntYearMonth;
|
||||||
|
|
||||||
|
//기술력
|
||||||
|
technology: number;
|
||||||
|
|
||||||
|
//환산 국력
|
||||||
|
power: number;
|
||||||
|
|
||||||
|
//첩보 제한
|
||||||
|
spyLimit: Map<CityID, RemainMonth>;
|
||||||
|
|
||||||
|
//커맨드별 옵션
|
||||||
|
commandOption: Map<NationCmdType, Map<string, unknown>>;
|
||||||
|
|
||||||
|
lastExecutedTurn: Map<StaffLevel, ReservedTurn>;
|
||||||
|
|
||||||
|
aux: {
|
||||||
|
availableWarSettingCnt?: number;
|
||||||
|
prevIncomeGold: number;
|
||||||
|
prevIncomeRice: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO: 타입 정의
|
||||||
|
nationPolicy: Record<string, unknown>;
|
||||||
|
//TODO: 타입 정의
|
||||||
|
npcPolicy: Record<string, unknown>;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -21,6 +21,8 @@ export type RegionID = number & { zz_t?: "RegionID" };
|
|||||||
export type ServerID = number & { zz_t?: "ServerID" };
|
export type ServerID = number & { zz_t?: "ServerID" };
|
||||||
export type ScenarioID = number & { zz_t?: "ScenarioID" };
|
export type ScenarioID = number & { zz_t?: "ScenarioID" };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//TODO: 무언가의 keyof 로 바꿔야함
|
//TODO: 무언가의 keyof 로 바꿔야함
|
||||||
export type NationType = string & { zz_t?: "NationType" };
|
export type NationType = string & { zz_t?: "NationType" };
|
||||||
export type StrategicTurnType = string & { zz_t?: "StrategicTurnType" };
|
export type StrategicTurnType = string & { zz_t?: "StrategicTurnType" };
|
||||||
@@ -107,6 +109,16 @@ export const enum DiplomaticPermission {
|
|||||||
ambassador = 2,
|
ambassador = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const enum NationLevel {
|
||||||
|
방랑군 = 0,
|
||||||
|
호족 = 1,
|
||||||
|
군벌 = 2,
|
||||||
|
주자사 = 3,
|
||||||
|
주목 = 4,
|
||||||
|
공 = 5,
|
||||||
|
왕 = 6,
|
||||||
|
황제 = 7,
|
||||||
|
}
|
||||||
|
|
||||||
export const enum CityLevel {
|
export const enum CityLevel {
|
||||||
진 = 1,
|
진 = 1,
|
||||||
@@ -131,6 +143,13 @@ export const enum FrontStatus {
|
|||||||
NearEmpty = 3,
|
NearEmpty = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NationCmdType = string & { zz_t?: "NationCmdType" };
|
||||||
|
|
||||||
|
export type StrategicCmdType = string & { zz_t?: "StrategicCmdType" };
|
||||||
|
|
||||||
|
//string? const or? Enum?
|
||||||
|
export type ColorType = string & { zz_t?: "ColorType" };
|
||||||
|
|
||||||
//XXX: 기존처럼 값 하나만 유지할 것인가?
|
//XXX: 기존처럼 값 하나만 유지할 것인가?
|
||||||
export const enum CityState {
|
export const enum CityState {
|
||||||
//일반
|
//일반
|
||||||
@@ -227,4 +246,12 @@ export interface ReservedTurn {
|
|||||||
action: string;
|
action: string;
|
||||||
arg: Record<string, unknown>;
|
arg: Record<string, unknown>;
|
||||||
brief: string;
|
brief: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//특수 숫자 정의
|
||||||
|
//연 * 12 + 월
|
||||||
|
export type IntYearMonth = number & { zz_t?: "YearMonth" };
|
||||||
|
export type RemainMonth = number & { zz_t?: "RemainMonth" };
|
||||||
|
//1.0을 기준으로한 number 타입
|
||||||
|
export type Ratio = number & { zz_t?: "Ratio" };
|
||||||
|
|||||||
Reference in New Issue
Block a user