fleethub-core 1.8.5 → 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,44 +1,20 @@
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
- declare namespace Engagement {
30
- export type GreenT = "GreenT";
31
- export type Parallel = "Parallel";
32
- export type HeadOn = "HeadOn";
33
- export type RedT = "RedT";
11
+ export interface ShipPosition {
12
+ org_type?: OrgType;
13
+ fleet_type?: FleetType;
14
+ fleet_len?: number;
15
+ index?: number;
34
16
  }
35
17
 
36
- export type Engagement =
37
- | Engagement.GreenT
38
- | Engagement.Parallel
39
- | Engagement.HeadOn
40
- | Engagement.RedT;
41
-
42
18
  export interface BattleDefinitions {
43
19
  formation: Record<Formation, NestedFormationDef>;
44
20
  anti_air_cutin: Record<number, AntiAirCutinDef>;
@@ -70,18 +46,9 @@ export interface AntiAirCutinDef {
70
46
  sequential: boolean | null;
71
47
  }
72
48
 
73
- type __NestedFormationDefFormationDef = FormationDef;
74
- declare namespace NestedFormationDef {
75
- export type Normal = __NestedFormationDefFormationDef;
76
- export type Vanguard = {
77
- top_half: __NestedFormationDefFormationDef;
78
- bottom_half: __NestedFormationDefFormationDef;
79
- };
80
- }
81
-
82
49
  export type NestedFormationDef =
83
- | NestedFormationDef.Normal
84
- | NestedFormationDef.Vanguard;
50
+ | FormationDef
51
+ | { top_half: FormationDef; bottom_half: FormationDef };
85
52
 
86
53
  export interface FormationDef {
87
54
  tag: Formation;
@@ -100,169 +67,117 @@ export interface FormationCombatModifiersDef {
100
67
  evasion_mod?: number;
101
68
  }
102
69
 
103
- export interface ShipAnalyzerConfig {
104
- air_state?: AirState;
105
- engagement?: Engagement;
106
- left?: AttackAnalyzerShipConfig;
107
- right?: AttackAnalyzerShipConfig;
70
+ export type CompiledEvaler = string;
71
+
72
+ export type SpeedGroup = "A" | "B1" | "B2" | "C";
73
+
74
+ export interface ActionReport<T> {
75
+ data: Record<string, AttackReport<T>>;
76
+ damage_state_density: Histogram<DamageState, number> | null;
77
+ is_active: boolean;
108
78
  }
109
79
 
110
80
  export type GearTypeIdArray = [number, number, number, number, number];
111
81
 
112
- declare namespace SpecialEnemyType {
113
- export type None = "None";
114
- export type SoftSkinned = "SoftSkinned";
115
- export type Pillbox = "Pillbox";
116
- export type IsolatedIsland = "IsolatedIsland";
117
- export type SupplyDepot = "SupplyDepot";
118
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
119
- export type PtImp = "PtImp";
120
- export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
121
- export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
122
- }
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";
123
106
 
124
- export type SpecialEnemyType =
125
- | SpecialEnemyType.None
126
- | SpecialEnemyType.SoftSkinned
127
- | SpecialEnemyType.Pillbox
128
- | SpecialEnemyType.IsolatedIsland
129
- | SpecialEnemyType.SupplyDepot
130
- | SpecialEnemyType.HarbourSummerPrincess
131
- | SpecialEnemyType.PtImp
132
- | SpecialEnemyType.BattleshipSummerPrincess
133
- | SpecialEnemyType.HeavyCruiserSummerPrincess;
134
-
135
- declare namespace MoraleState {
136
- export type Sparkle = "Sparkle";
137
- export type Normal = "Normal";
138
- export type Orange = "Orange";
139
- export type Red = "Red";
140
- }
141
-
142
- export type MoraleState =
143
- | MoraleState.Sparkle
144
- | MoraleState.Normal
145
- | MoraleState.Orange
146
- | MoraleState.Red;
147
-
148
- type __NightCutinLikeFleetCutin = FleetCutin;
149
- type __NightCutinLikeNightCutin = NightCutin;
150
- declare namespace NightCutinLike {
151
- export type NightCutin = __NightCutinLikeNightCutin;
152
- export type FleetCutin = __NightCutinLikeFleetCutin;
153
- }
154
-
155
- export type NightCutinLike =
156
- | NightCutinLike.NightCutin
157
- | NightCutinLike.FleetCutin;
158
-
159
- type __DayCutinLikeDayCutin = DayCutin;
160
- type __DayCutinLikeFleetCutin = FleetCutin;
161
- declare namespace DayCutinLike {
162
- export type DayCutin = __DayCutinLikeDayCutin;
163
- export type FleetCutin = __DayCutinLikeFleetCutin;
164
- }
165
-
166
- export type DayCutinLike = DayCutinLike.DayCutin | DayCutinLike.FleetCutin;
167
-
168
- declare namespace FleetCutin {
169
- export type NelsonTouch = "NelsonTouch";
170
- export type NagatoClassCutin = "NagatoClassCutin";
171
- export type ColoradoClassCutin = "ColoradoClassCutin";
172
- export type KongouClassCutin = "KongouClassCutin";
173
- export type Yamato2ShipCutin = "Yamato2ShipCutin";
174
- export type Yamato3ShipCutin = "Yamato3ShipCutin";
175
- }
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;
176
122
 
177
123
  export type FleetCutin =
178
- | FleetCutin.NelsonTouch
179
- | FleetCutin.NagatoClassCutin
180
- | FleetCutin.ColoradoClassCutin
181
- | FleetCutin.KongouClassCutin
182
- | FleetCutin.Yamato2ShipCutin
183
- | FleetCutin.Yamato3ShipCutin;
184
-
185
- declare namespace NightCutin {
186
- export type MainTorpRadar = "MainTorpRadar";
187
- export type TorpLookoutRadar = "TorpLookoutRadar";
188
- export type TorpTsloTorp = "TorpTsloTorp";
189
- export type TorpTsloDrum = "TorpTsloDrum";
190
- export type DoubleAttack = "DoubleAttack";
191
- export type TorpTorpMain = "TorpTorpMain";
192
- export type TorpTorpTorp = "TorpTorpTorp";
193
- export type MainMainSec = "MainMainSec";
194
- export type MainMainMain = "MainMainMain";
195
- export type SubTorpTorp = "SubTorpTorp";
196
- export type SubRadarTorp = "SubRadarTorp";
197
- export type Cvci1_25 = "Cvci1_25";
198
- export type Cvci1_20 = "Cvci1_20";
199
- export type Cvci1_18 = "Cvci1_18";
200
- export type Photobomber = "Photobomber";
201
- }
124
+ | "NelsonTouch"
125
+ | "NagatoClassCutin"
126
+ | "ColoradoClassCutin"
127
+ | "KongouClassCutin"
128
+ | "Yamato2ShipCutin"
129
+ | "Yamato3ShipCutin";
202
130
 
203
131
  export type NightCutin =
204
- | NightCutin.MainTorpRadar
205
- | NightCutin.TorpLookoutRadar
206
- | NightCutin.TorpTsloTorp
207
- | NightCutin.TorpTsloDrum
208
- | NightCutin.DoubleAttack
209
- | NightCutin.TorpTorpMain
210
- | NightCutin.TorpTorpTorp
211
- | NightCutin.MainMainSec
212
- | NightCutin.MainMainMain
213
- | NightCutin.SubTorpTorp
214
- | NightCutin.SubRadarTorp
215
- | NightCutin.Cvci1_25
216
- | NightCutin.Cvci1_20
217
- | NightCutin.Cvci1_18
218
- | NightCutin.Photobomber;
219
-
220
- declare namespace DayCutin {
221
- export type Zuiun = "Zuiun";
222
- export type AirSea = "AirSea";
223
- export type MainMain = "MainMain";
224
- export type MainAp = "MainAp";
225
- export type MainRadar = "MainRadar";
226
- export type MainSec = "MainSec";
227
- export type DoubleAttack = "DoubleAttack";
228
- export type FBA = "FBA";
229
- export type BBA = "BBA";
230
- export type BA = "BA";
231
- }
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";
232
147
 
233
148
  export type DayCutin =
234
- | DayCutin.Zuiun
235
- | DayCutin.AirSea
236
- | DayCutin.MainMain
237
- | DayCutin.MainAp
238
- | DayCutin.MainRadar
239
- | DayCutin.MainSec
240
- | DayCutin.DoubleAttack
241
- | DayCutin.FBA
242
- | DayCutin.BBA
243
- | DayCutin.BA;
244
-
245
- declare namespace ContactRank {
246
- export type Rank1 = "Rank1";
247
- export type Rank2 = "Rank2";
248
- export type Rank3 = "Rank3";
249
- }
250
-
251
- export type ContactRank =
252
- | ContactRank.Rank1
253
- | ContactRank.Rank2
254
- | ContactRank.Rank3;
255
-
256
- declare namespace AirWaveType {
257
- export type Jet = "Jet";
258
- export type LandBase = "LandBase";
259
- export type Carrier = "Carrier";
260
- }
261
-
262
- export type AirWaveType =
263
- | AirWaveType.Jet
264
- | AirWaveType.LandBase
265
- | 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";
266
181
 
267
182
  export interface SimulatorResult {
268
183
  items: SimulatorResultItem[];
@@ -276,196 +191,114 @@ export interface SimulatorResultItem {
276
191
  damage_state_map: Record<DamageState, number>;
277
192
  }
278
193
 
279
- declare namespace GearCategory {
280
- export type Fighter = "Fighter";
281
- export type Bomber = "Bomber";
282
- export type Recon = "Recon";
283
- export type MainGun = "MainGun";
284
- export type Secondary = "Secondary";
285
- export type Torpedo = "Torpedo";
286
- export type AntiSub = "AntiSub";
287
- export type Radar = "Radar";
288
- export type Landing = "Landing";
289
- export type Ration = "Ration";
290
- export type LandBased = "LandBased";
291
- export type Misc = "Misc";
292
- }
194
+ export type SpecialEnemyType =
195
+ | "None"
196
+ | "SoftSkinned"
197
+ | "Pillbox"
198
+ | "IsolatedIsland"
199
+ | "SupplyDepot"
200
+ | "HarbourSummerPrincess"
201
+ | "PtImp"
202
+ | "BattleshipSummerPrincess"
203
+ | "HeavyCruiserSummerPrincess";
293
204
 
294
205
  export type GearCategory =
295
- | GearCategory.Fighter
296
- | GearCategory.Bomber
297
- | GearCategory.Recon
298
- | GearCategory.MainGun
299
- | GearCategory.Secondary
300
- | GearCategory.Torpedo
301
- | GearCategory.AntiSub
302
- | GearCategory.Radar
303
- | GearCategory.Landing
304
- | GearCategory.Ration
305
- | GearCategory.LandBased
306
- | GearCategory.Misc;
307
-
308
- declare namespace GearType {
309
- export type Unknown = "Unknown";
310
- export type SmallMainGun = "SmallMainGun";
311
- export type MediumMainGun = "MediumMainGun";
312
- export type LargeMainGun = "LargeMainGun";
313
- export type SecondaryGun = "SecondaryGun";
314
- export type Torpedo = "Torpedo";
315
- export type CbFighter = "CbFighter";
316
- export type CbDiveBomber = "CbDiveBomber";
317
- export type CbTorpedoBomber = "CbTorpedoBomber";
318
- export type CbRecon = "CbRecon";
319
- export type ReconSeaplane = "ReconSeaplane";
320
- export type SeaplaneBomber = "SeaplaneBomber";
321
- export type SmallRadar = "SmallRadar";
322
- export type LargeRadar = "LargeRadar";
323
- export type Sonar = "Sonar";
324
- export type DepthCharge = "DepthCharge";
325
- export type ExtraArmor = "ExtraArmor";
326
- export type Engine = "Engine";
327
- export type AntiAirShell = "AntiAirShell";
328
- export type ApShell = "ApShell";
329
- export type VtFuze = "VtFuze";
330
- export type AntiAirGun = "AntiAirGun";
331
- export type MidgetSubmarine = "MidgetSubmarine";
332
- export type EmergencyRepair = "EmergencyRepair";
333
- export type LandingCraft = "LandingCraft";
334
- export type Rotorcraft = "Rotorcraft";
335
- export type AntiSubPatrolAircraft = "AntiSubPatrolAircraft";
336
- export type MediumArmor = "MediumArmor";
337
- export type LargeArmor = "LargeArmor";
338
- export type Searchlight = "Searchlight";
339
- export type SupplyContainer = "SupplyContainer";
340
- export type ShipRepairFacility = "ShipRepairFacility";
341
- export type SubmarineTorpedo = "SubmarineTorpedo";
342
- export type Starshell = "Starshell";
343
- export type CommandFacility = "CommandFacility";
344
- export type AviationPersonnel = "AviationPersonnel";
345
- export type AntiAirFireDirector = "AntiAirFireDirector";
346
- export type AntiGroundEquipment = "AntiGroundEquipment";
347
- export type LargeMainGun2 = "LargeMainGun2";
348
- export type ShipPersonnel = "ShipPersonnel";
349
- export type LargeSonar = "LargeSonar";
350
- export type LargeFlyingBoat = "LargeFlyingBoat";
351
- export type LargeSearchlight = "LargeSearchlight";
352
- export type CombatRation = "CombatRation";
353
- export type Supplies = "Supplies";
354
- export type SeaplaneFighter = "SeaplaneFighter";
355
- export type AmphibiousTank = "AmphibiousTank";
356
- export type LbAttacker = "LbAttacker";
357
- export type LbFighter = "LbFighter";
358
- export type LbRecon = "LbRecon";
359
- export type TransportationMaterial = "TransportationMaterial";
360
- export type SubmarineEquipment = "SubmarineEquipment";
361
- export type LargeLbAircraft = "LargeLbAircraft";
362
- export type JetFighter = "JetFighter";
363
- export type JetFighterBomber = "JetFighterBomber";
364
- export type JetTorpedoBomber = "JetTorpedoBomber";
365
- export type JetRecon = "JetRecon";
366
- export type LargeRadar2 = "LargeRadar2";
367
- export type CbRecon2 = "CbRecon2";
368
- export type SecondaryGun2 = "SecondaryGun2";
369
- }
206
+ | "Fighter"
207
+ | "Bomber"
208
+ | "Recon"
209
+ | "MainGun"
210
+ | "Secondary"
211
+ | "Torpedo"
212
+ | "AntiSub"
213
+ | "Radar"
214
+ | "Landing"
215
+ | "Ration"
216
+ | "LandBased"
217
+ | "Misc";
370
218
 
371
219
  export type GearType =
372
- | GearType.Unknown
373
- | GearType.SmallMainGun
374
- | GearType.MediumMainGun
375
- | GearType.LargeMainGun
376
- | GearType.SecondaryGun
377
- | GearType.Torpedo
378
- | GearType.CbFighter
379
- | GearType.CbDiveBomber
380
- | GearType.CbTorpedoBomber
381
- | GearType.CbRecon
382
- | GearType.ReconSeaplane
383
- | GearType.SeaplaneBomber
384
- | GearType.SmallRadar
385
- | GearType.LargeRadar
386
- | GearType.Sonar
387
- | GearType.DepthCharge
388
- | GearType.ExtraArmor
389
- | GearType.Engine
390
- | GearType.AntiAirShell
391
- | GearType.ApShell
392
- | GearType.VtFuze
393
- | GearType.AntiAirGun
394
- | GearType.MidgetSubmarine
395
- | GearType.EmergencyRepair
396
- | GearType.LandingCraft
397
- | GearType.Rotorcraft
398
- | GearType.AntiSubPatrolAircraft
399
- | GearType.MediumArmor
400
- | GearType.LargeArmor
401
- | GearType.Searchlight
402
- | GearType.SupplyContainer
403
- | GearType.ShipRepairFacility
404
- | GearType.SubmarineTorpedo
405
- | GearType.Starshell
406
- | GearType.CommandFacility
407
- | GearType.AviationPersonnel
408
- | GearType.AntiAirFireDirector
409
- | GearType.AntiGroundEquipment
410
- | GearType.LargeMainGun2
411
- | GearType.ShipPersonnel
412
- | GearType.LargeSonar
413
- | GearType.LargeFlyingBoat
414
- | GearType.LargeSearchlight
415
- | GearType.CombatRation
416
- | GearType.Supplies
417
- | GearType.SeaplaneFighter
418
- | GearType.AmphibiousTank
419
- | GearType.LbAttacker
420
- | GearType.LbFighter
421
- | GearType.LbRecon
422
- | GearType.TransportationMaterial
423
- | GearType.SubmarineEquipment
424
- | GearType.LargeLbAircraft
425
- | GearType.JetFighter
426
- | GearType.JetFighterBomber
427
- | GearType.JetTorpedoBomber
428
- | GearType.JetRecon
429
- | GearType.LargeRadar2
430
- | GearType.CbRecon2
431
- | GearType.SecondaryGun2;
432
-
433
- declare namespace DamageState {
434
- export type Normal = "Normal";
435
- export type Shouha = "Shouha";
436
- export type Chuuha = "Chuuha";
437
- export type Taiha = "Taiha";
438
- export type Sunk = "Sunk";
439
- }
440
-
441
- export type DamageState =
442
- | DamageState.Normal
443
- | DamageState.Shouha
444
- | DamageState.Chuuha
445
- | DamageState.Taiha
446
- | DamageState.Sunk;
447
-
448
- export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
449
- formation?: Formation;
450
- }
451
-
452
- export interface NodeAttackAnalyzerConfig {
453
- air_state?: AirState;
454
- engagement?: Engagement;
455
- left?: NodeAttackAnalyzerShipConfig;
456
- right?: NodeAttackAnalyzerShipConfig;
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;
457
291
  }
458
292
 
459
- export interface NodeAttackAnalysis {
460
- left: AttackAnalysis;
461
- right: AttackAnalysis;
293
+ export interface NationalityDef {
294
+ id: number;
295
+ ctypes: number[];
462
296
  }
463
297
 
464
- export interface ShipPosition {
465
- org_type?: OrgType;
466
- fleet_type?: FleetType;
467
- fleet_len?: number;
468
- index?: number;
298
+ export interface MasterAttrRule<T> {
299
+ tag: T;
300
+ name: string;
301
+ expr: CompiledEvaler;
469
302
  }
470
303
 
471
304
  export interface CompMeta {
@@ -485,130 +318,67 @@ export interface ShipMeta {
485
318
 
486
319
  export type TorpedoAttackType = null;
487
320
 
488
- type __NightPhaseAttackTypeAswAttackType = AswAttackType;
489
- type __NightPhaseAttackTypeNightAttackType = NightAttackType;
490
- declare namespace NightPhaseAttackType {
491
- export type Night = { t: "Night"; c: __NightPhaseAttackTypeNightAttackType };
492
- export type Asw = { t: "Asw"; c: __NightPhaseAttackTypeAswAttackType };
493
- }
494
-
495
321
  export type NightPhaseAttackType =
496
- | NightPhaseAttackType.Night
497
- | NightPhaseAttackType.Asw;
498
-
499
- type __DayPhaseAttackTypeAswAttackType = AswAttackType;
500
- type __DayPhaseAttackTypeShellingType = ShellingType;
501
- declare namespace DayPhaseAttackType {
502
- export type Shelling = { t: "Shelling"; c: __DayPhaseAttackTypeShellingType };
503
- export type Asw = { t: "Asw"; c: __DayPhaseAttackTypeAswAttackType };
504
- }
322
+ | { t: "Night"; c: NightAttackType }
323
+ | { t: "Asw"; c: AswAttackType };
505
324
 
506
325
  export type DayPhaseAttackType =
507
- | DayPhaseAttackType.Shelling
508
- | DayPhaseAttackType.Asw;
509
-
510
- type __AttackTypeAswAttackType = AswAttackType;
511
- type __AttackTypeNightAttackType = NightAttackType;
512
- type __AttackTypeShellingType = ShellingType;
513
- type __AttackTypeSupportShellingType = SupportShellingType;
514
- declare namespace AttackType {
515
- export type Asw = { t: "Asw"; c: __AttackTypeAswAttackType };
516
- export type Shelling = { t: "Shelling"; c: __AttackTypeShellingType };
517
- export type Night = { t: "Night"; c: __AttackTypeNightAttackType };
518
- export type Torpedo = { t: "Torpedo"; c: null };
519
- export type SupportShelling = {
520
- t: "SupportShelling";
521
- c: __AttackTypeSupportShellingType;
522
- };
523
- }
326
+ | { t: "Shelling"; c: ShellingType }
327
+ | { t: "Asw"; c: AswAttackType };
524
328
 
525
329
  export type AttackType =
526
- | AttackType.Asw
527
- | AttackType.Shelling
528
- | AttackType.Night
529
- | AttackType.Torpedo
530
- | 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 };
531
335
 
532
336
  export type SupportShellingType = ShellingType;
533
337
 
534
- declare namespace NightAttackType {
535
- export type Normal = "Normal";
536
- export type Swordfish = "Swordfish";
537
- export type Carrier = "Carrier";
538
- }
338
+ export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
539
339
 
540
- export type NightAttackType =
541
- | NightAttackType.Normal
542
- | NightAttackType.Swordfish
543
- | NightAttackType.Carrier;
340
+ export type ShellingType = "Normal" | "Carrier";
544
341
 
545
- declare namespace ShellingType {
546
- export type Normal = "Normal";
547
- export type Carrier = "Carrier";
548
- }
342
+ export type AswAttackType = "DepthCharge" | "Aircraft";
549
343
 
550
- export type ShellingType = ShellingType.Normal | ShellingType.Carrier;
344
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
551
345
 
552
- declare namespace AswAttackType {
553
- export type DepthCharge = "DepthCharge";
554
- export type Aircraft = "Aircraft";
555
- }
346
+ export type AirState =
347
+ | "AirSupremacy"
348
+ | "AirSuperiority"
349
+ | "AirParity"
350
+ | "AirDenial"
351
+ | "AirIncapability";
556
352
 
557
- export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
353
+ export type FhResult<T> = { Ok: T } | { Err: string };
558
354
 
559
- declare namespace AirStateRank {
560
- export type Rank0 = "Rank0";
561
- export type Rank1 = "Rank1";
562
- export type Rank2 = "Rank2";
563
- export type Rank3 = "Rank3";
355
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
356
+ formation?: Formation;
564
357
  }
565
358
 
566
- export type AirStateRank =
567
- | AirStateRank.Rank0
568
- | AirStateRank.Rank1
569
- | AirStateRank.Rank2
570
- | AirStateRank.Rank3;
359
+ export interface NodeAttackAnalyzerConfig {
360
+ air_state?: AirState;
361
+ engagement?: Engagement;
362
+ left?: NodeAttackAnalyzerShipConfig;
363
+ right?: NodeAttackAnalyzerShipConfig;
364
+ }
571
365
 
572
- declare namespace AirState {
573
- export type AirSupremacy = "AirSupremacy";
574
- export type AirSuperiority = "AirSuperiority";
575
- export type AirParity = "AirParity";
576
- export type AirDenial = "AirDenial";
577
- export type AirIncapability = "AirIncapability";
366
+ export interface NodeAttackAnalysis {
367
+ left: AttackAnalysis;
368
+ right: AttackAnalysis;
578
369
  }
579
370
 
580
- export type AirState =
581
- | AirState.AirSupremacy
582
- | AirState.AirSuperiority
583
- | AirState.AirParity
584
- | AirState.AirDenial
585
- | AirState.AirIncapability;
371
+ export type Side = "Player" | "Enemy";
586
372
 
587
- export interface MasterData {
588
- created_at: number;
589
- gears: MasterGear[];
590
- gear_attrs: MasterAttrRule<GearAttr>[];
591
- ships: MasterShip[];
592
- ship_attrs: MasterAttrRule<ShipAttr>[];
593
- ibonuses: MasterIBonuses;
594
- equippable: MasterEquippable;
595
- formation: NestedFormationDef[];
596
- anti_air_cutin: AntiAirCutinDef[];
597
- day_cutin: DayCutinDef[];
598
- night_cutin: NightCutinDef[];
599
- }
373
+ export type Role = "Main" | "Escort";
600
374
 
601
- export interface MasterConfig {
602
- formation: NestedFormationDef[];
603
- anti_air_cutin: AntiAirCutinDef[];
604
- day_cutin: DayCutinDef[];
605
- night_cutin: NightCutinDef[];
606
- }
375
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
607
376
 
608
- export interface MasterAttrRule<T> {
609
- tag: T;
610
- name: string;
611
- expr: string;
377
+ export interface ShipAnalyzerConfig {
378
+ air_state?: AirState;
379
+ engagement?: Engagement;
380
+ left?: AttackAnalyzerShipConfig;
381
+ right?: AttackAnalyzerShipConfig;
612
382
  }
613
383
 
614
384
  export interface EBonuses {
@@ -651,55 +421,33 @@ export interface GearInput {
651
421
 
652
422
  export type GearVecInput = GearInput[];
653
423
 
654
- declare namespace ShipAttr {
655
- export type Unknown = "Unknown";
656
- export type Abyssal = "Abyssal";
657
- export type NightCarrier = "NightCarrier";
658
- export type Installation = "Installation";
659
- export type RoyalNavy = "RoyalNavy";
660
- export type Kai2 = "Kai2";
661
- export type TurbineSpeedBonus = "TurbineSpeedBonus";
662
- export type Pillbox = "Pillbox";
663
- export type IsolatedIsland = "IsolatedIsland";
664
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
665
- export type SupplyDepot = "SupplyDepot";
666
- export type PtImp = "PtImp";
667
- export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
668
- export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
424
+ export interface ShipConditions extends ShipPosition {
425
+ formation?: Formation;
669
426
  }
670
427
 
671
428
  export type ShipAttr =
672
- | ShipAttr.Unknown
673
- | ShipAttr.Abyssal
674
- | ShipAttr.NightCarrier
675
- | ShipAttr.Installation
676
- | ShipAttr.RoyalNavy
677
- | ShipAttr.Kai2
678
- | ShipAttr.TurbineSpeedBonus
679
- | ShipAttr.Pillbox
680
- | ShipAttr.IsolatedIsland
681
- | ShipAttr.HarbourSummerPrincess
682
- | ShipAttr.SupplyDepot
683
- | ShipAttr.PtImp
684
- | ShipAttr.BattleshipSummerPrincess
685
- | ShipAttr.HeavyCruiserSummerPrincess;
686
-
687
- declare namespace OrgType {
688
- export type Single = "Single";
689
- export type CarrierTaskForce = "CarrierTaskForce";
690
- export type SurfaceTaskForce = "SurfaceTaskForce";
691
- export type TransportEscort = "TransportEscort";
692
- export type EnemySingle = "EnemySingle";
693
- export type EnemyCombined = "EnemyCombined";
694
- }
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";
695
443
 
696
444
  export type OrgType =
697
- | OrgType.Single
698
- | OrgType.CarrierTaskForce
699
- | OrgType.SurfaceTaskForce
700
- | OrgType.TransportEscort
701
- | OrgType.EnemySingle
702
- | OrgType.EnemyCombined;
445
+ | "Single"
446
+ | "CarrierTaskForce"
447
+ | "SurfaceTaskForce"
448
+ | "TransportEscort"
449
+ | "EnemySingle"
450
+ | "EnemyCombined";
703
451
 
704
452
  export interface SupportShellingSimulatorParams {
705
453
  attacker_formation?: Formation;
@@ -707,97 +455,90 @@ export interface SupportShellingSimulatorParams {
707
455
  engagement: Engagement;
708
456
  }
709
457
 
710
- declare namespace GearAttr {
711
- export type Unknown = "Unknown";
712
- export type Abyssal = "Abyssal";
713
- export type HighAngleMount = "HighAngleMount";
714
- export type NightFighter = "NightFighter";
715
- export type NightAttacker = "NightAttacker";
716
- export type HeavyBomber = "HeavyBomber";
717
- export type NightRecon = "NightRecon";
718
- export type MainGun = "MainGun";
719
- export type Radar = "Radar";
720
- export type SurfaceRadar = "SurfaceRadar";
721
- export type AirRadar = "AirRadar";
722
- export type DepthChargeProjector = "DepthChargeProjector";
723
- export type SynergisticDepthCharge = "SynergisticDepthCharge";
724
- export type AntiSubMortar = "AntiSubMortar";
725
- export type AntiSubWeapon = "AntiSubWeapon";
726
- export type ApDepthCharge = "ApDepthCharge";
727
- export type AntiSubAircraft = "AntiSubAircraft";
728
- export type LateModelBowTorpedo = "LateModelBowTorpedo";
729
- export type Seaplane = "Seaplane";
730
- export type CbAircraft = "CbAircraft";
731
- export type LbAircraft = "LbAircraft";
732
- export type JetAircraft = "JetAircraft";
733
- export type Fighter = "Fighter";
734
- export type Recon = "Recon";
735
- export type ObservationSeaplane = "ObservationSeaplane";
736
- export type CbFighterBomber = "CbFighterBomber";
737
- export type AntiInstDiveBomber = "AntiInstDiveBomber";
738
- export type CbSwordfish = "CbSwordfish";
739
- export type SemiNightPlane = "SemiNightPlane";
740
- export type HighAltitudeInterceptor = "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[];
741
475
  }
742
476
 
743
- export type GearAttr =
744
- | GearAttr.Unknown
745
- | GearAttr.Abyssal
746
- | GearAttr.HighAngleMount
747
- | GearAttr.NightFighter
748
- | GearAttr.NightAttacker
749
- | GearAttr.HeavyBomber
750
- | GearAttr.NightRecon
751
- | GearAttr.MainGun
752
- | GearAttr.Radar
753
- | GearAttr.SurfaceRadar
754
- | GearAttr.AirRadar
755
- | GearAttr.DepthChargeProjector
756
- | GearAttr.SynergisticDepthCharge
757
- | GearAttr.AntiSubMortar
758
- | GearAttr.AntiSubWeapon
759
- | GearAttr.ApDepthCharge
760
- | GearAttr.AntiSubAircraft
761
- | GearAttr.LateModelBowTorpedo
762
- | GearAttr.Seaplane
763
- | GearAttr.CbAircraft
764
- | GearAttr.LbAircraft
765
- | GearAttr.JetAircraft
766
- | GearAttr.Fighter
767
- | GearAttr.Recon
768
- | GearAttr.ObservationSeaplane
769
- | GearAttr.CbFighterBomber
770
- | GearAttr.AntiInstDiveBomber
771
- | GearAttr.CbSwordfish
772
- | GearAttr.SemiNightPlane
773
- | GearAttr.HighAltitudeInterceptor;
477
+ export interface MasterIBonusRule {
478
+ expr: CompiledEvaler;
479
+ formula: CompiledEvaler;
480
+ }
774
481
 
775
- export interface SupportShellingStyle {
776
- tag: "SupportShellingStyle";
777
- attack_type: SupportShellingType;
482
+ export interface CompAntiAirAnalysis {
483
+ fleet_adjusted_anti_air: number;
484
+ ships: AntiAirReport[];
485
+ anti_air_cutin_chance: [number, number][];
778
486
  }
779
487
 
780
- type __NightPhaseAttackStyleAswAttackStyle = AswAttackStyle;
781
- type __NightPhaseAttackStyleNightAttackStyle = NightAttackStyle;
782
- declare namespace NightPhaseAttackStyle {
783
- export type Night = __NightPhaseAttackStyleNightAttackStyle;
784
- export type Asw = __NightPhaseAttackStyleAswAttackStyle;
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;
785
498
  }
786
499
 
787
- export type NightPhaseAttackStyle =
788
- | NightPhaseAttackStyle.Night
789
- | NightPhaseAttackStyle.Asw;
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";
790
533
 
791
- type __DayPhaseAttackStyleAswAttackStyle = AswAttackStyle;
792
- type __DayPhaseAttackStyleShellingStyle = ShellingStyle;
793
- declare namespace DayPhaseAttackStyle {
794
- export type Shelling = __DayPhaseAttackStyleShellingStyle;
795
- export type Asw = __DayPhaseAttackStyleAswAttackStyle;
534
+ export interface SupportShellingStyle {
535
+ tag: "SupportShellingStyle";
536
+ attack_type: SupportShellingType;
796
537
  }
797
538
 
798
- export type DayPhaseAttackStyle =
799
- | DayPhaseAttackStyle.Shelling
800
- | DayPhaseAttackStyle.Asw;
539
+ export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
540
+
541
+ export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
801
542
 
802
543
  export interface TorpedoAttackStyle {
803
544
  tag: "TorpedoAttackStyle";
@@ -827,28 +568,39 @@ export interface ShellingStyle {
827
568
  hits: number;
828
569
  }
829
570
 
830
- export interface MasterIBonuses {
831
- shelling_power: MasterIBonusRule[];
832
- carrier_shelling_power: MasterIBonusRule[];
833
- shelling_accuracy: MasterIBonusRule[];
834
- torpedo_power: MasterIBonusRule[];
835
- torpedo_accuracy: MasterIBonusRule[];
836
- torpedo_evasion: MasterIBonusRule[];
837
- asw_power: MasterIBonusRule[];
838
- asw_accuracy: MasterIBonusRule[];
839
- night_power: MasterIBonusRule[];
840
- night_accuracy: MasterIBonusRule[];
841
- defense_power: MasterIBonusRule[];
842
- contact_selection: MasterIBonusRule[];
843
- fighter_power: MasterIBonusRule[];
844
- ship_anti_air: MasterIBonusRule[];
845
- fleet_anti_air: MasterIBonusRule[];
846
- elos: MasterIBonusRule[];
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;
847
579
  }
848
580
 
849
- export interface MasterIBonusRule {
850
- expr: CompiledEvaler;
851
- formula: CompiledEvaler;
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;
593
+ }
594
+
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;
852
604
  }
853
605
 
854
606
  export interface NightContactChance {
@@ -887,77 +639,29 @@ export interface DamageReport {
887
639
  damage_state_density: Histogram<DamageState, number>;
888
640
  }
889
641
 
890
- export interface CompAntiAirAnalysis {
891
- fleet_adjusted_anti_air: number;
892
- ships: AntiAirReport[];
893
- anti_air_cutin_chance: [number, number][];
894
- }
895
-
896
- export interface AntiAirReport {
897
- ship_id: number;
898
- role: Role;
899
- index: number;
900
- adjusted_anti_air: number | null;
901
- proportional_shotdown_rate: number | null;
902
- fixed_shotdown_number: number | null;
903
- guaranteed: number | null;
904
- anti_air_cutin_chance: [number, number][];
905
- anti_air_propellant_barrage_chance: number | null;
642
+ export interface AttackAnalyzerShipConfig
643
+ extends ShipConditions,
644
+ NightFleetConditions {
645
+ fleet_los_mod?: number | null;
906
646
  }
907
647
 
908
648
  export type Histogram<K, V> = Partial<Record<K, V>>;
909
649
 
910
- type __FormationCombinedFormation = CombinedFormation;
911
- type __FormationSingleFormation = SingleFormation;
912
- declare namespace Formation {
913
- export type Single = __FormationSingleFormation;
914
- export type Combined = __FormationCombinedFormation;
915
- }
916
-
917
- export type Formation = Formation.Single | Formation.Combined;
918
-
919
- declare namespace CombinedFormation {
920
- export type Cruising1 = "Cruising1";
921
- export type Cruising2 = "Cruising2";
922
- export type Cruising3 = "Cruising3";
923
- export type Cruising4 = "Cruising4";
924
- }
650
+ export type Formation = SingleFormation | CombinedFormation;
925
651
 
926
652
  export type CombinedFormation =
927
- | CombinedFormation.Cruising1
928
- | CombinedFormation.Cruising2
929
- | CombinedFormation.Cruising3
930
- | CombinedFormation.Cruising4;
931
-
932
- declare namespace SingleFormation {
933
- export type LineAhead = "LineAhead";
934
- export type DoubleLine = "DoubleLine";
935
- export type Diamond = "Diamond";
936
- export type Echelon = "Echelon";
937
- export type LineAbreast = "LineAbreast";
938
- export type Vanguard = "Vanguard";
939
- }
653
+ | "Cruising1"
654
+ | "Cruising2"
655
+ | "Cruising3"
656
+ | "Cruising4";
940
657
 
941
658
  export type SingleFormation =
942
- | SingleFormation.LineAhead
943
- | SingleFormation.DoubleLine
944
- | SingleFormation.Diamond
945
- | SingleFormation.Echelon
946
- | SingleFormation.LineAbreast
947
- | SingleFormation.Vanguard;
948
-
949
- declare namespace FleetType {
950
- export type Main = "Main";
951
- export type Escort = "Escort";
952
- export type RouteSup = "RouteSup";
953
- export type BossSup = "BossSup";
954
- }
955
-
956
- export type FleetType =
957
- | FleetType.Main
958
- | FleetType.Escort
959
- | FleetType.RouteSup
960
- | FleetType.BossSup;
659
+ | "LineAhead"
660
+ | "DoubleLine"
661
+ | "Diamond"
662
+ | "Echelon"
663
+ | "LineAbreast"
664
+ | "Vanguard";
961
665
 
962
666
  export interface CustomPowerModifiers {
963
667
  precap_mod?: AttackPowerModifier;
@@ -981,26 +685,11 @@ export interface AttackPowerModifier {
981
685
  b?: number;
982
686
  }
983
687
 
984
- export interface MasterEquippable {
985
- equip_stype: EquipStype[];
986
- equip_exslot: number[];
987
- equip_ship: MstEquipShip[];
988
- equip_exslot_ship: MstEquipExslotShip[];
989
- }
990
-
991
- export interface MstEquipExslotShip {
992
- api_slotitem_id: number;
993
- api_ship_ids: number[];
994
- }
995
-
996
- export interface MstEquipShip {
997
- api_ship_id: number;
998
- api_equip_type: number[];
999
- }
1000
-
1001
- export interface EquipStype {
1002
- id: number;
1003
- equip_type: number[];
688
+ export interface MasterBattleDefinitions {
689
+ formation: NestedFormationDef[];
690
+ anti_air_cutin: AntiAirCutinDef[];
691
+ day_cutin: DayCutinDef[];
692
+ night_cutin: NightCutinDef[];
1004
693
  }
1005
694
 
1006
695
  export interface HitRate {
@@ -1018,41 +707,6 @@ export interface HitRateParams {
1018
707
  hit_percentage_bonus: number;
1019
708
  }
1020
709
 
1021
- export interface AttackPower {
1022
- precap: number;
1023
- is_capped: boolean;
1024
- capped: number;
1025
- normal: number;
1026
- critical: number;
1027
- armor_penetration: number;
1028
- remaining_ammo_mod: number;
1029
- }
1030
-
1031
- export interface AttackPowerParams {
1032
- basic: number;
1033
- cap: number;
1034
- precap_mod: AttackPowerModifier;
1035
- postcap_mod: AttackPowerModifier;
1036
- ap_shell_mod: number | null;
1037
- carrier_power: number | null;
1038
- proficiency_critical_mod: number;
1039
- armor_penetration: number;
1040
- remaining_ammo_mod: number;
1041
- special_enemy_mods: SpecialEnemyModifiers;
1042
- custom_mods: CustomPowerModifiers;
1043
- }
1044
-
1045
- export interface SpecialEnemyModifiers {
1046
- precap_general_mod: AttackPowerModifier;
1047
- stype_mod: AttackPowerModifier;
1048
- landing_craft_synergy_mod: AttackPowerModifier;
1049
- toku_daihatsu_tank_mod: AttackPowerModifier;
1050
- m4a1dd_mod: AttackPowerModifier;
1051
- honi_mod: AttackPowerModifier;
1052
- postcap_general_mod: AttackPowerModifier;
1053
- pt_mod: AttackPowerModifier;
1054
- }
1055
-
1056
710
  export interface CompDayCutinAnalysis {
1057
711
  rank3_air_state: AirState;
1058
712
  rank2_air_state: AirState;
@@ -1087,12 +741,6 @@ export interface DayContactChance {
1087
741
  total: number;
1088
742
  }
1089
743
 
1090
- export interface AttackAnalyzerShipConfig
1091
- extends ShipConditions,
1092
- NightFleetConditions {
1093
- fleet_los_mod?: number | null;
1094
- }
1095
-
1096
744
  export interface AttackAnalysis {
1097
745
  attacker_is_player: boolean;
1098
746
  attacker_ship_id: number;
@@ -1104,34 +752,13 @@ export interface AttackAnalysis {
1104
752
  support_shelling: ActionReport<SupportShellingStyle>;
1105
753
  }
1106
754
 
1107
- export interface NightFleetConditions {
1108
- night_contact_rank?: ContactRank | null;
1109
- starshell_index?: number | null;
1110
- searchlight_index?: number | null;
1111
- activates_large_searchlight?: boolean;
1112
- }
1113
-
1114
- export interface NightConditions {
1115
- player?: NightFleetConditions;
1116
- enemy?: NightFleetConditions;
1117
- }
1118
-
1119
- export interface BattleConditions {
1120
- org_type: OrgType;
1121
- role: Role;
1122
- ship_index: number;
1123
- fleet_len: number;
1124
- formation: Formation;
1125
- fleet_los_mod: number | null;
1126
- night_conditions: NightFleetConditions;
1127
- }
1128
-
1129
755
  export interface MasterShip {
1130
756
  ship_id: number;
1131
757
  name: string;
1132
758
  yomi: string;
1133
759
  stype: number;
1134
760
  ctype: number;
761
+ nationality?: number;
1135
762
  sort_id?: number;
1136
763
  max_hp: StatInterval;
1137
764
  firepower: StatInterval;
@@ -1159,6 +786,36 @@ export interface MasterShip {
1159
786
 
1160
787
  export type StatInterval = [number | null, number | null];
1161
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
+
1162
819
  export interface CompAnalyzerConfig {
1163
820
  engagement: Engagement;
1164
821
  formation: Formation;
@@ -1199,24 +856,7 @@ export interface AttackReport<T> {
1199
856
 
1200
857
  export type ShipStateMap = Record<ShipKey, ShipState>;
1201
858
 
1202
- declare namespace ShipKey {
1203
- export type s1 = "s1";
1204
- export type s2 = "s2";
1205
- export type s3 = "s3";
1206
- export type s4 = "s4";
1207
- export type s5 = "s5";
1208
- export type s6 = "s6";
1209
- export type s7 = "s7";
1210
- }
1211
-
1212
- export type ShipKey =
1213
- | ShipKey.s1
1214
- | ShipKey.s2
1215
- | ShipKey.s3
1216
- | ShipKey.s4
1217
- | ShipKey.s5
1218
- | ShipKey.s6
1219
- | ShipKey.s7;
859
+ export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
1220
860
 
1221
861
  export interface OrgState {
1222
862
  id?: string;
@@ -1239,14 +879,7 @@ export interface AirSquadronState extends GearVecState, SlotSizeVecState {
1239
879
  mode?: AirSquadronMode;
1240
880
  }
1241
881
 
1242
- declare namespace AirSquadronMode {
1243
- export type Sortie = "Sortie";
1244
- export type AirDefense = "AirDefense";
1245
- }
1246
-
1247
- export type AirSquadronMode =
1248
- | AirSquadronMode.Sortie
1249
- | AirSquadronMode.AirDefense;
882
+ export type AirSquadronMode = "Sortie" | "AirDefense";
1250
883
 
1251
884
  export interface FleetState {
1252
885
  id?: string;
@@ -1306,6 +939,30 @@ export interface GearState {
1306
939
  stars?: number;
1307
940
  }
1308
941
 
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;
949
+ }
950
+
951
+ export interface NightConditions {
952
+ player?: NightFleetConditions;
953
+ enemy?: NightFleetConditions;
954
+ }
955
+
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
+ }
965
+
1309
966
  export interface MasterGear {
1310
967
  gear_id: number;
1311
968
  name: string;
@@ -1331,117 +988,6 @@ export interface MasterGear {
1331
988
  fleet_anti_air_resist?: number;
1332
989
  }
1333
990
 
1334
- export interface ActionReport<T> {
1335
- data: Record<string, AttackReport<T>>;
1336
- damage_state_density: Histogram<DamageState, number> | null;
1337
- is_active: boolean;
1338
- }
1339
-
1340
- declare namespace SpeedGroup {
1341
- export type A = "A";
1342
- export type B1 = "B1";
1343
- export type B2 = "B2";
1344
- export type C = "C";
1345
- }
1346
-
1347
- export type SpeedGroup =
1348
- | SpeedGroup.A
1349
- | SpeedGroup.B1
1350
- | SpeedGroup.B2
1351
- | SpeedGroup.C;
1352
-
1353
- export type SlotSizeVec = (number | null)[];
1354
-
1355
- declare namespace ShipType {
1356
- export type Unknown = "Unknown";
1357
- export type DE = "DE";
1358
- export type DD = "DD";
1359
- export type CL = "CL";
1360
- export type CLT = "CLT";
1361
- export type CA = "CA";
1362
- export type CAV = "CAV";
1363
- export type CVL = "CVL";
1364
- export type FBB = "FBB";
1365
- export type BB = "BB";
1366
- export type BBV = "BBV";
1367
- export type CV = "CV";
1368
- export type XBB = "XBB";
1369
- export type SS = "SS";
1370
- export type SSV = "SSV";
1371
- export type AP = "AP";
1372
- export type AV = "AV";
1373
- export type LHA = "LHA";
1374
- export type CVB = "CVB";
1375
- export type AR = "AR";
1376
- export type AS = "AS";
1377
- export type CT = "CT";
1378
- export type AO = "AO";
1379
- }
1380
-
1381
- export type ShipType =
1382
- | ShipType.Unknown
1383
- | ShipType.DE
1384
- | ShipType.DD
1385
- | ShipType.CL
1386
- | ShipType.CLT
1387
- | ShipType.CA
1388
- | ShipType.CAV
1389
- | ShipType.CVL
1390
- | ShipType.FBB
1391
- | ShipType.BB
1392
- | ShipType.BBV
1393
- | ShipType.CV
1394
- | ShipType.XBB
1395
- | ShipType.SS
1396
- | ShipType.SSV
1397
- | ShipType.AP
1398
- | ShipType.AV
1399
- | ShipType.LHA
1400
- | ShipType.CVB
1401
- | ShipType.AR
1402
- | ShipType.AS
1403
- | ShipType.CT
1404
- | ShipType.AO;
1405
-
1406
- declare namespace ShipCategory {
1407
- export type Battleship = "Battleship";
1408
- export type AircraftCarrier = "AircraftCarrier";
1409
- export type HeavyCruiser = "HeavyCruiser";
1410
- export type LightCruiser = "LightCruiser";
1411
- export type Destroyer = "Destroyer";
1412
- export type CoastalDefenseShip = "CoastalDefenseShip";
1413
- export type Submarine = "Submarine";
1414
- export type AuxiliaryShip = "AuxiliaryShip";
1415
- }
1416
-
1417
- export type ShipCategory =
1418
- | ShipCategory.Battleship
1419
- | ShipCategory.AircraftCarrier
1420
- | ShipCategory.HeavyCruiser
1421
- | ShipCategory.LightCruiser
1422
- | ShipCategory.Destroyer
1423
- | ShipCategory.CoastalDefenseShip
1424
- | ShipCategory.Submarine
1425
- | ShipCategory.AuxiliaryShip;
1426
-
1427
- export interface FleetCutinAnalysis {
1428
- shelling: FleetCutinReport<ShellingStyle>[];
1429
- night: FleetCutinReport<NightAttackStyle>[];
1430
- }
1431
-
1432
- export interface FleetCutinReport<T> {
1433
- cutin: FleetCutin;
1434
- rate: number | null;
1435
- formation: Formation;
1436
- attacks: FleetCutinAttackReport<T>[];
1437
- }
1438
-
1439
- export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1440
- index: number;
1441
- ship_id: number;
1442
- power_mod: number;
1443
- }
1444
-
1445
991
  /**
1446
992
  */
1447
993
  export class AirSquadron {
@@ -1836,10 +1382,6 @@ export class Gear {
1836
1382
  * @returns {boolean}
1837
1383
  */
1838
1384
  max_exp_eq_120(): boolean;
1839
- /**
1840
- * @returns {number}
1841
- */
1842
- exp_critical_bonus(): number;
1843
1385
  /**
1844
1386
  * @param {number} slot_size
1845
1387
  * @returns {number}
@@ -2203,6 +1745,20 @@ export class Org {
2203
1745
  */
2204
1746
  export class Ship {
2205
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;
2206
1762
  /**
2207
1763
  * @returns {Ship}
2208
1764
  */
@@ -2408,20 +1964,6 @@ export class Ship {
2408
1964
  * @returns {number | undefined}
2409
1965
  */
2410
1966
  ohko_power(): number | undefined;
2411
- /**
2412
- * @returns {number | undefined}
2413
- */
2414
- state_day_gunfit_accuracy(): number | undefined;
2415
- /**
2416
- * @returns {number | undefined}
2417
- */
2418
- state_night_gunfit_accuracy(): number | undefined;
2419
- /**
2420
- * フィット砲補正
2421
- * @param {boolean} is_night
2422
- * @returns {number}
2423
- */
2424
- gunfit_accuracy(is_night: boolean): number;
2425
1967
  /**
2426
1968
  */
2427
1969
  readonly accuracy: number;