파일 이식(0.31.1)
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
import type { ValidResponse } from "@/util/callSammoAPI";
|
||||
|
||||
export type BasicResourceAuctionBidder = {
|
||||
amount: number;
|
||||
date: string;
|
||||
generalID: number;
|
||||
generalName: string;
|
||||
};
|
||||
|
||||
export type BasicResourceAuctionInfo = {
|
||||
id: number;
|
||||
type: "buyRice" | "sellRice";
|
||||
hostGeneralID: number;
|
||||
hostName: string;
|
||||
openDate: string;
|
||||
closeDate: string;
|
||||
amount: number;
|
||||
startBidAmount: number;
|
||||
finishBidAmount: number;
|
||||
highestBid?: BasicResourceAuctionBidder;
|
||||
};
|
||||
|
||||
export type UniqueItemAuctionBidder = {
|
||||
generalName: string;
|
||||
amount: number;
|
||||
isCallerHighestBidder: boolean;
|
||||
date: string;
|
||||
};
|
||||
|
||||
export type UniqueItemAuctionInfo = {
|
||||
id: number;
|
||||
finished: boolean;
|
||||
title: string;
|
||||
target: string;
|
||||
isCallerHost: boolean;
|
||||
hostName: string;
|
||||
closeDate: string;
|
||||
remainCloseDateExtensionCnt: number;
|
||||
availableLatestBidCloseDate: string;
|
||||
};
|
||||
|
||||
export type ActiveResourceAuctionList = ValidResponse & {
|
||||
buyRice: BasicResourceAuctionInfo[];
|
||||
sellRice: BasicResourceAuctionInfo[];
|
||||
recentLogs: string[];
|
||||
generalID: number;
|
||||
};
|
||||
|
||||
export type UniqueItemAuctionList = ValidResponse & {
|
||||
list: (UniqueItemAuctionInfo & {
|
||||
highestBid: UniqueItemAuctionBidder;
|
||||
})[];
|
||||
obfuscatedName: string;
|
||||
};
|
||||
|
||||
export type UniqueItemAuctionDetail = ValidResponse & {
|
||||
auction: UniqueItemAuctionInfo;
|
||||
bidList: UniqueItemAuctionBidder[];
|
||||
obfuscatedName: string;
|
||||
remainPoint: number;
|
||||
};
|
||||
|
||||
export type OpenAuctionResponse = ValidResponse & {
|
||||
auctionID: number;
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
import type { ValidResponse } from "@/defs";
|
||||
|
||||
export type BettingListResponse = ValidResponse & {
|
||||
bettingList: Record<number, Omit<BettingInfo & { totalAmount: number }, "candidates">>;
|
||||
year: number;
|
||||
month: number;
|
||||
};
|
||||
|
||||
|
||||
export type BettingDetailResponse = ValidResponse & {
|
||||
bettingInfo: BettingInfo;
|
||||
bettingDetail: [string, number][];
|
||||
myBetting: [string, number][];
|
||||
remainPoint: number;
|
||||
year: number;
|
||||
month: number;
|
||||
};
|
||||
|
||||
export type BettingInfo = {
|
||||
id: number;
|
||||
type: 'nationBetting',
|
||||
name: string;
|
||||
finished: boolean;
|
||||
selectCnt: number;
|
||||
isExclusive?: boolean;
|
||||
reqInheritancePoint: boolean;
|
||||
openYearMonth: number;
|
||||
closeYearMonth: number;
|
||||
candidates: Record<string, SelectItem>;
|
||||
winner?: number[];
|
||||
}
|
||||
|
||||
export type SelectItem = {
|
||||
title: string;
|
||||
info?: string;
|
||||
isHtml?: boolean;
|
||||
aux?: Record<string, unknown>;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import type { TurnObj } from "@/defs";
|
||||
|
||||
export type ReservedCommandResponse = {
|
||||
result: true;
|
||||
turnTime: string;
|
||||
turnTerm: number;
|
||||
year: number;
|
||||
month: number;
|
||||
date: string;
|
||||
turn: TurnObj[];
|
||||
autorun_limit: null | number;
|
||||
};
|
||||
|
||||
export type ReserveCommandResponse = {
|
||||
result: true,
|
||||
brief: string,
|
||||
}
|
||||
|
||||
export type ReserveBulkCommandResponse = {
|
||||
result: true,
|
||||
briefList: string[],
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export type JoinArgs = {
|
||||
name: string;
|
||||
leadership: number;
|
||||
strength: number;
|
||||
intel: number;
|
||||
pic: boolean;
|
||||
character: string;
|
||||
inheritSpecial?: string;
|
||||
inheritTurntime?: number;
|
||||
inheritCity?: number;
|
||||
inheritBonusStat?: [number, number, number];
|
||||
};
|
||||
|
||||
export type GeneralLogType = 'generalHistory'|'generalAction'|'battleResult'|'battleDetail';
|
||||
|
||||
export type GetGeneralLogResponse = {
|
||||
result: true,
|
||||
reqType: GeneralLogType,
|
||||
generalID: number,
|
||||
log: Record<string, string>
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import type { CityID, CrewTypeID, GameCityDefault, GameConstType, GameUnitType, GameIActionKey, GameIActionCategory, GameIActionInfo } from "@/defs/GameObj";
|
||||
import type { diplomacyState, MapResult, SimpleNationObj } from "@/defs";
|
||||
|
||||
export interface GetConstResponse {
|
||||
result: true;
|
||||
cacheKey: string;
|
||||
data: {
|
||||
gameConst: GameConstType;
|
||||
gameUnitConst: Record<CrewTypeID, GameUnitType>;
|
||||
cityConst: Record<CityID, GameCityDefault>;
|
||||
cityConstMap: {
|
||||
region: Record<number | string, string | number>;
|
||||
level: Record<number | string, string | number>; //defs.CityLevelText
|
||||
};
|
||||
iActionInfo: Record<
|
||||
GameIActionCategory,
|
||||
Record<
|
||||
GameIActionKey,
|
||||
GameIActionInfo
|
||||
>
|
||||
>;
|
||||
iActionKeyMap: {
|
||||
availableNationType: "nationType";
|
||||
neutralNationType: "nationType";
|
||||
defaultSpecialDomestic: "specialDomestic";
|
||||
availableSpecialDomestic: "specialDomestic";
|
||||
optionalSpecialDomestic: "specialDomestic";
|
||||
defaultSpecialWar: "specialWar";
|
||||
availableSpecialWar: "specialWar";
|
||||
optionalSpecialWar: "specialWar";
|
||||
neutralPersonality: "personality";
|
||||
availablePersonality: "personality";
|
||||
optionalPersonality: "personality";
|
||||
allItems: "item";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type HistoryObj = {
|
||||
server_id: string,
|
||||
year: number;
|
||||
month: number;
|
||||
map: MapResult,
|
||||
global_history: string[],
|
||||
global_action: string[],
|
||||
nations: {
|
||||
capital: number,
|
||||
cities: string[],
|
||||
color: string,
|
||||
gennum: number,
|
||||
level: number,
|
||||
name: string,
|
||||
nation: number,
|
||||
power: number,
|
||||
type: GameIActionKey
|
||||
}[],
|
||||
}
|
||||
|
||||
export type GetHistoryResponse = {
|
||||
result: true;
|
||||
data: HistoryObj & {
|
||||
hash: string;
|
||||
//no: number,
|
||||
};
|
||||
}
|
||||
|
||||
export type GetCurrentHistoryResponse = {
|
||||
result: true;
|
||||
data: HistoryObj;
|
||||
}
|
||||
|
||||
|
||||
export type GetDiplomacyResponse = {
|
||||
result: true;
|
||||
nations: SimpleNationObj[];
|
||||
conflict: [number, Record<number, number>][];
|
||||
diplomacyList: Record<number, Record<number, diplomacyState>>;
|
||||
myNationID: number;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { ValidResponse } from "@/util/callSammoAPI";
|
||||
|
||||
export type inheritBuffType =
|
||||
| "warAvoidRatio"
|
||||
| "warCriticalRatio"
|
||||
| "warMagicTrialProb"
|
||||
| "domesticSuccessProb"
|
||||
| "domesticFailProb"
|
||||
| "warAvoidRatioOppose"
|
||||
| "warCriticalRatioOppose"
|
||||
| "warMagicTrialProbOppose";
|
||||
|
||||
export type InheritPointLogItem = {
|
||||
id: number;
|
||||
server_id: string;
|
||||
year: number;
|
||||
month: number;
|
||||
date: string;
|
||||
text: string;
|
||||
};
|
||||
|
||||
export type InheritLogResponse = ValidResponse & {
|
||||
log: InheritPointLogItem[];
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
export type LoginResponse = {
|
||||
result: true,
|
||||
nextToken: [number, string] | undefined,
|
||||
}
|
||||
|
||||
export type LoginFailed = {
|
||||
result: false,
|
||||
reqOTP: boolean,
|
||||
reason: string,
|
||||
}
|
||||
|
||||
export type LoginResponseWithKakao = LoginResponse | LoginFailed;
|
||||
|
||||
export type OTPResponse = {
|
||||
result: true,
|
||||
validUntil: string,
|
||||
} | {
|
||||
result: false,
|
||||
reset: boolean,
|
||||
reason: string,
|
||||
}
|
||||
|
||||
|
||||
export type AutoLoginNonceResponse = {
|
||||
result: true,
|
||||
loginNonce: string,
|
||||
};
|
||||
|
||||
export type AutoLoginResponse = {
|
||||
result: true,
|
||||
nextToken: [number, string] | undefined,
|
||||
}
|
||||
|
||||
export type AutoLoginFailed = {
|
||||
result: false,
|
||||
silent: boolean,
|
||||
reason: string,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { ValidResponse } from "@/defs";
|
||||
|
||||
export type UploadImageResponse = ValidResponse & {
|
||||
path: string;
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
import type { ValuesOf, TurnObj } from "@/defs";
|
||||
import type { GameObjClassKey } from "@/defs/GameObj";
|
||||
import type { ValidResponse } from "@/SammoAPI";
|
||||
|
||||
export type SetBlockWarResponse = ValidResponse & {
|
||||
availableCnt: number;
|
||||
};
|
||||
|
||||
export type GeneralListItemP0 = {
|
||||
no: number,
|
||||
name: string,
|
||||
nation: number,
|
||||
npc: number,
|
||||
injury: number,
|
||||
leadership: number,
|
||||
strength: number,
|
||||
intel: number,
|
||||
explevel: number,
|
||||
dedlevel: number,
|
||||
gold: number,
|
||||
rice: number,
|
||||
killturn: number,
|
||||
picture: string,
|
||||
imgsvr: 0 | 1,
|
||||
age: number,
|
||||
specialDomestic: GameObjClassKey,
|
||||
specialWar: GameObjClassKey,
|
||||
personal: GameObjClassKey,
|
||||
belong: number,
|
||||
connect: number,
|
||||
|
||||
officerLevel: number, //권한에따라 태수,군사,시종 노출 여부가 다름
|
||||
officerLevelText: string,
|
||||
lbonus: number,
|
||||
ownerName: string | null, //NPC 출력용에 따라 결과가 다름
|
||||
honorText: string,
|
||||
dedLevelText: string,
|
||||
bill: number,
|
||||
reservedCommand: TurnObj[] | null,
|
||||
|
||||
autorun_limit: number,
|
||||
}
|
||||
|
||||
export type GeneralListItemP1 = {
|
||||
con: number,
|
||||
specage: number,
|
||||
specage2: number,
|
||||
leadership_exp: number,
|
||||
strength_exp: number,
|
||||
intel_exp: number,
|
||||
|
||||
dex1: number,
|
||||
dex2: number,
|
||||
dex3: number,
|
||||
dex4: number,
|
||||
dex5: number,
|
||||
|
||||
city: number,
|
||||
experience: number,
|
||||
dedication: number,
|
||||
officer_level: number,
|
||||
officer_city: number,
|
||||
defence_train: number,
|
||||
troop: number,
|
||||
crewtype: GameObjClassKey,
|
||||
crew: number,
|
||||
train: number,
|
||||
atmos: number,
|
||||
turntime: string,
|
||||
recent_war: string,
|
||||
horse: GameObjClassKey,
|
||||
weapon: GameObjClassKey,
|
||||
book: GameObjClassKey,
|
||||
item: GameObjClassKey,
|
||||
|
||||
warnum: number,
|
||||
killnum: number,
|
||||
deathnum: number,
|
||||
killcrew: number,
|
||||
deathcrew: number,
|
||||
firenum: number,
|
||||
} & GeneralListItemP0;
|
||||
|
||||
export type GeneralListItemP2 = GeneralListItemP1;
|
||||
|
||||
export type RawGeneralListItem = GeneralListItemP0 | GeneralListItemP1 | GeneralListItemP2;
|
||||
|
||||
export type GeneralListItem =
|
||||
(GeneralListItemP0 & { st0: true, st1: false, st2: false, permission: 0 }) |
|
||||
(GeneralListItemP1 & { st0: true, st1: true, st2: false, permission: 1 }) |
|
||||
(GeneralListItemP2 & { st0: true, st1: true, st2: true, permission: 2 | 3 | 4 });
|
||||
|
||||
type ResponseEnv = {
|
||||
year: number,
|
||||
month: number,
|
||||
turntime: string,
|
||||
turnterm: number,
|
||||
killturn: number,
|
||||
autorun_user?: {
|
||||
limit_minutes: number,
|
||||
options: Record<string, number>,
|
||||
}
|
||||
}
|
||||
|
||||
export type RawGeneralListP0 = ValidResponse & {
|
||||
permission: 0,
|
||||
column: (keyof GeneralListItemP0)[],
|
||||
list: ValuesOf<GeneralListItemP0>[][],
|
||||
troops?: null,
|
||||
env: ResponseEnv,
|
||||
}
|
||||
|
||||
export type RawGeneralListP1 = ValidResponse & {
|
||||
permission: 1,
|
||||
column: (keyof GeneralListItemP1)[],
|
||||
list: ValuesOf<GeneralListItemP1>[][],
|
||||
troops?: null,
|
||||
env: ResponseEnv,
|
||||
}
|
||||
|
||||
export type RawGeneralListP2 = ValidResponse & {
|
||||
permission: 2 | 3 | 4,
|
||||
column: (keyof GeneralListItemP2)[],
|
||||
list: ValuesOf<GeneralListItemP2>[][],
|
||||
troops: [number, string][],
|
||||
env: ResponseEnv,
|
||||
}
|
||||
|
||||
export type GeneralListResponse = RawGeneralListP0 | RawGeneralListP1 | RawGeneralListP2;
|
||||
@@ -0,0 +1,30 @@
|
||||
import type { CommandItem, TurnObj } from "@/defs";
|
||||
|
||||
export type ChiefResponse = {
|
||||
result: true;
|
||||
lastExecute: string;
|
||||
year: number;
|
||||
month: number;
|
||||
turnTerm: number;
|
||||
date: string;
|
||||
chiefList: Record<
|
||||
number,
|
||||
{
|
||||
name: string | undefined;
|
||||
turnTime: string | undefined;
|
||||
officerLevelText: string;
|
||||
officerLevel: number;
|
||||
npcType: number;
|
||||
turn: TurnObj[];
|
||||
}
|
||||
>;
|
||||
isChief: boolean;
|
||||
autorun_limit: number;
|
||||
officerLevel: number;
|
||||
commandList: {
|
||||
category: string;
|
||||
values: CommandItem[];
|
||||
}[];
|
||||
mapName: string,
|
||||
unitSet: string,
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
import type { ValidResponse } from "@/util/callSammoAPI";
|
||||
|
||||
export type VoteInfo = {
|
||||
id: number;
|
||||
title: string;
|
||||
multipleOptions: number;
|
||||
startDate: string;
|
||||
endDate?: string;
|
||||
options: string[];
|
||||
}
|
||||
|
||||
export type VoteComment = {
|
||||
id: number;
|
||||
voteID: number;
|
||||
generalID: number;
|
||||
nationName: string;
|
||||
generalName: string;
|
||||
text: string;
|
||||
date: string;
|
||||
}
|
||||
|
||||
export type VoteListResult = ValidResponse & {
|
||||
votes: Record<string, VoteInfo>;
|
||||
}
|
||||
|
||||
export type VoteDetailResult = ValidResponse & {
|
||||
voteInfo: VoteInfo,
|
||||
votes: [number[], number][],
|
||||
comments: VoteComment[],
|
||||
myVote: null|number[],
|
||||
userCnt: number,
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
import type { CityLevel, ItemTypeKey } from ".";
|
||||
|
||||
type CSSRGBColor = string;
|
||||
|
||||
export type GameObjClassKey = string;
|
||||
export type GameIActionKey = GameObjClassKey;
|
||||
|
||||
type SpecialDomesticKey = GameIActionKey;
|
||||
type SpecialWarKey = GameIActionKey;
|
||||
type GameItemKey = GameIActionKey;
|
||||
type MapTypeKey = string;
|
||||
type UnitSetKey = string;
|
||||
type RawHTMLString = string;
|
||||
type NationTypeKey = GameIActionKey;
|
||||
type GamePersonalityKey = GameIActionKey;
|
||||
type GeneralCommandName = GameObjClassKey;
|
||||
type ChiefCommandName = GameObjClassKey;
|
||||
|
||||
/** GameConst.php */
|
||||
export type GameConstType = {
|
||||
title: string;
|
||||
banner: RawHTMLString;
|
||||
mapName: MapTypeKey;
|
||||
unitSet: UnitSetKey;
|
||||
develrate: number;
|
||||
upgradeLimit: number;
|
||||
dexLimit: number;
|
||||
defaultAtmosLow: number;
|
||||
defaultTrainLow: number;
|
||||
defaultAtmosHigh: number;
|
||||
defaultTrainHigh: number;
|
||||
maxAtmosByCommand: number;
|
||||
maxTrainByCommand: number;
|
||||
maxAtmosByWar: number;
|
||||
maxTrainByWar: number;
|
||||
trainDelta: number;
|
||||
atmosDelta: number;
|
||||
atmosSideEffectByTraining: number;
|
||||
trainSideEffectByAtmosTurn: number;
|
||||
sabotageDefaultProb: number;
|
||||
sabotageProbCoefByStat: number;
|
||||
sabotageDamageMin: number;
|
||||
sabotageDamageMax: number;
|
||||
basecolor: CSSRGBColor;
|
||||
basecolor2: CSSRGBColor;
|
||||
basecolor3: CSSRGBColor;
|
||||
basecolor4: CSSRGBColor;
|
||||
armperphase: number;
|
||||
basegold: number;
|
||||
baserice: number;
|
||||
minNationalGold: number;
|
||||
minNationalRice: number;
|
||||
exchangeFee: number;
|
||||
adultAge: number;
|
||||
minPushHallAge: number;
|
||||
maxDedLevel: number;
|
||||
maxTechLevel: number;
|
||||
maxBetrayCnt: number;
|
||||
|
||||
basePopIncreaseAmount: number;
|
||||
expandCityPopIncreaseAmount: number;
|
||||
expandCityDevelIncreaseAmount: number;
|
||||
expandCityWallIncreaseAmount: number;
|
||||
expandCityDefaultCost: number;
|
||||
expandCityCostCoef: number;
|
||||
minAvailableRecruitPop: number;
|
||||
initialNationGenLimitForRandInit: number;
|
||||
initialNationGenLimit: number;
|
||||
|
||||
defaultMaxGeneral: number;
|
||||
defaultMaxNation: number;
|
||||
defaultMaxGenius: number;
|
||||
defaultStartYear: number;
|
||||
|
||||
joinRuinedNPCProp: number;
|
||||
|
||||
defaultGold: number;
|
||||
defaultRice: number;
|
||||
|
||||
coefAidAmount: number;
|
||||
|
||||
maxResourceActionAmount: number;
|
||||
resourceActionAmountGuide: number[];
|
||||
|
||||
generalMinimumGold: number;
|
||||
generalMinimumRice: number;
|
||||
|
||||
maxTurn: number;
|
||||
maxChiefTurn: number;
|
||||
|
||||
statGradeLevel: number;
|
||||
|
||||
openingPartYear: number;
|
||||
joinActionLimit: number;
|
||||
|
||||
bornMinStatBonus: number;
|
||||
bornMaxStatBonus: number;
|
||||
|
||||
availableNationType: NationTypeKey[];
|
||||
neutralNationType: NationTypeKey;
|
||||
|
||||
defaultSpecialDomestic: SpecialDomesticKey;
|
||||
availableSpecialDomestic: SpecialDomesticKey[];
|
||||
optionalSpecialDomestic: SpecialDomesticKey[];
|
||||
|
||||
defaultSpecialWar: SpecialWarKey;
|
||||
availableSpecialWar: SpecialWarKey[];
|
||||
optionalSpecialWar: SpecialWarKey[];
|
||||
|
||||
neutralPersonality: GamePersonalityKey;
|
||||
availablePersonality: GamePersonalityKey[];
|
||||
optionalPersonality: GamePersonalityKey[];
|
||||
|
||||
maxUniqueItemLimit: [number, number][];
|
||||
|
||||
maxAvailableWarSettingCnt: number;
|
||||
incAvailableWarSettingCnt: number;
|
||||
|
||||
minMonthToAllowInheritItem: number;
|
||||
inheritBornSpecialPoint: number;
|
||||
inheritBornTurntimePoint: number;
|
||||
inheritBornCityPoint: number;
|
||||
inheritBornStatPoint: number;
|
||||
inheritItemUniqueMinPoint: number;
|
||||
inheritItemRandomPoint: number;
|
||||
inheritBuffPoints: number[];
|
||||
inheritSpecificSpecialPoint: number;
|
||||
inheritResetAttrPointBase: number[];
|
||||
|
||||
allItems: Record<ItemTypeKey, Record<GameItemKey, number>>;
|
||||
|
||||
availableGeneralCommand: Record<string, GeneralCommandName[]>;
|
||||
availableChiefCommand: Record<string, ChiefCommandName[]>;
|
||||
|
||||
retirementYear: number;
|
||||
|
||||
targetGeneralPool: GameObjClassKey;
|
||||
generalPoolAllowOption: string[];
|
||||
|
||||
randGenFirstName: string[];
|
||||
randGenMiddleName: string[];
|
||||
randGenLastName: string[];
|
||||
|
||||
npcBanMessageProb: number;
|
||||
npcSeizureMessageProb: number;
|
||||
npcMessageFreqByDay: number;
|
||||
|
||||
/**
|
||||
* Scenario::getGameConf
|
||||
*/
|
||||
|
||||
defaultStatTotal: number;
|
||||
defaultStatMin: number;
|
||||
defaultStatMax: number;
|
||||
defaultStatNPCTotal: number;
|
||||
defaultStatNPCMax: number;
|
||||
defaultStatNPCMin: number;
|
||||
chiefStatMin: number;
|
||||
|
||||
};
|
||||
|
||||
export type CrewTypeID = number;
|
||||
export type ArmTypeID = 0 | 1 | 2 | 3 | 4 | 5;
|
||||
|
||||
export type MapRegionID = number;
|
||||
export type CityID = number;
|
||||
|
||||
export type GameUnitType = {
|
||||
id: CrewTypeID;
|
||||
armType: ArmTypeID;
|
||||
name: string;
|
||||
attack: number;
|
||||
defence: number;
|
||||
speed: number;
|
||||
avoid: number;
|
||||
magicCoef: number;
|
||||
cost: number;
|
||||
rice: number;
|
||||
reqTech: number;
|
||||
reqCities: CityID[] | null;
|
||||
reqRegions: MapRegionID[] | null;
|
||||
reqYear: number;
|
||||
attackCoef: Record<CrewTypeID | ArmTypeID, number> | null | [];
|
||||
defenceCoef: Record<CrewTypeID | ArmTypeID, number> | null | [];
|
||||
info: string | string[];
|
||||
initSkillTrigger: GameObjClassKey[] | null;
|
||||
phaseSkillTrigger: GameObjClassKey[] | null;
|
||||
};
|
||||
|
||||
export type GameCityDefault = {
|
||||
id: CityID;
|
||||
name: string;
|
||||
level: CityLevel;
|
||||
population: number;
|
||||
agriculture: number;
|
||||
commerce: number;
|
||||
security: number;
|
||||
defence: number;
|
||||
wall: number;
|
||||
region: number;
|
||||
posX: number;
|
||||
posY: number;
|
||||
path: Record<CityID, string>;
|
||||
};
|
||||
|
||||
export type GameIActionCategory = "nationType" | "specialDomestic" | "specialWar" | "personality" | "item" | "crewtype";
|
||||
|
||||
export type GameIActionInfo = {
|
||||
value: string;
|
||||
name: string;
|
||||
info?: string | null;
|
||||
}
|
||||
@@ -0,0 +1,635 @@
|
||||
import type { ColumnState } from "ag-grid-community";
|
||||
|
||||
export type GridDisplaySetting = {
|
||||
column: ColumnState[];
|
||||
columnGroup: {
|
||||
groupId: string;
|
||||
open: boolean;
|
||||
}[];
|
||||
};
|
||||
export const defaultDisplaySetting: Record<"war" | "normal", GridDisplaySetting> = {
|
||||
war: {
|
||||
column: [
|
||||
{
|
||||
colId: "icon",
|
||||
width: 80,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "name",
|
||||
width: 126,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "stat_1",
|
||||
width: 88,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "troop",
|
||||
width: 90,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "leadership",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "strength",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "intel",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "officerLevel",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "expDedLv_1",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "explevel",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "dedlevel",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "goldRice_1",
|
||||
width: 80,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "gold",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "rice",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "city",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "crewtypeAndCrew_1",
|
||||
width: 80,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "crewtype",
|
||||
width: 80,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "crew",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "trainAtmos_1",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "train",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "atmos",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "defence_train",
|
||||
width: 50,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "specials_1",
|
||||
width: 80,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "personal",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "specialDomestic",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "specialWar",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "reservedCommandShort_1",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "reservedCommand",
|
||||
width: 120,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "turntime",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: "asc",
|
||||
sortIndex: 0,
|
||||
},
|
||||
{
|
||||
colId: "recent_war",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "years_1",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "age",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "belong",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killturnAndConnect_1",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killturn",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "connect",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "warResults_1",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "warnum",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killnum",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killcrew",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
],
|
||||
columnGroup: [
|
||||
{
|
||||
groupId: "0",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "1",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "stat",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "2",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "expDedLv",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "goldRice",
|
||||
open: true,
|
||||
},
|
||||
{
|
||||
groupId: "3",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "4",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "crewtypeAndCrew",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "trainAtmos",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "specials",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "reservedCommandShort",
|
||||
open: true,
|
||||
},
|
||||
{
|
||||
groupId: "5",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "6",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "years",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "killturnAndConnect",
|
||||
open: true,
|
||||
},
|
||||
{
|
||||
groupId: "warResults",
|
||||
open: false
|
||||
},
|
||||
],
|
||||
},
|
||||
normal: {
|
||||
column: [
|
||||
{
|
||||
colId: "icon",
|
||||
width: 80,
|
||||
hide: false,
|
||||
pinned: "left",
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "name",
|
||||
width: 126,
|
||||
hide: false,
|
||||
pinned: "left",
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "officerLevel",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "expDedLv_1",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "dedlevel",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "explevel",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "stat_1",
|
||||
width: 88,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "leadership",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "strength",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "intel",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "troop",
|
||||
width: 90,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "goldRice_1",
|
||||
width: 80,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "gold",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "rice",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "city",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "crewtypeAndCrew_1",
|
||||
width: 80,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "crewtype",
|
||||
width: 80,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "crew",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "trainAtmos_1",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "train",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "atmos",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "defence_train",
|
||||
width: 50,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "specials_1",
|
||||
width: 80,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "personal",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "specialDomestic",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "specialWar",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "reservedCommandShort_1",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "reservedCommand",
|
||||
width: 120,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "turntime",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "recent_war",
|
||||
width: 60,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "years_1",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "age",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "belong",
|
||||
width: 60,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killturnAndConnect_1",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killturn",
|
||||
width: 70,
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "connect",
|
||||
width: 70,
|
||||
hide: false,
|
||||
sort: "desc",
|
||||
sortIndex: 0,
|
||||
},
|
||||
{
|
||||
colId: "warResults_1",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "warnum",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killnum",
|
||||
hide: true,
|
||||
sort: null,
|
||||
},
|
||||
{
|
||||
colId: "killcrew",
|
||||
hide: true,
|
||||
sort: null,
|
||||
}
|
||||
],
|
||||
columnGroup: [
|
||||
{
|
||||
groupId: "0",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "1",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "stat",
|
||||
open: true
|
||||
},
|
||||
{
|
||||
groupId: "2",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "expDedLv",
|
||||
open: true
|
||||
},
|
||||
{
|
||||
groupId: "goldRice",
|
||||
open: true
|
||||
},
|
||||
{
|
||||
groupId: "3",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "4",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "crewtypeAndCrew",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "trainAtmos",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "specials",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "reservedCommandShort",
|
||||
open: true
|
||||
},
|
||||
{
|
||||
groupId: "5",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "6",
|
||||
open: false,
|
||||
},
|
||||
{
|
||||
groupId: "years",
|
||||
open: false
|
||||
},
|
||||
{
|
||||
groupId: "killturnAndConnect",
|
||||
open: true
|
||||
},
|
||||
{
|
||||
groupId: "warResults",
|
||||
open: false
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,267 @@
|
||||
import type { Args } from "@/processing/args";
|
||||
import type { ValidResponse, InvalidResponse } from "@/util/callSammoAPI";
|
||||
import type { GameIActionKey, GameObjClassKey } from "./GameObj";
|
||||
|
||||
export type { ValidResponse, InvalidResponse };
|
||||
export type BasicGeneralListResponse = {
|
||||
result: true,
|
||||
nationID: number,
|
||||
generalID: number,
|
||||
column: ['no', 'name', 'npc'],
|
||||
list: Record<string, [number, string, number][]>,
|
||||
nation: Record<string, {
|
||||
nation: number,
|
||||
name: string,
|
||||
color: string,
|
||||
}>
|
||||
}
|
||||
|
||||
|
||||
export type PublicGeneralItem = {
|
||||
no: number,
|
||||
picture: string,
|
||||
imgsvr: 0 | 1,
|
||||
npc: number,
|
||||
age: number,
|
||||
nation: string,
|
||||
specialDomestic: GameObjClassKey,
|
||||
specialWar: GameObjClassKey,
|
||||
personal: GameObjClassKey,
|
||||
name: string,
|
||||
ownerName: string | null,
|
||||
injury: number,
|
||||
leadership: number,
|
||||
lbonus: number,
|
||||
strength: number,
|
||||
intel: number,
|
||||
explevel: number,
|
||||
experienceStr: string,
|
||||
dedicationStr: string,
|
||||
officerLevelStr: string,
|
||||
killturn: number,
|
||||
connect: number,
|
||||
}
|
||||
|
||||
|
||||
export type GeneralListResponse = {
|
||||
result: true,
|
||||
list: [
|
||||
PublicGeneralItem['no'],
|
||||
PublicGeneralItem['picture'], PublicGeneralItem['imgsvr'],
|
||||
PublicGeneralItem['npc'], PublicGeneralItem['age'], PublicGeneralItem['nation'],
|
||||
PublicGeneralItem['specialDomestic'], PublicGeneralItem['specialWar'], PublicGeneralItem['personal'],
|
||||
PublicGeneralItem['name'], PublicGeneralItem['ownerName'],
|
||||
PublicGeneralItem['injury'],
|
||||
PublicGeneralItem['leadership'], PublicGeneralItem['lbonus'], PublicGeneralItem['strength'], PublicGeneralItem['intel'],
|
||||
PublicGeneralItem['explevel'],
|
||||
PublicGeneralItem['experienceStr'], PublicGeneralItem['dedicationStr'], PublicGeneralItem['officerLevelStr'],
|
||||
PublicGeneralItem['killturn'], PublicGeneralItem['connect']
|
||||
][],
|
||||
token?: Record<number, number>,
|
||||
}
|
||||
|
||||
export type NationLevel = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
||||
export const NationLevelText: Record<NationLevel, string> = {
|
||||
0: '방랑군',
|
||||
1: '호족',
|
||||
2: '군벌',
|
||||
3: '주자사',
|
||||
4: '주목',
|
||||
5: '공',
|
||||
6: '왕',
|
||||
7: '황제',
|
||||
}
|
||||
|
||||
export type CityLevel = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
||||
export const CityLevelText: Record<CityLevel, string> = {
|
||||
1: '수',
|
||||
2: '진',
|
||||
3: '관',
|
||||
4: '이',
|
||||
5: '소',
|
||||
6: '중',
|
||||
7: '대',
|
||||
8: '특'
|
||||
}
|
||||
|
||||
export type NationStaticItem = {
|
||||
nation: number,
|
||||
name: string,
|
||||
color: string,
|
||||
type: string,
|
||||
level: NationLevel,
|
||||
capital: number,
|
||||
gennum: number,
|
||||
power: number,
|
||||
}
|
||||
|
||||
export type NPCGeneralActions =
|
||||
'NPC사망대비' |
|
||||
'귀환' |
|
||||
'금쌀구매' |
|
||||
'출병' |
|
||||
'긴급내정' |
|
||||
'전투준비' |
|
||||
'전방워프' |
|
||||
//'NPC증여'|
|
||||
'NPC헌납' |
|
||||
'징병' |
|
||||
'후방워프' |
|
||||
'전쟁내정' |
|
||||
'소집해제' |
|
||||
'일반내정' |
|
||||
'내정워프';
|
||||
|
||||
export type NPCChiefActions =
|
||||
'불가침제의' |
|
||||
'선전포고' |
|
||||
'천도' |
|
||||
'유저장긴급포상' |
|
||||
'부대전방발령' |
|
||||
'유저장구출발령' |
|
||||
'유저장후방발령' |
|
||||
'부대유저장후방발령' |
|
||||
'유저장전방발령' |
|
||||
'유저장포상' |
|
||||
//'유저장몰수'|
|
||||
'부대구출발령' |
|
||||
'부대후방발령' |
|
||||
'NPC긴급포상' |
|
||||
'NPC구출발령' |
|
||||
'NPC후방발령' |
|
||||
'NPC포상' |
|
||||
'NPC전방발령' |
|
||||
'유저장내정발령' |
|
||||
'NPC내정발령' |
|
||||
'NPC몰수';
|
||||
|
||||
export type NationPolicy = {
|
||||
reqNationGold: number,
|
||||
reqNationRice: number,
|
||||
CombatForce: Record<number, number[]>,
|
||||
SupportForce: number[],
|
||||
DevelopForce: number[],
|
||||
reqHumanWarUrgentGold: number,
|
||||
reqHumanWarUrgentRice: number,
|
||||
reqHumanWarRecommandGold: number,
|
||||
reqHumanWarRecommandRice: number,
|
||||
reqHumanDevelGold: number,
|
||||
reqHumanDevelRice: number,
|
||||
reqNPCWarGold: number,
|
||||
reqNPCWarRice: number,
|
||||
reqNPCDevelGold: number,
|
||||
reqNPCDevelRice: number,
|
||||
minimumResourceActionAmount: number,
|
||||
maximumResourceActionAmount: number,
|
||||
minNPCWarLeadership: number,
|
||||
minWarCrew: number,
|
||||
minNPCRecruitCityPopulation: number,
|
||||
safeRecruitCityPopulationRatio: number,
|
||||
properWarTrainAtmos: number,
|
||||
}
|
||||
|
||||
export type ItemTypeKey = 'horse' | 'weapon' | 'book' | 'item';
|
||||
export const ItemTypeNameMap: Record<ItemTypeKey, string> = {
|
||||
horse: '명마',
|
||||
weapon: '무기',
|
||||
book: '서적',
|
||||
item: '도구',
|
||||
}
|
||||
|
||||
export declare type Colors = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light';
|
||||
|
||||
export type IDItem<T> = {
|
||||
id: T;
|
||||
};
|
||||
|
||||
export type ToastType = {
|
||||
content: {
|
||||
title?: string,
|
||||
body?: string,
|
||||
},
|
||||
options?: {
|
||||
variant?: Colors,
|
||||
delay?: number,
|
||||
}
|
||||
}
|
||||
|
||||
export const keyScreenMode = 'sam.screenMode';
|
||||
export type ScreenModeType = 'auto' | '500px' | '1000px';
|
||||
|
||||
export declare type ValuesOf<T> = T[keyof T];
|
||||
|
||||
export const NoneValue = 'None' as const;
|
||||
|
||||
export type Optional<Type> = {
|
||||
[Property in keyof Type]+?: Type[Property];
|
||||
};
|
||||
|
||||
export type OptionalFull<Type> = {
|
||||
[Property in keyof Type]: Type[Property] | undefined;
|
||||
};
|
||||
|
||||
export type TurnObj = {
|
||||
action: string;
|
||||
brief: string;
|
||||
arg: Args;
|
||||
};
|
||||
|
||||
|
||||
export type CommandItem = {
|
||||
value: string;
|
||||
title: string;
|
||||
info: string,
|
||||
compensation: number;
|
||||
simpleName: string;
|
||||
possible: boolean;
|
||||
reqArg: boolean;
|
||||
searchText?: string;
|
||||
};
|
||||
|
||||
type diplomacyInfo = {
|
||||
name: string,
|
||||
color?: string,
|
||||
}
|
||||
export type diplomacyState = 0 | 1 | 2 | 7;
|
||||
export const diplomacyStateInfo: Record<diplomacyState, diplomacyInfo> = {
|
||||
0: { name: '교전', color: 'red' },
|
||||
1: { name: '선포중', color: 'magenta' },
|
||||
2: { name: '통상' },
|
||||
7: { name: '불가침', color: 'green' },
|
||||
}
|
||||
|
||||
export const CURRENT_MAP_VERSION = 0 as const;
|
||||
|
||||
//Map
|
||||
type MapCityCompact = [number, number, number, number, number, number];
|
||||
type MapNationCompact = [number, string, string, number];
|
||||
export type MapResult = {
|
||||
result: true,
|
||||
version?: typeof CURRENT_MAP_VERSION,
|
||||
startYear: number,
|
||||
year: number,
|
||||
month: number,
|
||||
cityList: MapCityCompact[],
|
||||
nationList: MapNationCompact[],
|
||||
spyList: Record<number, number>,
|
||||
shownByGeneralList: number[],
|
||||
myCity?: number,
|
||||
myNation?: number,
|
||||
}
|
||||
|
||||
export type CachedMapResult = MapResult & {
|
||||
theme?: string,
|
||||
history?: string[],
|
||||
}
|
||||
|
||||
export type SimpleNationObj = {
|
||||
capital: number,
|
||||
cities: string[],
|
||||
color: string,
|
||||
gennum: number,
|
||||
level: number,
|
||||
name: string,
|
||||
nation: number,
|
||||
power: number,
|
||||
type: GameIActionKey
|
||||
}
|
||||
Reference in New Issue
Block a user