fleethub-core 1.7.11 → 1.8.1

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,193 +1,223 @@
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;
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>;
27
+ }
77
28
 
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";
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;
35
+ }
36
+
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;
43
+ }
44
+
45
+ export interface AntiAirCutinDef {
46
+ id: number;
47
+ type_factor: number | null;
48
+ multiplier: number | null;
49
+ guaranteed: number | null;
50
+ sequential: boolean | null;
51
+ }
52
+
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
+ };
60
+ }
61
+
62
+ export type NestedFormationDef =
63
+ | NestedFormationDef.Normal
64
+ | NestedFormationDef.Vanguard;
65
+
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;
75
+ }
76
+
77
+ export interface FormationCombatModifiersDef {
78
+ power_mod?: number;
79
+ accuracy_mod?: number;
80
+ evasion_mod?: number;
81
+ }
82
+
83
+ export interface ShipAnalyzerConfig {
84
+ air_state?: AirState;
85
+ engagement?: Engagement;
86
+ left?: AttackAnalyzerShipConfig;
87
+ right?: AttackAnalyzerShipConfig;
88
+ }
89
+
90
+ declare namespace SpecialEnemyType {
91
+ export type None = "None";
92
+ export type SoftSkinned = "SoftSkinned";
86
93
  export type Pillbox = "Pillbox";
87
94
  export type IsolatedIsland = "IsolatedIsland";
88
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
89
95
  export type SupplyDepot = "SupplyDepot";
96
+ export type HarbourSummerPrincess = "HarbourSummerPrincess";
90
97
  export type PtImp = "PtImp";
91
98
  export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
92
99
  export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
93
100
  }
94
101
 
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;
102
+ export type SpecialEnemyType =
103
+ | SpecialEnemyType.None
104
+ | SpecialEnemyType.SoftSkinned
105
+ | SpecialEnemyType.Pillbox
106
+ | SpecialEnemyType.IsolatedIsland
107
+ | SpecialEnemyType.SupplyDepot
108
+ | SpecialEnemyType.HarbourSummerPrincess
109
+ | SpecialEnemyType.PtImp
110
+ | SpecialEnemyType.BattleshipSummerPrincess
111
+ | SpecialEnemyType.HeavyCruiserSummerPrincess;
110
112
 
