fleethub-core 1.8.7 → 1.8.8

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,31 +1,13 @@
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;
28
-
29
11
  export interface ShipPosition {
30
12
  org_type?: OrgType;
31
13
  fleet_type?: FleetType;
@@ -33,19 +15,6 @@ export interface ShipPosition {
33
15
  index?: number;
34
16
  }
35
17
 
36
- declare namespace Engagement {
37
- export type GreenT = "GreenT";
38
- export type Parallel = "Parallel";
39
- export type HeadOn = "HeadOn";
40
- export type RedT = "RedT";
41
- }
42
-
43
- export type Engagement =
44
- | Engagement.GreenT
45
- | Engagement.Parallel
46
- | Engagement.HeadOn
47
- | Engagement.RedT;
48
-
49
18
  export interface BattleDefinitions {
50
19
  formation: Record<Formation, NestedFormationDef>;
51
20
  anti_air_cutin: Record<number, AntiAirCutinDef>;
@@ -77,18 +46,9 @@ export interface AntiAirCutinDef {
77
46
  sequential: boolean | null;
78
47
  }
79
48
 
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
49
  export type NestedFormationDef =
90
- | NestedFormationDef.Normal
91
- | NestedFormationDef.Vanguard;
50
+ | FormationDef
51
+ | { top_half: FormationDef; bottom_half: FormationDef };
92
52
 
93
53
  export interface FormationDef {
94
54
  tag: Formation;
@@ -107,167 +67,117 @@ export interface FormationCombatModifiersDef {
107
67
  evasion_mod?: number;
108
68
  }
109
69
 
110
- export interface ShipAnalyzerConfig {
111
- air_state?: AirState;
112
- engagement?: Engagement;
113
- left?: AttackAnalyzerShipConfig;
114
- right?: AttackAnalyzerShipConfig;
115
- }
70
+ export type CompiledEvaler = string;
116
71
 
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";
127
- }
72
+ export type SpeedGroup = "A" | "B1" | "B2" | "C";
128
73
 
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";
74
+ export interface ActionReport<T> {
75
+ data: Record<string, AttackReport<T>>;
76
+ damage_state_density: Histogram<DamageState, number> | null;
77
+ is_active: boolean;
180
78
  }
181
79
 
80
+ export type GearTypeIdArray = [number, number, number, number, number];
81
+
82
+ export type ShipType =
83
+ | "Unknown"
84
+ | "DE"
85
+ | "DD"
86
+ | "CL"
87
+ | "CLT"
88
+ | "CA"
89
+ | "CAV"
90
+ | "CVL"
91
+ | "FBB"
92
+ | "BB"
93
+ | "BBV"
94
+ | "CV"
95
+ | "XBB"
96
+ | "SS"
97
+ | "SSV"
98
+ | "AP"
99
+ | "AV"
100
+ | "LHA"
101
+ | "CVB"
102
+ | "AR"
103
+ | "AS"
104
+ | "CT"
105
+ | "AO";
106
+
107
+ export type ShipCategory =
108
+ | "Battleship"
109
+ | "AircraftCarrier"
110
+ | "HeavyCruiser"
111
+ | "LightCruiser"
112
+ | "Destroyer"
113
+ | "CoastalDefenseShip"
114
+ | "Submarine"
115
+ | "AuxiliaryShip";
116
+
117
+ export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
118
+
119
+ export type NightCutinLike = NightCutin | FleetCutin;
120
+
121
+ export type DayCutinLike = DayCutin | FleetCutin;
122
+
182
123
  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
- }
124
+ | "NelsonTouch"
125
+ | "NagatoClassCutin"
126
+ | "ColoradoClassCutin"
127
+ | "KongouClassCutin"
128
+ | "Yamato2ShipCutin"
129
+ | "Yamato3ShipCutin";
207
130
 
208
131
  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";
236
- }
132
+ | "MainTorpRadar"
133
+ | "TorpLookoutRadar"
134
+ | "TorpTsloTorp"
135
+ | "TorpTsloDrum"
136
+ | "DoubleAttack"
137
+ | "TorpTorpMain"
138
+ | "TorpTorpTorp"
139
+ | "MainMainSec"
140
+ | "MainMainMain"
141
+ | "SubTorpTorp"
142
+ | "SubRadarTorp"
143
+ | "Cvci1_25"
144
+ | "Cvci1_20"
145
+ | "Cvci1_18"
146
+ | "Photobomber";
237
147
 
