fleethub-core 1.7.13 → 1.8.0

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,199 +1,90 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ /**
4
+ * @param {ShipConditions} value
5
+ * @returns {ShipConditions}
6
+ */
7
+ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
3
8
  /**
4
9
  */
5
10
  export function set_panic_hook(): void;
6
- declare namespace ShipType {
7
- export type Unknown = "Unknown";
8
- export type DE = "DE";
9
- export type DD = "DD";
10
- export type CL = "CL";
11
- export type CLT = "CLT";
12
- export type CA = "CA";
13
- export type CAV = "CAV";
14
- export type CVL = "CVL";
15
- export type FBB = "FBB";
16
- export type BB = "BB";
17
- export type BBV = "BBV";
18
- export type CV = "CV";
19
- export type XBB = "XBB";
20
- export type SS = "SS";
21
- export type SSV = "SSV";
22
- export type AP = "AP";
23
- export type AV = "AV";
24
- export type LHA = "LHA";
25
- export type CVB = "CVB";
26
- export type AR = "AR";
27
- export type AS = "AS";
28
- export type CT = "CT";
29
- export type AO = "AO";
11
+ declare namespace Side {
12
+ export type Player = "Player";
13
+ export type Enemy = "Enemy";
30
14
  }
31
15
 
32
- export type ShipType =
33
- | ShipType.Unknown
34
- | ShipType.DE
35
- | ShipType.DD
36
- | ShipType.CL
37
- | ShipType.CLT
38
- | ShipType.CA
39
- | ShipType.CAV
40
- | ShipType.CVL
41
- | ShipType.FBB
42
- | ShipType.BB
43
- | ShipType.BBV
44
- | ShipType.CV
45
- | ShipType.XBB
46
- | ShipType.SS
47
- | ShipType.SSV
48
- | ShipType.AP
49
- | ShipType.AV
50
- | ShipType.LHA
51
- | ShipType.CVB
52
- | ShipType.AR
53
- | ShipType.AS
54
- | ShipType.CT
55
- | ShipType.AO;
16
+ export type Side = Side.Player | Side.Enemy;
56
17
 
57
- declare namespace ShipCategory {
58
- export type Battleship = "Battleship";
59
- export type AircraftCarrier = "AircraftCarrier";
60
- export type HeavyCruiser = "HeavyCruiser";
61
- export type LightCruiser = "LightCruiser";
62
- export type Destroyer = "Destroyer";
63
- export type CoastalDefenseShip = "CoastalDefenseShip";
64
- export type Submarine = "Submarine";
65
- export type AuxiliaryShip = "AuxiliaryShip";
18
+ export interface ShipConditions extends ShipPosition {
19
+ formation?: Formation;
66
20
  }
67
21
 
68
- export type ShipCategory =
69
- | ShipCategory.Battleship
70
- | ShipCategory.AircraftCarrier
71
- | ShipCategory.HeavyCruiser
72
- | ShipCategory.LightCruiser
73
- | ShipCategory.Destroyer
74
- | ShipCategory.CoastalDefenseShip
75
- | ShipCategory.Submarine
76
- | ShipCategory.AuxiliaryShip;
77
-
78
- declare namespace ShipAttr {
79
- export type Unknown = "Unknown";
80
- export type Abyssal = "Abyssal";
81
- export type NightCarrier = "NightCarrier";
82
- export type Installation = "Installation";
83
- export type RoyalNavy = "RoyalNavy";
84
- export type Kai2 = "Kai2";
85
- export type TurbineSpeedBonus = "TurbineSpeedBonus";
86
- export type Pillbox = "Pillbox";
87
- export type IsolatedIsland = "IsolatedIsland";
88
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
89
- export type SupplyDepot = "SupplyDepot";
90
- export type PtImp = "PtImp";
91
- export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
92
- export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
22
+ export interface BattleDefinitions {
23
+ formation: Record<Formation, NestedFormationDef>;
24
+ anti_air_cutin: Record<number, AntiAirCutinDef>;
25
+ day_cutin: Record<DayCutin, DayCutinDef>;
26
+ night_cutin: Record<NightCutin, NightCutinDef>;
93
27
  }
94
28
 
95
- export type ShipAttr =
96
- | ShipAttr.Unknown
97
- | ShipAttr.Abyssal
98
- | ShipAttr.NightCarrier
99
- | ShipAttr.Installation
100
- | ShipAttr.RoyalNavy
101
- | ShipAttr.Kai2
102
- | ShipAttr.TurbineSpeedBonus
103
- | ShipAttr.Pillbox
104
- | ShipAttr.IsolatedIsland
105
- | ShipAttr.HarbourSummerPrincess
106
- | ShipAttr.SupplyDepot
107
- | ShipAttr.PtImp
108
- | ShipAttr.BattleshipSummerPrincess
109
- | ShipAttr.HeavyCruiserSummerPrincess;
110
-
111
- declare namespace FleetCutin {
112
- export type NelsonTouch = "NelsonTouch";
113
- export type NagatoClassCutin = "NagatoClassCutin";
114
- export type ColoradoClassCutin = "ColoradoClassCutin";
115
- export type KongouClassCutin = "KongouClassCutin";
116
- export type Yamato2ShipCutin = "Yamato2ShipCutin";
117
- export type Yamato3ShipCutin = "Yamato3ShipCutin";
29
+ export interface NightCutinDef {
30
+ tag: NightCutin;
31
+ hits: number;
32
+ type_factor: number | null;
33
+ power_mod: number | null;
34
+ accuracy_mod: number | null;
118
35
  }
119
36
 
120
- export type FleetCutin =
121
- | FleetCutin.NelsonTouch
122
- | FleetCutin.NagatoClassCutin
123
- | FleetCutin.ColoradoClassCutin
124
- | FleetCutin.KongouClassCutin
125
- | FleetCutin.Yamato2ShipCutin
126
- | FleetCutin.Yamato3ShipCutin;
127
-
128
- declare namespace AirStateRank {
129
- export type Rank0 = "Rank0";
130
- export type Rank1 = "Rank1";
131
- export type Rank2 = "Rank2";
132
- export type Rank3 = "Rank3";
37
+ export interface DayCutinDef {
38
+ tag: DayCutin;
39
+ hits: number;
40
+ type_factor: number | null;
41
+ power_mod: number | null;
42
+ accuracy_mod: number | null;
133
43
  }
134
44
 
135
- export type AirStateRank =
136
- | AirStateRank.Rank0
137
- | AirStateRank.Rank1
138
- | AirStateRank.Rank2
139
- | AirStateRank.Rank3;
140
-
141
- declare namespace AirState {
142
- export type AirSupremacy = "AirSupremacy";
143
- export type AirSuperiority = "AirSuperiority";
144
- export type AirParity = "AirParity";
145
- export type AirDenial = "AirDenial";
146
- export type AirIncapability = "AirIncapability";
45
+ export interface AntiAirCutinDef {
46
+ id: number;
47
+ type_factor: number | null;
48
+ multiplier: number | null;
49
+ guaranteed: number | null;
50
+ sequential: boolean | null;
147
51
  }
148
52
 
149
- export type AirState =
150
- | AirState.AirSupremacy
151
- | AirState.AirSuperiority
152
- | AirState.AirParity
153
- | AirState.AirDenial
154
- | AirState.AirIncapability;
155
-
156
- export interface MasterIBonuses {
157
- shelling_power: MasterIBonusRule[];
158
- carrier_shelling_power: MasterIBonusRule[];
159
- shelling_accuracy: MasterIBonusRule[];
160
- torpedo_power: MasterIBonusRule[];
161
- torpedo_accuracy: MasterIBonusRule[];
162
- torpedo_evasion: MasterIBonusRule[];
163
- asw_power: MasterIBonusRule[];
164
- asw_accuracy: MasterIBonusRule[];
165
- night_power: MasterIBonusRule[];
166
- night_accuracy: MasterIBonusRule[];
167
- defense_power: MasterIBonusRule[];
168
- contact_selection: MasterIBonusRule[];
169
- fighter_power: MasterIBonusRule[];
170
- ship_anti_air: MasterIBonusRule[];
171
- fleet_anti_air: MasterIBonusRule[];
172
- elos: MasterIBonusRule[];
53
+ type __NestedFormationDefFormationDef = FormationDef;
54
+ declare namespace NestedFormationDef {
55
+ export type Normal = __NestedFormationDefFormationDef;
56
+ export type Vanguard = {
57
+ top_half: __NestedFormationDefFormationDef;
58
+ bottom_half: __NestedFormationDefFormationDef;
59
+ };
173
60
  }
174
61
 
175
- export interface MasterIBonusRule {
176
- expr: CompiledEvaler;
177
- formula: CompiledEvaler;
178
- }
62
+ export type NestedFormationDef =
63
+ | NestedFormationDef.Normal
64
+ | NestedFormationDef.Vanguard;
179
65
 
180
- export interface FleetCutinAnalysis {
181
- shelling: FleetCutinInfo[];
182
- night: FleetCutinInfo[];
66
+ export interface FormationDef {
67
+ tag: Formation;
68
+ protection_rate: number | null;
69
+ fleet_anti_air_mod: number;
70
+ shelling: FormationCombatModifiersDef;
71
+ torpedo: FormationCombatModifiersDef;
72
+ asw: FormationCombatModifiersDef;
73
+ night: FormationCombatModifiersDef;
74
+ support_shelling: FormationCombatModifiersDef;
183
75
  }
184
76
 
185
- export interface FleetCutinInfo {
186
- cutin: FleetCutin;
187
- rate: number | null;
188
- formation: Formation;
189
- items: FleetCutinInfoItem[];
77
+ export interface FormationCombatModifiersDef {
78
+ power_mod?: number;
79
+ accuracy_mod?: number;
80
+ evasion_mod?: number;
190
81
  }
191
82
 
192
- export interface FleetCutinInfoItem {
193
- ship_id: number;
194
- cutin: FleetCutin;
195
- fleet_cutin_mod: number;
196
- stats: AttackStats;
83
+ export interface ShipAnalyzerConfig {
84
+ air_state?: AirState;
85
+ engagement?: Engagement;
86
+ left?: AttackAnalyzerShipConfig;
87
+ right?: AttackAnalyzerShipConfig;
197
88
  }
198
89
 
199
90
  declare namespace SpecialEnemyType {
@@ -219,46 +110,113 @@ export type SpecialEnemyType =
219
110
  | SpecialEnemyType.BattleshipSummerPrincess
220
111
  | SpecialEnemyType.HeavyCruiserSummerPrincess;
221
112
 
222
- declare namespace MoraleState {
223
- export type Sparkle = "Sparkle";
224
- export type Normal = "Normal";
225
- export type Orange = "Orange";
226
- export type Red = "Red";
113
+ type __NightCutinLikeFleetCutin = FleetCutin;
114
+ type __NightCutinLikeNightCutin = NightCutin;
115
+ declare namespace NightCutinLike {
116
+ export type NightCutin = __NightCutinLikeNightCutin;
117
+ export type FleetCutin = __NightCutinLikeFleetCutin;
227
118
  }
228
119
 
229
- export type MoraleState =
230
- | MoraleState.Sparkle
231
- | MoraleState.Normal
232
- | MoraleState.Orange
233
- | MoraleState.Red;
120
+ export type NightCutinLike =
121
+ | NightCutinLike.NightCutin
122
+ | NightCutinLike.FleetCutin;
234
123
 
235
- declare namespace DamageState {
236
- export type Normal = "Normal";
237
- export type Shouha = "Shouha";
238
- export type Chuuha = "Chuuha";
239
- export type Taiha = "Taiha";
240
- export type Sunk = "Sunk";
124
+ type __DayCutinLikeDayCutin = DayCutin;
125
+ type __DayCutinLikeFleetCutin = FleetCutin;
126
+ declare namespace DayCutinLike {
127
+ export type DayCutin = __DayCutinLikeDayCutin;
128
+ export type FleetCutin = __DayCutinLikeFleetCutin;
241
129
  }
242
130
 
243
- export type DamageState =
244
- | DamageState.Normal
245
- | DamageState.Shouha
246
- | DamageState.Chuuha
247
- | DamageState.Taiha
248
- | DamageState.Sunk;
131
+ export type DayCutinLike = DayCutinLike.DayCutin | DayCutinLike.FleetCutin;
249
132
 
250
- declare namespace SpeedGroup {
251
- export type A = "A";
252
- export type B1 = "B1";
253
- export type B2 = "B2";
254
- export type C = "C";
133
+ declare namespace FleetCutin {
134
+ export type NelsonTouch = "NelsonTouch";
135
+ export type NagatoClassCutin = "NagatoClassCutin";
136
+ export type ColoradoClassCutin = "ColoradoClassCutin";
137
+ export type KongouClassCutin = "KongouClassCutin";
138
+ export type Yamato2ShipCutin = "Yamato2ShipCutin";
139
+ export type Yamato3ShipCutin = "Yamato3ShipCutin";
255
140
  }
256
141
 
257
- export type SpeedGroup =
258
- | SpeedGroup.A
259
- | SpeedGroup.B1
260
- | SpeedGroup.B2
261
- | SpeedGroup.C;
142
+ export type FleetCutin =
143
+ | FleetCutin.NelsonTouch
144
+ | FleetCutin.NagatoClassCutin
145
+ | FleetCutin.ColoradoClassCutin
146
+ | FleetCutin.KongouClassCutin
147
+ | FleetCutin.Yamato2ShipCutin
148
+ | FleetCutin.Yamato3ShipCutin;
149
+
150
+ declare namespace NightCutin {
151
+ export type MainTorpRadar = "MainTorpRadar";
152
+ export type TorpLookoutRadar = "TorpLookoutRadar";
153
+ export type TorpTsloTorp = "TorpTsloTorp";
154
+ export type TorpTsloDrum = "TorpTsloDrum";
155
+ export type DoubleAttack = "DoubleAttack";
156
+ export type TorpTorpMain = "TorpTorpMain";
157
+ export type TorpTorpTorp = "TorpTorpTorp";
158
+ export type MainMainSec = "MainMainSec";
159
+ export type MainMainMain = "MainMainMain";
160
+ export type SubTorpTorp = "SubTorpTorp";
161
+ export type SubRadarTorp = "SubRadarTorp";
162
+ export type Cvci1_25 = "Cvci1_25";
163
+ export type Cvci1_20 = "Cvci1_20";
164
+ export type Cvci1_18 = "Cvci1_18";
165
+ export type Photobomber = "Photobomber";
166
+ }
167
+
168
+ export type NightCutin =
169
+ | NightCutin.MainTorpRadar
170
+ | NightCutin.TorpLookoutRadar
171
+ | NightCutin.TorpTsloTorp
172
+ | NightCutin.TorpTsloDrum
173
+ | NightCutin.DoubleAttack
174
+ | NightCutin.TorpTorpMain
175
+ | NightCutin.TorpTorpTorp
176
+ | NightCutin.MainMainSec
177
+ | NightCutin.MainMainMain
178
+ | NightCutin.SubTorpTorp
179
+ | NightCutin.SubRadarTorp
180
+ | NightCutin.Cvci1_25
181
+ | NightCutin.Cvci1_20
182
+ | NightCutin.Cvci1_18
183
+ | NightCutin.Photobomber;
184
+
185
+ declare namespace DayCutin {
186
+ export type Zuiun = "Zuiun";
187
+ export type AirSea = "AirSea";
188
+ export type MainMain = "MainMain";
189
+ export type MainAp = "MainAp";
190
+ export type MainRadar = "MainRadar";
191
+ export type MainSec = "MainSec";
192
+ export type DoubleAttack = "DoubleAttack";
193
+ export type FBA = "FBA";
194
+ export type BBA = "BBA";
195
+ export type BA = "BA";
196
+ }
197
+
198
+ export type DayCutin =
199
+ | DayCutin.Zuiun
200
+ | DayCutin.AirSea
201
+ | DayCutin.MainMain
202
+ | DayCutin.MainAp
203
+ | DayCutin.MainRadar
204
+ | DayCutin.MainSec
205
+ | DayCutin.DoubleAttack
206
+ | DayCutin.FBA
207
+ | DayCutin.BBA
208
+ | DayCutin.BA;
209
+
210
+ declare namespace ContactRank {
211
+ export type Rank1 = "Rank1";
212
+ export type Rank2 = "Rank2";
213
+ export type Rank3 = "Rank3";
214
+ }
215
+
216
+ export type ContactRank =
217
+ | ContactRank.Rank1
218
+ | ContactRank.Rank2
219
+ | ContactRank.Rank3;
262
220
 
263
221
  declare namespace AirWaveType {
264
222
  export type Jet = "Jet";
@@ -283,45 +241,28 @@ export interface SimulatorResultItem {
283
241
  damage_state_map: Record<DamageState, number>;
284
242
  }
285
243
 
286
- declare namespace OrgType {
287
- export type Single = "Single";
288
- export type CarrierTaskForce = "CarrierTaskForce";
289
- export type SurfaceTaskForce = "SurfaceTaskForce";
290
- export type TransportEscort = "TransportEscort";
291
- export type EnemySingle = "EnemySingle";
292
- export type EnemyCombined = "EnemyCombined";
293
- }
294
-
295
- export type OrgType =
296
- | OrgType.Single
297
- | OrgType.CarrierTaskForce
298
- | OrgType.SurfaceTaskForce
299
- | OrgType.TransportEscort
300
- | OrgType.EnemySingle
301
- | OrgType.EnemyCombined;
302
-
303
- export interface CompMeta {
304
- fleets: Record<FleetType, FleetMeta>;
305
- }
306
-
307
- export interface FleetMeta {
308
- id: string;
309
- len: number;
310
- ships: [string, ShipMeta | null][];
244
+ declare namespace DamageState {
245
+ export type Normal = "Normal";
246
+ export type Shouha = "Shouha";
247
+ export type Chuuha = "Chuuha";
248
+ export type Taiha = "Taiha";
249
+ export type Sunk = "Sunk";
311
250
  }
312
251
 
313
- export interface ShipMeta {
314
- id: string;
315
- ship_id: number;
316
- }
252
+ export type DamageState =
253
+ | DamageState.Normal
254
+ | DamageState.Shouha
255
+ | DamageState.Chuuha
256
+ | DamageState.Taiha
257
+ | DamageState.Sunk;
317
258
 
318
- declare namespace AswAttackType {
319
- export type DepthCharge = "DepthCharge";
320
- export type Aircraft = "Aircraft";
259
+ export interface ShipPosition {
260
+ org_type?: OrgType;
261
+ role?: Role;
262
+ fleet_len?: number;
263
+ index?: number;
321
264
  }
322
265
 
323
- export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
324
-
325
266
  declare namespace GearCategory {
326
267
  export type Fighter = "Fighter";
327
268
  export type Bomber = "Bomber";
@@ -474,50 +415,49 @@ export type GearType =
474
415
  | GearType.LargeRadar2
475
416
  | GearType.CbRecon2;
476
417
 
477
- export type NumMap<K, V> = Partial<Record<K, V>>;
418
+ declare namespace FleetType {
419
+ export type Main = "Main";
420
+ export type Escort = "Escort";
421
+ export type RouteSup = "RouteSup";
422
+ export type BossSup = "BossSup";
423
+ }
424
+
425
+ export type FleetType =
426
+ | FleetType.Main
427
+ | FleetType.Escort
428
+ | FleetType.RouteSup
429
+ | FleetType.BossSup;
478
430
 
479
- type __ShellingSpecialAttackDayCutin = DayCutin;
480
- type __ShellingSpecialAttackFleetCutin = FleetCutin;
481
- declare namespace ShellingSpecialAttack {
482
- export type DayCutin = { DayCutin: __ShellingSpecialAttackDayCutin };
483
- export type FleetCutin = { FleetCutin: __ShellingSpecialAttackFleetCutin };
431
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
432
+ formation?: Formation;
484
433
  }
485
434
 
486
- export type ShellingSpecialAttack =
487
- | ShellingSpecialAttack.DayCutin
488
- | ShellingSpecialAttack.FleetCutin;
435
+ export interface NodeAttackAnalyzerConfig {
436
+ air_state?: AirState;
437
+ engagement?: Engagement;
438
+ left?: NodeAttackAnalyzerShipConfig;
439
+ right?: NodeAttackAnalyzerShipConfig;
440
+ }
489
441
 
490
- declare namespace DayCutin {
491
- export type Zuiun = "Zuiun";
492
- export type AirSea = "AirSea";
493
- export type MainMain = "MainMain";
494
- export type MainAp = "MainAp";
495
- export type MainRadar = "MainRadar";
496
- export type MainSec = "MainSec";
497
- export type DoubleAttack = "DoubleAttack";
498
- export type FBA = "FBA";
499
- export type BBA = "BBA";
500
- export type BA = "BA";
442
+ export interface NodeAttackAnalysis {
443
+ left: AttackAnalysis;
444
+ right: AttackAnalysis;
501
445
  }
502
446
 
503
- export type DayCutin =
504
- | DayCutin.Zuiun
505
- | DayCutin.AirSea
506
- | DayCutin.MainMain
507
- | DayCutin.MainAp
508
- | DayCutin.MainRadar
509
- | DayCutin.MainSec
510
- | DayCutin.DoubleAttack
511
- | DayCutin.FBA
512
- | DayCutin.BBA
513
- | DayCutin.BA;
447
+ export interface CompMeta {
448
+ fleets: Record<FleetType, FleetMeta>;
449
+ }
514
450
 
515
- declare namespace Role {
516
- export type Main = "Main";
517
- export type Escort = "Escort";
451
+ export interface FleetMeta {
452
+ id: string;
453
+ len: number;
454
+ ships: [string, ShipMeta | null][];
518
455
  }
519
456
 
520
- export type Role = Role.Main | Role.Escort;
457
+ export interface ShipMeta {
458
+ id: string;
459
+ ship_id: number;
460
+ }
521
461
 
522
462
  declare namespace Engagement {
523
463
  export type GreenT = "GreenT";
@@ -526,38 +466,113 @@ declare namespace Engagement {
526
466
  export type RedT = "RedT";
527
467
  }
528
468
 
529
- export type Engagement =
530
- | Engagement.GreenT
531
- | Engagement.Parallel
532
- | Engagement.HeadOn
533
- | Engagement.RedT;
469
+ export type Engagement =
470
+ | Engagement.GreenT
471
+ | Engagement.Parallel
472
+ | Engagement.HeadOn
473
+ | Engagement.RedT;
474
+
475
+ export type TorpedoAttackType = null;
476
+
477
+ type __NightPhaseAttackTypeAswAttackType = AswAttackType;
478
+ type __NightPhaseAttackTypeNightAttackType = NightAttackType;
479
+ declare namespace NightPhaseAttackType {
480
+ export type Night = { t: "Night"; c: __NightPhaseAttackTypeNightAttackType };
481
+ export type Asw = { t: "Asw"; c: __NightPhaseAttackTypeAswAttackType };
482
+ }
483
+
484
+ export type NightPhaseAttackType =
485
+ | NightPhaseAttackType.Night
486
+ | NightPhaseAttackType.Asw;
487
+
488
+ type __DayPhaseAttackTypeAswAttackType = AswAttackType;
489
+ type __DayPhaseAttackTypeShellingType = ShellingType;
490
+ declare namespace DayPhaseAttackType {
491
+ export type Shelling = { t: "Shelling"; c: __DayPhaseAttackTypeShellingType };
492
+ export type Asw = { t: "Asw"; c: __DayPhaseAttackTypeAswAttackType };
493
+ }
494
+
495
+ export type DayPhaseAttackType =
496
+ | DayPhaseAttackType.Shelling
497
+ | DayPhaseAttackType.Asw;
498
+
499
+ type __AttackTypeAswAttackType = AswAttackType;
500
+ type __AttackTypeNightAttackType = NightAttackType;
501
+ type __AttackTypeShellingType = ShellingType;
502
+ type __AttackTypeSupportShellingType = SupportShellingType;
503
+ declare namespace AttackType {
504
+ export type Asw = { t: "Asw"; c: __AttackTypeAswAttackType };
505
+ export type Shelling = { t: "Shelling"; c: __AttackTypeShellingType };
506
+ export type Night = { t: "Night"; c: __AttackTypeNightAttackType };
507
+ export type Torpedo = { t: "Torpedo"; c: null };
508
+ export type SupportShelling = {
509
+ t: "SupportShelling";
510
+ c: __AttackTypeSupportShellingType;
511
+ };
512
+ }
513
+
514
+ export type AttackType =
515
+ | AttackType.Asw
516
+ | AttackType.Shelling
517
+ | AttackType.Night
518
+ | AttackType.Torpedo
519
+ | AttackType.SupportShelling;
520
+
521
+ export type SupportShellingType = ShellingType;
522
+
523
+ declare namespace NightAttackType {
524
+ export type Normal = "Normal";
525
+ export type Swordfish = "Swordfish";
526
+ export type Carrier = "Carrier";
527
+ }
528
+
529
+ export type NightAttackType =
530
+ | NightAttackType.Normal
531
+ | NightAttackType.Swordfish
532
+ | NightAttackType.Carrier;
533
+
534
+ declare namespace ShellingType {
535
+ export type Normal = "Normal";
536
+ export type Carrier = "Carrier";
537
+ }
538
+
539
+ export type ShellingType = ShellingType.Normal | ShellingType.Carrier;
540
+
541
+ declare namespace AswAttackType {
542
+ export type DepthCharge = "DepthCharge";
543
+ export type Aircraft = "Aircraft";
544
+ }
545
+
546
+ export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
534
547
 
535
- export interface ShipEnvironment {
536
- org_type?: OrgType;
537
- role?: Role;
538
- index?: number;
539
- fleet_len?: number;
540
- formation?: Formation;
541
- fleet_los_mod?: number | null;
542
- night_conditions?: NightConditions;
548
+ declare namespace AirStateRank {
549
+ export type Rank0 = "Rank0";
550
+ export type Rank1 = "Rank1";
551
+ export type Rank2 = "Rank2";
552
+ export type Rank3 = "Rank3";
543
553
  }
544
554
 
545
- export interface NightConditions {
546
- night_contact_rank?: ContactRank | null;
547
- starshell_index?: number | null;
548
- searchlight_index?: number | null;
549
- }
555
+ export type AirStateRank =
556
+ | AirStateRank.Rank0
557
+ | AirStateRank.Rank1
558
+ | AirStateRank.Rank2
559
+ | AirStateRank.Rank3;
550
560
 
551
- export interface BattleConditions {
552
- org_type: OrgType;
553
- role: Role;
554
- ship_index: number;
555
- fleet_len: number;
556
- formation: Formation;
557
- fleet_los_mod: number | null;
558
- night_conditions: NightConditions;
561
+ declare namespace AirState {
562
+ export type AirSupremacy = "AirSupremacy";
563
+ export type AirSuperiority = "AirSuperiority";
564
+ export type AirParity = "AirParity";
565
+ export type AirDenial = "AirDenial";
566
+ export type AirIncapability = "AirIncapability";
559
567
  }
560
568
 
569
+ export type AirState =
570
+ | AirState.AirSupremacy
571
+ | AirState.AirSuperiority
572
+ | AirState.AirParity
573
+ | AirState.AirDenial
574
+ | AirState.AirIncapability;
575
+
561
576
  export interface MasterData {
562
577
  gears: MasterGear[];
563
578
  gear_attrs: MasterAttrRule<GearAttr>[];
@@ -584,26 +599,105 @@ export interface MasterAttrRule<T> {
584
599
  expr: string;
585
600
  }
586
601
 
587
- export interface CompDayCutinRateInfo {
588
- main: FleetDayCutinRateInfo;
589
- escort: FleetDayCutinRateInfo | null;
602
+ export interface AttackAnalyzerConfig {
603
+ air_state?: AirState;
604
+ engagement?: Engagement;
605
+ attacker?: AttackAnalyzerShipConfig;
606
+ target?: AttackAnalyzerShipConfig;
590
607
  }
591
608
 
592
- export interface FleetDayCutinRateInfo {
593
- fleet_los_mod: number | null;
594
- ships: ShipDayCutinRateInfo[];
609
+ export interface AttackAnalyzerShipConfig
610
+ extends ShipConditions,
611
+ NightFleetConditions {
612
+ fleet_los_mod?: number | null;
595
613
  }
596
614
 
597
- export interface ShipDayCutinRateInfo {
598
- ship_id: number;
599
- air_supremacy: DayCutinRateInfo;
600
- air_superiority: DayCutinRateInfo;
615
+ declare namespace ShipAttr {
616
+ export type Unknown = "Unknown";
617
+ export type Abyssal = "Abyssal";
618
+ export type NightCarrier = "NightCarrier";
619
+ export type Installation = "Installation";
620
+ export type RoyalNavy = "RoyalNavy";
621
+ export type Kai2 = "Kai2";
622
+ export type TurbineSpeedBonus = "TurbineSpeedBonus";
623
+ export type Pillbox = "Pillbox";
624
+ export type IsolatedIsland = "IsolatedIsland";
625
+ export type HarbourSummerPrincess = "HarbourSummerPrincess";
626
+ export type SupplyDepot = "SupplyDepot";
627
+ export type PtImp = "PtImp";
628
+ export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
629
+ export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
601
630
  }
602
631
 
603
- export interface DayCutinRateInfo {
604
- observation_term: number | null;
605
- rates: [DayCutin | null, number | null][];
606
- total_cutin_rate: number | null;
632
+ export type ShipAttr =
633
+ | ShipAttr.Unknown
634
+ | ShipAttr.Abyssal
635
+ | ShipAttr.NightCarrier
636
+ | ShipAttr.Installation
637
+ | ShipAttr.RoyalNavy
638
+ | ShipAttr.Kai2
639
+ | ShipAttr.TurbineSpeedBonus
640
+ | ShipAttr.Pillbox
641
+ | ShipAttr.IsolatedIsland
642
+ | ShipAttr.HarbourSummerPrincess
643
+ | ShipAttr.SupplyDepot
644
+ | ShipAttr.PtImp
645
+ | ShipAttr.BattleshipSummerPrincess
646
+ | ShipAttr.HeavyCruiserSummerPrincess;
647
+
648
+ declare namespace OrgType {
649
+ export type Single = "Single";
650
+ export type CarrierTaskForce = "CarrierTaskForce";
651
+ export type SurfaceTaskForce = "SurfaceTaskForce";
652
+ export type TransportEscort = "TransportEscort";
653
+ export type EnemySingle = "EnemySingle";
654
+ export type EnemyCombined = "EnemyCombined";
655
+ }
656
+
657
+ export type OrgType =
658
+ | OrgType.Single
659
+ | OrgType.CarrierTaskForce
660
+ | OrgType.SurfaceTaskForce
661
+ | OrgType.TransportEscort
662
+ | OrgType.EnemySingle
663
+ | OrgType.EnemyCombined;
664
+
665
+ export interface ShipEnvironment {
666
+ org_type?: OrgType;
667
+ role?: Role;
668
+ index?: number;
669
+ fleet_len?: number;
670
+ formation?: Formation;
671
+ fleet_los_mod?: number | null;
672
+ night_conditions?: NightFleetConditions;
673
+ }
674
+
675
+ export interface NightFleetConditions {
676
+ night_contact_rank?: ContactRank | null;
677
+ starshell_index?: number | null;
678
+ searchlight_index?: number | null;
679
+ activates_large_searchlight?: boolean;
680
+ }
681
+
682
+ export interface NightConditions {
683
+ player?: NightFleetConditions;
684
+ enemy?: NightFleetConditions;
685
+ }
686
+
687
+ export interface BattleConditions {
688
+ org_type: OrgType;
689
+ role: Role;
690
+ ship_index: number;
691
+ fleet_len: number;
692
+ formation: Formation;
693
+ fleet_los_mod: number | null;
694
+ night_conditions: NightFleetConditions;
695
+ }
696
+
697
+ export interface SupportShellingSimulatorParams {
698
+ attacker_formation?: Formation;
699
+ target_formation?: Formation;
700
+ engagement: Engagement;
607
701
  }
608
702
 
609
703
  export interface EBonuses {
@@ -644,15 +738,183 @@ export interface GearInput {
644
738
  ace: number;
645
739
  }
646
740
 
647
- export type GearVecInput = GearInput[];
648
-
649
- export interface ShellingSupportSimulatorParams {
650
- attacker_formation?: Formation;
651
- target_formation?: Formation;
652
- engagement: Engagement;
741
+ export type GearVecInput = GearInput[];
742
+
743
+ declare namespace Role {
744
+ export type Main = "Main";
745
+ export type Escort = "Escort";
746
+ }
747
+
748
+ export type Role = Role.Main | Role.Escort;
749
+
750
+ declare namespace GearAttr {
751
+ export type Unknown = "Unknown";
752
+ export type Abyssal = "Abyssal";
753
+ export type HighAngleMount = "HighAngleMount";
754
+ export type NightFighter = "NightFighter";
755
+ export type NightAttacker = "NightAttacker";
756
+ export type HeavyBomber = "HeavyBomber";
757
+ export type NightRecon = "NightRecon";
758
+ export type MainGun = "MainGun";
759
+ export type Radar = "Radar";
760
+ export type SurfaceRadar = "SurfaceRadar";
761
+ export type AirRadar = "AirRadar";
762
+ export type DepthChargeProjector = "DepthChargeProjector";
763
+ export type SynergisticDepthCharge = "SynergisticDepthCharge";
764
+ export type AntiSubMortar = "AntiSubMortar";
765
+ export type AntiSubWeapon = "AntiSubWeapon";
766
+ export type ApDepthCharge = "ApDepthCharge";
767
+ export type AntiSubAircraft = "AntiSubAircraft";
768
+ export type LateModelBowTorpedo = "LateModelBowTorpedo";
769
+ export type Seaplane = "Seaplane";
770
+ export type CbAircraft = "CbAircraft";
771
+ export type LbAircraft = "LbAircraft";
772
+ export type JetAircraft = "JetAircraft";
773
+ export type Fighter = "Fighter";
774
+ export type Recon = "Recon";
775
+ export type ObservationSeaplane = "ObservationSeaplane";
776
+ export type CbFighterBomber = "CbFighterBomber";
777
+ export type AntiInstDiveBomber = "AntiInstDiveBomber";
778
+ export type CbSwordfish = "CbSwordfish";
779
+ export type SemiNightPlane = "SemiNightPlane";
780
+ export type HighAltitudeInterceptor = "HighAltitudeInterceptor";
781
+ }
782
+
783
+ export type GearAttr =
784
+ | GearAttr.Unknown
785
+ | GearAttr.Abyssal
786
+ | GearAttr.HighAngleMount
787
+ | GearAttr.NightFighter
788
+ | GearAttr.NightAttacker
789
+ | GearAttr.HeavyBomber
790
+ | GearAttr.NightRecon
791
+ | GearAttr.MainGun
792
+ | GearAttr.Radar
793
+ | GearAttr.SurfaceRadar
794
+ | GearAttr.AirRadar
795
+ | GearAttr.DepthChargeProjector
796
+ | GearAttr.SynergisticDepthCharge
797
+ | GearAttr.AntiSubMortar
798
+ | GearAttr.AntiSubWeapon
799
+ | GearAttr.ApDepthCharge
800
+ | GearAttr.AntiSubAircraft
801
+ | GearAttr.LateModelBowTorpedo
802
+ | GearAttr.Seaplane
803
+ | GearAttr.CbAircraft
804
+ | GearAttr.LbAircraft
805
+ | GearAttr.JetAircraft
806
+ | GearAttr.Fighter
807
+ | GearAttr.Recon
808
+ | GearAttr.ObservationSeaplane
809
+ | GearAttr.CbFighterBomber
810
+ | GearAttr.AntiInstDiveBomber
811
+ | GearAttr.CbSwordfish
812
+ | GearAttr.SemiNightPlane
813
+ | GearAttr.HighAltitudeInterceptor;
814
+
815
+ export interface SupportShellingStyle {
816
+ tag: "SupportShellingStyle";
817
+ attack_type: SupportShellingType;
818
+ }
819
+
820
+ type __NightPhaseAttackStyleAswAttackStyle = AswAttackStyle;
821
+ type __NightPhaseAttackStyleNightAttackStyle = NightAttackStyle;
822
+ declare namespace NightPhaseAttackStyle {
823
+ export type Night = __NightPhaseAttackStyleNightAttackStyle;
824
+ export type Asw = __NightPhaseAttackStyleAswAttackStyle;
825
+ }
826
+
827
+ export type NightPhaseAttackStyle =
828
+ | NightPhaseAttackStyle.Night
829
+ | NightPhaseAttackStyle.Asw;
830
+
831
+ type __DayPhaseAttackStyleAswAttackStyle = AswAttackStyle;
832
+ type __DayPhaseAttackStyleShellingStyle = ShellingStyle;
833
+ declare namespace DayPhaseAttackStyle {
834
+ export type Shelling = __DayPhaseAttackStyleShellingStyle;
835
+ export type Asw = __DayPhaseAttackStyleAswAttackStyle;
836
+ }
837
+
838
+ export type DayPhaseAttackStyle =
839
+ | DayPhaseAttackStyle.Shelling
840
+ | DayPhaseAttackStyle.Asw;
841
+
842
+ export interface TorpedoAttackStyle {
843
+ tag: "TorpedoAttackStyle";
844
+ attack_type: TorpedoAttackType;
845
+ }
846
+
847
+ export interface AswAttackStyle {
848
+ tag: "AswAttackStyle";
849
+ attack_type: AswAttackType;
850
+ }
851
+
852
+ export interface NightAttackStyle {
853
+ tag: "NightAttackStyle";
854
+ attack_type: NightAttackType;
855
+ cutin: NightCutinLike | null;
856
+ power_mod: number;
857
+ accuracy_mod: number;
858
+ hits: number;
859
+ }
860
+
861
+ export interface ShellingStyle {
862
+ tag: "ShellingStyle";
863
+ attack_type: ShellingType;
864
+ cutin: DayCutinLike | null;
865
+ power_mod: number;
866
+ accuracy_mod: number;
867
+ hits: number;
868
+ }
869
+
870
+ export interface MasterIBonuses {
871
+ shelling_power: MasterIBonusRule[];
872
+ carrier_shelling_power: MasterIBonusRule[];
873
+ shelling_accuracy: MasterIBonusRule[];
874
+ torpedo_power: MasterIBonusRule[];
875
+ torpedo_accuracy: MasterIBonusRule[];
876
+ torpedo_evasion: MasterIBonusRule[];
877
+ asw_power: MasterIBonusRule[];
878
+ asw_accuracy: MasterIBonusRule[];
879
+ night_power: MasterIBonusRule[];
880
+ night_accuracy: MasterIBonusRule[];
881
+ defense_power: MasterIBonusRule[];
882
+ contact_selection: MasterIBonusRule[];
883
+ fighter_power: MasterIBonusRule[];
884
+ ship_anti_air: MasterIBonusRule[];
885
+ fleet_anti_air: MasterIBonusRule[];
886
+ elos: MasterIBonusRule[];
887
+ }
888
+
889
+ export interface MasterIBonusRule {
890
+ expr: CompiledEvaler;
891
+ formula: CompiledEvaler;
892
+ }
893
+
894
+ export interface NightContactChance {
895
+ rank1: number;
896
+ rank2: number;
897
+ rank3: number;
898
+ }
899
+
900
+ export interface CompNightCutinAnalysis {
901
+ night_contact_chance: NightContactChance;
902
+ ships: ShipNightCutinAnalysis[];
903
+ }
904
+
905
+ export interface ShipNightCutinAnalysis {
906
+ ship_id: number;
907
+ index: number;
908
+ normal: NightCutinActionReport;
909
+ chuuha: NightCutinActionReport;
910
+ }
911
+
912
+ export interface NightCutinActionReport
913
+ extends ActionReport<NightPhaseAttackStyle> {
914
+ cutin_term: number | null;
653
915
  }
654
916
 
655
- export interface DamageInfo {
917
+ export interface DamageReport {
656
918
  miss_damage_min: number;
657
919
  miss_damage_max: number;
658
920
  normal_damage_min: number;
@@ -661,72 +923,29 @@ export interface DamageInfo {
661
923
  critical_damage_max: number;
662
924
  normal_scratch_rate: number;
663
925
  critical_scratch_rate: number;
664
- damage_map: NumMap<number, number>;
665
- damage_state_map: NumMap<DamageState, number>;
926
+ damage_density: Histogram<number, number>;
927
+ damage_state_density: Histogram<DamageState, number>;
666
928
  }
667
929
 
668
- declare namespace GearAttr {
669
- export type Unknown = "Unknown";
670
- export type Abyssal = "Abyssal";
671
- export type HighAngleMount = "HighAngleMount";
672
- export type NightFighter = "NightFighter";
673
- export type NightAttacker = "NightAttacker";
674
- export type HeavyBomber = "HeavyBomber";
675
- export type NightRecon = "NightRecon";
676
- export type MainGun = "MainGun";
677
- export type Radar = "Radar";
678
- export type SurfaceRadar = "SurfaceRadar";
679
- export type AirRadar = "AirRadar";
680
- export type DepthChargeProjector = "DepthChargeProjector";
681
- export type SynergisticDepthCharge = "SynergisticDepthCharge";
682
- export type AntiSubMortar = "AntiSubMortar";
683
- export type AntiSubWeapon = "AntiSubWeapon";
684
- export type AntiSubAircraft = "AntiSubAircraft";
685
- export type LateModelBowTorpedo = "LateModelBowTorpedo";
686
- export type Seaplane = "Seaplane";
687
- export type CbAircraft = "CbAircraft";
688
- export type LbAircraft = "LbAircraft";
689
- export type JetAircraft = "JetAircraft";
690
- export type Fighter = "Fighter";
691
- export type Recon = "Recon";
692
- export type ObservationSeaplane = "ObservationSeaplane";
693
- export type CbFighterBomber = "CbFighterBomber";
694
- export type AntiInstDiveBomber = "AntiInstDiveBomber";
695
- export type CbSwordfish = "CbSwordfish";
696
- export type SemiNightPlane = "SemiNightPlane";
697
- export type HighAltitudeInterceptor = "HighAltitudeInterceptor";
930
+ export interface CompAntiAirAnalysis {
931
+ fleet_adjusted_anti_air: number;
932
+ ships: AntiAirReport[];
933
+ anti_air_cutin_chance: [number, number][];
698
934
  }
699
935
 
700
- export type GearAttr =
701
- | GearAttr.Unknown
702
- | GearAttr.Abyssal
703
- | GearAttr.HighAngleMount
704
- | GearAttr.NightFighter
705
- | GearAttr.NightAttacker
706
- | GearAttr.HeavyBomber
707
- | GearAttr.NightRecon
708
- | GearAttr.MainGun
709
- | GearAttr.Radar
710
- | GearAttr.SurfaceRadar
711
- | GearAttr.AirRadar
712
- | GearAttr.DepthChargeProjector
713
- | GearAttr.SynergisticDepthCharge
714
- | GearAttr.AntiSubMortar
715
- | GearAttr.AntiSubWeapon
716
- | GearAttr.AntiSubAircraft
717
- | GearAttr.LateModelBowTorpedo
718
- | GearAttr.Seaplane
719
- | GearAttr.CbAircraft
720
- | GearAttr.LbAircraft
721
- | GearAttr.JetAircraft
722
- | GearAttr.Fighter
723
- | GearAttr.Recon
724
- | GearAttr.ObservationSeaplane
725
- | GearAttr.CbFighterBomber
726
- | GearAttr.AntiInstDiveBomber
727
- | GearAttr.CbSwordfish
728
- | GearAttr.SemiNightPlane
729
- | GearAttr.HighAltitudeInterceptor;
936
+ export interface AntiAirReport {
937
+ ship_id: number;
938
+ role: Role;
939
+ index: number;
940
+ adjusted_anti_air: number | null;
941
+ proportional_shotdown_rate: number | null;
942
+ fixed_shotdown_number: number | null;
943
+ guaranteed: number | null;
944
+ anti_air_cutin_chance: [number, number][];
945
+ anti_air_propellant_barrage_chance: number | null;
946
+ }
947
+
948
+ export type Histogram<K, V> = Partial<Record<K, V>>;
730
949
 
731
950
  type __FormationCombinedFormation = CombinedFormation;
732
951
  type __FormationSingleFormation = SingleFormation;
@@ -789,27 +1008,6 @@ export interface AttackPowerModifier {
789
1008
  b?: number;
790
1009
  }
791
1010
 
792
- export interface WarfareInfo {
793
- day: AttackInfo<DayBattleAttackType, DayCutin | null> | null;
794
- closing_torpedo: AttackInfo<null, null> | null;
795
- night: AttackInfo<NightBattleAttackType, NightCutin | null> | null;
796
- shelling_support: AttackInfo<null, null> | null;
797
- opening_asw: AttackInfo<null, null> | null;
798
- }
799
-
800
- declare namespace FleetType {
801
- export type Main = "Main";
802
- export type Escort = "Escort";
803
- export type RouteSup = "RouteSup";
804
- export type BossSup = "BossSup";
805
- }
806
-
807
- export type FleetType =
808
- | FleetType.Main
809
- | FleetType.Escort
810
- | FleetType.RouteSup
811
- | FleetType.BossSup;
812
-
813
1011
  export interface MasterEquippable {
814
1012
  equip_stype: EquipStype[];
815
1013
  equip_exslot: number[];
@@ -832,14 +1030,20 @@ export interface EquipStype {
832
1030
  equip_type: number[];
833
1031
  }
834
1032
 
835
- declare namespace ShellingAttackType {
836
- export type Normal = "Normal";
837
- export type Carrier = "Carrier";
1033
+ export interface HitRate {
1034
+ normal: number;
1035
+ critical: number;
1036
+ total: number;
838
1037
  }
839
1038
 
840
- export type ShellingAttackType =
841
- | ShellingAttackType.Normal
842
- | ShellingAttackType.Carrier;
1039
+ export interface HitRateParams {
1040
+ accuracy_term: number;
1041
+ evasion_term: number;
1042
+ target_morale_mod: number;
1043
+ critical_rate_constant: number;
1044
+ critical_percentage_bonus: number;
1045
+ hit_percentage_bonus: number;
1046
+ }
843
1047
 
844
1048
  export interface AttackPower {
845
1049
  precap: number;
@@ -858,7 +1062,7 @@ export interface AttackPowerParams {
858
1062
  postcap_mod: AttackPowerModifier;
859
1063
  ap_shell_mod: number | null;
860
1064
  carrier_power: number | null;
861
- proficiency_critical_mod: number | null;
1065
+ proficiency_critical_mod: number;
862
1066
  armor_penetration: number;
863
1067
  remaining_ammo_mod: number;
864
1068
  special_enemy_mods: SpecialEnemyModifiers;
@@ -876,193 +1080,49 @@ export interface SpecialEnemyModifiers {
876
1080
  pt_mod: AttackPowerModifier;
877
1081
  }
878
1082
 
879
- export interface AttackInfo<AttackType, Cutin> {
880
- attack_type: AttackType;
881
- items: AttackInfoItem<Cutin>[];
882
- damage_state_map: NumMap<DamageState, number> | null;
883
- }
884
-
885
- export interface AttackInfoItem<Cutin> {
886
- cutin: Cutin;
887
- rate: number | null;
888
- stats: AttackStats;
889
- }
890
-
891
- export interface AttackStats {
892
- attack_power: AttackPower | null;
893
- attack_power_params: AttackPowerParams | null;
894
- hits: number;
895
- hit_rate: HitRate | null;
896
- hit_rate_params: HitRateParams | null;
897
- damage: DamageInfo | null;
898
- }
899
-
900
- export interface CompAntiAirInfo {
901
- fleet_adjusted_anti_air: number;
902
- ships: ShipAntiAirInfo[];
903
- anti_air_cutin_chance: [number, number][];
1083
+ export interface CompDayCutinAnalysis {
1084
+ rank3_air_state: AirState;
1085
+ rank2_air_state: AirState;
1086
+ main_fleet_los_mod: number | null;
1087
+ escort_fleet_los_mod: number | null;
1088
+ ships: ShipDayCutinAnalysis[];
904
1089
  }
905
1090
 
906
- export interface ShipAntiAirInfo {
1091
+ export interface ShipDayCutinAnalysis {
907
1092
  ship_id: number;
908
- adjusted_anti_air: number | null;
909
- proportional_shotdown_rate: number | null;
910
- fixed_shotdown_number: number | null;
911
- guaranteed: number | null;
912
- anti_air_cutin_chance: [number, number][];
913
- anti_air_propellant_barrage_chance: number | null;
914
- }
915
-
916
- export interface CompContactChanceInfo {
917
- single: AirstrikeContactChance[] | null;
918
- combined: AirstrikeContactChance[] | null;
919
- }
920
-
921
- export interface AirstrikeContactChance {
922
- air_state: AirState;
923
- trigger_rate: number;
924
- rank3: number;
925
- rank2: number;
926
- rank1: number;
927
- total: number;
928
- }
929
-
930
- export type SlotSizeVec = (number | null)[];
931
-
932
- declare namespace Side {
933
- export type Player = "Player";
934
- export type Enemy = "Enemy";
935
- }
936
-
937
- export type Side = Side.Player | Side.Enemy;
938
-
939
- declare namespace NightAttackType {
940
- export type Normal = "Normal";
941
- export type ArkRoyal = "ArkRoyal";
942
- export type Carrier = "Carrier";
943
- }
944
-
945
- export type NightAttackType =
946
- | NightAttackType.Normal
947
- | NightAttackType.ArkRoyal
948
- | NightAttackType.Carrier;
949
-
950
- type __NightSpecialAttackFleetCutin = FleetCutin;
951
- type __NightSpecialAttackNightCutin = NightCutin;
952
- declare namespace NightSpecialAttack {
953
- export type NightCutin = { NightCutin: __NightSpecialAttackNightCutin };
954
- export type FleetCutin = { FleetCutin: __NightSpecialAttackFleetCutin };
955
- }
956
-
957
- export type NightSpecialAttack =
958
- | NightSpecialAttack.NightCutin
959
- | NightSpecialAttack.FleetCutin;
960
-
961
- declare namespace NightCutin {
962
- export type MainTorpRadar = "MainTorpRadar";
963
- export type TorpLookoutRadar = "TorpLookoutRadar";
964
- export type TorpTsloTorp = "TorpTsloTorp";
965
- export type TorpTsloDrum = "TorpTsloDrum";
966
- export type DoubleAttack = "DoubleAttack";
967
- export type TorpTorpMain = "TorpTorpMain";
968
- export type TorpTorpTorp = "TorpTorpTorp";
969
- export type MainMainSec = "MainMainSec";
970
- export type MainMainMain = "MainMainMain";
971
- export type SubTorpTorp = "SubTorpTorp";
972
- export type SubRadarTorp = "SubRadarTorp";
973
- export type Cvci1_25 = "Cvci1_25";
974
- export type Cvci1_20 = "Cvci1_20";
975
- export type Cvci1_18 = "Cvci1_18";
976
- export type Photobomber = "Photobomber";
977
- }
978
-
979
- export type NightCutin =
980
- | NightCutin.MainTorpRadar
981
- | NightCutin.TorpLookoutRadar
982
- | NightCutin.TorpTsloTorp
983
- | NightCutin.TorpTsloDrum
984
- | NightCutin.DoubleAttack
985
- | NightCutin.TorpTorpMain
986
- | NightCutin.TorpTorpTorp
987
- | NightCutin.MainMainSec
988
- | NightCutin.MainMainMain
989
- | NightCutin.SubTorpTorp
990
- | NightCutin.SubRadarTorp
991
- | NightCutin.Cvci1_25
992
- | NightCutin.Cvci1_20
993
- | NightCutin.Cvci1_18
994
- | NightCutin.Photobomber;
995
-
996
- declare namespace ContactRank {
997
- export type Rank1 = "Rank1";
998
- export type Rank2 = "Rank2";
999
- export type Rank3 = "Rank3";
1000
- }
1001
-
1002
- export type ContactRank =
1003
- | ContactRank.Rank1
1004
- | ContactRank.Rank2
1005
- | ContactRank.Rank3;
1006
-
1007
- export interface BattleDefinitions {
1008
- formation: Record<Formation, NestedFormationDef>;
1009
- anti_air_cutin: Record<number, AntiAirCutinDef>;
1010
- day_cutin: Record<DayCutin, DayCutinDef>;
1011
- night_cutin: Record<NightCutin, NightCutinDef>;
1012
- }
1013
-
1014
- export interface NightCutinDef {
1015
- tag: NightCutin;
1016
- hits: number;
1017
- type_factor: number | null;
1018
- power_mod: number | null;
1019
- accuracy_mod: number | null;
1020
- }
1021
-
1022
- export interface DayCutinDef {
1023
- tag: DayCutin;
1024
- hits: number;
1025
- type_factor: number | null;
1026
- power_mod: number | null;
1027
- accuracy_mod: number | null;
1028
- }
1029
-
1030
- export interface AntiAirCutinDef {
1031
- id: number;
1032
- type_factor: number | null;
1033
- multiplier: number | null;
1034
- guaranteed: number | null;
1035
- sequential: boolean | null;
1093
+ role: Role;
1094
+ index: number;
1095
+ rank3: DayCutinReport;
1096
+ rank2: DayCutinReport;
1036
1097
  }
1037
1098
 
1038
- type __NestedFormationDefFormationDef = FormationDef;
1039
- declare namespace NestedFormationDef {
1040
- export type Normal = __NestedFormationDefFormationDef;
1041
- export type Vanguard = {
1042
- top_half: __NestedFormationDefFormationDef;
1043
- bottom_half: __NestedFormationDefFormationDef;
1044
- };
1099
+ export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
1100
+ observation_term: number | null;
1045
1101
  }
1046
-
1047
- export type NestedFormationDef =
1048
- | NestedFormationDef.Normal
1049
- | NestedFormationDef.Vanguard;
1050
-
1051
- export interface FormationDef {
1052
- tag: Formation;
1053
- protection_rate: number | null;
1054
- fleet_anti_air_mod: number;
1055
- shelling: FormationWarfareDef;
1056
- torpedo: FormationWarfareDef;
1057
- asw: FormationWarfareDef;
1058
- night: FormationWarfareDef;
1059
- shelling_support: FormationWarfareDef;
1102
+
1103
+ export interface ContactAnalysis {
1104
+ single: DayContactChance[] | null;
1105
+ combined: DayContactChance[] | null;
1060
1106
  }
1061
1107
 
1062
- export interface FormationWarfareDef {
1063
- power_mod: number | null;
1064
- accuracy_mod: number | null;
1065
- evasion_mod: number | null;
1108
+ export interface DayContactChance {
1109
+ air_state: AirState;
1110
+ trigger_rate: number;
1111
+ rank3: number;
1112
+ rank2: number;
1113
+ rank1: number;
1114
+ total: number;
1115
+ }
1116
+
1117
+ export interface AttackAnalysis {
1118
+ attacker_is_player: boolean;
1119
+ attacker_ship_id: number;
1120
+ target_ship_id: number;
1121
+ day: ActionReport<DayPhaseAttackStyle>;
1122
+ night: ActionReport<NightPhaseAttackStyle>;
1123
+ closing_torpedo: ActionReport<TorpedoAttackStyle>;
1124
+ opening_asw: ActionReport<AswAttackStyle>;
1125
+ support_shelling: ActionReport<SupportShellingStyle>;
1066
1126
  }
1067
1127
 
1068
1128
  export interface MasterShip {
@@ -1098,77 +1158,42 @@ export interface MasterShip {
1098
1158
 
1099
1159
  export type StatInterval = [number | null, number | null];
1100
1160
 
1101
- export interface MasterGear {
1102
- gear_id: number;
1103
- name: string;
1104
- types: GearTypeIdArray;
1105
- special_type?: number;
1106
- max_hp?: number;
1107
- firepower?: number;
1108
- armor?: number;
1109
- torpedo?: number;
1110
- anti_air?: number;
1111
- speed?: number;
1112
- bombing?: number;
1113
- asw?: number;
1114
- los?: number;
1115
- luck?: number;
1116
- accuracy?: number;
1117
- evasion?: number;
1118
- range?: number;
1119
- radius?: number;
1120
- cost?: number;
1121
- improvable?: boolean;
1122
- ship_anti_air_resistance?: number;
1123
- fleet_anti_air_resistance?: number;
1124
- }
1125
-
1126
- export interface WarfareContext {
1127
- attacker_env: ShipEnvironment;
1128
- target_env: ShipEnvironment;
1161
+ export interface CompAnalyzerConfig {
1129
1162
  engagement: Engagement;
1130
- air_state: AirState;
1163
+ formation: Formation;
1164
+ anti_air_cutin: number | null;
1165
+ ship_anti_air_resist: number;
1166
+ fleet_anti_air_resist: number;
1167
+ left_night_fleet_conditions: NightFleetConditions;
1168
+ right_night_fleet_conditions: NightFleetConditions;
1131
1169
  }
1132
1170
 
1133
- type __NightBattleAttackTypeAswAttackType = AswAttackType;
1134
- type __NightBattleAttackTypeNightAttackType = NightAttackType;
1135
- declare namespace NightBattleAttackType {
1136
- export type NightAttack = {
1137
- t: "NightAttack";
1138
- c: __NightBattleAttackTypeNightAttackType;
1139
- };
1140
- export type Asw = { t: "Asw"; c: __NightBattleAttackTypeAswAttackType };
1171
+ export interface CompNightAnalysis {
1172
+ night_cutin: CompNightCutinAnalysis;
1173
+ fleet_cutin: FleetCutinReport<NightAttackStyle>[];
1141
1174
  }
1142
1175
 
1143
- export type NightBattleAttackType =
1144
- | NightBattleAttackType.NightAttack
1145
- | NightBattleAttackType.Asw;
1146
-
1147
- type __DayBattleAttackTypeAswAttackType = AswAttackType;
1148
- type __DayBattleAttackTypeShellingAttackType = ShellingAttackType;
1149
- declare namespace DayBattleAttackType {
1150
- export type Shelling = {
1151
- t: "Shelling";
1152
- c: __DayBattleAttackTypeShellingAttackType;
1153
- };
1154
- export type Asw = { t: "Asw"; c: __DayBattleAttackTypeAswAttackType };
1176
+ export interface CompDayAnalysis {
1177
+ day_cutin: CompDayCutinAnalysis;
1178
+ fleet_cutin: FleetCutinReport<ShellingStyle>[];
1155
1179
  }
1156
1180
 
1157
- export type DayBattleAttackType =
1158
- | DayBattleAttackType.Shelling
1159
- | DayBattleAttackType.Asw;
1160
-
1161
- export interface WarfareAnalysisResult {
1162
- player: AttackAnalysisResult;
1163
- enemy: AttackAnalysisResult;
1181
+ export interface CompAnalysis {
1182
+ day: CompDayAnalysis;
1183
+ night: CompNightAnalysis;
1184
+ contact: ContactAnalysis;
1185
+ anti_air: CompAntiAirAnalysis;
1164
1186
  }
1165
1187
 
1166
- export interface AttackAnalysisResult {
1167
- day: AttackInfo<DayBattleAttackType, DayCutin | null> | null;
1168
- closing_torpedo: AttackInfo<null, null> | null;
1169
- night: AttackInfo<NightBattleAttackType, NightCutin | null> | null;
1170
- shelling_support: AttackInfo<null, null> | null;
1171
- opening_asw: AttackInfo<null, null> | null;
1188
+ export interface AttackReport<T> {
1189
+ style: T;
1190
+ proc_rate: number | null;
1191
+ attack_power: AttackPower | null;
1192
+ attack_power_params: AttackPowerParams | null;
1193
+ hits: number;
1194
+ hit_rate: HitRate | null;
1195
+ hit_rate_params: HitRateParams | null;
1196
+ damage: DamageReport | null;
1172
1197
  }
1173
1198
 
1174
1199
  export type ShipStateMap = Record<ShipKey, ShipState>;
@@ -1280,60 +1305,155 @@ export interface GearState {
1280
1305
  stars?: number;
1281
1306
  }
1282
1307
 
1283
- export interface HitRate {
1284
- total: number;
1285
- normal: number;
1286
- critical: number;
1308
+ declare namespace SpeedGroup {
1309
+ export type A = "A";
1310
+ export type B1 = "B1";
1311
+ export type B2 = "B2";
1312
+ export type C = "C";
1287
1313
  }
1288
1314
 
1289
- export interface HitRateParams {
1290
- accuracy_term: number;
1291
- evasion_term: number;
1292
- target_morale_mod: number;
1293
- critical_rate_constant: number;
1294
- critical_percentage_bonus: number;
1295
- hit_percentage_bonus: number;
1315
+ export type SpeedGroup =
1316
+ | SpeedGroup.A
1317
+ | SpeedGroup.B1
1318
+ | SpeedGroup.B2
1319
+ | SpeedGroup.C;
1320
+
1321
+ export type SlotSizeVec = (number | null)[];
1322
+
1323
+ export interface MasterGear {
1324
+ gear_id: number;
1325
+ name: string;
1326
+ types: GearTypeIdArray;
1327
+ special_type?: number;
1328
+ max_hp?: number;
1329
+ firepower?: number;
1330
+ armor?: number;
1331
+ torpedo?: number;
1332
+ anti_air?: number;
1333
+ speed?: number;
1334
+ bombing?: number;
1335
+ asw?: number;
1336
+ los?: number;
1337
+ luck?: number;
1338
+ accuracy?: number;
1339
+ evasion?: number;
1340
+ range?: number;
1341
+ radius?: number;
1342
+ cost?: number;
1343
+ improvable?: boolean;
1344
+ ship_anti_air_resist?: number;
1345
+ fleet_anti_air_resist?: number;
1346
+ }
1347
+
1348
+ export interface ActionReport<T> {
1349
+ data: Record<string, AttackReport<T>>;
1350
+ damage_state_density: Histogram<DamageState, number> | null;
1351
+ is_active: boolean;
1296
1352
  }
1297
1353
 
1298
1354
  export type GearTypeIdArray = [number, number, number, number, number];
1299
1355
 
1300
- declare namespace ShellingAttackType {
1301
- export type Normal = "Normal";
1302
- export type Carrier = "Carrier";
1356
+ declare namespace ShipType {
1357
+ export type Unknown = "Unknown";
1358
+ export type DE = "DE";
1359
+ export type DD = "DD";
1360
+ export type CL = "CL";
1361
+ export type CLT = "CLT";
1362
+ export type CA = "CA";
1363
+ export type CAV = "CAV";
1364
+ export type CVL = "CVL";
1365
+ export type FBB = "FBB";
1366
+ export type BB = "BB";
1367
+ export type BBV = "BBV";
1368
+ export type CV = "CV";
1369
+ export type XBB = "XBB";
1370
+ export type SS = "SS";
1371
+ export type SSV = "SSV";
1372
+ export type AP = "AP";
1373
+ export type AV = "AV";
1374
+ export type LHA = "LHA";
1375
+ export type CVB = "CVB";
1376
+ export type AR = "AR";
1377
+ export type AS = "AS";
1378
+ export type CT = "CT";
1379
+ export type AO = "AO";
1303
1380
  }
1304
1381
 
1305
- export type ShellingAttackType =
1306
- | ShellingAttackType.Normal
1307
- | ShellingAttackType.Carrier;
1382
+ export type ShipType =
1383
+ | ShipType.Unknown
1384
+ | ShipType.DE
1385
+ | ShipType.DD
1386
+ | ShipType.CL
1387
+ | ShipType.CLT
1388
+ | ShipType.CA
1389
+ | ShipType.CAV
1390
+ | ShipType.CVL
1391
+ | ShipType.FBB
1392
+ | ShipType.BB
1393
+ | ShipType.BBV
1394
+ | ShipType.CV
1395
+ | ShipType.XBB
1396
+ | ShipType.SS
1397
+ | ShipType.SSV
1398
+ | ShipType.AP
1399
+ | ShipType.AV
1400
+ | ShipType.LHA
1401
+ | ShipType.CVB
1402
+ | ShipType.AR
1403
+ | ShipType.AS
1404
+ | ShipType.CT
1405
+ | ShipType.AO;
1308
1406
 
1309
- declare namespace AswAttackType {
1310
- export type DepthCharge = "DepthCharge";
1311
- export type Aircraft = "Aircraft";
1407
+ declare namespace ShipCategory {
1408
+ export type Battleship = "Battleship";
1409
+ export type AircraftCarrier = "AircraftCarrier";
1410
+ export type HeavyCruiser = "HeavyCruiser";
1411
+ export type LightCruiser = "LightCruiser";
1412
+ export type Destroyer = "Destroyer";
1413
+ export type CoastalDefenseShip = "CoastalDefenseShip";
1414
+ export type Submarine = "Submarine";
1415
+ export type AuxiliaryShip = "AuxiliaryShip";
1312
1416
  }
1313
1417
 
1314
- export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
1418
+ export type ShipCategory =
1419
+ | ShipCategory.Battleship
1420
+ | ShipCategory.AircraftCarrier
1421
+ | ShipCategory.HeavyCruiser
1422
+ | ShipCategory.LightCruiser
1423
+ | ShipCategory.Destroyer
1424
+ | ShipCategory.CoastalDefenseShip
1425
+ | ShipCategory.Submarine
1426
+ | ShipCategory.AuxiliaryShip;
1315
1427
 
1316
- export interface FleetNightCutinRateInfo {
1317
- night_contact_chance: NightContactChance;
1318
- ships: ShipNightCutinRateInfo[];
1428
+ declare namespace MoraleState {
1429
+ export type Sparkle = "Sparkle";
1430
+ export type Normal = "Normal";
1431
+ export type Orange = "Orange";
1432
+ export type Red = "Red";
1319
1433
  }
1320
1434
 
1321
- export interface ShipNightCutinRateInfo {
1322
- ship_id: number;
1323
- normal: NightCutinRateInfo;
1324
- chuuha: NightCutinRateInfo;
1435
+ export type MoraleState =
1436
+ | MoraleState.Sparkle
1437
+ | MoraleState.Normal
1438
+ | MoraleState.Orange
1439
+ | MoraleState.Red;
1440
+
1441
+ export interface FleetCutinAnalysis {
1442
+ shelling: FleetCutinReport<ShellingStyle>[];
1443
+ night: FleetCutinReport<NightAttackStyle>[];
1325
1444
  }
1326
1445
 
1327
- export interface NightCutinRateInfo {
1328
- cutin_term: number | null;
1329
- rates: [NightCutin | null, number | null][];
1446
+ export interface FleetCutinReport<T> {
1447
+ cutin: FleetCutin;
1448
+ rate: number | null;
1449
+ formation: Formation;
1450
+ attacks: FleetCutinAttackReport<T>[];
1330
1451
  }
1331
1452
 
1332
- export interface NightContactChance {
1333
- rank1: number;
1334
- rank2: number;
1335
- rank3: number;
1336
- total: number;
1453
+ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1454
+ index: number;
1455
+ ship_id: number;
1456
+ power_mod: number;
1337
1457
  }
1338
1458
 
1339
1459
  /**
@@ -1370,71 +1490,76 @@ export class AirSquadron {
1370
1490
  radius(): number;
1371
1491
  /**
1372
1492
  */
1373
- id: string;
1493
+ hash: bigint;
1374
1494
  /**
1375
1495
  */
1376
- mode: AirSquadronMode;
1496
+ id: string;
1377
1497
  /**
1378
1498
  */
1379
- xxh3: bigint;
1499
+ mode: AirSquadronMode;
1380
1500
  }
1381
1501
  /**
1382
1502
  */
1383
1503
  export class Analyzer {
1384
1504
  free(): void;
1385
1505
  /**
1386
- * @param {Comp} comp
1387
- * @param {Formation} formation
1388
- * @param {number} ship_anti_air_resist
1389
- * @param {number} fleet_anti_air_resist
1390
- * @param {number | undefined} aaci
1391
- * @returns {CompAntiAirInfo}
1392
- */
1393
- analyze_anti_air(
1394
- comp: Comp,
1395
- formation: Formation,
1396
- ship_anti_air_resist: number,
1397
- fleet_anti_air_resist: number,
1398
- aaci?: number
1399
- ): CompAntiAirInfo;
1400
- /**
1401
- * @param {Comp} comp
1402
- * @returns {CompDayCutinRateInfo}
1403
- */
1404
- analyze_day_cutin(comp: Comp): CompDayCutinRateInfo;
1405
- /**
1406
- * @param {Comp} comp
1407
- * @param {NightConditions} attacker_conditions
1408
- * @param {NightConditions} target_conditions
1409
- * @returns {FleetNightCutinRateInfo}
1410
- */
1411
- analyze_night_cutin(
1412
- comp: Comp,
1413
- attacker_conditions: NightConditions,
1414
- target_conditions: NightConditions
1415
- ): FleetNightCutinRateInfo;
1416
- /**
1417
- * @param {Comp} comp
1418
- * @returns {CompContactChanceInfo}
1419
- */
1420
- analyze_contact_chance(comp: Comp): CompContactChanceInfo;
1421
- /**
1422
- * @param {WarfareContext} params
1506
+ * @param {AttackAnalyzerConfig} config
1423
1507
  * @param {Ship} attacker
1424
1508
  * @param {Ship} target
1425
- * @returns {WarfareInfo}
1509
+ * @returns {AttackAnalysis}
1426
1510
  */
1427
- analyze_warfare(
1428
- params: WarfareContext,
1511
+ analyze_attack(
1512
+ config: AttackAnalyzerConfig,
1429
1513
  attacker: Ship,
1430
1514
  target: Ship
1431
- ): WarfareInfo;
1515
+ ): AttackAnalysis;
1516
+ /**
1517
+ * @param {ShipAnalyzerConfig} config
1518
+ * @param {Ship} left
1519
+ * @param {Ship} right
1520
+ * @param {boolean} attacker_is_left
1521
+ * @returns {AttackAnalysis}
1522
+ */
1523
+ analyze_attack_by_ship_analyzer(
1524
+ config: ShipAnalyzerConfig,
1525
+ left: Ship,
1526
+ right: Ship,
1527
+ attacker_is_left: boolean
1528
+ ): AttackAnalysis;
1529
+ /**
1530
+ * @param {NodeAttackAnalyzerConfig} config
1531
+ * @param {Comp} left_comp
1532
+ * @param {Ship} left_ship
1533
+ * @param {Comp} right_comp
1534
+ * @param {Ship} right_ship
1535
+ * @returns {NodeAttackAnalysis}
1536
+ */
1537
+ analyze_node_attack(
1538
+ config: NodeAttackAnalyzerConfig,
1539
+ left_comp: Comp,
1540
+ left_ship: Ship,
1541
+ right_comp: Comp,
1542
+ right_ship: Ship
1543
+ ): NodeAttackAnalysis;
1432
1544
  /**
1433
1545
  * @param {Comp} comp
1434
- * @param {Engagement} engagement
1435
- * @returns {FleetCutinAnalysis}
1546
+ * @param {CompAnalyzerConfig} config
1547
+ * @returns {CompAnalysis}
1548
+ */
1549
+ analyze_comp(comp: Comp, config: CompAnalyzerConfig): CompAnalysis;
1550
+ /**
1551
+ * @param {Comp} player_comp
1552
+ * @param {Comp} enemy_comp
1553
+ * @param {NodeAttackAnalyzerConfig} config
1554
+ * @param {number} times
1555
+ * @returns {SimulatorResult}
1436
1556
  */
1437
- analyze_fleet_cutin(comp: Comp, engagement: Engagement): FleetCutinAnalysis;
1557
+ simulate_support_shelling(
1558
+ player_comp: Comp,
1559
+ enemy_comp: Comp,
1560
+ config: NodeAttackAnalyzerConfig,
1561
+ times: number
1562
+ ): SimulatorResult;
1438
1563
  }
1439
1564
  /**
1440
1565
  */
@@ -1520,12 +1645,9 @@ export class Comp {
1520
1645
  /**
1521
1646
  * @param {Ship} ship
1522
1647
  * @param {Formation | undefined} formation
1523
- * @returns {ShipEnvironment}
1648
+ * @returns {ShipConditions}
1524
1649
  */
1525
- create_warfare_ship_environment(
1526
- ship: Ship,
1527
- formation?: Formation
1528
- ): ShipEnvironment;
1650
+ get_ship_conditions(ship: Ship, formation?: Formation): ShipConditions;
1529
1651
  /**
1530
1652
  */
1531
1653
  boss_sup?: Fleet;
@@ -1534,13 +1656,13 @@ export class Comp {
1534
1656
  escort?: Fleet;
1535
1657
  /**
1536
1658
  */
1537
- hq_level: number;
1659
+ readonly hq_level: number;
1538
1660
  /**
1539
1661
  */
1540
1662
  main: Fleet;
1541
1663
  /**
1542
1664
  */
1543
- org_type: OrgType;
1665
+ readonly org_type: OrgType;
1544
1666
  /**
1545
1667
  */
1546
1668
  route_sup?: Fleet;
@@ -1601,19 +1723,6 @@ export class FhCore {
1601
1723
  * @returns {Analyzer}
1602
1724
  */
1603
1725
  create_analyzer(): Analyzer;
1604
- /**
1605
- * @param {Comp} player
1606
- * @param {Comp} enemy
1607
- * @param {ShellingSupportSimulatorParams} params
1608
- * @param {number} times
1609
- * @returns {SimulatorResult}
1610
- */
1611
- simulate_shelling_support(
1612
- player: Comp,
1613
- enemy: Comp,
1614
- params: ShellingSupportSimulatorParams,
1615
- times: number
1616
- ): SimulatorResult;
1617
1726
  }
1618
1727
  /**
1619
1728
  */
@@ -1711,13 +1820,13 @@ export class Fleet {
1711
1820
  readonly fleet_los_mod: number | undefined;
1712
1821
  /**
1713
1822
  */
1714
- id: string;
1823
+ readonly hash: bigint;
1715
1824
  /**
1716
1825
  */
1717
- len: number;
1826
+ id: string;
1718
1827
  /**
1719
1828
  */
1720
- xxh3: bigint;
1829
+ readonly len: number;
1721
1830
  }
1722
1831
  /**
1723
1832
  */
@@ -1755,7 +1864,7 @@ export class Gear {
1755
1864
  /**
1756
1865
  * @returns {number}
1757
1866
  */
1758
- proficiency_critical_power_mod(): number;
1867
+ exp_critical_bonus(): number;
1759
1868
  /**
1760
1869
  * @param {number} slot_size
1761
1870
  * @returns {number}
@@ -1833,52 +1942,55 @@ export class Gear {
1833
1942
  can_be_deployed_to_land_base(): boolean;
1834
1943
  /**
1835
1944
  */
1836
- accuracy: number;
1945
+ readonly accuracy: number;
1837
1946
  /**
1838
1947
  */
1839
1948
  readonly ace: number;
1840
1949
  /**
1841
1950
  */
1842
- anti_air: number;
1951
+ readonly anti_air: number;
1843
1952
  /**
1844
1953
  */
1845
1954
  readonly anti_bomber: number;
1846
1955
  /**
1847
1956
  */
1848
- armor: number;
1957
+ readonly armor: number;
1849
1958
  /**
1850
1959
  */
1851
- asw: number;
1960
+ readonly asw: number;
1852
1961
  /**
1853
1962
  */
1854
- bombing: number;
1963
+ readonly bombing: number;
1855
1964
  /**
1856
1965
  */
1857
- cost: number;
1966
+ readonly cost: number;
1858
1967
  /**
1859
1968
  */
1860
- default_exp: number;
1969
+ readonly default_exp: number;
1861
1970
  /**
1862
1971
  */
1863
- evasion: number;
1972
+ readonly evasion: number;
1864
1973
  /**
1865
1974
  */
1866
- exp: number;
1975
+ readonly exp: number;
1867
1976
  /**
1868
1977
  */
1869
- firepower: number;
1978
+ readonly firepower: number;
1870
1979
  /**
1871
1980
  */
1872
- fleet_anti_air_resistance: number;
1981
+ readonly fleet_anti_air_resist: number;
1873
1982
  /**
1874
1983
  */
1875
- gear_id: number;
1984
+ readonly gear_id: number;
1876
1985
  /**
1877
1986
  */
1878
- gear_type: GearType;
1987
+ readonly gear_type: GearType;
1879
1988
  /**
1880
1989
  */
1881
1990
  readonly gear_type_id: number;
1991
+ /**
1992
+ */
1993
+ readonly hash: bigint;
1882
1994
  /**
1883
1995
  */
1884
1996
  readonly icon_id: number;
@@ -1887,49 +1999,46 @@ export class Gear {
1887
1999
  id: string;
1888
2000
  /**
1889
2001
  */
1890
- improvable: boolean;
2002
+ readonly improvable: boolean;
1891
2003
  /**
1892
2004
  */
1893
2005
  readonly interception: number;
1894
2006
  /**
1895
2007
  */
1896
- los: number;
2008
+ readonly los: number;
1897
2009
  /**
1898
2010
  */
1899
- luck: number;
2011
+ readonly luck: number;
1900
2012
  /**
1901
2013
  */
1902
- max_hp: number;
2014
+ readonly max_hp: number;
1903
2015
  /**
1904
2016
  */
1905
2017
  name: string;
1906
2018
  /**
1907
2019
  */
1908
- radius: number;
2020
+ readonly radius: number;
1909
2021
  /**
1910
2022
  */
1911
- range: number;
2023
+ readonly range: number;
1912
2024
  /**
1913
2025
  */
1914
- ship_anti_air_resistance: number;
2026
+ readonly ship_anti_air_resist: number;
1915
2027
  /**
1916
2028
  */
1917
2029
  readonly special_type_id: number;
1918
2030
  /**
1919
2031
  */
1920
- speed: number;
2032
+ readonly speed: number;
1921
2033
  /**
1922
2034
  */
1923
- stars: number;
2035
+ readonly stars: number;
1924
2036
  /**
1925
2037
  */
1926
- torpedo: number;
2038
+ readonly torpedo: number;
1927
2039
  /**
1928
2040
  */
1929
2041
  types: Uint8Array;
1930
- /**
1931
- */
1932
- xxh3: bigint;
1933
2042
  }
1934
2043
  /**
1935
2044
  */
@@ -2098,22 +2207,22 @@ export class Org {
2098
2207
  boss_sup?: string;
2099
2208
  /**
2100
2209
  */
2101
- hq_level: number;
2210
+ readonly hash: bigint;
2211
+ /**
2212
+ */
2213
+ readonly hq_level: number;
2102
2214
  /**
2103
2215
  */
2104
2216
  id: string;
2105
2217
  /**
2106
2218
  */
2107
- org_type: OrgType;
2219
+ readonly org_type: OrgType;
2108
2220
  /**
2109
2221
  */
2110
2222
  route_sup?: string;
2111
2223
  /**
2112
2224
  */
2113
2225
  sortie: string;
2114
- /**
2115
- */
2116
- xxh3: bigint;
2117
2226
  }
2118
2227
  /**
2119
2228
  */
@@ -2268,6 +2377,13 @@ export class Ship {
2268
2377
  */
2269
2378
  fleet_los_factor(): number | undefined;
2270
2379
  /**
2380
+ * 加重対空
2381
+ * @param {Side} side
2382
+ * @returns {number | undefined}
2383
+ */
2384
+ ship_adjusted_anti_air(side: Side): number | undefined;
2385
+ /**
2386
+ * 艦隊対空補正
2271
2387
  * @returns {number}
2272
2388
  */
2273
2389
  fleet_anti_air_mod(): number;
@@ -2313,10 +2429,6 @@ export class Ship {
2313
2429
  * @returns {number | undefined}
2314
2430
  */
2315
2431
  ohko_power(): number | undefined;
2316
- /**
2317
- * @param {number} value
2318
- */
2319
- take_damage(value: number): void;
2320
2432
  /**
2321
2433
  * @returns {number | undefined}
2322
2434
  */
@@ -2336,7 +2448,7 @@ export class Ship {
2336
2448
  readonly accuracy: number;
2337
2449
  /**
2338
2450
  */
2339
- ammo: number;
2451
+ readonly ammo: number;
2340
2452
  /**
2341
2453
  */
2342
2454
  readonly anti_air: number | undefined;
@@ -2348,10 +2460,10 @@ export class Ship {
2348
2460
  readonly asw: number | undefined;
2349
2461
  /**
2350
2462
  */
2351
- ctype: number;
2463
+ readonly ctype: number;
2352
2464
  /**
2353
2465
  */
2354
- current_hp: number;
2466
+ readonly current_hp: number;
2355
2467
  /**
2356
2468
  */
2357
2469
  readonly evasion: number | undefined;
@@ -2360,7 +2472,10 @@ export class Ship {
2360
2472
  readonly firepower: number | undefined;
2361
2473
  /**
2362
2474
  */
2363
- fuel: number;
2475
+ readonly fuel: number;
2476
+ /**
2477
+ */
2478
+ readonly hash: bigint;
2364
2479
  /**
2365
2480
  */
2366
2481
  id: string;
@@ -2369,7 +2484,7 @@ export class Ship {
2369
2484
  readonly innate_torpedo_accuracy: number;
2370
2485
  /**
2371
2486
  */
2372
- level: number;
2487
+ readonly level: number;
2373
2488
  /**
2374
2489
  */
2375
2490
  readonly los: number | undefined;
@@ -2387,7 +2502,7 @@ export class Ship {
2387
2502
  readonly max_hp: number | undefined;
2388
2503
  /**
2389
2504
  */
2390
- morale: number;
2505
+ readonly morale: number;
2391
2506
  /**
2392
2507
  */
2393
2508
  readonly naked_anti_air: number | undefined;
@@ -2426,10 +2541,10 @@ export class Ship {
2426
2541
  readonly range: number | undefined;
2427
2542
  /**
2428
2543
  */
2429
- ship_id: number;
2544
+ readonly ship_id: number;
2430
2545
  /**
2431
2546
  */
2432
- ship_type: ShipType;
2547
+ readonly ship_type: ShipType;
2433
2548
  /**
2434
2549
  */
2435
2550
  readonly slotnum: number;
@@ -2451,9 +2566,6 @@ export class Ship {
2451
2566
  /**
2452
2567
  */
2453
2568
  readonly useful: boolean;
2454
- /**
2455
- */
2456
- xxh3: bigint;
2457
2569
  /**
2458
2570
  */
2459
2571
  readonly yomi: string;