111
- declare namespace AirStateRank {
112
- export type Rank0 = "Rank0";
113
- export type Rank1 = "Rank1";
114
- export type Rank2 = "Rank2";
115
- export type Rank3 = "Rank3";
113
+ type __NightCutinLikeFleetCutin = FleetCutin;
114
+ type __NightCutinLikeNightCutin = NightCutin;
115
+ declare namespace NightCutinLike {
116
+ export type NightCutin = __NightCutinLikeNightCutin;
117
+ export type FleetCutin = __NightCutinLikeFleetCutin;
116
118
  }
117
119
 
118
- export type AirStateRank =
119
- | AirStateRank.Rank0
120
- | AirStateRank.Rank1
121
- | AirStateRank.Rank2
122
- | AirStateRank.Rank3;
120
+ export type NightCutinLike =
121
+ | NightCutinLike.NightCutin
122
+ | NightCutinLike.FleetCutin;
123
123
 
124
- declare namespace AirState {
125
- export type AirSupremacy = "AirSupremacy";
126
- export type AirSuperiority = "AirSuperiority";
127
- export type AirParity = "AirParity";
128
- export type AirDenial = "AirDenial";
129
- export type AirIncapability = "AirIncapability";
124
+ type __DayCutinLikeDayCutin = DayCutin;
125
+ type __DayCutinLikeFleetCutin = FleetCutin;
126
+ declare namespace DayCutinLike {
127
+ export type DayCutin = __DayCutinLikeDayCutin;
128
+ export type FleetCutin = __DayCutinLikeFleetCutin;
130
129
  }
131
130
 
132
- export type AirState =
133
- | AirState.AirSupremacy
134
- | AirState.AirSuperiority
135
- | AirState.AirParity
136
- | AirState.AirDenial
137
- | AirState.AirIncapability;
131
+ export type DayCutinLike = DayCutinLike.DayCutin | DayCutinLike.FleetCutin;
138
132
 
139
- export interface MasterIBonuses {
140
- shelling_power: MasterIBonusRule[];
141
- carrier_shelling_power: MasterIBonusRule[];
142
- shelling_accuracy: MasterIBonusRule[];
143
- torpedo_power: MasterIBonusRule[];
144
- torpedo_accuracy: MasterIBonusRule[];
145
- torpedo_evasion: MasterIBonusRule[];
146
- asw_power: MasterIBonusRule[];
147
- asw_accuracy: MasterIBonusRule[];
148
- night_power: MasterIBonusRule[];
149
- night_accuracy: MasterIBonusRule[];
150
- defense_power: MasterIBonusRule[];
151
- contact_selection: MasterIBonusRule[];
152
- fighter_power: MasterIBonusRule[];
153
- ship_anti_air: MasterIBonusRule[];
154
- fleet_anti_air: MasterIBonusRule[];
155
- elos: MasterIBonusRule[];
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";
156
140
  }
157
141
 
158
- export interface MasterIBonusRule {
159
- expr: CompiledEvaler;
160
- formula: CompiledEvaler;
161
- }
142
+ export type FleetCutin =
143
+ | FleetCutin.NelsonTouch
144
+ | FleetCutin.NagatoClassCutin
145
+ | FleetCutin.ColoradoClassCutin
146
+ | FleetCutin.KongouClassCutin
147
+ | FleetCutin.Yamato2ShipCutin
148
+ | FleetCutin.Yamato3ShipCutin;
162
149
 
163
- declare namespace ShellingAttackType {
164
- export type Normal = "Normal";
165
- export type Carrier = "Carrier";
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
166
  }
167
167
 
168
- export type ShellingAttackType =
169
- | ShellingAttackType.Normal
170
- | ShellingAttackType.Carrier;
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;
171
184
 
172
- export interface FleetCutinAnalysis {
173
- shelling: FleetCutinInfo[];
174
- night: FleetCutinInfo[];
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";
175
196
  }
176
197
 
177
- export interface FleetCutinInfo {
178
- cutin: FleetCutin;
179
- rate: number | null;
180
- formation: Formation;
181
- items: FleetCutinInfoItem[];
182
- }
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;
183
209
 
184
- export interface FleetCutinInfoItem {
185
- ship_id: number;
186
- cutin: FleetCutin;
187
- fleet_cutin_mod: number;
188
- stats: AttackStats;
210
+ declare namespace ContactRank {
211
+ export type Rank1 = "Rank1";
212
+ export type Rank2 = "Rank2";
213
+ export type Rank3 = "Rank3";
189
214
  }
190
215
 
216
+ export type ContactRank =
217
+ | ContactRank.Rank1
218
+ | ContactRank.Rank2
219
+ | ContactRank.Rank3;
220
+
191
221
  declare namespace AirWaveType {
192
222
  export type Jet = "Jet";
193
223
  export type LandBase = "LandBase";
@@ -211,50 +241,26 @@ export interface SimulatorResultItem {
211
241
  damage_state_map: Record<DamageState, number>;
212
242
  }
213
243
 
214
- declare namespace AswAttackType {
215
- export type DepthCharge = "DepthCharge";
216
- export type Aircraft = "Aircraft";
217
- }
218
-
219
- export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
220
-
221
- declare namespace OrgType {
222
- export type Single = "Single";
223
- export type CarrierTaskForce = "CarrierTaskForce";
224
- export type SurfaceTaskForce = "SurfaceTaskForce";
225
- export type TransportEscort = "TransportEscort";
226
- export type EnemySingle = "EnemySingle";
227
- export type EnemyCombined = "EnemyCombined";
228
- }
229
-
230
- export type OrgType =
231
- | OrgType.Single
232
- | OrgType.CarrierTaskForce
233
- | OrgType.SurfaceTaskForce
234
- | OrgType.TransportEscort
235
- | OrgType.EnemySingle
236
- | OrgType.EnemyCombined;
237
-
238
- declare namespace Role {
239
- export type Main = "Main";
240
- export type Escort = "Escort";
241
- }
242
-
243
- export type Role = Role.Main | Role.Escort;
244
-
245
- export interface CompMeta {
246
- fleets: Record<FleetType, FleetMeta>;
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";
247
250
  }
248
251
 
249
- export interface FleetMeta {
250
- id: string;
251
- len: number;
252
- ships: [string, ShipMeta | null][];
253
- }
252
+ export type DamageState =
253
+ | DamageState.Normal
254
+ | DamageState.Shouha
255
+ | DamageState.Chuuha
256
+ | DamageState.Taiha
257
+ | DamageState.Sunk;
254
258
 
255
- export interface ShipMeta {
256
- id: string;
257
- ship_id: number;
259
+ export interface ShipPosition {
260
+ org_type?: OrgType;
261
+ role?: Role;
262
+ fleet_len?: number;
263
+ index?: number;
258
264
  }
259
265
 
260
266
  declare namespace GearCategory {
@@ -346,6 +352,7 @@ declare namespace GearType {
346
352
  export type JetRecon = "JetRecon";
347
353
  export type LargeRadar2 = "LargeRadar2";
348
354
  export type CbRecon2 = "CbRecon2";
355
+ export type SecondaryGun2 = "SecondaryGun2";
349
356
  }
350
357
 
351
358
  export type GearType =
@@ -407,7 +414,166 @@ export type GearType =
407
414
  | GearType.JetTorpedoBomber
408
415
  | GearType.JetRecon
409
416
  | GearType.LargeRadar2
410
- | GearType.CbRecon2;
417
+ | GearType.CbRecon2
418
+ | GearType.SecondaryGun2;
419
+
420
+ declare namespace FleetType {
421
+ export type Main = "Main";
422
+ export type Escort = "Escort";
423
+ export type RouteSup = "RouteSup";
424
+ export type BossSup = "BossSup";
425
+ }
426
+
427
+ export type FleetType =
428
+ | FleetType.Main
429
+ | FleetType.Escort
430
+ | FleetType.RouteSup
431
+ | FleetType.BossSup;
432
+
433
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
434
+ formation?: Formation;
435
+ }
436
+
437
+ export interface NodeAttackAnalyzerConfig {
438
+ air_state?: AirState;
439
+ engagement?: Engagement;
440
+ left?: NodeAttackAnalyzerShipConfig;
441
+ right?: NodeAttackAnalyzerShipConfig;
442
+ }
443
+
444
+ export interface NodeAttackAnalysis {
445
+ left: AttackAnalysis;
446
+ right: AttackAnalysis;
447
+ }
448
+
449
+ export interface CompMeta {
450
+ fleets: Record<FleetType, FleetMeta>;
451
+ }
452
+
453
+ export interface FleetMeta {
454
+ id: string;
455
+ len: number;
456
+ ships: [string, ShipMeta | null][];
457
+ }
458
+
459
+ export interface ShipMeta {
460
+ id: string;
461
+ ship_id: number;
462
+ }
463
+
464
+ declare namespace Engagement {
465
+ export type GreenT = "GreenT";
466
+ export type Parallel = "Parallel";
467
+ export type HeadOn = "HeadOn";
468
+ export type RedT = "RedT";
469
+ }
470
+
471
+ export type Engagement =
472
+ | Engagement.GreenT
473
+ | Engagement.Parallel
474
+ | Engagement.HeadOn
475
+ | Engagement.RedT;
476
+
477
+ export type TorpedoAttackType = null;
478
+
479
+ type __NightPhaseAttackTypeAswAttackType = AswAttackType;
480
+ type __NightPhaseAttackTypeNightAttackType = NightAttackType;
481
+ declare namespace NightPhaseAttackType {
482
+ export type Night = { t: "Night"; c: __NightPhaseAttackTypeNightAttackType };
483
+ export type Asw = { t: "Asw"; c: __NightPhaseAttackTypeAswAttackType };
484
+ }
485
+
486
+ export type NightPhaseAttackType =
487
+ | NightPhaseAttackType.Night
488
+ | NightPhaseAttackType.Asw;
489
+
490
+ type __DayPhaseAttackTypeAswAttackType = AswAttackType;
491
+ type __DayPhaseAttackTypeShellingType = ShellingType;
492
+ declare namespace DayPhaseAttackType {
493
+ export type Shelling = { t: "Shelling"; c: __DayPhaseAttackTypeShellingType };
494
+ export type Asw = { t: "Asw"; c: __DayPhaseAttackTypeAswAttackType };
495
+ }
496
+
497
+ export type DayPhaseAttackType =
498
+ | DayPhaseAttackType.Shelling
499
+ | DayPhaseAttackType.Asw;
500
+
501
+ type __AttackTypeAswAttackType = AswAttackType;
502
+ type __AttackTypeNightAttackType = NightAttackType;
503
+ type __AttackTypeShellingType = ShellingType;
504
+ type __AttackTypeSupportShellingType = SupportShellingType;
505
+ declare namespace AttackType {
506
+ export type Asw = { t: "Asw"; c: __AttackTypeAswAttackType };
507
+ export type Shelling = { t: "Shelling"; c: __AttackTypeShellingType };
508
+ export type Night = { t: "Night"; c: __AttackTypeNightAttackType };
509
+ export type Torpedo = { t: "Torpedo"; c: null };
510
+ export type SupportShelling = {
511
+ t: "SupportShelling";
512
+ c: __AttackTypeSupportShellingType;
513
+ };
514
+ }
515
+
516
+ export type AttackType =
517
+ | AttackType.Asw
518
+ | AttackType.Shelling
519
+ | AttackType.Night
520
+ | AttackType.Torpedo
521
+ | AttackType.SupportShelling;
522
+
523
+ export type SupportShellingType = ShellingType;
524
+
525
+ declare namespace NightAttackType {
526
+ export type Normal = "Normal";
527
+ export type Swordfish = "Swordfish";
528
+ export type Carrier = "Carrier";
529
+ }
530
+
531
+ export type NightAttackType =
532
+ | NightAttackType.Normal
533
+ | NightAttackType.Swordfish
534
+ | NightAttackType.Carrier;
535
+
536
+ declare namespace ShellingType {
537
+ export type Normal = "Normal";
538
+ export type Carrier = "Carrier";
539
+ }
540
+
541
+ export type ShellingType = ShellingType.Normal | ShellingType.Carrier;
542
+
543
+ declare namespace AswAttackType {
544
+ export type DepthCharge = "DepthCharge";
545
+ export type Aircraft = "Aircraft";
546
+ }
547
+
548
+ export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
549
+
550
+ declare namespace AirStateRank {
551
+ export type Rank0 = "Rank0";
552
+ export type Rank1 = "Rank1";
553
+ export type Rank2 = "Rank2";
554
+ export type Rank3 = "Rank3";
555
+ }
556
+
557
+ export type AirStateRank =
558
+ | AirStateRank.Rank0
559
+ | AirStateRank.Rank1
560
+ | AirStateRank.Rank2
561
+ | AirStateRank.Rank3;
562
+
563
+ declare namespace AirState {
564
+ export type AirSupremacy = "AirSupremacy";
565
+ export type AirSuperiority = "AirSuperiority";
566
+ export type AirParity = "AirParity";
567
+ export type AirDenial = "AirDenial";
568
+ export type AirIncapability = "AirIncapability";
569
+ }
570
+
571
+ export type AirState =
572
+ | AirState.AirSupremacy
573
+ | AirState.AirSuperiority
574
+ | AirState.AirParity
575
+ | AirState.AirDenial
576
+ | AirState.AirIncapability;
411
577
 
412
578
  export interface MasterData {
413
579
  gears: MasterGear[];
@@ -435,56 +601,68 @@ export interface MasterAttrRule<T> {
435
601
  expr: string;
436
602
  }
437
603
 
438
- export type NumMap<K, V> = Partial<Record<K, V>>;
439
-
440
- type __ShellingSpecialAttackDayCutin = DayCutin;
441
- type __ShellingSpecialAttackFleetCutin = FleetCutin;
442
- declare namespace ShellingSpecialAttack {
443
- export type DayCutin = { DayCutin: __ShellingSpecialAttackDayCutin };
444
- export type FleetCutin = { FleetCutin: __ShellingSpecialAttackFleetCutin };
604
+ export interface AttackAnalyzerConfig {
605
+ air_state?: AirState;
606
+ engagement?: Engagement;
607
+ attacker?: AttackAnalyzerShipConfig;
608
+ target?: AttackAnalyzerShipConfig;
445
609
  }
446
610
 
447
- export type ShellingSpecialAttack =
448
- | ShellingSpecialAttack.DayCutin
449
- | ShellingSpecialAttack.FleetCutin;
611
+ export interface AttackAnalyzerShipConfig
612
+ extends ShipConditions,
613
+ NightFleetConditions {
614
+ fleet_los_mod?: number | null;
615
+ }
450
616
 
451
- declare namespace DayCutin {
452
- export type Zuiun = "Zuiun";
453
- export type AirSea = "AirSea";
454
- export type MainMain = "MainMain";
455
- export type MainAp = "MainAp";
456
- export type MainRadar = "MainRadar";
457
- export type MainSec = "MainSec";
458
- export type DoubleAttack = "DoubleAttack";
459
- export type FBA = "FBA";
460
- export type BBA = "BBA";
461
- export type BA = "BA";
617
+ declare namespace ShipAttr {
618
+ export type Unknown = "Unknown";
619
+ export type Abyssal = "Abyssal";
620
+ export type NightCarrier = "NightCarrier";
621
+ export type Installation = "Installation";
622
+ export type RoyalNavy = "RoyalNavy";
623
+ export type Kai2 = "Kai2";
624
+ export type TurbineSpeedBonus = "TurbineSpeedBonus";
625
+ export type Pillbox = "Pillbox";
626
+ export type IsolatedIsland = "IsolatedIsland";
627
+ export type HarbourSummerPrincess = "HarbourSummerPrincess";
628
+ export type SupplyDepot = "SupplyDepot";
629
+ export type PtImp = "PtImp";
630
+ export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
631
+ export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
462
632
  }
463
633
 
464
- export type DayCutin =
465
- | DayCutin.Zuiun
466
- | DayCutin.AirSea
467
- | DayCutin.MainMain
468
- | DayCutin.MainAp
469
- | DayCutin.MainRadar
470
- | DayCutin.MainSec
471
- | DayCutin.DoubleAttack
472
- | DayCutin.FBA
473
- | DayCutin.BBA
474
- | DayCutin.BA;
634
+ export type ShipAttr =
635
+ | ShipAttr.Unknown
636
+ | ShipAttr.Abyssal
637
+ | ShipAttr.NightCarrier
638
+ | ShipAttr.Installation
639
+ | ShipAttr.RoyalNavy
640
+ | ShipAttr.Kai2
641
+ | ShipAttr.TurbineSpeedBonus
642
+ | ShipAttr.Pillbox
643
+ | ShipAttr.IsolatedIsland
644
+ | ShipAttr.HarbourSummerPrincess
645
+ | ShipAttr.SupplyDepot
646
+ | ShipAttr.PtImp
647
+ | ShipAttr.BattleshipSummerPrincess
648
+ | ShipAttr.HeavyCruiserSummerPrincess;
475
649
 
476
- declare namespace Engagement {
477
- export type GreenT = "GreenT";
478
- export type Parallel = "Parallel";
479
- export type HeadOn = "HeadOn";
480
- export type RedT = "RedT";
650
+ declare namespace OrgType {
651
+ export type Single = "Single";
652
+ export type CarrierTaskForce = "CarrierTaskForce";
653
+ export type SurfaceTaskForce = "SurfaceTaskForce";
654
+ export type TransportEscort = "TransportEscort";
655
+ export type EnemySingle = "EnemySingle";
656
+ export type EnemyCombined = "EnemyCombined";
481
657
  }
482
658
 
483
- export type Engagement =
484
- | Engagement.GreenT
485
- | Engagement.Parallel
486
- | Engagement.HeadOn
487
- | Engagement.RedT;
659
+ export type OrgType =
660
+ | OrgType.Single
661
+ | OrgType.CarrierTaskForce
662
+ | OrgType.SurfaceTaskForce
663
+ | OrgType.TransportEscort
664
+ | OrgType.EnemySingle
665
+ | OrgType.EnemyCombined;
488
666
 
489
667
  export interface ShipEnvironment {
490
668
  org_type?: OrgType;
@@ -493,13 +671,19 @@ export interface ShipEnvironment {
493
671
  fleet_len?: number;
494
672
  formation?: Formation;
495
673
  fleet_los_mod?: number | null;
496
- night_conditions?: NightConditions;
674
+ night_conditions?: NightFleetConditions;
497
675
  }
498
676
 
499
- export interface NightConditions {
677
+ export interface NightFleetConditions {
500
678
  night_contact_rank?: ContactRank | null;
501
679
  starshell_index?: number | null;
502
680
  searchlight_index?: number | null;
681
+ activates_large_searchlight?: boolean;
682
+ }
683
+
684
+ export interface NightConditions {
685
+ player?: NightFleetConditions;
686
+ enemy?: NightFleetConditions;
503
687
  }
504
688
 
505
689
  export interface BattleConditions {
@@ -509,29 +693,13 @@ export interface BattleConditions {
509
693
  fleet_len: number;
510
694
  formation: Formation;
511
695
  fleet_los_mod: number | null;
512
- night_conditions: NightConditions;
513
- }
514
-
515
- export interface CompDayCutinRateInfo {
516
- main: FleetDayCutinRateInfo;
517
- escort: FleetDayCutinRateInfo | null;
518
- }
519
-
520
- export interface FleetDayCutinRateInfo {
521
- fleet_los_mod: number | null;
522
- ships: ShipDayCutinRateInfo[];
523
- }
524
-
525
- export interface ShipDayCutinRateInfo {
526
- ship_id: number;
527
- air_supremacy: DayCutinRateInfo;
528
- air_superiority: DayCutinRateInfo;
696
+ night_conditions: NightFleetConditions;
529
697
  }
530
698
 
531
- export interface DayCutinRateInfo {
532
- observation_term: number | null;
533
- rates: [DayCutin | null, number | null][];
534
- total_cutin_rate: number | null;
699
+ export interface SupportShellingSimulatorParams {
700
+ attacker_formation?: Formation;
701
+ target_formation?: Formation;
702
+ engagement: Engagement;
535
703
  }
536
704
 
537
705
  export interface EBonuses {
@@ -574,24 +742,12 @@ export interface GearInput {
574
742
 
575
743
  export type GearVecInput = GearInput[];
576
744
 
577
- export interface ShellingSupportSimulatorParams {
578
- attacker_formation?: Formation;
579
- target_formation?: Formation;
580
- engagement: Engagement;
745
+ declare namespace Role {
746
+ export type Main = "Main";
747
+ export type Escort = "Escort";
581
748
  }
582
749
 
583
- export interface DamageInfo {
584
- miss_damage_min: number;
585
- miss_damage_max: number;
586
- normal_damage_min: number;
587
- normal_damage_max: number;
588
- critical_damage_min: number;
589
- critical_damage_max: number;
590
- normal_scratch_rate: number;
591
- critical_scratch_rate: number;
592
- damage_map: NumMap<number, number>;
593
- damage_state_map: NumMap<DamageState, number>;
594
- }
750
+ export type Role = Role.Main | Role.Escort;
595
751
 
596
752
  declare namespace GearAttr {
597
753
  export type Unknown = "Unknown";
@@ -600,6 +756,7 @@ declare namespace GearAttr {
600
756
  export type NightFighter = "NightFighter";
601
757
  export type NightAttacker = "NightAttacker";
602
758
  export type HeavyBomber = "HeavyBomber";
759
+ export type NightRecon = "NightRecon";
603
760
  export type MainGun = "MainGun";
604
761
  export type Radar = "Radar";
605
762
  export type SurfaceRadar = "SurfaceRadar";
@@ -608,6 +765,7 @@ declare namespace GearAttr {
608
765
  export type SynergisticDepthCharge = "SynergisticDepthCharge";
609
766
  export type AntiSubMortar = "AntiSubMortar";
610
767
  export type AntiSubWeapon = "AntiSubWeapon";
768
+ export type ApDepthCharge = "ApDepthCharge";
611
769
  export type AntiSubAircraft = "AntiSubAircraft";
612
770
  export type LateModelBowTorpedo = "LateModelBowTorpedo";
613
771
  export type Seaplane = "Seaplane";
@@ -619,7 +777,6 @@ declare namespace GearAttr {
619
777
  export type ObservationSeaplane = "ObservationSeaplane";
620
778
  export type CbFighterBomber = "CbFighterBomber";
621
779
  export type AntiInstDiveBomber = "AntiInstDiveBomber";
622
- export type NightRecon = "NightRecon";
623
780
  export type CbSwordfish = "CbSwordfish";
624
781
  export type SemiNightPlane = "SemiNightPlane";
625
782
  export type HighAltitudeInterceptor = "HighAltitudeInterceptor";
@@ -632,6 +789,7 @@ export type GearAttr =
632
789
  | GearAttr.NightFighter
633
790
  | GearAttr.NightAttacker
634
791
  | GearAttr.HeavyBomber
792
+ | GearAttr.NightRecon
635
793
  | GearAttr.MainGun
636
794
  | GearAttr.Radar
637
795
  | GearAttr.SurfaceRadar
@@ -640,6 +798,7 @@ export type GearAttr =
640
798
  | GearAttr.SynergisticDepthCharge
641
799
  | GearAttr.AntiSubMortar
642
800
  | GearAttr.AntiSubWeapon
801
+ | GearAttr.ApDepthCharge
643
802
  | GearAttr.AntiSubAircraft
644
803
  | GearAttr.LateModelBowTorpedo
645
804
  | GearAttr.Seaplane
@@ -651,11 +810,145 @@ export type GearAttr =
651
810
  | GearAttr.ObservationSeaplane
652
811
  | GearAttr.CbFighterBomber
653
812
  | GearAttr.AntiInstDiveBomber
654
- | GearAttr.NightRecon
655
813
  | GearAttr.CbSwordfish
656
814
  | GearAttr.SemiNightPlane
657
815
  | GearAttr.HighAltitudeInterceptor;
658
816
 
817
+ export interface SupportShellingStyle {
818
+ tag: "SupportShellingStyle";
819
+ attack_type: SupportShellingType;
820
+ }
821
+
822
+ type __NightPhaseAttackStyleAswAttackStyle = AswAttackStyle;
823
+ type __NightPhaseAttackStyleNightAttackStyle = NightAttackStyle;
824
+ declare namespace NightPhaseAttackStyle {
825
+ export type Night = __NightPhaseAttackStyleNightAttackStyle;
826
+ export type Asw = __NightPhaseAttackStyleAswAttackStyle;
827
+ }
828
+
829
+ export type NightPhaseAttackStyle =
830
+ | NightPhaseAttackStyle.Night
831
+ | NightPhaseAttackStyle.Asw;
832
+
833
+ type __DayPhaseAttackStyleAswAttackStyle = AswAttackStyle;
834
+ type __DayPhaseAttackStyleShellingStyle = ShellingStyle;
835
+ declare namespace DayPhaseAttackStyle {
836
+ export type Shelling = __DayPhaseAttackStyleShellingStyle;
837
+ export type Asw = __DayPhaseAttackStyleAswAttackStyle;
838
+ }
839
+
840
+ export type DayPhaseAttackStyle =
841
+ | DayPhaseAttackStyle.Shelling
842
+ | DayPhaseAttackStyle.Asw;
843
+
844
+ export interface TorpedoAttackStyle {
845
+ tag: "TorpedoAttackStyle";
846
+ attack_type: TorpedoAttackType;
847
+ }
848
+
849
+ export interface AswAttackStyle {
850
+ tag: "AswAttackStyle";
851
+ attack_type: AswAttackType;
852
+ }
853
+
854
+ export interface NightAttackStyle {
855
+ tag: "NightAttackStyle";
856
+ attack_type: NightAttackType;
857
+ cutin: NightCutinLike | null;
858
+ power_mod: number;
859
+ accuracy_mod: number;
860
+ hits: number;
861
+ }
862
+
863
+ export interface ShellingStyle {
864
+ tag: "ShellingStyle";
865
+ attack_type: ShellingType;
866
+ cutin: DayCutinLike | null;
867
+ power_mod: number;
868
+ accuracy_mod: number;
869
+ hits: number;
870
+ }
871
+
872
+ export interface MasterIBonuses {
873
+ shelling_power: MasterIBonusRule[];
874
+ carrier_shelling_power: MasterIBonusRule[];
875
+ shelling_accuracy: MasterIBonusRule[];
876
+ torpedo_power: MasterIBonusRule[];
877
+ torpedo_accuracy: MasterIBonusRule[];
878
+ torpedo_evasion: MasterIBonusRule[];
879
+ asw_power: MasterIBonusRule[];
880
+ asw_accuracy: MasterIBonusRule[];
881
+ night_power: MasterIBonusRule[];
882
+ night_accuracy: MasterIBonusRule[];
883
+ defense_power: MasterIBonusRule[];
884
+ contact_selection: MasterIBonusRule[];
885
+ fighter_power: MasterIBonusRule[];
886
+ ship_anti_air: MasterIBonusRule[];
887
+ fleet_anti_air: MasterIBonusRule[];
888
+ elos: MasterIBonusRule[];
889
+ }
890
+
891
+ export interface MasterIBonusRule {
892
+ expr: CompiledEvaler;
893
+ formula: CompiledEvaler;
894
+ }
895
+
896
+ export interface NightContactChance {
897
+ rank1: number;
898
+ rank2: number;
899
+ rank3: number;
900
+ }
901
+
902
+ export interface CompNightCutinAnalysis {
903
+ night_contact_chance: NightContactChance;
904
+ ships: ShipNightCutinAnalysis[];
905
+ }
906
+
907
+ export interface ShipNightCutinAnalysis {
908
+ ship_id: number;
909
+ index: number;
910
+ normal: NightCutinActionReport;
911
+ chuuha: NightCutinActionReport;
912
+ }
913
+
914
+ export interface NightCutinActionReport
915
+ extends ActionReport<NightPhaseAttackStyle> {
916
+ cutin_term: number | null;
917
+ }
918
+
919
+ export interface DamageReport {
920
+ miss_damage_min: number;
921
+ miss_damage_max: number;
922
+ normal_damage_min: number;
923
+ normal_damage_max: number;
924
+ critical_damage_min: number;
925
+ critical_damage_max: number;
926
+ normal_scratch_rate: number;
927
+ critical_scratch_rate: number;
928
+ damage_density: Histogram<number, number>;
929
+ damage_state_density: Histogram<DamageState, number>;
930
+ }
931
+
932
+ export interface CompAntiAirAnalysis {
933
+ fleet_adjusted_anti_air: number;
934
+ ships: AntiAirReport[];
935
+ anti_air_cutin_chance: [number, number][];
936
+ }
937
+
938
+ export interface AntiAirReport {
939
+ ship_id: number;
940
+ role: Role;
941
+ index: number;
942
+ adjusted_anti_air: number | null;
943
+ proportional_shotdown_rate: number | null;
944
+ fixed_shotdown_number: number | null;
945
+ guaranteed: number | null;
946
+ anti_air_cutin_chance: [number, number][];
947
+ anti_air_propellant_barrage_chance: number | null;
948
+ }
949
+
950
+ export type Histogram<K, V> = Partial<Record<K, V>>;
951
+
659
952
  type __FormationCombinedFormation = CombinedFormation;
660
953
  type __FormationSingleFormation = SingleFormation;
661
954
  declare namespace Formation {
@@ -695,23 +988,6 @@ export type SingleFormation =
695
988
  | SingleFormation.LineAbreast
696
989
  | SingleFormation.Vanguard;
697
990
 
698
- declare namespace FleetCutin {
699
- export type NelsonTouch = "NelsonTouch";
700
- export type NagatoClassCutin = "NagatoClassCutin";
701
- export type ColoradoClassCutin = "ColoradoClassCutin";
702
- export type KongouClassCutin = "KongouClassCutin";
703
- export type Yamato2ShipCutin = "Yamato2ShipCutin";
704
- export type Yamato3ShipCutin = "Yamato3ShipCutin";
705
- }
706
-
707
- export type FleetCutin =
708
- | FleetCutin.NelsonTouch
709
- | FleetCutin.NagatoClassCutin
710
- | FleetCutin.ColoradoClassCutin
711
- | FleetCutin.KongouClassCutin
712
- | FleetCutin.Yamato2ShipCutin
713
- | FleetCutin.Yamato3ShipCutin;
714
-
715
991
  export interface CustomPowerModifiers {
716
992
  precap_mod?: AttackPowerModifier;
717
993
  postcap_mod?: AttackPowerModifier;
@@ -734,27 +1010,6 @@ export interface AttackPowerModifier {
734
1010
  b?: number;
735
1011
  }
736
1012
 
737
- export interface WarfareInfo {
738
- day: AttackInfo<DayBattleAttackType, DayCutin | null> | null;
739
- closing_torpedo: AttackInfo<null, null> | null;
740
- night: AttackInfo<NightBattleAttackType, NightCutin | null> | null;
741
- shelling_support: AttackInfo<null, null> | null;
742
- opening_asw: AttackInfo<null, null> | null;
743
- }
744
-
745
- declare namespace FleetType {
746
- export type Main = "Main";
747
- export type Escort = "Escort";
748
- export type RouteSup = "RouteSup";
749
- export type BossSup = "BossSup";
750
- }
751
-
752
- export type FleetType =
753
- | FleetType.Main
754
- | FleetType.Escort
755
- | FleetType.RouteSup
756
- | FleetType.BossSup;
757
-
758
1013
  export interface MasterEquippable {
759
1014
  equip_stype: EquipStype[];
760
1015
  equip_exslot: number[];
@@ -777,11 +1032,19 @@ export interface EquipStype {
777
1032
  equip_type: number[];
778
1033
  }
779
1034
 
780
- export interface WarfareContext {
781
- attacker_env: ShipEnvironment;
782
- target_env: ShipEnvironment;
783
- engagement: Engagement;
784
- air_state: AirState;
1035
+ export interface HitRate {
1036
+ normal: number;
1037
+ critical: number;
1038
+ total: number;
1039
+ }
1040
+
1041
+ export interface HitRateParams {
1042
+ accuracy_term: number;
1043
+ evasion_term: number;
1044
+ target_morale_mod: number;
1045
+ critical_rate_constant: number;
1046
+ critical_percentage_bonus: number;
1047
+ hit_percentage_bonus: number;
785
1048
  }
786
1049
 
787
1050
  export interface AttackPower {
@@ -801,7 +1064,7 @@ export interface AttackPowerParams {
801
1064
  postcap_mod: AttackPowerModifier;
802
1065
  ap_shell_mod: number | null;
803
1066
  carrier_power: number | null;
804
- proficiency_critical_mod: number | null;
1067
+ proficiency_critical_mod: number;
805
1068
  armor_penetration: number;
806
1069
  remaining_ammo_mod: number;
807
1070
  special_enemy_mods: SpecialEnemyModifiers;
@@ -819,49 +1082,32 @@ export interface SpecialEnemyModifiers {
819
1082
  pt_mod: AttackPowerModifier;
820
1083
  }
821
1084
 
822
- export interface AttackInfo<AttackType, Cutin> {
823
- attack_type: AttackType;
824
- items: AttackInfoItem<Cutin>[];
825
- damage_state_map: NumMap<DamageState, number> | null;
826
- }
827
-
828
- export interface AttackInfoItem<Cutin> {
829
- cutin: Cutin;
830
- rate: number | null;
831
- stats: AttackStats;
832
- }
833
-
834
- export interface AttackStats {
835
- attack_power: AttackPower | null;
836
- attack_power_params: AttackPowerParams | null;
837
- hits: number;
838
- hit_rate: HitRate | null;
839
- hit_rate_params: HitRateParams | null;
840
- damage: DamageInfo | null;
1085
+ export interface CompDayCutinAnalysis {
1086
+ rank3_air_state: AirState;
1087
+ rank2_air_state: AirState;
1088
+ main_fleet_los_mod: number | null;
1089
+ escort_fleet_los_mod: number | null;
1090
+ ships: ShipDayCutinAnalysis[];
841
1091
  }
842
1092
 
843
- export interface CompAntiAirInfo {
844
- fleet_adjusted_anti_air: number;
845
- ships: ShipAntiAirInfo[];
846
- anti_air_cutin_chance: [number, number][];
1093
+ export interface ShipDayCutinAnalysis {
1094
+ ship_id: number;
1095
+ role: Role;
1096
+ index: number;
1097
+ rank3: DayCutinReport;
1098
+ rank2: DayCutinReport;
847
1099
  }
848
1100
 
849
- export interface ShipAntiAirInfo {
850
- ship_id: number;
851
- adjusted_anti_air: number | null;
852
- proportional_shotdown_rate: number | null;
853
- fixed_shotdown_number: number | null;
854
- guaranteed: number | null;
855
- anti_air_cutin_chance: [number, number][];
856
- anti_air_propellant_barrage_chance: number | null;
1101
+ export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
1102
+ observation_term: number | null;
857
1103
  }
858
1104
 
859
- export interface CompContactChanceInfo {
860
- single: AirstrikeContactChance[] | null;
861
- combined: AirstrikeContactChance[] | null;
1105
+ export interface ContactAnalysis {
1106
+ single: DayContactChance[] | null;
1107
+ combined: DayContactChance[] | null;
862
1108
  }
863
1109
 
864
- export interface AirstrikeContactChance {
1110
+ export interface DayContactChance {
865
1111
  air_state: AirState;
866
1112
  trigger_rate: number;
867
1113
  rank3: number;
@@ -870,6 +1116,88 @@ export interface AirstrikeContactChance {
870
1116
  total: number;
871
1117
  }
872
1118
 
1119
+ export interface AttackAnalysis {
1120
+ attacker_is_player: boolean;
1121
+ attacker_ship_id: number;
1122
+ target_ship_id: number;
1123
+ day: ActionReport<DayPhaseAttackStyle>;
1124
+ night: ActionReport<NightPhaseAttackStyle>;
1125
+ closing_torpedo: ActionReport<TorpedoAttackStyle>;
1126
+ opening_asw: ActionReport<AswAttackStyle>;
1127
+ support_shelling: ActionReport<SupportShellingStyle>;
1128
+ }
1129
+
1130
+ export interface MasterShip {
1131
+ ship_id: number;
1132
+ name: string;
1133
+ yomi: string;
1134
+ stype: number;
1135
+ ctype: number;
1136
+ sort_id?: number;
1137
+ max_hp: StatInterval;
1138
+ firepower: StatInterval;
1139
+ armor: StatInterval;
1140
+ torpedo: StatInterval;
1141
+ evasion: StatInterval;
1142
+ anti_air: StatInterval;
1143
+ asw: StatInterval;
1144
+ los: StatInterval;
1145
+ luck: StatInterval;
1146
+ torpedo_accuracy?: number;
1147
+ basic_evasion_term?: number;
1148
+ speed: number;
1149
+ range?: number;
1150
+ fuel?: number;
1151
+ ammo?: number;
1152
+ next_id?: number;
1153
+ next_level?: number;
1154
+ slotnum: number;
1155
+ slots: SlotSizeVec;
1156
+ stock: GearState[];
1157
+ speed_group?: SpeedGroup;
1158
+ useful?: boolean;
1159
+ }
1160
+
1161
+ export type StatInterval = [number | null, number | null];
1162
+
1163
+ export interface CompAnalyzerConfig {
1164
+ engagement: Engagement;
1165
+ formation: Formation;
1166
+ anti_air_cutin: number | null;
1167
+ ship_anti_air_resist: number;
1168
+ fleet_anti_air_resist: number;
1169
+ left_night_fleet_conditions: NightFleetConditions;
1170
+ right_night_fleet_conditions: NightFleetConditions;
1171
+ }
1172
+
1173
+ export interface CompNightAnalysis {
1174
+ night_cutin: CompNightCutinAnalysis;
1175
+ fleet_cutin: FleetCutinReport<NightAttackStyle>[];
1176
+ }
1177
+
1178
+ export interface CompDayAnalysis {
1179
+ day_cutin: CompDayCutinAnalysis;
1180
+ fleet_cutin: FleetCutinReport<ShellingStyle>[];
1181
+ }
1182
+
1183
+ export interface CompAnalysis {
1184
+ day: CompDayAnalysis;
1185
+ night: CompNightAnalysis;
1186
+ contact: ContactAnalysis;
1187
+ anti_air: CompAntiAirAnalysis;
1188
+ }
1189
+
1190
+ export interface AttackReport<T> {
1191
+ style: T;
1192
+ proc_rate: number | null;
1193
+ attack_power: AttackPower | null;
1194
+ attack_power_params: AttackPowerParams | null;
1195
+ hits: number;
1196
+ hit_rate: HitRate | null;
1197
+ hit_rate_params: HitRateParams | null;
1198
+ damage: DamageReport | null;
1199
+ }
1200
+
873
1201
  export type ShipStateMap = Record<ShipKey, ShipState>;
874
1202
 
875
1203
  declare namespace ShipKey {
@@ -974,211 +1302,25 @@ export interface GearVecState {
974
1302
 
975
1303
  export interface GearState {
976
1304
  id?: string;
977
- gear_id: number;
978
- exp?: number;
979
- stars?: number;
980
- }
981
-
982
- export type SlotSizeVec = (number | null)[];
983
-
984
- declare namespace Side {
985
- export type Player = "Player";
986
- export type Enemy = "Enemy";
987
- }
988
-
989
- export type Side = Side.Player | Side.Enemy;
990
-
991
- declare namespace NightAttackType {
992
- export type Normal = "Normal";
993
- export type ArkRoyal = "ArkRoyal";
994
- export type Carrier = "Carrier";
995
- }
996
-
997
- export type NightAttackType =
998
- | NightAttackType.Normal
999
- | NightAttackType.ArkRoyal
1000
- | NightAttackType.Carrier;
1001
-
1002
- type __NightSpecialAttackFleetCutin = FleetCutin;
1003
- type __NightSpecialAttackNightCutin = NightCutin;
1004
- declare namespace NightSpecialAttack {
1005
- export type NightCutin = { NightCutin: __NightSpecialAttackNightCutin };
1006
- export type FleetCutin = { FleetCutin: __NightSpecialAttackFleetCutin };
1007
- }
1008
-
1009
- export type NightSpecialAttack =
1010
- | NightSpecialAttack.NightCutin
1011
- | NightSpecialAttack.FleetCutin;
1012
-
1013
- declare namespace NightCutin {
1014
- export type MainTorpRadar = "MainTorpRadar";
1015
- export type TorpLookoutRadar = "TorpLookoutRadar";
1016
- export type TorpTsloTorp = "TorpTsloTorp";
1017
- export type TorpTsloDrum = "TorpTsloDrum";
1018
- export type DoubleAttack = "DoubleAttack";
1019
- export type TorpTorpMain = "TorpTorpMain";
1020
- export type TorpTorpTorp = "TorpTorpTorp";
1021
- export type MainMainSec = "MainMainSec";
1022
- export type MainMainMain = "MainMainMain";
1023
- export type SubTorpTorp = "SubTorpTorp";
1024
- export type SubRadarTorp = "SubRadarTorp";
1025
- export type Cvci1_25 = "Cvci1_25";
1026
- export type Cvci1_20 = "Cvci1_20";
1027
- export type Cvci1_18 = "Cvci1_18";
1028
- export type Photobomber = "Photobomber";
1029
- }
1030
-
1031
- export type NightCutin =
1032
- | NightCutin.MainTorpRadar
1033
- | NightCutin.TorpLookoutRadar
1034
- | NightCutin.TorpTsloTorp
1035
- | NightCutin.TorpTsloDrum
1036
- | NightCutin.DoubleAttack
1037
- | NightCutin.TorpTorpMain
1038
- | NightCutin.TorpTorpTorp
1039
- | NightCutin.MainMainSec
1040
- | NightCutin.MainMainMain
1041
- | NightCutin.SubTorpTorp
1042
- | NightCutin.SubRadarTorp
1043
- | NightCutin.Cvci1_25
1044
- | NightCutin.Cvci1_20
1045
- | NightCutin.Cvci1_18
1046
- | NightCutin.Photobomber;
1047
-
1048
- declare namespace ContactRank {
1049
- export type Rank1 = "Rank1";
1050
- export type Rank2 = "Rank2";
1051
- export type Rank3 = "Rank3";
1052
- }
1053
-
1054
- export type ContactRank =
1055
- | ContactRank.Rank1
1056
- | ContactRank.Rank2
1057
- | ContactRank.Rank3;
1058
-
1059
- type __NightBattleAttackTypeAswAttackType = AswAttackType;
1060
- type __NightBattleAttackTypeNightAttackType = NightAttackType;
1061
- declare namespace NightBattleAttackType {
1062
- export type NightAttack = {
1063
- t: "NightAttack";
1064
- c: __NightBattleAttackTypeNightAttackType;
1065
- };
1066
- export type Asw = { t: "Asw"; c: __NightBattleAttackTypeAswAttackType };
1067
- }
1068
-
1069
- export type NightBattleAttackType =
1070
- | NightBattleAttackType.NightAttack
1071
- | NightBattleAttackType.Asw;
1072
-
1073
- type __DayBattleAttackTypeAswAttackType = AswAttackType;
1074
- type __DayBattleAttackTypeShellingAttackType = ShellingAttackType;
1075
- declare namespace DayBattleAttackType {
1076
- export type Shelling = {
1077
- t: "Shelling";
1078
- c: __DayBattleAttackTypeShellingAttackType;
1079
- };
1080
- export type Asw = { t: "Asw"; c: __DayBattleAttackTypeAswAttackType };
1081
- }
1082
-
1083
- export type DayBattleAttackType =
1084
- | DayBattleAttackType.Shelling
1085
- | DayBattleAttackType.Asw;
1086
-
1087
- export type GearTypeIdArray = [number, number, number, number, number];
1088
-
1089
- export interface BattleConfig {
1090
- formation: Record<Formation, NestedFormationDef>;
1091
- anti_air_cutin: Record<number, AntiAirCutinDef>;
1092
- day_cutin: Record<DayCutin, DayCutinDef>;
1093
- night_cutin: Record<NightCutin, NightCutinDef>;
1094
- }
1095
-
1096
- export interface NightCutinDef {
1097
- tag: NightCutin;
1098
- hits: number;
1099
- type_factor: number | null;
1100
- power_mod: number | null;
1101
- accuracy_mod: number | null;
1102
- }
1103
-
1104
- export interface DayCutinDef {
1105
- tag: DayCutin;
1106
- hits: number;
1107
- type_factor: number | null;
1108
- power_mod: number | null;
1109
- accuracy_mod: number | null;
1110
- }
1111
-
1112
- export interface AntiAirCutinDef {
1113
- id: number;
1114
- type_factor: number | null;
1115
- multiplier: number | null;
1116
- guaranteed: number | null;
1117
- sequential: boolean | null;
1118
- }
1119
-
1120
- type __NestedFormationDefFormationDef = FormationDef;
1121
- declare namespace NestedFormationDef {
1122
- export type Normal = __NestedFormationDefFormationDef;
1123
- export type Vanguard = {
1124
- top_half: __NestedFormationDefFormationDef;
1125
- bottom_half: __NestedFormationDefFormationDef;
1126
- };
1127
- }
1128
-
1129
- export type NestedFormationDef =
1130
- | NestedFormationDef.Normal
1131
- | NestedFormationDef.Vanguard;
1132
-
1133
- export interface FormationDef {
1134
- tag: Formation;
1135
- protection_rate: number | null;
1136
- fleet_anti_air_mod: number;
1137
- shelling: FormationWarfareDef;
1138
- torpedo: FormationWarfareDef;
1139
- asw: FormationWarfareDef;
1140
- night: FormationWarfareDef;
1141
- shelling_support: FormationWarfareDef;
1305
+ gear_id: number;
1306
+ exp?: number;
1307
+ stars?: number;
1142
1308
  }
1143
1309
 
1144
- export interface FormationWarfareDef {
1145
- power_mod: number | null;
1146
- accuracy_mod: number | null;
1147
- evasion_mod: number | null;
1310
+ declare namespace SpeedGroup {
1311
+ export type A = "A";
1312
+ export type B1 = "B1";
1313
+ export type B2 = "B2";
1314
+ export type C = "C";
1148
1315
  }
1149
1316
 
1150
- export interface MasterShip {
1151
- ship_id: number;
1152
- name: string;
1153
- yomi: string;
1154
- stype: number;
1155
- ctype: number;
1156
- sort_id?: number;
1157
- max_hp: StatInterval;
1158
- firepower: StatInterval;
1159
- armor: StatInterval;
1160
- torpedo: StatInterval;
1161
- evasion: StatInterval;
1162
- anti_air: StatInterval;
1163
- asw: StatInterval;
1164
- los: StatInterval;
1165
- luck: StatInterval;
1166
- torpedo_accuracy?: number;
1167
- basic_evasion_term?: number;
1168
- speed: number;
1169
- range?: number;
1170
- fuel?: number;
1171
- ammo?: number;
1172
- next_id?: number;
1173
- next_level?: number;
1174
- slotnum: number;
1175
- slots: SlotSizeVec;
1176
- stock: GearState[];
1177
- speed_group?: SpeedGroup;
1178
- useful?: boolean;
1179
- }
1317
+ export type SpeedGroup =
1318
+ | SpeedGroup.A
1319
+ | SpeedGroup.B1
1320
+ | SpeedGroup.B2
1321
+ | SpeedGroup.C;
1180
1322
 
1181
- export type StatInterval = [number | null, number | null];
1323
+ export type SlotSizeVec = (number | null)[];
1182
1324
 
1183
1325
  export interface MasterGear {
1184
1326
  gear_id: number;
@@ -1201,70 +1343,89 @@ export interface MasterGear {
1201
1343
  radius?: number;
1202
1344
  cost?: number;
1203
1345
  improvable?: boolean;
1204
- ship_anti_air_resistance?: number;
1205
- fleet_anti_air_resistance?: number;
1206
- }
1207
-
1208
- export interface HitRate {
1209
- total: number;
1210
- normal: number;
1211
- critical: number;
1212
- }
1213
-
1214
- export interface HitRateParams {
1215
- accuracy_term: number;
1216
- evasion_term: number;
1217
- target_morale_mod: number;
1218
- critical_rate_constant: number;
1219
- critical_percentage_bonus: number;
1220
- hit_percentage_bonus: number;
1346
+ ship_anti_air_resist?: number;
1347
+ fleet_anti_air_resist?: number;
1221
1348
  }
1222
1349
 
1223
- export interface FleetNightCutinRateInfo {
1224
- night_contact_chance: NightContactChance;
1225
- ships: ShipNightCutinRateInfo[];
1350
+ export interface ActionReport<T> {
1351
+ data: Record<string, AttackReport<T>>;
1352
+ damage_state_density: Histogram<DamageState, number> | null;
1353
+ is_active: boolean;
1226
1354
  }
1227
1355
 
1228
- export interface ShipNightCutinRateInfo {
1229
- ship_id: number;
1230
- normal: NightCutinRateInfo;
1231
- chuuha: NightCutinRateInfo;
1232
- }
1356
+ export type GearTypeIdArray = [number, number, number, number, number];
1233
1357
 
1234
- export interface NightCutinRateInfo {
1235
- cutin_term: number | null;
1236
- rates: [NightCutin | null, number | null][];
1358
+ declare namespace ShipType {
1359
+ export type Unknown = "Unknown";
1360
+ export type DE = "DE";
1361
+ export type DD = "DD";
1362
+ export type CL = "CL";
1363
+ export type CLT = "CLT";
1364
+ export type CA = "CA";
1365
+ export type CAV = "CAV";
1366
+ export type CVL = "CVL";
1367
+ export type FBB = "FBB";
1368
+ export type BB = "BB";
1369
+ export type BBV = "BBV";
1370
+ export type CV = "CV";
1371
+ export type XBB = "XBB";
1372
+ export type SS = "SS";
1373
+ export type SSV = "SSV";
1374
+ export type AP = "AP";
1375
+ export type AV = "AV";
1376
+ export type LHA = "LHA";
1377
+ export type CVB = "CVB";
1378
+ export type AR = "AR";
1379
+ export type AS = "AS";
1380
+ export type CT = "CT";
1381
+ export type AO = "AO";
1237
1382
  }
1238
1383
 
1239
- export interface NightContactChance {
1240
- rank1: number;
1241
- rank2: number;
1242
- rank3: number;
1243
- total: number;
1244
- }
1384
+ export type ShipType =
1385
+ | ShipType.Unknown
1386
+ | ShipType.DE
1387
+ | ShipType.DD
1388
+ | ShipType.CL
1389
+ | ShipType.CLT
1390
+ | ShipType.CA
1391
+ | ShipType.CAV
1392
+ | ShipType.CVL
1393
+ | ShipType.FBB
1394
+ | ShipType.BB
1395
+ | ShipType.BBV
1396
+ | ShipType.CV
1397
+ | ShipType.XBB
1398
+ | ShipType.SS
1399
+ | ShipType.SSV
1400
+ | ShipType.AP
1401
+ | ShipType.AV
1402
+ | ShipType.LHA
1403
+ | ShipType.CVB
1404
+ | ShipType.AR
1405
+ | ShipType.AS
1406
+ | ShipType.CT
1407
+ | ShipType.AO;
1245
1408
 
1246
- declare namespace SpecialEnemyType {
1247
- export type None = "None";
1248
- export type SoftSkinned = "SoftSkinned";
1249
- export type Pillbox = "Pillbox";
1250
- export type IsolatedIsland = "IsolatedIsland";
1251
- export type SupplyDepot = "SupplyDepot";
1252
- export type HarbourSummerPrincess = "HarbourSummerPrincess";
1253
- export type PtImp = "PtImp";
1254
- export type BattleshipSummerPrincess = "BattleshipSummerPrincess";
1255
- export type HeavyCruiserSummerPrincess = "HeavyCruiserSummerPrincess";
1409
+ declare namespace ShipCategory {
1410
+ export type Battleship = "Battleship";
1411
+ export type AircraftCarrier = "AircraftCarrier";
1412
+ export type HeavyCruiser = "HeavyCruiser";
1413
+ export type LightCruiser = "LightCruiser";
1414
+ export type Destroyer = "Destroyer";
1415
+ export type CoastalDefenseShip = "CoastalDefenseShip";
1416
+ export type Submarine = "Submarine";
1417
+ export type AuxiliaryShip = "AuxiliaryShip";
1256
1418
  }
1257
1419
 
1258
- export type SpecialEnemyType =
1259
- | SpecialEnemyType.None
1260
- | SpecialEnemyType.SoftSkinned
1261
- | SpecialEnemyType.Pillbox
1262
- | SpecialEnemyType.IsolatedIsland
1263
- | SpecialEnemyType.SupplyDepot
1264
- | SpecialEnemyType.HarbourSummerPrincess
1265
- | SpecialEnemyType.PtImp
1266
- | SpecialEnemyType.BattleshipSummerPrincess
1267
- | SpecialEnemyType.HeavyCruiserSummerPrincess;
1420
+ export type ShipCategory =
1421
+ | ShipCategory.Battleship
1422
+ | ShipCategory.AircraftCarrier
1423
+ | ShipCategory.HeavyCruiser
1424
+ | ShipCategory.LightCruiser
1425
+ | ShipCategory.Destroyer
1426
+ | ShipCategory.CoastalDefenseShip
1427
+ | ShipCategory.Submarine
1428
+ | ShipCategory.AuxiliaryShip;
1268
1429
 
1269
1430
  declare namespace MoraleState {
1270
1431
  export type Sparkle = "Sparkle";
@@ -1279,33 +1440,23 @@ export type MoraleState =
1279
1440
  | MoraleState.Orange
1280
1441
  | MoraleState.Red;
1281
1442
 
1282
- declare namespace DamageState {
1283
- export type Normal = "Normal";
1284
- export type Shouha = "Shouha";
1285
- export type Chuuha = "Chuuha";
1286
- export type Taiha = "Taiha";
1287
- export type Sunk = "Sunk";
1443
+ export interface FleetCutinAnalysis {
1444
+ shelling: FleetCutinReport<ShellingStyle>[];
1445
+ night: FleetCutinReport<NightAttackStyle>[];
1288
1446
  }
1289
1447
 
1290
- export type DamageState =
1291
- | DamageState.Normal
1292
- | DamageState.Shouha
1293
- | DamageState.Chuuha
1294
- | DamageState.Taiha
1295
- | DamageState.Sunk;
1296
-
1297
- declare namespace SpeedGroup {
1298
- export type A = "A";
1299
- export type B1 = "B1";
1300
- export type B2 = "B2";
1301
- export type C = "C";
1448
+ export interface FleetCutinReport<T> {
1449
+ cutin: FleetCutin;
1450
+ rate: number | null;
1451
+ formation: Formation;
1452
+ attacks: FleetCutinAttackReport<T>[];
1302
1453
  }
1303
1454
 
1304
- export type SpeedGroup =
1305
- | SpeedGroup.A
1306
- | SpeedGroup.B1
1307
- | SpeedGroup.B2
1308
- | SpeedGroup.C;
1455
+ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1456
+ index: number;
1457
+ ship_id: number;
1458
+ power_mod: number;
1459
+ }
1309
1460
 
1310
1461
  /**
1311
1462
  */
@@ -1341,71 +1492,76 @@ export class AirSquadron {
1341
1492
  radius(): number;
1342
1493
  /**
1343
1494
  */
1344
- id: string;
1495
+ hash: bigint;
1345
1496
  /**
1346
1497
  */
1347
- mode: AirSquadronMode;
1498
+ id: string;
1348
1499
  /**
1349
1500
  */
1350
- xxh3: bigint;
1501
+ mode: AirSquadronMode;
1351
1502
  }
1352
1503
  /**
1353
1504
  */
1354
1505
  export class Analyzer {
1355
1506
  free(): void;
1356
1507
  /**
1357
- * @param {Comp} comp
1358
- * @param {Formation} formation
1359
- * @param {number} ship_anti_air_resist
1360
- * @param {number} fleet_anti_air_resist
1361
- * @param {number | undefined} aaci
1362
- * @returns {CompAntiAirInfo}
1363
- */
1364
- analyze_anti_air(
1365
- comp: Comp,
1366
- formation: Formation,
1367
- ship_anti_air_resist: number,
1368
- fleet_anti_air_resist: number,
1369
- aaci?: number
1370
- ): CompAntiAirInfo;
1371
- /**
1372
- * @param {Comp} comp
1373
- * @returns {CompDayCutinRateInfo}
1374
- */
1375
- analyze_day_cutin(comp: Comp): CompDayCutinRateInfo;
1376
- /**
1377
- * @param {Comp} comp
1378
- * @param {NightConditions} attacker_conditions
1379
- * @param {NightConditions} target_conditions
1380
- * @returns {FleetNightCutinRateInfo}
1381
- */
1382
- analyze_night_cutin(
1383
- comp: Comp,
1384
- attacker_conditions: NightConditions,
1385
- target_conditions: NightConditions
1386
- ): FleetNightCutinRateInfo;
1387
- /**
1388
- * @param {Comp} comp
1389
- * @returns {CompContactChanceInfo}
1390
- */
1391
- analyze_contact_chance(comp: Comp): CompContactChanceInfo;
1392
- /**
1393
- * @param {WarfareContext} params
1508
+ * @param {AttackAnalyzerConfig} config
1394
1509
  * @param {Ship} attacker
1395
1510
  * @param {Ship} target
1396
- * @returns {WarfareInfo}
1511
+ * @returns {AttackAnalysis}
1397
1512
  */
1398
- analyze_warfare(
1399
- params: WarfareContext,
1513
+ analyze_attack(
1514
+ config: AttackAnalyzerConfig,
1400
1515
  attacker: Ship,
1401
1516
  target: Ship
1402
- ): WarfareInfo;
1517
+ ): AttackAnalysis;
1518
+ /**
1519
+ * @param {ShipAnalyzerConfig} config
1520
+ * @param {Ship} left
1521
+ * @param {Ship} right
1522
+ * @param {boolean} attacker_is_left
1523
+ * @returns {AttackAnalysis}
1524
+ */
1525
+ analyze_attack_by_ship_analyzer(
1526
+ config: ShipAnalyzerConfig,
1527
+ left: Ship,
1528
+ right: Ship,
1529
+ attacker_is_left: boolean
1530
+ ): AttackAnalysis;
1531
+ /**
1532
+ * @param {NodeAttackAnalyzerConfig} config
1533
+ * @param {Comp} left_comp
1534
+ * @param {Ship} left_ship
1535
+ * @param {Comp} right_comp
1536
+ * @param {Ship} right_ship
1537
+ * @returns {NodeAttackAnalysis}
1538
+ */
1539
+ analyze_node_attack(
1540
+ config: NodeAttackAnalyzerConfig,
1541
+ left_comp: Comp,
1542
+ left_ship: Ship,
1543
+ right_comp: Comp,
1544
+ right_ship: Ship
1545
+ ): NodeAttackAnalysis;
1403
1546
  /**
1404
1547
  * @param {Comp} comp
1405
- * @param {Engagement} engagement
1406
- * @returns {FleetCutinAnalysis}
1548
+ * @param {CompAnalyzerConfig} config
1549
+ * @returns {CompAnalysis}
1550
+ */
1551
+ analyze_comp(comp: Comp, config: CompAnalyzerConfig): CompAnalysis;
1552
+ /**
1553
+ * @param {Comp} player_comp
1554
+ * @param {Comp} enemy_comp
1555
+ * @param {NodeAttackAnalyzerConfig} config
1556
+ * @param {number} times
1557
+ * @returns {SimulatorResult}
1407
1558
  */
1408
- analyze_fleet_cutin(comp: Comp, engagement: Engagement): FleetCutinAnalysis;
1559
+ simulate_support_shelling(
1560
+ player_comp: Comp,
1561
+ enemy_comp: Comp,
1562
+ config: NodeAttackAnalyzerConfig,
1563
+ times: number
1564
+ ): SimulatorResult;
1409
1565
  }
1410
1566
  /**
1411
1567
  */
@@ -1491,12 +1647,9 @@ export class Comp {
1491
1647
  /**
1492
1648
  * @param {Ship} ship
1493
1649
  * @param {Formation | undefined} formation
1494
- * @returns {ShipEnvironment}
1650
+ * @returns {ShipConditions}
1495
1651
  */
1496
- create_warfare_ship_environment(
1497
- ship: Ship,
1498
- formation?: Formation
1499
- ): ShipEnvironment;
1652
+ get_ship_conditions(ship: Ship, formation?: Formation): ShipConditions;
1500
1653
  /**
1501
1654
  */
1502
1655
  boss_sup?: Fleet;
@@ -1505,13 +1658,13 @@ export class Comp {
1505
1658
  escort?: Fleet;
1506
1659
  /**
1507
1660
  */
1508
- hq_level: number;
1661
+ readonly hq_level: number;
1509
1662
  /**
1510
1663
  */
1511
1664
  main: Fleet;
1512
1665
  /**
1513
1666
  */
1514
- org_type: OrgType;
1667
+ readonly org_type: OrgType;
1515
1668
  /**
1516
1669
  */
1517
1670
  route_sup?: Fleet;
@@ -1572,19 +1725,6 @@ export class FhCore {
1572
1725
  * @returns {Analyzer}
1573
1726
  */
1574
1727
  create_analyzer(): Analyzer;
1575
- /**
1576
- * @param {Comp} player
1577
- * @param {Comp} enemy
1578
- * @param {ShellingSupportSimulatorParams} params
1579
- * @param {number} times
1580
- * @returns {SimulatorResult}
1581
- */
1582
- simulate_shelling_support(
1583
- player: Comp,
1584
- enemy: Comp,
1585
- params: ShellingSupportSimulatorParams,
1586
- times: number
1587
- ): SimulatorResult;
1588
1728
  }
1589
1729
  /**
1590
1730
  */
@@ -1682,13 +1822,13 @@ export class Fleet {
1682
1822
  readonly fleet_los_mod: number | undefined;
1683
1823
  /**
1684
1824
  */
1685
- id: string;
1825
+ readonly hash: bigint;
1686
1826
  /**
1687
1827
  */
1688
- len: number;
1828
+ id: string;
1689
1829
  /**
1690
1830
  */
1691
- xxh3: bigint;
1831
+ readonly len: number;
1692
1832
  }
1693
1833
  /**
1694
1834
  */
@@ -1726,7 +1866,7 @@ export class Gear {
1726
1866
  /**
1727
1867
  * @returns {number}
1728
1868
  */
1729
- proficiency_critical_power_mod(): number;
1869
+ exp_critical_bonus(): number;
1730
1870
  /**
1731
1871
  * @param {number} slot_size
1732
1872
  * @returns {number}
@@ -1804,52 +1944,55 @@ export class Gear {
1804
1944
  can_be_deployed_to_land_base(): boolean;
1805
1945
  /**
1806
1946
  */
1807
- accuracy: number;
1947
+ readonly accuracy: number;
1808
1948
  /**
1809
1949
  */
1810
1950
  readonly ace: number;
1811
1951
  /**
1812
1952
  */
1813
- anti_air: number;
1953
+ readonly anti_air: number;
1814
1954
  /**
1815
1955
  */
1816
1956
  readonly anti_bomber: number;
1817
1957
  /**
1818
1958
  */
1819
- armor: number;
1959
+ readonly armor: number;
1820
1960
  /**
1821
1961
  */
1822
- asw: number;
1962
+ readonly asw: number;
1823
1963
  /**
1824
1964
  */
1825
- bombing: number;
1965
+ readonly bombing: number;
1826
1966
  /**
1827
1967
  */
1828
- cost: number;
1968
+ readonly cost: number;
1829
1969
  /**
1830
1970
  */
1831
- default_exp: number;
1971
+ readonly default_exp: number;
1832
1972
  /**
1833
1973
  */
1834
- evasion: number;
1974
+ readonly evasion: number;
1835
1975
  /**
1836
1976
  */
1837
- exp: number;
1977
+ readonly exp: number;
1838
1978
  /**
1839
1979
  */
1840
- firepower: number;
1980
+ readonly firepower: number;
1841
1981
  /**
1842
1982
  */
1843
- fleet_anti_air_resistance: number;
1983
+ readonly fleet_anti_air_resist: number;
1844
1984
  /**
1845
1985
  */
1846
- gear_id: number;
1986
+ readonly gear_id: number;
1847
1987
  /**
1848
1988
  */
1849
- gear_type: GearType;
1989
+ readonly gear_type: GearType;
1850
1990
  /**
1851
1991
  */
1852
1992
  readonly gear_type_id: number;
1993
+ /**
1994
+ */
1995
+ readonly hash: bigint;
1853
1996
  /**
1854
1997
  */
1855
1998
  readonly icon_id: number;
@@ -1858,49 +2001,46 @@ export class Gear {
1858
2001
  id: string;
1859
2002
  /**
1860
2003
  */
1861
- improvable: boolean;
2004
+ readonly improvable: boolean;
1862
2005
  /**
1863
2006
  */
1864
2007
  readonly interception: number;
1865
2008
  /**
1866
2009
  */
1867
- los: number;
2010
+ readonly los: number;
1868
2011
  /**
1869
2012
  */
1870
- luck: number;
2013
+ readonly luck: number;
1871
2014
  /**
1872
2015
  */
1873
- max_hp: number;
2016
+ readonly max_hp: number;
1874
2017
  /**
1875
2018
  */
1876
2019
  name: string;
1877
2020
  /**
1878
2021
  */
1879
- radius: number;
2022
+ readonly radius: number;
1880
2023
  /**
1881
2024
  */
1882
- range: number;
2025
+ readonly range: number;
1883
2026
  /**
1884
2027
  */
1885
- ship_anti_air_resistance: number;
2028
+ readonly ship_anti_air_resist: number;
1886
2029
  /**
1887
2030
  */
1888
2031
  readonly special_type_id: number;
1889
2032
  /**
1890
2033
  */
1891
- speed: number;
2034
+ readonly speed: number;
1892
2035
  /**
1893
2036
  */
1894
- stars: number;
2037
+ readonly stars: number;
1895
2038
  /**
1896
2039
  */
1897
- torpedo: number;
2040
+ readonly torpedo: number;
1898
2041
  /**
1899
2042
  */
1900
2043
  types: Uint8Array;
1901
- /**
1902
- */
1903
- xxh3: bigint;
1904
2044
  }
1905
2045
  /**
1906
2046
  */
@@ -2069,22 +2209,22 @@ export class Org {
2069
2209
  boss_sup?: string;
2070
2210
  /**
2071
2211
  */
2072
- hq_level: number;
2212
+ readonly hash: bigint;
2213
+ /**
2214
+ */
2215
+ readonly hq_level: number;
2073
2216
  /**
2074
2217
  */
2075
2218
  id: string;
2076
2219
  /**
2077
2220
  */
2078
- org_type: OrgType;
2221
+ readonly org_type: OrgType;
2079
2222
  /**
2080
2223
  */
2081
2224
  route_sup?: string;
2082
2225
  /**
2083
2226
  */
2084
2227
  sortie: string;
2085
- /**
2086
- */
2087
- xxh3: bigint;
2088
2228
  }
2089
2229
  /**
2090
2230
  */
@@ -2239,6 +2379,13 @@ export class Ship {
2239
2379
  */
2240
2380
  fleet_los_factor(): number | undefined;
2241
2381
  /**
2382
+ * 加重対空
2383
+ * @param {Side} side
2384
+ * @returns {number | undefined}
2385
+ */
2386
+ ship_adjusted_anti_air(side: Side): number | undefined;
2387
+ /**
2388
+ * 艦隊対空補正
2242
2389
  * @returns {number}
2243
2390
  */
2244
2391
  fleet_anti_air_mod(): number;
@@ -2284,10 +2431,6 @@ export class Ship {
2284
2431
  * @returns {number | undefined}
2285
2432
  */
2286
2433
  ohko_power(): number | undefined;
2287
- /**
2288
- * @param {number} value
2289
- */
2290
- take_damage(value: number): void;
2291
2434
  /**
2292
2435
  * @returns {number | undefined}
2293
2436
  */
@@ -2307,7 +2450,7 @@ export class Ship {
2307
2450
  readonly accuracy: number;
2308
2451
  /**
2309
2452
  */
2310
- ammo: number;
2453
+ readonly ammo: number;
2311
2454
  /**
2312
2455
  */
2313
2456
  readonly anti_air: number | undefined;
@@ -2319,10 +2462,10 @@ export class Ship {
2319
2462
  readonly asw: number | undefined;
2320
2463
  /**
2321
2464
  */
2322
- ctype: number;
2465
+ readonly ctype: number;
2323
2466
  /**
2324
2467
  */
2325
- current_hp: number;
2468
+ readonly current_hp: number;
2326
2469
  /**
2327
2470
  */
2328
2471
  readonly evasion: number | undefined;
@@ -2331,7 +2474,10 @@ export class Ship {
2331
2474
  readonly firepower: number | undefined;
2332
2475
  /**
2333
2476
  */
2334
- fuel: number;
2477
+ readonly fuel: number;
2478
+ /**
2479
+ */
2480
+ readonly hash: bigint;
2335
2481
  /**
2336
2482
  */
2337
2483
  id: string;
@@ -2340,7 +2486,7 @@ export class Ship {
2340
2486
  readonly innate_torpedo_accuracy: number;
2341
2487
  /**
2342
2488
  */
2343
- level: number;
2489
+ readonly level: number;
2344
2490
  /**
2345
2491
  */
2346
2492
  readonly los: number | undefined;
@@ -2358,7 +2504,7 @@ export class Ship {
2358
2504
  readonly max_hp: number | undefined;
2359
2505
  /**
2360
2506
  */
2361
- morale: number;
2507
+ readonly morale: number;
2362
2508
  /**
2363
2509
  */
2364
2510
  readonly naked_anti_air: number | undefined;
@@ -2397,10 +2543,10 @@ export class Ship {
2397
2543
  readonly range: number | undefined;
2398
2544
  /**
2399
2545
  */
2400
- ship_id: number;
2546
+ readonly ship_id: number;
2401
2547
  /**
2402
2548
  */
2403
- ship_type: ShipType;
2549
+ readonly ship_type: ShipType;
2404
2550
  /**
2405
2551
  */
2406
2552
  readonly slotnum: number;
@@ -2422,9 +2568,6 @@ export class Ship {
2422
2568
  /**
2423
2569
  */
2424
2570
  readonly useful: boolean;
2425
- /**
2426
- */
2427
- xxh3: bigint;
2428
2571
  /**
2429
2572
  */
2430
2573
  readonly yomi: string;