238
148
  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;
149
+ | "Zuiun"
150
+ | "AirSea"
151
+ | "MainMain"
152
+ | "MainAp"
153
+ | "MainRadar"
154
+ | "MainSec"
155
+ | "DoubleAttack"
156
+ | "FBA"
157
+ | "BBA"
158
+ | "BA";
159
+
160
+ export interface FleetCutinAnalysis {
161
+ shelling: FleetCutinReport<ShellingStyle>[];
162
+ night: FleetCutinReport<NightAttackStyle>[];
163
+ }
164
+
165
+ export interface FleetCutinReport<T> {
166
+ cutin: FleetCutin;
167
+ rate: number | null;
168
+ formation: Formation;
169
+ attacks: FleetCutinAttackReport<T>[];
170
+ }
171
+
172
+ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
173
+ index: number;
174
+ ship_id: number;
175
+ power_mod: number;
176
+ }
177
+
178
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
179
+
180
+ export type AirWaveType = "Jet" | "LandBase" | "Carrier";
271
181
 
272
182
  export interface SimulatorResult {
273
183
  items: SimulatorResultItem[];
@@ -281,189 +191,114 @@ export interface SimulatorResultItem {
281
191
  damage_state_map: Record<DamageState, number>;
282
192
  }
283
193
 
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";
297
- }
194
+ export type SpecialEnemyType =
195
+ | "None"
196
+ | "SoftSkinned"
197
+ | "Pillbox"
198
+ | "IsolatedIsland"
199
+ | "SupplyDepot"
200
+ | "HarbourSummerPrincess"
201
+ | "PtImp"
202
+ | "BattleshipSummerPrincess"
203
+ | "HeavyCruiserSummerPrincess";
298
204
 
299
205
  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";
374
- }
206
+ | "Fighter"
207
+ | "Bomber"
208
+ | "Recon"
209
+ | "MainGun"
210
+ | "Secondary"
211
+ | "Torpedo"
212
+ | "AntiSub"
213
+ | "Radar"
214
+ | "Landing"
215
+ | "Ration"
216
+ | "LandBased"
217
+ | "Misc";
375
218
 
376
219
  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;
452
-
453
- export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
454
- formation?: Formation;
220
+ | "Unknown"
221
+ | "SmallMainGun"
222
+ | "MediumMainGun"
223
+ | "LargeMainGun"
224
+ | "SecondaryGun"
225
+ | "Torpedo"
226
+ | "CbFighter"
227
+ | "CbDiveBomber"
228
+ | "CbTorpedoBomber"
229
+ | "CbRecon"
230
+ | "ReconSeaplane"
231
+ | "SeaplaneBomber"
232
+ | "SmallRadar"
233
+ | "LargeRadar"
234
+ | "Sonar"
235
+ | "DepthCharge"
236
+ | "ExtraArmor"
237
+ | "Engine"
238
+ | "AntiAirShell"
239
+ | "ApShell"
240
+ | "VtFuze"
241
+ | "AntiAirGun"
242
+ | "MidgetSubmarine"
243
+ | "EmergencyRepair"
244
+ | "LandingCraft"
245
+ | "Rotorcraft"
246
+ | "AntiSubPatrolAircraft"
247
+ | "MediumArmor"
248
+ | "LargeArmor"
249
+ | "Searchlight"
250
+ | "SupplyContainer"
251
+ | "ShipRepairFacility"
252
+ | "SubmarineTorpedo"
253
+ | "Starshell"
254
+ | "CommandFacility"
255
+ | "AviationPersonnel"
256
+ | "AntiAirFireDirector"
257
+ | "AntiGroundEquipment"
258
+ | "LargeMainGun2"
259
+ | "ShipPersonnel"
260
+ | "LargeSonar"
261
+ | "LargeFlyingBoat"
262
+ | "LargeSearchlight"
263
+ | "CombatRation"
264
+ | "Supplies"
265
+ | "SeaplaneFighter"
266
+ | "AmphibiousTank"
267
+ | "LbAttacker"
268
+ | "LbFighter"
269
+ | "LbRecon"
270
+ | "TransportationMaterial"
271
+ | "SubmarineEquipment"
272
+ | "LargeLbAircraft"
273
+ | "JetFighter"
274
+ | "JetFighterBomber"
275
+ | "JetTorpedoBomber"
276
+ | "JetRecon"
277
+ | "LargeRadar2"
278
+ | "CbRecon2"
279
+ | "SecondaryGun2";
280
+
281
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
282
+
283
+ export interface MasterData extends MasterBattleDefinitions {
284
+ created_at: number;
285
+ gears: MasterGear[];
286
+ gear_attrs: MasterAttrRule<GearAttr>[];
287
+ ships: MasterShip[];
288
+ ship_attrs: MasterAttrRule<ShipAttr>[];
289
+ ibonuses: MasterIBonuses;
290
+ equippable: MasterEquippability;
455
291
  }
