fleethub-core 1.8.7 → 1.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ */
5
+ export function set_panic_hook(): void;
3
6
  /**
4
7
  * @param {ShipConditions} value
5
8
  * @returns {ShipConditions}
6
9
  */
7
10
  export function parse_ship_conditions(value: ShipConditions): ShipConditions;
8
- /**
9
- */
10
- export function set_panic_hook(): void;
11
- declare namespace Side {
12
- export type Player = "Player";
13
- export type Enemy = "Enemy";
14
- }
15
-
16
- export type Side = Side.Player | Side.Enemy;
17
-
18
- export interface ShipConditions extends ShipPosition {
19
- formation?: Formation;
20
- }
21
-
22
- declare namespace Role {
23
- export type Main = "Main";
24
- export type Escort = "Escort";
25
- }
26
-
27
- export type Role = Role.Main | Role.Escort;
11
+ export type Side = "Player" | "Enemy";
28
12
 
29
13
  export interface ShipPosition {
30
14
  org_type?: OrgType;
@@ -33,18 +17,22 @@ export interface ShipPosition {
33
17
  index?: number;
34
18
  }
35
19
 
36
- declare namespace Engagement {
37
- export type GreenT = "GreenT";
38
- export type Parallel = "Parallel";
39
- export type HeadOn = "HeadOn";
40
- export type RedT = "RedT";
20
+ export interface CompMeta {
21
+ fleets: Record<FleetType, FleetMeta>;
22
+ }
23
+
24
+ export interface FleetMeta {
25
+ id: string;
26
+ len: number;
27
+ ships: [string, ShipMeta | null][];
28
+ }
29
+
30
+ export interface ShipMeta {
31
+ id: string;
32
+ ship_id: number;
41
33
  }
42
34
 
43
- export type Engagement =
44
- | Engagement.GreenT
45
- | Engagement.Parallel
46
- | Engagement.HeadOn
47
- | Engagement.RedT;
35
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
48
36
 
49
37
  export interface BattleDefinitions {
50
38
  formation: Record<Formation, NestedFormationDef>;
@@ -77,18 +65,9 @@ export interface AntiAirCutinDef {
77
65
  sequential: boolean | null;
78
66
  }
79
67
 
80
- type __NestedFormationDefFormationDef = FormationDef;
81
- declare namespace NestedFormationDef {
82
- export type Normal = __NestedFormationDefFormationDef;
83
- export type Vanguard = {
84
- top_half: __NestedFormationDefFormationDef;
85
- bottom_half: __NestedFormationDefFormationDef;
86
- };
87
- }
88
-
89
68
  export type NestedFormationDef =
90
- | NestedFormationDef.Normal
91
- | NestedFormationDef.Vanguard;
69
+ | FormationDef
70
+ | { top_half: FormationDef; bottom_half: FormationDef };
92
71
 
93
72
  export interface FormationDef {
94
73
  tag: Formation;
@@ -107,506 +86,407 @@ export interface FormationCombatModifiersDef {
107
86
  evasion_mod?: number;
108
87
  }
109
88
 
110
- export interface ShipAnalyzerConfig {
111
- air_state?: AirState;
112
- engagement?: Engagement;
113
- left?: AttackAnalyzerShipConfig;
114
- right?: AttackAnalyzerShipConfig;
115
- }
89
+ export type CompiledEvaler = string;
116
90
 
117
- declare namespace SpecialEnemyType {
118
- export type None = "None";
119
- export type SoftSkinned = "SoftSkinned";
120
- export type Pillbox = "Pillbox";
121
- export type IsolatedIsland = "IsolatedIsland";
122
- export type SupplyDepot = "SupplyDepot";
123
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
124
- export type PtImp = "PtImp";
125
- export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
126
- export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
91
+ export interface OrgState {
92
+ id?: string;
93
+ f1?: FleetState;
94
+ f2?: FleetState;
95
+ f3?: FleetState;
96
+ f4?: FleetState;
97
+ a1?: AirSquadronState;
98
+ a2?: AirSquadronState;
99
+ a3?: AirSquadronState;
100
+ hq_level?: number;
101
+ org_type?: OrgType;
102
+ sortie?: FleetKey;
103
+ route_sup?: FleetKey;
104
+ boss_sup?: FleetKey;
127
105
  }
128
106
 
129
- export type SpecialEnemyType =
130
- | SpecialEnemyType.None
131
- | SpecialEnemyType.SoftSkinned
132
- | SpecialEnemyType.Pillbox
133
- | SpecialEnemyType.IsolatedIsland
134
- | SpecialEnemyType.SupplyDepot
135
- | SpecialEnemyType.HarbourSummerPrincess
136
- | SpecialEnemyType.PtImp
137
- | SpecialEnemyType.BattleshipSummerPrincess
138
- | SpecialEnemyType.HeavyCruiserSummerPrincess;
139
-
140
- declare namespace MoraleState {
141
- export type Sparkle = "Sparkle";
142
- export type Normal = "Normal";
143
- export type Orange = "Orange";
144
- export type Red = "Red";
145
- }
146
-
147
- export type MoraleState =
148
- | MoraleState.Sparkle
149
- | MoraleState.Normal
150
- | MoraleState.Orange
151
- | MoraleState.Red;
152
-
153
- type __NightCutinLikeFleetCutin = FleetCutin;
154
- type __NightCutinLikeNightCutin = NightCutin;
155
- declare namespace NightCutinLike {
156
- export type NightCutin = __NightCutinLikeNightCutin;
157
- export type FleetCutin = __NightCutinLikeFleetCutin;
158
- }
159
-
160
- export type NightCutinLike =
161
- | NightCutinLike.NightCutin
162
- | NightCutinLike.FleetCutin;
163
-
164
- type __DayCutinLikeDayCutin = DayCutin;
165
- type __DayCutinLikeFleetCutin = FleetCutin;
166
- declare namespace DayCutinLike {
167
- export type DayCutin = __DayCutinLikeDayCutin;
168
- export type FleetCutin = __DayCutinLikeFleetCutin;
169
- }
170
-
171
- export type DayCutinLike = DayCutinLike.DayCutin | DayCutinLike.FleetCutin;
172
-
173
- declare namespace FleetCutin {
174
- export type NelsonTouch = "NelsonTouch";
175
- export type NagatoClassCutin = "NagatoClassCutin";
176
- export type ColoradoClassCutin = "ColoradoClassCutin";
177
- export type KongouClassCutin = "KongouClassCutin";
178
- export type Yamato2ShipCutin = "Yamato2ShipCutin";
179
- export type Yamato3ShipCutin = "Yamato3ShipCutin";
107
+ export interface AirSquadronState extends GearVecState, SlotSizeVecState {
108
+ id?: string;
109
+ mode?: AirSquadronMode;
180
110
  }
181
111
 
182
- export type FleetCutin =
183
- | FleetCutin.NelsonTouch
184
- | FleetCutin.NagatoClassCutin
185
- | FleetCutin.ColoradoClassCutin
186
- | FleetCutin.KongouClassCutin
187
- | FleetCutin.Yamato2ShipCutin
188
- | FleetCutin.Yamato3ShipCutin;
189
-
190
- declare namespace NightCutin {
191
- export type MainTorpRadar = "MainTorpRadar";
192
- export type TorpLookoutRadar = "TorpLookoutRadar";
193
- export type TorpTsloTorp = "TorpTsloTorp";
194
- export type TorpTsloDrum = "TorpTsloDrum";
195
- export type DoubleAttack = "DoubleAttack";
196
- export type TorpTorpMain = "TorpTorpMain";
197
- export type TorpTorpTorp = "TorpTorpTorp";
198
- export type MainMainSec = "MainMainSec";
199
- export type MainMainMain = "MainMainMain";
200
- export type SubTorpTorp = "SubTorpTorp";
201
- export type SubRadarTorp = "SubRadarTorp";
202
- export type Cvci1_25 = "Cvci1_25";
203
- export type Cvci1_20 = "Cvci1_20";
204
- export type Cvci1_18 = "Cvci1_18";
205
- export type Photobomber = "Photobomber";
206
- }
112
+ export type AirSquadronMode = "Sortie" | "AirDefense";
207
113
 
208
- export type NightCutin =
209
- | NightCutin.MainTorpRadar
210
- | NightCutin.TorpLookoutRadar
211
- | NightCutin.TorpTsloTorp
212
- | NightCutin.TorpTsloDrum
213
- | NightCutin.DoubleAttack
214
- | NightCutin.TorpTorpMain
215
- | NightCutin.TorpTorpTorp
216
- | NightCutin.MainMainSec
217
- | NightCutin.MainMainMain
218
- | NightCutin.SubTorpTorp
219
- | NightCutin.SubRadarTorp
220
- | NightCutin.Cvci1_25
221
- | NightCutin.Cvci1_20
222
- | NightCutin.Cvci1_18
223
- | NightCutin.Photobomber;
224
-
225
- declare namespace DayCutin {
226
- export type Zuiun = "Zuiun";
227
- export type AirSea = "AirSea";
228
- export type MainMain = "MainMain";
229
- export type MainAp = "MainAp";
230
- export type MainRadar = "MainRadar";
231
- export type MainSec = "MainSec";
232
- export type DoubleAttack = "DoubleAttack";
233
- export type FBA = "FBA";
234
- export type BBA = "BBA";
235
- export type BA = "BA";
114
+ export interface FleetState {
115
+ id?: string;
116
+ len?: number;
117
+ s1?: ShipState;
118
+ s2?: ShipState;
119
+ s3?: ShipState;
120
+ s4?: ShipState;
121
+ s5?: ShipState;
122
+ s6?: ShipState;
123
+ s7?: ShipState;
236
124
  }
237
125
 
238
- export type DayCutin =
239
- | DayCutin.Zuiun
240
- | DayCutin.AirSea
241
- | DayCutin.MainMain
242
- | DayCutin.MainAp
243
- | DayCutin.MainRadar
244
- | DayCutin.MainSec
245
- | DayCutin.DoubleAttack
246
- | DayCutin.FBA
247
- | DayCutin.BBA
248
- | DayCutin.BA;
249
-
250
- declare namespace ContactRank {
251
- export type Rank1 = "Rank1";
252
- export type Rank2 = "Rank2";
253
- export type Rank3 = "Rank3";
254
- }
255
-
256
- export type ContactRank =
257
- | ContactRank.Rank1
258
- | ContactRank.Rank2
259
- | ContactRank.Rank3;
260
-
261
- declare namespace AirWaveType {
262
- export type Jet = "Jet";
263
- export type LandBase = "LandBase";
264
- export type Carrier = "Carrier";
265
- }
266
-
267
- export type AirWaveType =
268
- | AirWaveType.Jet
269
- | AirWaveType.LandBase
270
- | AirWaveType.Carrier;
271
-
272
- export interface SimulatorResult {
273
- items: SimulatorResultItem[];
274
- sunk_vec: [number, number, number][];
126
+ export interface ShipState extends GearVecState, SlotSizeVecState {
127
+ id?: string;
128
+ ship_id: number;
129
+ level?: number;
130
+ current_hp?: number;
131
+ morale?: number;
132
+ ammo?: number;
133
+ fuel?: number;
134
+ max_hp_mod?: number;
135
+ firepower_mod?: number;
136
+ torpedo_mod?: number;
137
+ armor_mod?: number;
138
+ anti_air_mod?: number;
139
+ evasion_mod?: number;
140
+ asw_mod?: number;
141
+ los_mod?: number;
142
+ luck_mod?: number;
143
+ day_gunfit_accuracy?: number;
144
+ night_gunfit_accuracy?: number;
145
+ custom_power_mods?: CustomPowerModifiers;
275
146
  }
276
147
 
277
- export interface SimulatorResultItem {
278
- id: string;
279
- fleet_type: FleetType;
280
- index: number;
281
- damage_state_map: Record<DamageState, number>;
148
+ export interface SlotSizeVecState {
149
+ ss1?: number;
150
+ ss2?: number;
151
+ ss3?: number;
152
+ ss4?: number;
153
+ ss5?: number;
282
154
  }
283
155
 
284
- declare namespace GearCategory {
285
- export type Fighter = "Fighter";
286
- export type Bomber = "Bomber";
287
- export type Recon = "Recon";
288
- export type MainGun = "MainGun";
289
- export type Secondary = "Secondary";
290
- export type Torpedo = "Torpedo";
291
- export type AntiSub = "AntiSub";
292
- export type Radar = "Radar";
293
- export type Landing = "Landing";
294
- export type Ration = "Ration";
295
- export type LandBased = "LandBased";
296
- export type Misc = "Misc";
156
+ export interface GearVecState {
157
+ g1?: GearState;
158
+ g2?: GearState;
159
+ g3?: GearState;
160
+ g4?: GearState;
161
+ g5?: GearState;
162
+ gx?: GearState;
297
163
  }
298
164
 
299
- export type GearCategory =
300
- | GearCategory.Fighter
301
- | GearCategory.Bomber
302
- | GearCategory.Recon
303
- | GearCategory.MainGun
304
- | GearCategory.Secondary
305
- | GearCategory.Torpedo
306
- | GearCategory.AntiSub
307
- | GearCategory.Radar
308
- | GearCategory.Landing
309
- | GearCategory.Ration
310
- | GearCategory.LandBased
311
- | GearCategory.Misc;
312
-
313
- declare namespace GearType {
314
- export type Unknown = "Unknown";
315
- export type SmallMainGun = "SmallMainGun";
316
- export type MediumMainGun = "MediumMainGun";
317
- export type LargeMainGun = "LargeMainGun";
318
- export type SecondaryGun = "SecondaryGun";
319
- export type Torpedo = "Torpedo";
320
- export type CbFighter = "CbFighter";
321
- export type CbDiveBomber = "CbDiveBomber";
322
- export type CbTorpedoBomber = "CbTorpedoBomber";
323
- export type CbRecon = "CbRecon";
324
- export type ReconSeaplane = "ReconSeaplane";
325
- export type SeaplaneBomber = "SeaplaneBomber";
326
- export type SmallRadar = "SmallRadar";
327
- export type LargeRadar = "LargeRadar";
328
- export type Sonar = "Sonar";
329
- export type DepthCharge = "DepthCharge";
330
- export type ExtraArmor = "ExtraArmor";
331
- export type Engine = "Engine";
332
- export type AntiAirShell = "AntiAirShell";
333
- export type ApShell = "ApShell";
334
- export type VtFuze = "VtFuze";
335
- export type AntiAirGun = "AntiAirGun";
336
- export type MidgetSubmarine = "MidgetSubmarine";
337
- export type EmergencyRepair = "EmergencyRepair";
338
- export type LandingCraft = "LandingCraft";
339
- export type Rotorcraft = "Rotorcraft";
340
- export type AntiSubPatrolAircraft = "AntiSubPatrolAircraft";
341
- export type MediumArmor = "MediumArmor";
342
- export type LargeArmor = "LargeArmor";
343
- export type Searchlight = "Searchlight";
344
- export type SupplyContainer = "SupplyContainer";
345
- export type ShipRepairFacility = "ShipRepairFacility";
346
- export type SubmarineTorpedo = "SubmarineTorpedo";
347
- export type Starshell = "Starshell";
348
- export type CommandFacility = "CommandFacility";
349
- export type AviationPersonnel = "AviationPersonnel";
350
- export type AntiAirFireDirector = "AntiAirFireDirector";
351
- export type AntiGroundEquipment = "AntiGroundEquipment";
352
- export type LargeMainGun2 = "LargeMainGun2";
353
- export type ShipPersonnel = "ShipPersonnel";
354
- export type LargeSonar = "LargeSonar";
355
- export type LargeFlyingBoat = "LargeFlyingBoat";
356
- export type LargeSearchlight = "LargeSearchlight";
357
- export type CombatRation = "CombatRation";
358
- export type Supplies = "Supplies";
359
- export type SeaplaneFighter = "SeaplaneFighter";
360
- export type AmphibiousTank = "AmphibiousTank";
361
- export type LbAttacker = "LbAttacker";
362
- export type LbFighter = "LbFighter";
363
- export type LbRecon = "LbRecon";
364
- export type TransportationMaterial = "TransportationMaterial";
365
- export type SubmarineEquipment = "SubmarineEquipment";
366
- export type LargeLbAircraft = "LargeLbAircraft";
367
- export type JetFighter = "JetFighter";
368
- export type JetFighterBomber = "JetFighterBomber";
369
- export type JetTorpedoBomber = "JetTorpedoBomber";
370
- export type JetRecon = "JetRecon";
371
- export type LargeRadar2 = "LargeRadar2";
372
- export type CbRecon2 = "CbRecon2";
373
- export type SecondaryGun2 = "SecondaryGun2";
165
+ export interface GearState {
166
+ id?: string;
167
+ gear_id: number;
168
+ exp?: number;
169
+ stars?: number;
374
170
  }
375
171
 
376
- export type GearType =
377
- | GearType.Unknown
378
- | GearType.SmallMainGun
379
- | GearType.MediumMainGun
380
- | GearType.LargeMainGun
381
- | GearType.SecondaryGun
382
- | GearType.Torpedo
383
- | GearType.CbFighter
384
- | GearType.CbDiveBomber
385
- | GearType.CbTorpedoBomber
386
- | GearType.CbRecon
387
- | GearType.ReconSeaplane
388
- | GearType.SeaplaneBomber
389
- | GearType.SmallRadar
390
- | GearType.LargeRadar
391
- | GearType.Sonar
392
- | GearType.DepthCharge
393
- | GearType.ExtraArmor
394
- | GearType.Engine
395
- | GearType.AntiAirShell
396
- | GearType.ApShell
397
- | GearType.VtFuze
398
- | GearType.AntiAirGun
399
- | GearType.MidgetSubmarine
400
- | GearType.EmergencyRepair
401
- | GearType.LandingCraft
402
- | GearType.Rotorcraft
403
- | GearType.AntiSubPatrolAircraft
404
- | GearType.MediumArmor
405
- | GearType.LargeArmor
406
- | GearType.Searchlight
407
- | GearType.SupplyContainer
408
- | GearType.ShipRepairFacility
409
- | GearType.SubmarineTorpedo
410
- | GearType.Starshell
411
- | GearType.CommandFacility
412
- | GearType.AviationPersonnel
413
- | GearType.AntiAirFireDirector
414
- | GearType.AntiGroundEquipment
415
- | GearType.LargeMainGun2
416
- | GearType.ShipPersonnel
417
- | GearType.LargeSonar
418
- | GearType.LargeFlyingBoat
419
- | GearType.LargeSearchlight
420
- | GearType.CombatRation
421
- | GearType.Supplies
422
- | GearType.SeaplaneFighter
423
- | GearType.AmphibiousTank
424
- | GearType.LbAttacker
425
- | GearType.LbFighter
426
- | GearType.LbRecon
427
- | GearType.TransportationMaterial
428
- | GearType.SubmarineEquipment
429
- | GearType.LargeLbAircraft
430
- | GearType.JetFighter
431
- | GearType.JetFighterBomber
432
- | GearType.JetTorpedoBomber
433
- | GearType.JetRecon
434
- | GearType.LargeRadar2
435
- | GearType.CbRecon2
436
- | GearType.SecondaryGun2;
437
-
438
- declare namespace DamageState {
439
- export type Normal = "Normal";
440
- export type Shouha = "Shouha";
441
- export type Chuuha = "Chuuha";
442
- export type Taiha = "Taiha";
443
- export type Sunk = "Sunk";
444
- }
445
-
446
- export type DamageState =
447
- | DamageState.Normal
448
- | DamageState.Shouha
449
- | DamageState.Chuuha
450
- | DamageState.Taiha
451
- | DamageState.Sunk;
172
+ export type SpeedGroup = "A" | "B1" | "B2" | "C";
452
173
 
453
- export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
454
- formation?: Formation;
174
+ export type SlotSizeVec = (number | null)[];
175
+
176
+ export type Role = "Main" | "Escort";
177
+
178
+ export interface ActionReport<T> {
179
+ data: Record<string, AttackReport<T>>;
180
+ damage_state_density: Histogram<DamageState, number> | null;
181
+ is_active: boolean;
455
182
  }
456
183
 
457
- export interface NodeAttackAnalyzerConfig {
458
- air_state?: AirState;
459
- engagement?: Engagement;
460
- left?: NodeAttackAnalyzerShipConfig;
461
- right?: NodeAttackAnalyzerShipConfig;
184
+ export type ShipType =
185
+ | "Unknown"
186
+ | "DE"
187
+ | "DD"
188
+ | "CL"
189
+ | "CLT"
190
+ | "CA"
191
+ | "CAV"
192
+ | "CVL"
193
+ | "FBB"
194
+ | "BB"
195
+ | "BBV"
196
+ | "CV"
197
+ | "XBB"
198
+ | "SS"
199
+ | "SSV"
200
+ | "AP"
201
+ | "AV"
202
+ | "LHA"
203
+ | "CVB"
204
+ | "AR"
205
+ | "AS"
206
+ | "CT"
207
+ | "AO";
208
+
209
+ export type ShipCategory =
210
+ | "Battleship"
211
+ | "AircraftCarrier"
212
+ | "HeavyCruiser"
213
+ | "LightCruiser"
214
+ | "Destroyer"
215
+ | "CoastalDefenseShip"
216
+ | "Submarine"
217
+ | "AuxiliaryShip";
218
+
219
+ export type NightCutinLike = NightCutin | FleetCutin;
220
+
221
+ export type DayCutinLike = DayCutin | FleetCutin;
222
+
223
+ export type FleetCutin =
224
+ | "NelsonTouch"
225
+ | "NagatoClassCutin"
226
+ | "ColoradoClassCutin"
227
+ | "KongouClassCutin"
228
+ | "Yamato2ShipCutin"
229
+ | "Yamato3ShipCutin";
230
+
231
+ export type NightCutin =
232
+ | "MainTorpRadar"
233
+ | "TorpLookoutRadar"
234
+ | "TorpTsloTorp"
235
+ | "TorpTsloDrum"
236
+ | "DoubleAttack"
237
+ | "TorpTorpMain"
238
+ | "TorpTorpTorp"
239
+ | "MainMainSec"
240
+ | "MainMainMain"
241
+ | "SubTorpTorp"
242
+ | "SubRadarTorp"
243
+ | "Cvci1_25"
244
+ | "Cvci1_20"
245
+ | "Cvci1_18"
246
+ | "Photobomber";
247
+
248
+ export type DayCutin =
249
+ | "Zuiun"
250
+ | "AirSea"
251
+ | "MainMain"
252
+ | "MainAp"
253
+ | "MainRadar"
254
+ | "MainSec"
255
+ | "DoubleAttack"
256
+ | "FBA"
257
+ | "BBA"
258
+ | "BA";
259
+
260
+ export interface MasterIBonuses {
261
+ shelling_power: MasterIBonusRule[];
262
+ shelling_accuracy: MasterIBonusRule[];
263
+ shelling_aerial_power: MasterIBonusRule[];
264
+ torpedo_power: MasterIBonusRule[];
265
+ torpedo_accuracy: MasterIBonusRule[];
266
+ torpedo_evasion: MasterIBonusRule[];
267
+ asw_power: MasterIBonusRule[];
268
+ asw_accuracy: MasterIBonusRule[];
269
+ night_power: MasterIBonusRule[];
270
+ night_aerial_power: MasterIBonusRule[];
271
+ night_accuracy: MasterIBonusRule[];
272
+ defense_power: MasterIBonusRule[];
273
+ contact_selection: MasterIBonusRule[];
274
+ fighter_power: MasterIBonusRule[];
275
+ ship_anti_air: MasterIBonusRule[];
276
+ fleet_anti_air: MasterIBonusRule[];
277
+ elos: MasterIBonusRule[];
462
278
  }
463
279
 
464
- export interface NodeAttackAnalysis {
465
- left: AttackAnalysis;
466
- right: AttackAnalysis;
280
+ export interface MasterIBonusRule {
281
+ expr: CompiledEvaler;
282
+ formula: CompiledEvaler;
467
283
  }
468
284
 
469
- export interface CompMeta {
470
- fleets: Record<FleetType, FleetMeta>;
285
+ export interface FleetCutinAnalysis {
286
+ shelling: FleetCutinReport<ShellingStyle>[];
287
+ night: FleetCutinReport<NightAttackStyle>[];
471
288
  }
472
289
 
473
- export interface FleetMeta {
474
- id: string;
475
- len: number;
476
- ships: [string, ShipMeta | null][];
290
+ export interface FleetCutinReport<T> {
291
+ cutin: FleetCutin;
292
+ rate: number | null;
293
+ formation: Formation;
294
+ attacks: FleetCutinAttackReport<T>[];
477
295
  }
478
296
 
479
- export interface ShipMeta {
480
- id: string;
297
+ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
298
+ index: number;
481
299
  ship_id: number;
300
+ power_mod: number;
482
301
  }
483
302
 
484
- export type TorpedoAttackType = null;
485
-
486
- type __NightPhaseAttackTypeAswAttackType = AswAttackType;
487
- type __NightPhaseAttackTypeNightAttackType = NightAttackType;
488
- declare namespace NightPhaseAttackType {
489
- export type Night = { t: "Night"; c: __NightPhaseAttackTypeNightAttackType };
490
- export type Asw = { t: "Asw"; c: __NightPhaseAttackTypeAswAttackType };
303
+ export interface MoveShipPayload {
304
+ current: [string, string, ShipKey];
305
+ target: [string | null, string, ShipKey];
491
306
  }
492
307
 
493
- export type NightPhaseAttackType =
494
- | NightPhaseAttackType.Night
495
- | NightPhaseAttackType.Asw;
308
+ export type GearTypeIdArray = [number, number, number, number, number];
309
+
310
+ export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
496
311
 
497
- type __DayPhaseAttackTypeAswAttackType = AswAttackType;
498
- type __DayPhaseAttackTypeShellingType = ShellingType;
499
- declare namespace DayPhaseAttackType {
500
- export type Shelling = { t: "Shelling"; c: __DayPhaseAttackTypeShellingType };
501
- export type Asw = { t: "Asw"; c: __DayPhaseAttackTypeAswAttackType };
312
+ export type AirWaveType = "Jet" | "LandBase" | "Carrier";
313
+
314
+ export interface SimulatorResult {
315
+ items: SimulatorResultItem[];
316
+ sunk_vec: [number, number, number][];
502
317
  }
503
318
 
504
- export type DayPhaseAttackType =
505
- | DayPhaseAttackType.Shelling
506
- | DayPhaseAttackType.Asw;
507
-
508
- type __AttackTypeAswAttackType = AswAttackType;
509
- type __AttackTypeNightAttackType = NightAttackType;
510
- type __AttackTypeShellingType = ShellingType;
511
- type __AttackTypeSupportShellingType = SupportShellingType;
512
- declare namespace AttackType {
513
- export type Asw = { t: "Asw"; c: __AttackTypeAswAttackType };
514
- export type Shelling = { t: "Shelling"; c: __AttackTypeShellingType };
515
- export type Night = { t: "Night"; c: __AttackTypeNightAttackType };
516
- export type Torpedo = { t: "Torpedo"; c: null };
517
- export type SupportShelling = {
518
- t: "SupportShelling";
519
- c: __AttackTypeSupportShellingType;
520
- };
319
+ export interface SimulatorResultItem {
320
+ id: string;
321
+ fleet_type: FleetType;
322
+ index: number;
323
+ damage_state_map: Record<DamageState, number>;
521
324
  }
522
325
 
523
- export type AttackType =
524
- | AttackType.Asw
525
- | AttackType.Shelling
526
- | AttackType.Night
527
- | AttackType.Torpedo
528
- | AttackType.SupportShelling;
326
+ export type SpecialEnemyType =
327
+ | "None"
328
+ | "SoftSkinned"
329
+ | "Pillbox"
330
+ | "IsolatedIsland"
331
+ | "SupplyDepot"
332
+ | "HarbourSummerPrincess"
333
+ | "PtImp"
334
+ | "BattleshipSummerPrincess"
335
+ | "HeavyCruiserSummerPrincess";
529
336
 
530
- export type SupportShellingType = ShellingType;
337
+ export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
531
338
 
532
- declare namespace NightAttackType {
533
- export type Normal = "Normal";
534
- export type Swordfish = "Swordfish";
535
- export type Carrier = "Carrier";
536
- }
339
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
537
340
 
538
- export type NightAttackType =
539
- | NightAttackType.Normal
540
- | NightAttackType.Swordfish
541
- | NightAttackType.Carrier;
341
+ export type GearCategory =
342
+ | "Fighter"
343
+ | "Bomber"
344
+ | "Recon"
345
+ | "MainGun"
346
+ | "Secondary"
347
+ | "Torpedo"
348
+ | "AntiSub"
349
+ | "Radar"
350
+ | "Landing"
351
+ | "Ration"
352
+ | "LandBased"
353
+ | "Misc";
542
354
 
543
- declare namespace ShellingType {
544
- export type Normal = "Normal";
545
- export type Carrier = "Carrier";
546
- }
355
+ export type GearType =
356
+ | "Unknown"
357
+ | "SmallMainGun"
358
+ | "MediumMainGun"
359
+ | "LargeMainGun"
360
+ | "SecondaryGun"
361
+ | "Torpedo"
362
+ | "CbFighter"
363
+ | "CbDiveBomber"
364
+ | "CbTorpedoBomber"
365
+ | "CbRecon"
366
+ | "ReconSeaplane"
367
+ | "SeaplaneBomber"
368
+ | "SmallRadar"
369
+ | "LargeRadar"
370
+ | "Sonar"
371
+ | "DepthCharge"
372
+ | "ExtraArmor"
373
+ | "Engine"
374
+ | "AntiAirShell"
375
+ | "ApShell"
376
+ | "VtFuze"
377
+ | "AntiAirGun"
378
+ | "MidgetSubmarine"
379
+ | "EmergencyRepair"
380
+ | "LandingCraft"
381
+ | "Rotorcraft"
382
+ | "AntiSubPatrolAircraft"
383
+ | "MediumArmor"
384
+ | "LargeArmor"
385
+ | "Searchlight"
386
+ | "SupplyContainer"
387
+ | "ShipRepairFacility"
388
+ | "SubmarineTorpedo"
389
+ | "Starshell"
390
+ | "CommandFacility"
391
+ | "AviationPersonnel"
392
+ | "AntiAirFireDirector"
393
+ | "AntiGroundEquipment"
394
+ | "LargeMainGun2"
395
+ | "ShipPersonnel"
396
+ | "LargeSonar"
397
+ | "LargeFlyingBoat"
398
+ | "LargeSearchlight"
399
+ | "CombatRation"
400
+ | "Supplies"
401
+ | "SeaplaneFighter"
402
+ | "AmphibiousTank"
403
+ | "LbAttacker"
404
+ | "LbFighter"
405
+ | "LbRecon"
406
+ | "TransportationMaterial"
407
+ | "SubmarineEquipment"
408
+ | "LargeLbAircraft"
409
+ | "JetFighter"
410
+ | "JetFighterBomber"
411
+ | "JetTorpedoBomber"
412
+ | "JetRecon"
413
+ | "LargeRadar2"
414
+ | "CbRecon2"
415
+ | "SecondaryGun2";
416
+
417
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
547
418
 
548
- export type ShellingType = ShellingType.Normal | ShellingType.Carrier;
419
+ export type TorpedoAttackType = null;
549
420
 
550
- declare namespace AswAttackType {
551
- export type DepthCharge = "DepthCharge";
552
- export type Aircraft = "Aircraft";
553
- }
421
+ export type NightPhaseAttackType =
422
+ | { t: "Night"; c: NightAttackType }
423
+ | { t: "Asw"; c: AswAttackType };
554
424
 
555
- export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
425
+ export type DayPhaseAttackType =
426
+ | { t: "Shelling"; c: ShellingType }
427
+ | { t: "Asw"; c: AswAttackType };
556
428
 
557
- declare namespace AirStateRank {
558
- export type Rank0 = "Rank0";
559
- export type Rank1 = "Rank1";
560
- export type Rank2 = "Rank2";
561
- export type Rank3 = "Rank3";
562
- }
429
+ export type AttackType =
430
+ | { t: "Asw"; c: AswAttackType }
431
+ | { t: "Shelling"; c: ShellingType }
432
+ | { t: "Night"; c: NightAttackType }
433
+ | { t: "Torpedo" }
434
+ | { t: "SupportShelling"; c: SupportShellingType };
563
435
 
564
- export type AirStateRank =
565
- | AirStateRank.Rank0
566
- | AirStateRank.Rank1
567
- | AirStateRank.Rank2
568
- | AirStateRank.Rank3;
436
+ export type SupportShellingType = ShellingType;
569
437
 
570
- declare namespace AirState {
571
- export type AirSupremacy = "AirSupremacy";
572
- export type AirSuperiority = "AirSuperiority";
573
- export type AirParity = "AirParity";
574
- export type AirDenial = "AirDenial";
575
- export type AirIncapability = "AirIncapability";
576
- }
438
+ export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
439
+
440
+ export type ShellingType = "Normal" | "Carrier";
441
+
442
+ export type AswAttackType = "DepthCharge" | "Aircraft";
443
+
444
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
577
445
 
578
446
  export type AirState =
579
- | AirState.AirSupremacy
580
- | AirState.AirSuperiority
581
- | AirState.AirParity
582
- | AirState.AirDenial
583
- | AirState.AirIncapability;
447
+ | "AirSupremacy"
448
+ | "AirSuperiority"
449
+ | "AirParity"
450
+ | "AirDenial"
451
+ | "AirIncapability";
584
452
 
585
- export interface MasterData {
453
+ export type FhResult<T> = { Ok: T } | { Err: string };
454
+
455
+ export interface MasterData extends MasterBattleDefinitions {
586
456
  created_at: number;
587
457
  gears: MasterGear[];
588
458
  gear_attrs: MasterAttrRule<GearAttr>[];
589
459
  ships: MasterShip[];
590
460
  ship_attrs: MasterAttrRule<ShipAttr>[];
591
461
  ibonuses: MasterIBonuses;
592
- equippable: MasterEquippable;
593
- formation: NestedFormationDef[];
594
- anti_air_cutin: AntiAirCutinDef[];
595
- day_cutin: DayCutinDef[];
596
- night_cutin: NightCutinDef[];
462
+ equippable: MasterEquippability;
597
463
  }
598
464
 
599
- export interface MasterConfig {
600
- formation: NestedFormationDef[];
601
- anti_air_cutin: AntiAirCutinDef[];
602
- day_cutin: DayCutinDef[];
603
- night_cutin: NightCutinDef[];
465
+ export interface NationalityDef {
466
+ id: number;
467
+ ctypes: number[];
604
468
  }
605
469
 
606
470
  export interface MasterAttrRule<T> {
607
471
  tag: T;
608
472
  name: string;
609
- expr: string;
473
+ expr: CompiledEvaler;
474
+ }
475
+
476
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
477
+ formation?: Formation;
478
+ }
479
+
480
+ export interface NodeAttackAnalyzerConfig {
481
+ air_state?: AirState;
482
+ engagement?: Engagement;
483
+ left?: NodeAttackAnalyzerShipConfig;
484
+ right?: NodeAttackAnalyzerShipConfig;
485
+ }
486
+
487
+ export interface NodeAttackAnalysis {
488
+ left: AttackAnalysis;
489
+ right: AttackAnalysis;
610
490
  }
611
491
 
612
492
  export interface EBonuses {
@@ -649,147 +529,109 @@ export interface GearInput {
649
529
 
650
530
  export type GearVecInput = GearInput[];
651
531
 
652
- declare namespace ShipAttr {
653
- export type Unknown = "Unknown";
654
- export type Abyssal = "Abyssal";
655
- export type NightCarrier = "NightCarrier";
656
- export type Installation = "Installation";
657
- export type RoyalNavy = "RoyalNavy";
658
- export type Kai2 = "Kai2";
659
- export type TurbineSpeedBonus = "TurbineSpeedBonus";
660
- export type Pillbox = "Pillbox";
661
- export type IsolatedIsland = "IsolatedIsland";
662
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
663
- export type SupplyDepot = "SupplyDepot";
664
- export type PtImp = "PtImp";
665
- export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
666
- export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
532
+ export interface ShipConditions extends ShipPosition {
533
+ formation?: Formation;
667
534
  }
668
535
 
669
536
  export type ShipAttr =
670
- | ShipAttr.Unknown
671
- | ShipAttr.Abyssal
672
- | ShipAttr.NightCarrier
673
- | ShipAttr.Installation
674
- | ShipAttr.RoyalNavy
675
- | ShipAttr.Kai2
676
- | ShipAttr.TurbineSpeedBonus
677
- | ShipAttr.Pillbox
678
- | ShipAttr.IsolatedIsland
679
- | ShipAttr.HarbourSummerPrincess
680
- | ShipAttr.SupplyDepot
681
- | ShipAttr.PtImp
682
- | ShipAttr.BattleshipSummerPrincess
683
- | ShipAttr.HeavyCruiserSummerPrincess;
684
-
685
- declare namespace OrgType {
686
- export type Single = "Single";
687
- export type CarrierTaskForce = "CarrierTaskForce";
688
- export type SurfaceTaskForce = "SurfaceTaskForce";
689
- export type TransportEscort = "TransportEscort";
690
- export type EnemySingle = "EnemySingle";
691
- export type EnemyCombined = "EnemyCombined";
692
- }
537
+ | "Unknown"
538
+ | "Abyssal"
539
+ | "NightCarrier"
540
+ | "Installation"
541
+ | "RoyalNavy"
542
+ | "Kai2"
543
+ | "TurbineSpeedBonus"
544
+ | "Pillbox"
545
+ | "IsolatedIsland"
546
+ | "HarbourSummerPrincess"
547
+ | "SupplyDepot"
548
+ | "PtImp"
549
+ | "BattleshipSummerPrincess"
550
+ | "HeavyCruiserSummerPrincess";
693
551
 
694
552
  export type OrgType =
695
- | OrgType.Single
696
- | OrgType.CarrierTaskForce
697
- | OrgType.SurfaceTaskForce
698
- | OrgType.TransportEscort
699
- | OrgType.EnemySingle
700
- | OrgType.EnemyCombined;
701
-
702
- declare namespace GearAttr {
703
- export type Unknown = "Unknown";
704
- export type Abyssal = "Abyssal";
705
- export type HighAngleMount = "HighAngleMount";
706
- export type NightFighter = "NightFighter";
707
- export type NightAttacker = "NightAttacker";
708
- export type HeavyBomber = "HeavyBomber";
709
- export type NightRecon = "NightRecon";
710
- export type MainGun = "MainGun";
711
- export type Radar = "Radar";
712
- export type SurfaceRadar = "SurfaceRadar";
713
- export type AirRadar = "AirRadar";
714
- export type DepthChargeProjector = "DepthChargeProjector";
715
- export type SynergisticDepthCharge = "SynergisticDepthCharge";
716
- export type AntiSubMortar = "AntiSubMortar";
717
- export type AntiSubWeapon = "AntiSubWeapon";
718
- export type ApDepthCharge = "ApDepthCharge";
719
- export type AntiSubAircraft = "AntiSubAircraft";
720
- export type LateModelBowTorpedo = "LateModelBowTorpedo";
721
- export type Seaplane = "Seaplane";
722
- export type CbAircraft = "CbAircraft";
723
- export type LbAircraft = "LbAircraft";
724
- export type JetAircraft = "JetAircraft";
725
- export type Fighter = "Fighter";
726
- export type Recon = "Recon";
727
- export type ObservationSeaplane = "ObservationSeaplane";
728
- export type CbFighterBomber = "CbFighterBomber";
729
- export type AntiInstDiveBomber = "AntiInstDiveBomber";
730
- export type CbSwordfish = "CbSwordfish";
731
- export type SemiNightPlane = "SemiNightPlane";
732
- export type HighAltitudeInterceptor = "HighAltitudeInterceptor";
733
- }
553
+ | "Single"
554
+ | "CarrierTaskForce"
555
+ | "SurfaceTaskForce"
556
+ | "TransportEscort"
557
+ | "EnemySingle"
558
+ | "EnemyCombined";
734
559
 
735
560
  export type GearAttr =
736
- | GearAttr.Unknown
737
- | GearAttr.Abyssal
738
- | GearAttr.HighAngleMount
739
- | GearAttr.NightFighter
740
- | GearAttr.NightAttacker
741
- | GearAttr.HeavyBomber
742
- | GearAttr.NightRecon
743
- | GearAttr.MainGun
744
- | GearAttr.Radar
745
- | GearAttr.SurfaceRadar
746
- | GearAttr.AirRadar
747
- | GearAttr.DepthChargeProjector
748
- | GearAttr.SynergisticDepthCharge
749
- | GearAttr.AntiSubMortar
750
- | GearAttr.AntiSubWeapon
751
- | GearAttr.ApDepthCharge
752
- | GearAttr.AntiSubAircraft
753
- | GearAttr.LateModelBowTorpedo
754
- | GearAttr.Seaplane
755
- | GearAttr.CbAircraft
756
- | GearAttr.LbAircraft
757
- | GearAttr.JetAircraft
758
- | GearAttr.Fighter
759
- | GearAttr.Recon
760
- | GearAttr.ObservationSeaplane
761
- | GearAttr.CbFighterBomber
762
- | GearAttr.AntiInstDiveBomber
763
- | GearAttr.CbSwordfish
764
- | GearAttr.SemiNightPlane
765
- | GearAttr.HighAltitudeInterceptor;
561
+ | "Unknown"
562
+ | "Abyssal"
563
+ | "HighAngleMount"
564
+ | "NightFighter"
565
+ | "NightAttacker"
566
+ | "HeavyBomber"
567
+ | "NightRecon"
568
+ | "MainGun"
569
+ | "Radar"
570
+ | "SurfaceRadar"
571
+ | "AirRadar"
572
+ | "DepthChargeProjector"
573
+ | "SynergisticDepthCharge"
574
+ | "AntiSubMortar"
575
+ | "AntiSubWeapon"
576
+ | "ApDepthCharge"
577
+ | "AntiSubAircraft"
578
+ | "LateModelBowTorpedo"
579
+ | "Seaplane"
580
+ | "CbAircraft"
581
+ | "LbAircraft"
582
+ | "JetAircraft"
583
+ | "Fighter"
584
+ | "Recon"
585
+ | "ObservationSeaplane"
586
+ | "CbFighterBomber"
587
+ | "AntiInstDiveBomber"
588
+ | "CbSwordfish"
589
+ | "SemiNightPlane"
590
+ | "HighAltitudeInterceptor";
591
+
592
+ export type FleetKey = "f1" | "f2" | "f3" | "f4";
766
593
 
767
- export interface SupportShellingStyle {
768
- tag: "SupportShellingStyle";
769
- attack_type: SupportShellingType;
594
+ export interface SupportShellingSimulatorParams {
595
+ attacker_formation?: Formation;
596
+ target_formation?: Formation;
597
+ engagement: Engagement;
598
+ }
599
+
600
+ export interface ShipAnalyzerConfig {
601
+ air_state?: AirState;
602
+ engagement?: Engagement;
603
+ left?: AttackAnalyzerShipConfig;
604
+ right?: AttackAnalyzerShipConfig;
605
+ }
606
+
607
+ export interface CompAntiAirAnalysis {
608
+ fleet_adjusted_anti_air: number;
609
+ ships: AntiAirReport[];
610
+ anti_air_cutin_chance: [number, number][];
770
611
  }
771
612
 
772
- type __NightPhaseAttackStyleAswAttackStyle = AswAttackStyle;
773
- type __NightPhaseAttackStyleNightAttackStyle = NightAttackStyle;
774
- declare namespace NightPhaseAttackStyle {
775
- export type Night = __NightPhaseAttackStyleNightAttackStyle;
776
- export type Asw = __NightPhaseAttackStyleAswAttackStyle;
613
+ export interface AntiAirReport {
614
+ ship_id: number;
615
+ role: Role;
616
+ index: number;
617
+ adjusted_anti_air: number | null;
618
+ proportional_shotdown_rate: number | null;
619
+ fixed_shotdown_number: number | null;
620
+ guaranteed: number | null;
621
+ anti_air_cutin_chance: [number, number][];
622
+ anti_air_propellant_barrage_chance: number | null;
777
623
  }
778
624
 
779
- export type NightPhaseAttackStyle =
780
- | NightPhaseAttackStyle.Night
781
- | NightPhaseAttackStyle.Asw;
625
+ export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
782
626
 
783
- type __DayPhaseAttackStyleAswAttackStyle = AswAttackStyle;
784
- type __DayPhaseAttackStyleShellingStyle = ShellingStyle;
785
- declare namespace DayPhaseAttackStyle {
786
- export type Shelling = __DayPhaseAttackStyleShellingStyle;
787
- export type Asw = __DayPhaseAttackStyleAswAttackStyle;
627
+ export interface SupportShellingStyle {
628
+ tag: "SupportShellingStyle";
629
+ attack_type: SupportShellingType;
788
630
  }
789
631
 
790
- export type DayPhaseAttackStyle =
791
- | DayPhaseAttackStyle.Shelling
792
- | DayPhaseAttackStyle.Asw;
632
+ export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
633
+
634
+ export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
793
635
 
794
636
  export interface TorpedoAttackStyle {
795
637
  tag: "TorpedoAttackStyle";
@@ -819,34 +661,39 @@ export interface ShellingStyle {
819
661
  hits: number;
820
662
  }
821
663
 
822
- export interface SupportShellingSimulatorParams {
823
- attacker_formation?: Formation;
824
- target_formation?: Formation;
825
- engagement: Engagement;
664
+ export interface AttackPower {
665
+ precap: number;
666
+ is_capped: boolean;
667
+ capped: number;
668
+ normal: number;
669
+ critical: number;
670
+ armor_penetration: number;
671
+ remaining_ammo_mod: number;
826
672
  }
827
673
 
828
- export interface MasterIBonuses {
829
- shelling_power: MasterIBonusRule[];
830
- carrier_shelling_power: MasterIBonusRule[];
831
- shelling_accuracy: MasterIBonusRule[];
832
- torpedo_power: MasterIBonusRule[];
833
- torpedo_accuracy: MasterIBonusRule[];
834
- torpedo_evasion: MasterIBonusRule[];
835
- asw_power: MasterIBonusRule[];
836
- asw_accuracy: MasterIBonusRule[];
837
- night_power: MasterIBonusRule[];
838
- night_accuracy: MasterIBonusRule[];
839
- defense_power: MasterIBonusRule[];
840
- contact_selection: MasterIBonusRule[];
841
- fighter_power: MasterIBonusRule[];
842
- ship_anti_air: MasterIBonusRule[];
843
- fleet_anti_air: MasterIBonusRule[];
844
- elos: MasterIBonusRule[];
674
+ export interface AttackPowerParams {
675
+ basic: number;
676
+ cap: number;
677
+ precap_mod: AttackPowerModifier;
678
+ postcap_mod: AttackPowerModifier;
679
+ ap_shell_mod: number | null;
680
+ aerial_power: number | null;
681
+ proficiency_critical_mod: number;
682
+ armor_penetration: number;
683
+ remaining_ammo_mod: number;
684
+ special_enemy_mods: SpecialEnemyModifiers;
685
+ custom_mods: CustomPowerModifiers;
845
686
  }
846
687
 
847
- export interface MasterIBonusRule {
848
- expr: CompiledEvaler;
849
- formula: CompiledEvaler;
688
+ export interface SpecialEnemyModifiers {
689
+ precap_general_mod: AttackPowerModifier;
690
+ stype_mod: AttackPowerModifier;
691
+ landing_craft_synergy_mod: AttackPowerModifier;
692
+ toku_daihatsu_tank_mod: AttackPowerModifier;
693
+ m4a1dd_mod: AttackPowerModifier;
694
+ honi_mod: AttackPowerModifier;
695
+ postcap_general_mod: AttackPowerModifier;
696
+ pt_mod: AttackPowerModifier;
850
697
  }
851
698
 
852
699
  export interface NightContactChance {
@@ -885,77 +732,29 @@ export interface DamageReport {
885
732
  damage_state_density: Histogram<DamageState, number>;
886
733
  }
887
734
 
888
- export interface CompAntiAirAnalysis {
889
- fleet_adjusted_anti_air: number;
890
- ships: AntiAirReport[];
891
- anti_air_cutin_chance: [number, number][];
892
- }
893
-
894
- export interface AntiAirReport {
895
- ship_id: number;
896
- role: Role;
897
- index: number;
898
- adjusted_anti_air: number | null;
899
- proportional_shotdown_rate: number | null;
900
- fixed_shotdown_number: number | null;
901
- guaranteed: number | null;
902
- anti_air_cutin_chance: [number, number][];
903
- anti_air_propellant_barrage_chance: number | null;
735
+ export interface AttackAnalyzerShipConfig
736
+ extends ShipConditions,
737
+ NightFleetConditions {
738
+ fleet_los_mod?: number | null;
904
739
  }
905
740
 
906
741
  export type Histogram<K, V> = Partial<Record<K, V>>;
907
742
 
908
- type __FormationCombinedFormation = CombinedFormation;
909
- type __FormationSingleFormation = SingleFormation;
910
- declare namespace Formation {
911
- export type Single = __FormationSingleFormation;
912
- export type Combined = __FormationCombinedFormation;
913
- }
914
-
915
- export type Formation = Formation.Single | Formation.Combined;
916
-
917
- declare namespace CombinedFormation {
918
- export type Cruising1 = "Cruising1";
919
- export type Cruising2 = "Cruising2";
920
- export type Cruising3 = "Cruising3";
921
- export type Cruising4 = "Cruising4";
922
- }
743
+ export type Formation = SingleFormation | CombinedFormation;
923
744
 
924
745
  export type CombinedFormation =
925
- | CombinedFormation.Cruising1
926
- | CombinedFormation.Cruising2
927
- | CombinedFormation.Cruising3
928
- | CombinedFormation.Cruising4;
929
-
930
- declare namespace SingleFormation {
931
- export type LineAhead = "LineAhead";
932
- export type DoubleLine = "DoubleLine";
933
- export type Diamond = "Diamond";
934
- export type Echelon = "Echelon";
935
- export type LineAbreast = "LineAbreast";
936
- export type Vanguard = "Vanguard";
937
- }
746
+ | "Cruising1"
747
+ | "Cruising2"
748
+ | "Cruising3"
749
+ | "Cruising4";
938
750
 
939
751
  export type SingleFormation =
940
- | SingleFormation.LineAhead
941
- | SingleFormation.DoubleLine
942
- | SingleFormation.Diamond
943
- | SingleFormation.Echelon
944
- | SingleFormation.LineAbreast
945
- | SingleFormation.Vanguard;
946
-
947
- declare namespace FleetType {
948
- export type Main = "Main";
949
- export type Escort = "Escort";
950
- export type RouteSup = "RouteSup";
951
- export type BossSup = "BossSup";
952
- }
953
-
954
- export type FleetType =
955
- | FleetType.Main
956
- | FleetType.Escort
957
- | FleetType.RouteSup
958
- | FleetType.BossSup;
752
+ | "LineAhead"
753
+ | "DoubleLine"
754
+ | "Diamond"
755
+ | "Echelon"
756
+ | "LineAbreast"
757
+ | "Vanguard";
959
758
 
960
759
  export interface CustomPowerModifiers {
961
760
  precap_mod?: AttackPowerModifier;
@@ -979,26 +778,11 @@ export interface AttackPowerModifier {
979
778
  b?: number;
980
779
  }
981
780
 
982
- export interface MasterEquippable {
983
- equip_stype: EquipStype[];
984
- equip_exslot: number[];
985
- equip_ship: MstEquipShip[];
986
- equip_exslot_ship: MstEquipExslotShip[];
987
- }
988
-
989
- export interface MstEquipExslotShip {
990
- api_slotitem_id: number;
991
- api_ship_ids: number[];
992
- }
993
-
994
- export interface MstEquipShip {
995
- api_ship_id: number;
996
- api_equip_type: number[];
997
- }
998
-
999
- export interface EquipStype {
1000
- id: number;
1001
- equip_type: number[];
781
+ export interface MasterBattleDefinitions {
782
+ formation: NestedFormationDef[];
783
+ anti_air_cutin: AntiAirCutinDef[];
784
+ day_cutin: DayCutinDef[];
785
+ night_cutin: NightCutinDef[];
1002
786
  }
1003
787
 
1004
788
  export interface HitRate {
@@ -1016,41 +800,6 @@ export interface HitRateParams {
1016
800
  hit_percentage_bonus: number;
1017
801
  }
1018
802
 
1019
- export interface AttackPower {
1020
- precap: number;
1021
- is_capped: boolean;
1022
- capped: number;
1023
- normal: number;
1024
- critical: number;
1025
- armor_penetration: number;
1026
- remaining_ammo_mod: number;
1027
- }
1028
-
1029
- export interface AttackPowerParams {
1030
- basic: number;
1031
- cap: number;
1032
- precap_mod: AttackPowerModifier;
1033
- postcap_mod: AttackPowerModifier;
1034
- ap_shell_mod: number | null;
1035
- carrier_power: number | null;
1036
- proficiency_critical_mod: number;
1037
- armor_penetration: number;
1038
- remaining_ammo_mod: number;
1039
- special_enemy_mods: SpecialEnemyModifiers;
1040
- custom_mods: CustomPowerModifiers;
1041
- }
1042
-
1043
- export interface SpecialEnemyModifiers {
1044
- precap_general_mod: AttackPowerModifier;
1045
- stype_mod: AttackPowerModifier;
1046
- landing_craft_synergy_mod: AttackPowerModifier;
1047
- toku_daihatsu_tank_mod: AttackPowerModifier;
1048
- m4a1dd_mod: AttackPowerModifier;
1049
- honi_mod: AttackPowerModifier;
1050
- postcap_general_mod: AttackPowerModifier;
1051
- pt_mod: AttackPowerModifier;
1052
- }
1053
-
1054
803
  export interface CompDayCutinAnalysis {
1055
804
  rank3_air_state: AirState;
1056
805
  rank2_air_state: AirState;
@@ -1085,12 +834,6 @@ export interface DayContactChance {
1085
834
  total: number;
1086
835
  }
1087
836
 
1088
- export interface AttackAnalyzerShipConfig
1089
- extends ShipConditions,
1090
- NightFleetConditions {
1091
- fleet_los_mod?: number | null;
1092
- }
1093
-
1094
837
  export interface AttackAnalysis {
1095
838
  attacker_is_player: boolean;
1096
839
  attacker_ship_id: number;
@@ -1102,34 +845,13 @@ export interface AttackAnalysis {
1102
845
  support_shelling: ActionReport<SupportShellingStyle>;
1103
846
  }
1104
847
 
1105
- export interface NightFleetConditions {
1106
- night_contact_rank?: ContactRank | null;
1107
- starshell_index?: number | null;
1108
- searchlight_index?: number | null;
1109
- activates_large_searchlight?: boolean;
1110
- }
1111
-
1112
- export interface NightConditions {
1113
- player?: NightFleetConditions;
1114
- enemy?: NightFleetConditions;
1115
- }
1116
-
1117
- export interface BattleConditions {
1118
- org_type: OrgType;
1119
- role: Role;
1120
- ship_index: number;
1121
- fleet_len: number;
1122
- formation: Formation;
1123
- fleet_los_mod: number | null;
1124
- night_conditions: NightFleetConditions;
1125
- }
1126
-
1127
848
  export interface MasterShip {
1128
849
  ship_id: number;
1129
850
  name: string;
1130
851
  yomi: string;
1131
852
  stype: number;
1132
853
  ctype: number;
854
+ nationality?: number;
1133
855
  sort_id?: number;
1134
856
  max_hp: StatInterval;
1135
857
  firepower: StatInterval;
@@ -1155,7 +877,37 @@ export interface MasterShip {
1155
877
  useful?: boolean;
1156
878
  }
1157
879
 
1158
- export type StatInterval = [number | null, number | null];
880
+ export type StatInterval = [number | null, number | null];
881
+
882
+ export interface EquippabilityRule {
883
+ ship: CompiledEvaler;
884
+ keys?: string[];
885
+ include?: string;
886
+ exclude?: string;
887
+ }
888
+
889
+ export interface MasterEquippability {
890
+ equip_stype: EquipStype[];
891
+ equip_exslot: number[];
892
+ equip_ship: MstEquipShip[];
893
+ equip_exslot_ship: MstEquipExslotShip[];
894
+ rules: EquippabilityRule[];
895
+ }
896
+
897
+ export interface MstEquipExslotShip {
898
+ api_slotitem_id: number;
899
+ api_ship_ids: number[];
900
+ }
901
+
902
+ export interface MstEquipShip {
903
+ api_ship_id: number;
904
+ api_equip_type: number[];
905
+ }
906
+
907
+ export interface EquipStype {
908
+ id: number;
909
+ equip_type: number[];
910
+ }
1159
911
 
1160
912
  export interface CompAnalyzerConfig {
1161
913
  engagement: Engagement;
@@ -1184,141 +936,28 @@ export interface CompAnalysis {
1184
936
  anti_air: CompAntiAirAnalysis;
1185
937
  }
1186
938
 
1187
- export interface AttackReport<T> {
1188
- style: T;
1189
- proc_rate: number | null;
1190
- attack_power: AttackPower | null;
1191
- attack_power_params: AttackPowerParams | null;
1192
- hits: number;
1193
- hit_rate: HitRate | null;
1194
- hit_rate_params: HitRateParams | null;
1195
- damage: DamageReport | null;
1196
- }
1197
-
1198
- export type ShipStateMap = Record<ShipKey, ShipState>;
1199
-
1200
- declare namespace ShipKey {
1201
- export type s1 = "s1";
1202
- export type s2 = "s2";
1203
- export type s3 = "s3";
1204
- export type s4 = "s4";
1205
- export type s5 = "s5";
1206
- export type s6 = "s6";
1207
- export type s7 = "s7";
1208
- }
1209
-
1210
- export type ShipKey =
1211
- | ShipKey.s1
1212
- | ShipKey.s2
1213
- | ShipKey.s3
1214
- | ShipKey.s4
1215
- | ShipKey.s5
1216
- | ShipKey.s6
1217
- | ShipKey.s7;
1218
-
1219
- export interface OrgState {
1220
- id?: string;
1221
- f1?: FleetState;
1222
- f2?: FleetState;
1223
- f3?: FleetState;
1224
- f4?: FleetState;
1225
- a1?: AirSquadronState;
1226
- a2?: AirSquadronState;
1227
- a3?: AirSquadronState;
1228
- hq_level?: number;
1229
- org_type?: OrgType;
1230
- sortie?: string;
1231
- route_sup?: string;
1232
- boss_sup?: string;
1233
- }
1234
-
1235
- export interface AirSquadronState extends GearVecState, SlotSizeVecState {
1236
- id?: string;
1237
- mode?: AirSquadronMode;
1238
- }
1239
-
1240
- declare namespace AirSquadronMode {
1241
- export type Sortie = "Sortie";
1242
- export type AirDefense = "AirDefense";
1243
- }
1244
-
1245
- export type AirSquadronMode =
1246
- | AirSquadronMode.Sortie
1247
- | AirSquadronMode.AirDefense;
1248
-
1249
- export interface FleetState {
1250
- id?: string;
1251
- len?: number;
1252
- s1?: ShipState;
1253
- s2?: ShipState;
1254
- s3?: ShipState;
1255
- s4?: ShipState;
1256
- s5?: ShipState;
1257
- s6?: ShipState;
1258
- s7?: ShipState;
1259
- }
1260
-
1261
- export interface ShipState extends GearVecState, SlotSizeVecState {
1262
- id?: string;
1263
- ship_id: number;
1264
- level?: number;
1265
- current_hp?: number;
1266
- morale?: number;
1267
- ammo?: number;
1268
- fuel?: number;
1269
- max_hp_mod?: number;
1270
- firepower_mod?: number;
1271
- torpedo_mod?: number;
1272
- armor_mod?: number;
1273
- anti_air_mod?: number;
1274
- evasion_mod?: number;
1275
- asw_mod?: number;
1276
- los_mod?: number;
1277
- luck_mod?: number;
1278
- day_gunfit_accuracy?: number;
1279
- night_gunfit_accuracy?: number;
1280
- custom_power_mods?: CustomPowerModifiers;
1281
- }
1282
-
1283
- export interface SlotSizeVecState {
1284
- ss1?: number;
1285
- ss2?: number;
1286
- ss3?: number;
1287
- ss4?: number;
1288
- ss5?: number;
1289
- }
1290
-
1291
- export interface GearVecState {
1292
- g1?: GearState;
1293
- g2?: GearState;
1294
- g3?: GearState;
1295
- g4?: GearState;
1296
- g5?: GearState;
1297
- gx?: GearState;
939
+ export interface NightFleetConditions {
940
+ night_contact_rank?: ContactRank | null;
941
+ starshell_index?: number | null;
942
+ searchlight_index?: number | null;
943
+ activates_large_searchlight?: boolean;
1298
944
  }
1299
945
 
1300
- export interface GearState {
1301
- id?: string;
1302
- gear_id: number;
1303
- exp?: number;
1304
- stars?: number;
946
+ export interface NightConditions {
947
+ player?: NightFleetConditions;
948
+ enemy?: NightFleetConditions;
1305
949
  }
1306
950
 
1307
- declare namespace SpeedGroup {
1308
- export type A = "A";
1309
- export type B1 = "B1";
1310
- export type B2 = "B2";
1311
- export type C = "C";
951
+ export interface BattleConditions {
952
+ org_type: OrgType;
953
+ role: Role;
954
+ ship_index: number;
955
+ fleet_len: number;
956
+ formation: Formation;
957
+ fleet_los_mod: number | null;
958
+ night_conditions: NightFleetConditions;
1312
959
  }
1313
960
 
1314
- export type SpeedGroup =
1315
- | SpeedGroup.A
1316
- | SpeedGroup.B1
1317
- | SpeedGroup.B2
1318
- | SpeedGroup.C;
1319
-
1320
- export type SlotSizeVec = (number | null)[];
1321
-
1322
961
  export interface MasterGear {
1323
962
  gear_id: number;
1324
963
  name: string;
@@ -1344,102 +983,15 @@ export interface MasterGear {
1344
983
  fleet_anti_air_resist?: number;
1345
984
  }
1346
985
 
1347
- export type GearTypeIdArray = [number, number, number, number, number];
1348
-
1349
- declare namespace ShipType {
1350
- export type Unknown = "Unknown";
1351
- export type DE = "DE";
1352
- export type DD = "DD";
1353
- export type CL = "CL";
1354
- export type CLT = "CLT";
1355
- export type CA = "CA";
1356
- export type CAV = "CAV";
1357
- export type CVL = "CVL";
1358
- export type FBB = "FBB";
1359
- export type BB = "BB";
1360
- export type BBV = "BBV";
1361
- export type CV = "CV";
1362
- export type XBB = "XBB";
1363
- export type SS = "SS";
1364
- export type SSV = "SSV";
1365
- export type AP = "AP";
1366
- export type AV = "AV";
1367
- export type LHA = "LHA";
1368
- export type CVB = "CVB";
1369
- export type AR = "AR";
1370
- export type AS = "AS";
1371
- export type CT = "CT";
1372
- export type AO = "AO";
1373
- }
1374
-
1375
- export type ShipType =
1376
- | ShipType.Unknown
1377
- | ShipType.DE
1378
- | ShipType.DD
1379
- | ShipType.CL
1380
- | ShipType.CLT
1381
- | ShipType.CA
1382
- | ShipType.CAV
1383
- | ShipType.CVL
1384
- | ShipType.FBB
1385
- | ShipType.BB
1386
- | ShipType.BBV
1387
- | ShipType.CV
1388
- | ShipType.XBB
1389
- | ShipType.SS
1390
- | ShipType.SSV
1391
- | ShipType.AP
1392
- | ShipType.AV
1393
- | ShipType.LHA
1394
- | ShipType.CVB
1395
- | ShipType.AR
1396
- | ShipType.AS
1397
- | ShipType.CT
1398
- | ShipType.AO;
1399
-
1400
- declare namespace ShipCategory {
1401
- export type Battleship = "Battleship";
1402
- export type AircraftCarrier = "AircraftCarrier";
1403
- export type HeavyCruiser = "HeavyCruiser";
1404
- export type LightCruiser = "LightCruiser";
1405
- export type Destroyer = "Destroyer";
1406
- export type CoastalDefenseShip = "CoastalDefenseShip";
1407
- export type Submarine = "Submarine";
1408
- export type AuxiliaryShip = "AuxiliaryShip";
1409
- }
1410
-
1411
- export type ShipCategory =
1412
- | ShipCategory.Battleship
1413
- | ShipCategory.AircraftCarrier
1414
- | ShipCategory.HeavyCruiser
1415
- | ShipCategory.LightCruiser
1416
- | ShipCategory.Destroyer
1417
- | ShipCategory.CoastalDefenseShip
1418
- | ShipCategory.Submarine
1419
- | ShipCategory.AuxiliaryShip;
1420
-
1421
- export interface FleetCutinAnalysis {
1422
- shelling: FleetCutinReport<ShellingStyle>[];
1423
- night: FleetCutinReport<NightAttackStyle>[];
1424
- }
1425
-
1426
- export interface FleetCutinReport<T> {
1427
- cutin: FleetCutin;
1428
- rate: number | null;
1429
- formation: Formation;
1430
- attacks: FleetCutinAttackReport<T>[];
1431
- }
1432
-
1433
- export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1434
- index: number;
1435
- ship_id: number;
1436
- power_mod: number;
1437
- }
1438
-
1439
- export interface ActionReport<T> {
1440
- data: Record<string, AttackReport<T>>;
1441
- damage_state_density: Histogram<DamageState, number> | null;
1442
- is_active: boolean;
986
+ export interface AttackReport<T> {
987
+ style: T;
988
+ proc_rate: number | null;
989
+ attack_power: AttackPower | null;
990
+ attack_power_params: AttackPowerParams | null;
991
+ hits: number;
992
+ hit_rate: HitRate | null;
993
+ hit_rate_params: HitRateParams | null;
994
+ damage: DamageReport | null;
1443
995
  }
1444
996
 
1445
997
  /**
@@ -1571,16 +1123,16 @@ export class Comp {
1571
1123
  get_fleet_id(ft: FleetType): string | undefined;
1572
1124
  /**
1573
1125
  * @param {FleetType} ft
1574
- * @param {string} key
1126
+ * @param {ShipKey} key
1575
1127
  * @returns {Ship | undefined}
1576
1128
  */
1577
- get_ship_with_clone(ft: FleetType, key: string): Ship | undefined;
1129
+ get_ship_with_clone(ft: FleetType, key: ShipKey): Ship | undefined;
1578
1130
  /**
1579
1131
  * @param {FleetType} ft
1580
- * @param {string} key
1132
+ * @param {ShipKey} key
1581
1133
  * @returns {string | undefined}
1582
1134
  */
1583
- get_ship_entity_id(ft: FleetType, key: string): string | undefined;
1135
+ get_ship_entity_id(ft: FleetType, key: ShipKey): string | undefined;
1584
1136
  /**
1585
1137
  * @param {string} id
1586
1138
  * @returns {Ship | undefined}
@@ -1623,6 +1175,11 @@ export class Comp {
1623
1175
  * @returns {ShipConditions}
1624
1176
  */
1625
1177
  get_ship_conditions(ship: Ship, formation?: Formation): ShipConditions;
1178
+ /**
1179
+ * @param {FleetType} fleet_type
1180
+ * @returns {number | undefined}
1181
+ */
1182
+ fleet_los_mod(fleet_type: FleetType): number | undefined;
1626
1183
  /**
1627
1184
  */
1628
1185
  boss_sup?: Fleet;
@@ -1756,10 +1313,10 @@ export class Fleet {
1756
1313
  */
1757
1314
  count_ships(): number;
1758
1315
  /**
1759
- * @param {string} key
1316
+ * @param {ShipKey} key
1760
1317
  * @returns {Ship | undefined}
1761
1318
  */
1762
- get_ship(key: string): Ship | undefined;
1319
+ get_ship(key: ShipKey): Ship | undefined;
1763
1320
  /**
1764
1321
  * @param {AirWaveType} air_type
1765
1322
  * @returns {number | undefined}
@@ -2013,81 +1570,33 @@ export class Gear {
2013
1570
  }
2014
1571
  /**
2015
1572
  */
2016
- export class IBonuses {
1573
+ export class Org {
2017
1574
  free(): void;
2018
1575
  /**
1576
+ * @returns {string | undefined}
2019
1577
  */
2020
- asw_accuracy: number;
2021
- /**
2022
- */
2023
- asw_power: number;
2024
- /**
2025
- */
2026
- carrier_shelling_power: number;
2027
- /**
2028
- */
2029
- contact_selection: number;
2030
- /**
2031
- */
2032
- defense_power: number;
2033
- /**
2034
- */
2035
- elos: number;
2036
- /**
2037
- */
2038
- fighter_power: number;
2039
- /**
2040
- */
2041
- fleet_anti_air: number;
2042
- /**
2043
- */
2044
- night_accuracy: number;
2045
- /**
2046
- */
2047
- night_power: number;
2048
- /**
2049
- */
2050
- shelling_accuracy: number;
2051
- /**
2052
- */
2053
- shelling_power: number;
2054
- /**
2055
- */
2056
- ship_anti_air: number;
2057
- /**
2058
- */
2059
- torpedo_accuracy: number;
2060
- /**
2061
- */
2062
- torpedo_evasion: number;
1578
+ first_ship_id(): string | undefined;
2063
1579
  /**
1580
+ * @param {FleetKey} fleet_key
1581
+ * @param {ShipKey} ship_key
1582
+ * @returns {number | undefined}
2064
1583
  */
2065
- torpedo_power: number;
2066
- }
2067
- /**
2068
- */
2069
- export class Org {
2070
- free(): void;
1584
+ get_ship_mid(fleet_key: FleetKey, ship_key: ShipKey): number | undefined;
2071
1585
  /**
2072
- * @param {Role} role
2073
- * @returns {number}
1586
+ * @param {FleetKey} fleet_key
1587
+ * @param {ShipKey} ship_key
1588
+ * @returns {string | undefined}
2074
1589
  */
2075
- fleet_len(role: Role): number;
1590
+ get_ship_eid(fleet_key: FleetKey, ship_key: ShipKey): string | undefined;
2076
1591
  /**
2077
- * @param {Role} role
2078
- * @param {string} key
2079
- * @returns {string | undefined}
1592
+ * @param {FleetKey} key
1593
+ * @returns {string}
2080
1594
  */
2081
- get_ship_entity_id(role: Role, key: string): string | undefined;
1595
+ get_fleet_id(key: FleetKey): string;
2082
1596
  /**
2083
1597
  * @returns {(string)[]}
2084
1598
  */
2085
1599
  air_squadron_ids(): string[];
2086
- /**
2087
- * @param {Role} role
2088
- * @returns {number | undefined}
2089
- */
2090
- fleet_los_mod(role: Role): number | undefined;
2091
1600
  /**
2092
1601
  * @returns {Uint16Array}
2093
1602
  */
@@ -2097,35 +1606,35 @@ export class Org {
2097
1606
  */
2098
1607
  escort_ship_ids(): Uint16Array;
2099
1608
  /**
2100
- * @param {string} key
1609
+ * @param {FleetKey} key
2101
1610
  * @returns {Fleet}
2102
1611
  */
2103
- clone_fleet(key: string): Fleet;
1612
+ clone_fleet(key: FleetKey): Fleet;
2104
1613
  /**
2105
- * @param {Role} role
2106
- * @param {string} key
1614
+ * @param {FleetKey} fleet_key
1615
+ * @param {ShipKey} ship_key
2107
1616
  * @returns {Ship | undefined}
2108
1617
  */
2109
- get_ship(role: Role, key: string): Ship | undefined;
1618
+ clone_ship(fleet_key: FleetKey, ship_key: ShipKey): Ship | undefined;
2110
1619
  /**
2111
1620
  * @param {string} id
2112
1621
  * @returns {Ship | undefined}
2113
1622
  */
2114
1623
  get_ship_by_id(id: string): Ship | undefined;
2115
1624
  /**
2116
- * @param {Role} role
2117
- * @returns {string}
1625
+ * @param {FleetKey} key
1626
+ * @returns {(string)[]}
2118
1627
  */
2119
- get_fleet_id_by_role(role: Role): string;
1628
+ ship_keys(key: FleetKey): string[];
2120
1629
  /**
2121
1630
  * @returns {Comp}
2122
1631
  */
2123
1632
  create_comp(): Comp;
2124
1633
  /**
2125
- * @param {string} key
1634
+ * @param {FleetKey} key
2126
1635
  * @returns {Comp}
2127
1636
  */
2128
- create_comp_by_key(key: string): Comp;
1637
+ create_comp_by_key(key: FleetKey): Comp;
2129
1638
  /**
2130
1639
  * @param {string} key
2131
1640
  * @returns {AirSquadron}
@@ -2170,12 +1679,24 @@ export class Org {
2170
1679
  */
2171
1680
  high_altitude_interception_power(): number;
2172
1681
  /**
2173
- * @returns {Org}
1682
+ * @param {string} id
1683
+ * @param {number} x
1684
+ * @param {number} y
1685
+ * @returns {MoveShipPayload | undefined}
1686
+ */
1687
+ create_move_ship_payload(
1688
+ id: string,
1689
+ x: number,
1690
+ y: number
1691
+ ): MoveShipPayload | undefined;
1692
+ /**
1693
+ * @param {FleetKey} key
1694
+ * @returns {FleetType | undefined}
2174
1695
  */
2175
- static default(): Org;
1696
+ get_fleet_type(key: FleetKey): FleetType | undefined;
2176
1697
  /**
2177
1698
  */
2178
- boss_sup?: string;
1699
+ readonly boss_sup: FleetKey | undefined;
2179
1700
  /**
2180
1701
  */
2181
1702
  readonly hash: bigint;
@@ -2190,15 +1711,29 @@ export class Org {
2190
1711
  readonly org_type: OrgType;
2191
1712
  /**
2192
1713
  */
2193
- route_sup?: string;
1714
+ readonly route_sup: FleetKey | undefined;
2194
1715
  /**
2195
1716
  */
2196
- sortie: string;
1717
+ readonly sortie: FleetKey;
2197
1718
  }
2198
1719
  /**
2199
1720
  */
2200
1721
  export class Ship {
2201
1722
  free(): void;
1723
+ /**
1724
+ * @returns {number | undefined}
1725
+ */
1726
+ state_day_gunfit_accuracy(): number | undefined;
1727
+ /**
1728
+ * @returns {number | undefined}
1729
+ */
1730
+ state_night_gunfit_accuracy(): number | undefined;
1731
+ /**
1732
+ * フィット砲補正
1733
+ * @param {boolean} is_night
1734
+ * @returns {number}
1735
+ */
1736
+ gunfit_accuracy(is_night: boolean): number;
2202
1737
  /**
2203
1738
  * @returns {Ship}
2204
1739
  */
@@ -2404,20 +1939,6 @@ export class Ship {
2404
1939
  * @returns {number | undefined}
2405
1940
  */
2406
1941
  ohko_power(): number | undefined;
2407
- /**
2408
- * @returns {number | undefined}
2409
- */
2410
- state_day_gunfit_accuracy(): number | undefined;
2411
- /**
2412
- * @returns {number | undefined}
2413
- */
2414
- state_night_gunfit_accuracy(): number | undefined;
2415
- /**
2416
- * フィット砲補正
2417
- * @param {boolean} is_night
2418
- * @returns {number}
2419
- */
2420
- gunfit_accuracy(is_night: boolean): number;
2421
1942
  /**
2422
1943
  */
2423
1944
  readonly accuracy: number;