456
292
 
457
- export interface NodeAttackAnalyzerConfig {
458
- air_state?: AirState;
459
- engagement?: Engagement;
460
- left?: NodeAttackAnalyzerShipConfig;
461
- right?: NodeAttackAnalyzerShipConfig;
293
+ export interface NationalityDef {
294
+ id: number;
295
+ ctypes: number[];
462
296
  }
463
297
 
464
- export interface NodeAttackAnalysis {
465
- left: AttackAnalysis;
466
- right: AttackAnalysis;
298
+ export interface MasterAttrRule<T> {
299
+ tag: T;
300
+ name: string;
301
+ expr: CompiledEvaler;
467
302
  }
468
303
 
469
304
  export interface CompMeta {
@@ -483,130 +318,67 @@ export interface ShipMeta {
483
318
 
484
319
  export type TorpedoAttackType = null;
485
320
 
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 };
491
- }
492
-
493
321
  export type NightPhaseAttackType =
494
- | NightPhaseAttackType.Night
495
- | NightPhaseAttackType.Asw;
496
-
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 };
502
- }
322
+ | { t: "Night"; c: NightAttackType }
323
+ | { t: "Asw"; c: AswAttackType };
503
324
 
504
325
  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
- };
521
- }
326
+ | { t: "Shelling"; c: ShellingType }
327
+ | { t: "Asw"; c: AswAttackType };
522
328
 
523
329
  export type AttackType =
524
- | AttackType.Asw
525
- | AttackType.Shelling
526
- | AttackType.Night
527
- | AttackType.Torpedo
528
- | AttackType.SupportShelling;
330
+ | { t: "Asw"; c: AswAttackType }
331
+ | { t: "Shelling"; c: ShellingType }
332
+ | { t: "Night"; c: NightAttackType }
333
+ | { t: "Torpedo" }
334
+ | { t: "SupportShelling"; c: SupportShellingType };
529
335
 
530
336
  export type SupportShellingType = ShellingType;
531
337
 
532
- declare namespace NightAttackType {
533
- export type Normal = "Normal";
534
- export type Swordfish = "Swordfish";
535
- export type Carrier = "Carrier";
536
- }
338
+ export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
537
339
 
538
- export type NightAttackType =
539
- | NightAttackType.Normal
540
- | NightAttackType.Swordfish
541
- | NightAttackType.Carrier;
340
+ export type ShellingType = "Normal" | "Carrier";
542
341
 
543
- declare namespace ShellingType {
544
- export type Normal = "Normal";
545
- export type Carrier = "Carrier";
546
- }
342
+ export type AswAttackType = "DepthCharge" | "Aircraft";
547
343
 
548
- export type ShellingType = ShellingType.Normal | ShellingType.Carrier;
344
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
549
345
 
550
- declare namespace AswAttackType {
551
- export type DepthCharge = "DepthCharge";
552
- export type Aircraft = "Aircraft";
553
- }
346
+ export type AirState =
347
+ | "AirSupremacy"
348
+ | "AirSuperiority"
349
+ | "AirParity"
350
+ | "AirDenial"
351
+ | "AirIncapability";
554
352
 
555
- export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
353
+ export type FhResult<T> = { Ok: T } | { Err: string };
556
354
 
557
- declare namespace AirStateRank {
558
- export type Rank0 = "Rank0";
559
- export type Rank1 = "Rank1";
560
- export type Rank2 = "Rank2";
561
- export type Rank3 = "Rank3";
355
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
356
+ formation?: Formation;
562
357
  }
563
358
 
564
- export type AirStateRank =
565
- | AirStateRank.Rank0
566
- | AirStateRank.Rank1
567
- | AirStateRank.Rank2
568
- | AirStateRank.Rank3;
359
+ export interface NodeAttackAnalyzerConfig {
360
+ air_state?: AirState;
361
+ engagement?: Engagement;
362
+ left?: NodeAttackAnalyzerShipConfig;
363
+ right?: NodeAttackAnalyzerShipConfig;
364
+ }
569
365
 
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";
366
+ export interface NodeAttackAnalysis {
367
+ left: AttackAnalysis;
368
+ right: AttackAnalysis;
576
369
  }
577
370
 
578
- export type AirState =
579
- | AirState.AirSupremacy
580
- | AirState.AirSuperiority
581
- | AirState.AirParity
582
- | AirState.AirDenial
583
- | AirState.AirIncapability;
371
+ export type Side = "Player" | "Enemy";
584
372
 
585
- export interface MasterData {
586
- created_at: number;
587
- gears: MasterGear[];
588
- gear_attrs: MasterAttrRule<GearAttr>[];
589
- ships: MasterShip[];
590
- ship_attrs: MasterAttrRule<ShipAttr>[];
591
- ibonuses: MasterIBonuses;
592
- equippable: MasterEquippable;
593
- formation: NestedFormationDef[];
594
- anti_air_cutin: AntiAirCutinDef[];
595
- day_cutin: DayCutinDef[];
596
- night_cutin: NightCutinDef[];
597
- }
373
+ export type Role = "Main" | "Escort";
598
374
 
599
- export interface MasterConfig {
600
- formation: NestedFormationDef[];
601
- anti_air_cutin: AntiAirCutinDef[];
602
- day_cutin: DayCutinDef[];
603
- night_cutin: NightCutinDef[];
604
- }
375
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
605
376
 
606
- export interface MasterAttrRule<T> {
607
- tag: T;
608
- name: string;
609
- expr: string;
377
+ export interface ShipAnalyzerConfig {
378
+ air_state?: AirState;
379
+ engagement?: Engagement;
380
+ left?: AttackAnalyzerShipConfig;
381
+ right?: AttackAnalyzerShipConfig;
610
382
  }
611
383
 
612
384
  export interface EBonuses {
@@ -649,147 +421,124 @@ export interface GearInput {
649
421
 
650
422
  export type GearVecInput = GearInput[];
651
423
 
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";
424
+ export interface ShipConditions extends ShipPosition {
425
+ formation?: Formation;
667
426
  }
668
427
 
669
428
  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
- }
429
+ | "Unknown"
430
+ | "Abyssal"
431
+ | "NightCarrier"
432
+ | "Installation"
433
+ | "RoyalNavy"
434
+ | "Kai2"
435
+ | "TurbineSpeedBonus"
436
+ | "Pillbox"
437
+ | "IsolatedIsland"
438
+ | "HarbourSummerPrincess"
439
+ | "SupplyDepot"
440
+ | "PtImp"
441
+ | "BattleshipSummerPrincess"
442
+ | "HeavyCruiserSummerPrincess";
693
443
 
694
444
  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";
445
+ | "Single"
446
+ | "CarrierTaskForce"
447
+ | "SurfaceTaskForce"
448
+ | "TransportEscort"
449
+ | "EnemySingle"
450
+ | "EnemyCombined";
451
+
452
+ export interface SupportShellingSimulatorParams {
453
+ attacker_formation?: Formation;
454
+ target_formation?: Formation;
455
+ engagement: Engagement;
733
456
  }
734
457
 
735
- 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;
458
+ export interface MasterIBonuses {
459
+ shelling_power: MasterIBonusRule[];
460
+ carrier_shelling_power: MasterIBonusRule[];
461
+ shelling_accuracy: MasterIBonusRule[];
462
+ torpedo_power: MasterIBonusRule[];
463
+ torpedo_accuracy: MasterIBonusRule[];
464
+ torpedo_evasion: MasterIBonusRule[];
465
+ asw_power: MasterIBonusRule[];
466
+ asw_accuracy: MasterIBonusRule[];
467
+ night_power: MasterIBonusRule[];
468
+ night_accuracy: MasterIBonusRule[];
469
+ defense_power: MasterIBonusRule[];
470
+ contact_selection: MasterIBonusRule[];
471
+ fighter_power: MasterIBonusRule[];
472
+ ship_anti_air: MasterIBonusRule[];
473
+ fleet_anti_air: MasterIBonusRule[];
474
+ elos: MasterIBonusRule[];
475
+ }
766
476
 
767
- export interface SupportShellingStyle {
768
- tag: "SupportShellingStyle";
769
- attack_type: SupportShellingType;
477
+ export interface MasterIBonusRule {
478
+ expr: CompiledEvaler;
479
+ formula: CompiledEvaler;
770
480
  }
771
481
 
772
- type __NightPhaseAttackStyleAswAttackStyle = AswAttackStyle;
773
- type __NightPhaseAttackStyleNightAttackStyle = NightAttackStyle;
774
- declare namespace NightPhaseAttackStyle {
775
- export type Night = __NightPhaseAttackStyleNightAttackStyle;
776
- export type Asw = __NightPhaseAttackStyleAswAttackStyle;
482
+ export interface CompAntiAirAnalysis {
483
+ fleet_adjusted_anti_air: number;
484
+ ships: AntiAirReport[];
485
+ anti_air_cutin_chance: [number, number][];
777
486
  }
778
487
 
779
- export type NightPhaseAttackStyle =
780
- | NightPhaseAttackStyle.Night
781
- | NightPhaseAttackStyle.Asw;
488
+ export interface AntiAirReport {
489
+ ship_id: number;
490
+ role: Role;
491
+ index: number;
492
+ adjusted_anti_air: number | null;
493
+ proportional_shotdown_rate: number | null;
494
+ fixed_shotdown_number: number | null;
495
+ guaranteed: number | null;
496
+ anti_air_cutin_chance: [number, number][];
497
+ anti_air_propellant_barrage_chance: number | null;
498
+ }
499
+
500
+ export type GearAttr =
501
+ | "Unknown"
502
+ | "Abyssal"
503
+ | "HighAngleMount"
504
+ | "NightFighter"
505
+ | "NightAttacker"
506
+ | "HeavyBomber"
507
+ | "NightRecon"
508
+ | "MainGun"
509
+ | "Radar"
510
+ | "SurfaceRadar"
511
+ | "AirRadar"
512
+ | "DepthChargeProjector"
513
+ | "SynergisticDepthCharge"
514
+ | "AntiSubMortar"
515
+ | "AntiSubWeapon"
516
+ | "ApDepthCharge"
517
+ | "AntiSubAircraft"
518
+ | "LateModelBowTorpedo"
519
+ | "Seaplane"
520
+ | "CbAircraft"
521
+ | "LbAircraft"
522
+ | "JetAircraft"
523
+ | "Fighter"
524
+ | "Recon"
525
+ | "ObservationSeaplane"
526
+ | "CbFighterBomber"
527
+ | "AntiInstDiveBomber"
528
+ | "CbSwordfish"
529
+ | "SemiNightPlane"
530
+ | "HighAltitudeInterceptor";
531
+
532
+ export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
782
533
 
783
- type __DayPhaseAttackStyleAswAttackStyle = AswAttackStyle;
784
- type __DayPhaseAttackStyleShellingStyle = ShellingStyle;
785
- declare namespace DayPhaseAttackStyle {
786
- export type Shelling = __DayPhaseAttackStyleShellingStyle;
787
- export type Asw = __DayPhaseAttackStyleAswAttackStyle;
534
+ export interface SupportShellingStyle {
535
+ tag: "SupportShellingStyle";
536
+ attack_type: SupportShellingType;
788
537
  }
789
538
 
790
- export type DayPhaseAttackStyle =
791
- | DayPhaseAttackStyle.Shelling
792
- | DayPhaseAttackStyle.Asw;
539
+ export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
540
+
541
+ export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
793
542
 
794
543
  export interface TorpedoAttackStyle {
795
544
  tag: "TorpedoAttackStyle";
@@ -819,34 +568,39 @@ export interface ShellingStyle {
819
568
  hits: number;
820
569
  }
821
570
 
822
- export interface SupportShellingSimulatorParams {
823
- attacker_formation?: Formation;
824
- target_formation?: Formation;
825
- engagement: Engagement;
571
+ export interface AttackPower {
572
+ precap: number;
573
+ is_capped: boolean;
574
+ capped: number;
575
+ normal: number;
576
+ critical: number;
577
+ armor_penetration: number;
578
+ remaining_ammo_mod: number;
826
579
  }
827
580
 
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[];
581
+ export interface AttackPowerParams {
582
+ basic: number;
583
+ cap: number;
584
+ precap_mod: AttackPowerModifier;
585
+ postcap_mod: AttackPowerModifier;
586
+ ap_shell_mod: number | null;
587
+ carrier_power: number | null;
588
+ proficiency_critical_mod: number;
589
+ armor_penetration: number;
590
+ remaining_ammo_mod: number;
591
+ special_enemy_mods: SpecialEnemyModifiers;
592
+ custom_mods: CustomPowerModifiers;
845
593
  }
846
594
 
847
- export interface MasterIBonusRule {
848
- expr: CompiledEvaler;
849
- formula: CompiledEvaler;
595
+ export interface SpecialEnemyModifiers {
596
+ precap_general_mod: AttackPowerModifier;
597
+ stype_mod: AttackPowerModifier;
598
+ landing_craft_synergy_mod: AttackPowerModifier;
599
+ toku_daihatsu_tank_mod: AttackPowerModifier;
600
+ m4a1dd_mod: AttackPowerModifier;
601
+ honi_mod: AttackPowerModifier;
602
+ postcap_general_mod: AttackPowerModifier;
603
+ pt_mod: AttackPowerModifier;
850
604
  }
851
605
 
852
606
  export interface NightContactChance {
@@ -885,77 +639,29 @@ export interface DamageReport {
885
639
  damage_state_density: Histogram<DamageState, number>;
886
640
  }
887
641
 
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;
642
+ export interface AttackAnalyzerShipConfig
643
+ extends ShipConditions,
644
+ NightFleetConditions {
645
+ fleet_los_mod?: number | null;
904
646
  }
905
647
 
906
648
  export type Histogram<K, V> = Partial<Record<K, V>>;
907
649
 
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
- }
650
+ export type Formation = SingleFormation | CombinedFormation;
923
651
 
924
652
  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
- }
653
+ | "Cruising1"
654
+ | "Cruising2"
655
+ | "Cruising3"
656
+ | "Cruising4";
938
657
 
939
658
  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;
659
+ | "LineAhead"
660
+ | "DoubleLine"
661
+ | "Diamond"
662
+ | "Echelon"
663
+ | "LineAbreast"
664
+ | "Vanguard";
959
665
 
960
666
  export interface CustomPowerModifiers {
961
667
  precap_mod?: AttackPowerModifier;
@@ -979,26 +685,11 @@ export interface AttackPowerModifier {
979
685
  b?: number;
980
686
  }
981
687
 
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[];
688
+ export interface MasterBattleDefinitions {
689
+ formation: NestedFormationDef[];
690
+ anti_air_cutin: AntiAirCutinDef[];
691
+ day_cutin: DayCutinDef[];
692
+ night_cutin: NightCutinDef[];
1002
693
  }
1003
694
 
1004
695
  export interface HitRate {
@@ -1016,41 +707,6 @@ export interface HitRateParams {
1016
707
  hit_percentage_bonus: number;
1017
708
  }
1018
709
 
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
710
  export interface CompDayCutinAnalysis {
1055
711
  rank3_air_state: AirState;
1056
712
  rank2_air_state: AirState;
@@ -1085,12 +741,6 @@ export interface DayContactChance {
1085
741
  total: number;
1086
742
  }
1087
743
 
1088
- export interface AttackAnalyzerShipConfig
1089
- extends ShipConditions,
1090
- NightFleetConditions {
1091
- fleet_los_mod?: number | null;
1092
- }
1093
-
1094
744
  export interface AttackAnalysis {
1095
745
  attacker_is_player: boolean;
1096
746
  attacker_ship_id: number;
@@ -1102,34 +752,13 @@ export interface AttackAnalysis {
1102
752
  support_shelling: ActionReport<SupportShellingStyle>;
1103
753
  }
1104
754
 
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
755
  export interface MasterShip {
1128
756
  ship_id: number;
1129
757
  name: string;
1130
758
  yomi: string;
1131
759
  stype: number;
1132
760
  ctype: number;
761
+ nationality?: number;
1133
762
  sort_id?: number;
1134
763
  max_hp: StatInterval;
1135
764
  firepower: StatInterval;
@@ -1157,6 +786,36 @@ export interface MasterShip {
1157
786
 
1158
787
  export type StatInterval = [number | null, number | null];
1159
788
 
789
+ export interface EquippabilityRule {
790
+ ship: CompiledEvaler;
791
+ keys?: string[];
792
+ include?: string;
793
+ exclude?: string;
794
+ }
795
+
796
+ export interface MasterEquippability {
797
+ equip_stype: EquipStype[];
798
+ equip_exslot: number[];
799
+ equip_ship: MstEquipShip[];
800
+ equip_exslot_ship: MstEquipExslotShip[];
801
+ rules: EquippabilityRule[];
802
+ }
803
+
804
+ export interface MstEquipExslotShip {
805
+ api_slotitem_id: number;
806
+ api_ship_ids: number[];
807
+ }
808
+
809
+ export interface MstEquipShip {
810
+ api_ship_id: number;
811
+ api_equip_type: number[];
812
+ }
813
+
814
+ export interface EquipStype {
815
+ id: number;
816
+ equip_type: number[];
817
+ }
818
+
1160
819
  export interface CompAnalyzerConfig {
1161
820
  engagement: Engagement;
1162
821
  formation: Formation;
@@ -1197,24 +856,7 @@ export interface AttackReport<T> {
1197
856
 
1198
857
  export type ShipStateMap = Record<ShipKey, ShipState>;
1199
858
 
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;
859
+ export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
1218
860
 
1219
861
  export interface OrgState {
1220
862
  id?: string;
@@ -1237,14 +879,7 @@ export interface AirSquadronState extends GearVecState, SlotSizeVecState {
1237
879
  mode?: AirSquadronMode;
1238
880
  }
1239
881
 
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;
882
+ export type AirSquadronMode = "Sortie" | "AirDefense";
1248
883
 
1249
884
  export interface FleetState {
1250
885
  id?: string;
@@ -1304,20 +939,29 @@ export interface GearState {
1304
939
  stars?: number;
1305
940
  }
1306
941
 
1307
- declare namespace SpeedGroup {
1308
- export type A = "A";
1309
- export type B1 = "B1";
1310
- export type B2 = "B2";
1311
- export type C = "C";
942
+ export type SlotSizeVec = (number | null)[];
943
+
944
+ export interface NightFleetConditions {
945
+ night_contact_rank?: ContactRank | null;
946
+ starshell_index?: number | null;
947
+ searchlight_index?: number | null;
948
+ activates_large_searchlight?: boolean;
1312
949
  }
1313
950
 
1314
- export type SpeedGroup =
1315
- | SpeedGroup.A
1316
- | SpeedGroup.B1
1317
- | SpeedGroup.B2
1318
- | SpeedGroup.C;
951
+ export interface NightConditions {
952
+ player?: NightFleetConditions;
953
+ enemy?: NightFleetConditions;
954
+ }
1319
955
 
1320
- export type SlotSizeVec = (number | null)[];
956
+ export interface BattleConditions {
957
+ org_type: OrgType;
958
+ role: Role;
959
+ ship_index: number;
960
+ fleet_len: number;
961
+ formation: Formation;
962
+ fleet_los_mod: number | null;
963
+ night_conditions: NightFleetConditions;
964
+ }
1321
965
 
1322
966
  export interface MasterGear {
1323
967
  gear_id: number;
@@ -1344,104 +988,6 @@ export interface MasterGear {
1344
988
  fleet_anti_air_resist?: number;
1345
989
  }
1346
990
 
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;
1443
- }
1444
-
1445
991
  /**
1446
992
  */
1447
993
  export class AirSquadron {
@@ -2199,6 +1745,20 @@ export class Org {
2199
1745
  */
2200
1746
  export class Ship {
2201
1747
  free(): void;
1748
+ /**
1749
+ * @returns {number | undefined}
1750
+ */
1751
+ state_day_gunfit_accuracy(): number | undefined;
1752
+ /**
1753
+ * @returns {number | undefined}
1754
+ */
1755
+ state_night_gunfit_accuracy(): number | undefined;
1756
+ /**
1757
+ * フィット砲補正
1758
+ * @param {boolean} is_night
1759
+ * @returns {number}
1760
+ */
1761
+ gunfit_accuracy(is_night: boolean): number;
2202
1762
  /**
2203
1763
  * @returns {Ship}
2204
1764
  */
@@ -2404,20 +1964,6 @@ export class Ship {
2404
1964
  * @returns {number | undefined}
2405
1965
  */
2406
1966
  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
1967
  /**
2422
1968
  */
2423
1969
  readonly accuracy: number;