fleethub-core 1.12.15 → 1.12.16

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,7 +1,7 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function parse_ship_conditions(value: ShipConditions): ShipConditions;
4
3
  export function set_panic_hook(): void;
4
+ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
5
5
  export type ShipAttr =
6
6
  | "Unknown"
7
7
  | "NightCarrier"
@@ -26,414 +26,151 @@ export type ShipAttr =
26
26
 
27
27
  export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
28
28
 
29
- export type AswAttackType = "DepthCharge" | "Aerial";
30
-
31
- export type NightPhaseAttackType =
32
- | { t: "Night"; c: NightAttackType }
33
- | { t: "Asw"; c: AswAttackType };
34
-
35
- export type ShellingType = "Normal" | "Aerial";
36
-
37
- export type DayPhaseAttackType =
38
- | { t: "Shelling"; c: ShellingType }
39
- | { t: "Asw"; c: AswAttackType };
40
-
41
- export type SupportShellingType = ShellingType;
42
-
43
- export type NightAttackType = "Normal" | "Swordfish" | "Aerial";
44
-
45
- export type TorpedoAttackType = null;
46
-
47
- export type AttackType =
48
- | { t: "Asw"; c: AswAttackType }
49
- | { t: "Shelling"; c: ShellingType }
50
- | { t: "Night"; c: NightAttackType }
51
- | { t: "Torpedo" }
52
- | { t: "SupportShelling"; c: SupportShellingType };
53
-
54
- export type SlotSizeVec = (number | null)[];
55
-
56
- export type GearTypeIdArray = [number, number, number, number, number];
57
-
58
- export interface DamageReport {
59
- miss_damage_min: number;
60
- miss_damage_max: number;
61
- normal_damage_min: number;
62
- normal_damage_max: number;
63
- critical_damage_min: number;
64
- critical_damage_max: number;
65
- normal_scratch_rate: number;
66
- critical_scratch_rate: number;
67
- damage_density: Histogram<number, number>;
68
- damage_state_density: Histogram<DamageState, number>;
69
- }
70
-
71
- export interface DayContactChance {
72
- air_state: AirState;
73
- trigger_rate: number;
74
- rank3: number;
75
- rank2: number;
76
- rank1: number;
77
- total: number;
29
+ export interface NationalityDef {
30
+ id: number;
31
+ ctypes: number[];
78
32
  }
79
33
 
80
- export interface ContactAnalysis {
81
- single: DayContactChance[] | null;
82
- combined: DayContactChance[] | null;
34
+ export interface MasterData extends MasterBattleDefinitions {
35
+ created_at: number;
36
+ gears: MasterGear[];
37
+ gear_attrs: MasterAttrRule<GearAttr>[];
38
+ ships: MasterShip[];
39
+ ship_attrs: MasterAttrRule<ShipAttr>[];
40
+ ibonuses: MasterIBonuses;
41
+ equippability: MasterEquippability;
83
42
  }
84
43
 
85
- export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
86
- observation_term: number | null;
44
+ export interface MasterAttrRule<T> {
45
+ tag: T;
46
+ name: string;
47
+ expr: CompiledEvaler;
87
48
  }
88
49
 
89
- export interface CompDayCutinAnalysis {
90
- rank3_air_state: AirState;
91
- rank2_air_state: AirState;
92
- main_fleet_los_mod: number | null;
93
- escort_fleet_los_mod: number | null;
94
- ships: ShipDayCutinAnalysis[];
95
- }
50
+ export type CompiledEvaler = string;
96
51
 
97
- export interface ShipDayCutinAnalysis {
98
- ship_id: number;
99
- role: Role;
100
- index: number;
101
- rank3: DayCutinReport;
102
- rank2: DayCutinReport;
52
+ export interface NightFleetConditions {
53
+ night_contact_rank?: ContactRank | null;
54
+ starshell_index?: number | null;
55
+ searchlight_index?: number | null;
56
+ activates_large_searchlight?: boolean;
103
57
  }
104
58
 
105
- export interface ShipNightCutinAnalysis {
106
- ship_id: number;
107
- index: number;
108
- normal: NightCutinActionReport;
109
- chuuha: NightCutinActionReport;
59
+ export interface NightConditions {
60
+ player?: NightFleetConditions;
61
+ enemy?: NightFleetConditions;
110
62
  }
111
63
 
112
- export interface NightContactChance {
113
- rank1: number;
114
- rank2: number;
115
- rank3: number;
64
+ export interface BattleConditions {
65
+ org_type: OrgType;
66
+ role: Role;
67
+ ship_index: number;
68
+ fleet_len: number;
69
+ formation: Formation;
70
+ fleet_los_mod: number | null;
71
+ night_conditions: NightFleetConditions;
116
72
  }
117
73
 
118
- export interface CompNightCutinAnalysis {
119
- night_contact_chance: NightContactChance;
120
- ships: ShipNightCutinAnalysis[];
74
+ export interface ShipPosition {
75
+ org_type?: OrgType;
76
+ fleet_type?: FleetType;
77
+ fleet_len?: number;
78
+ index?: number;
121
79
  }
122
80
 
123
- export interface NightCutinActionReport
124
- extends ActionReport<NightPhaseAttackStyle> {
125
- cutin_term: number | null;
126
- }
81
+ export type GearAttr =
82
+ | "Unknown"
83
+ | "HighAngleMount"
84
+ | "NightFighter"
85
+ | "NightAttacker"
86
+ | "HeavyBomber"
87
+ | "NightRecon"
88
+ | "NightBomber"
89
+ | "MainGun"
90
+ | "Radar"
91
+ | "SurfaceRadar"
92
+ | "AirRadar"
93
+ | "DepthChargeProjector"
94
+ | "SynergisticDepthCharge"
95
+ | "AntiSubMortar"
96
+ | "AntiSubWeapon"
97
+ | "ApDepthCharge"
98
+ | "AntiSubAircraft"
99
+ | "LateModelBowTorpedo"
100
+ | "Seaplane"
101
+ | "CbAircraft"
102
+ | "LbAircraft"
103
+ | "JetAircraft"
104
+ | "Fighter"
105
+ | "Recon"
106
+ | "ObservationSeaplane"
107
+ | "CbFighterBomber"
108
+ | "AntiInstDiveBomber"
109
+ | "CbSwordfish"
110
+ | "SemiNightPlane"
111
+ | "HighAltitudeInterceptor";
127
112
 
128
- export interface MasterShip {
129
- ship_id: number;
130
- name: string;
131
- yomi: string;
132
- stype: number;
133
- ctype: number;
134
- nationality?: number;
135
- sort_id?: number;
136
- max_hp: StatInterval;
137
- firepower: StatInterval;
138
- armor: StatInterval;
139
- torpedo: StatInterval;
140
- evasion: StatInterval;
141
- anti_air: StatInterval;
142
- asw: StatInterval;
143
- los: StatInterval;
144
- luck: StatInterval;
145
- torpedo_accuracy?: number;
146
- basic_evasion_term?: number;
147
- speed: number;
148
- range?: number;
149
- fuel?: number;
150
- ammo?: number;
151
- next_id?: number;
152
- next_level?: number;
153
- slotnum: number;
154
- slots: SlotSizeVec;
155
- stock: GearState[];
156
- speed_group?: SpeedGroup;
157
- useful?: boolean;
113
+ export interface MasterBattleDefinitions {
114
+ formation: NestedFormationDef[];
115
+ anti_air_cutin: AntiAirCutinDef[];
116
+ day_cutin: DayCutinDef[];
117
+ night_cutin: NightCutinDef[];
118
+ historical_bonuses?: HistoricalBonusDef[];
158
119
  }
159
120
 
160
- export type StatInterval = [number | null, number | null];
161
-
162
- export interface GearState {
163
- id?: string;
164
- gear_id: number;
165
- exp?: number;
166
- stars?: number;
167
- }
121
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
168
122
 
169
- export interface GearVecState {
170
- g1?: GearState;
171
- g2?: GearState;
172
- g3?: GearState;
173
- g4?: GearState;
174
- g5?: GearState;
175
- gx?: GearState;
123
+ export interface ActionReport<T> {
124
+ data: Record<string, AttackReport<T>>;
125
+ damage_state_density: Histogram<DamageState, number> | null;
126
+ is_active: boolean;
176
127
  }
177
128
 
178
- export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
179
-
180
- export interface ShellingStyle {
181
- tag: "ShellingStyle";
182
- attack_type: ShellingType;
183
- cutin: DayCutinLike | null;
184
- power_mod: number;
185
- accuracy_mod: number;
129
+ export interface AttackReport<T> {
130
+ style: T;
131
+ proc_rate: number | null;
132
+ attack_power: AttackPower | null;
133
+ attack_power_params: AttackPowerParams | null;
186
134
  hits: number;
135
+ hit_rate: HitRate | null;
136
+ hit_rate_params: HitRateParams | null;
137
+ damage: DamageReport | null;
187
138
  }
188
139
 
189
- export interface NightAttackStyle {
190
- tag: "NightAttackStyle";
191
- attack_type: NightAttackType;
192
- cutin: NightCutinLike | null;
193
- power_mod: number;
194
- accuracy_mod: number;
195
- hits: number;
196
- }
140
+ export type DayCutinLike = DayCutin | FleetCutin;
197
141
 
198
- export interface AswAttackStyle {
199
- tag: "AswAttackStyle";
200
- attack_type: AswAttackType;
201
- }
142
+ export type NightCutin =
143
+ | "MainTorpRadar"
144
+ | "TorpLookoutRadar"
145
+ | "TorpTsloTorp"
146
+ | "TorpTsloDrum"
147
+ | "NightZuiun2Radar"
148
+ | "NightZuiun2"
149
+ | "NightZuiunRadar"
150
+ | "NightZuiun"
151
+ | "DoubleAttack"
152
+ | "TorpTorpMain"
153
+ | "TorpTorpTorp"
154
+ | "MainMainSec"
155
+ | "MainMainMain"
156
+ | "SubTorpTorp"
157
+ | "SubRadarTorp"
158
+ | "Cvci1_25"
159
+ | "Cvci1_20"
160
+ | "Photobomber"
161
+ | "Cvci1_18";
202
162
 
203
- export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
204
-
205
- export interface SupportShellingStyle {
206
- tag: "SupportShellingStyle";
207
- attack_type: SupportShellingType;
208
- }
209
-
210
- export interface TorpedoAttackStyle {
211
- tag: "TorpedoAttackStyle";
212
- attack_type: TorpedoAttackType;
213
- }
214
-
215
- export interface ShipConditions extends ShipPosition {
216
- formation?: Formation;
217
- amagiri_index?: number | null;
218
- }
219
-
220
- export interface NodeAttackAnalyzerConfig {
221
- air_state?: AirState;
222
- engagement?: Engagement;
223
- node_state?: NodeState;
224
- left?: NodeAttackAnalyzerShipConfig;
225
- right?: NodeAttackAnalyzerShipConfig;
226
- }
227
-
228
- export interface NodeAttackAnalysis {
229
- left: AttackAnalysis;
230
- right: AttackAnalysis;
231
- shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
232
- night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
233
- }
234
-
235
- export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
236
- formation?: Formation;
237
- }
238
-
239
- export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
240
-
241
- export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
242
-
243
- export type NestedFormationDef =
244
- | FormationDef
245
- | { top_half: FormationDef; bottom_half: FormationDef };
246
-
247
- export interface DayCutinDef {
248
- tag: DayCutin;
249
- hits: number;
250
- type_factor: number | null;
251
- power_mod: number | null;
252
- accuracy_mod: number | null;
253
- }
254
-
255
- export interface BattleDefinitions {
256
- formation: Record<Formation, NestedFormationDef>;
257
- anti_air_cutin: Record<number, AntiAirCutinDef>;
258
- day_cutin: Record<DayCutin, DayCutinDef>;
259
- night_cutin: Record<NightCutin, NightCutinDef>;
260
- historical_bonuses: HistoricalBonusDef[];
261
- }
262
-
263
- export interface HistoricalParams {
264
- power_mod: AttackPowerModifier;
265
- armor_penetration: number;
266
- accuracy_mod: number;
267
- target_evasion_mod: number;
268
- }
269
-
270
- export interface FormationCombatModifiersDef {
271
- power_mod?: number;
272
- accuracy_mod?: number;
273
- evasion_mod?: number;
274
- }
275
-
276
- export interface AntiAirCutinDef {
277
- id: number;
278
- type_factor: number | null;
279
- multiplier: number | null;
280
- guaranteed: number | null;
281
- sequential: boolean | null;
282
- }
283
-
284
- export interface FormationDef {
285
- tag: Formation;
286
- protection_rate: number | null;
287
- fleet_anti_air_mod: number;
288
- shelling: FormationCombatModifiersDef;
289
- torpedo: FormationCombatModifiersDef;
290
- asw: FormationCombatModifiersDef;
291
- night: FormationCombatModifiersDef;
292
- support_shelling: FormationCombatModifiersDef;
293
- }
294
-
295
- export interface NightCutinDef {
296
- tag: NightCutin;
297
- hits: number;
298
- type_factor: number | null;
299
- power_mod: number | null;
300
- accuracy_mod: number | null;
301
- }
302
-
303
- export interface HistoricalBonusDef {
304
- map?: number;
305
- node?: CompiledEvaler;
306
- phase?: number;
307
- debuff?: boolean;
308
- ship?: CompiledEvaler;
309
- enemy?: CompiledEvaler;
310
- power_mod?: AttackPowerModifier;
311
- armor_penetration?: number;
312
- accuracy_mod?: number;
313
- evasion_mod?: number;
314
- }
315
-
316
- export interface SpecialEnemyModifiers {
317
- precap_general_mod: AttackPowerModifier;
318
- stype_mod: AttackPowerModifier;
319
- landing_craft_synergy_mod: AttackPowerModifier;
320
- toku_daihatsu_tank_mod: AttackPowerModifier;
321
- m4a1dd_mod: AttackPowerModifier;
322
- honi_mod: AttackPowerModifier;
323
- toku_daihatsu_chiha_mod: AttackPowerModifier;
324
- toku_daihatsu_chiha_kai_mod: AttackPowerModifier;
325
- army_infantry_mod: AttackPowerModifier;
326
- army_infantry_chiha_kai_mod: AttackPowerModifier;
327
- t97_tank_chiha_mod: AttackPowerModifier;
328
- t97_tank_chiha_kai_mod: AttackPowerModifier;
329
- landing_forces_mod: AttackPowerModifier;
330
- landing_forces_group_mod: AttackPowerModifier;
331
- landing_forces_t4_mod: AttackPowerModifier;
332
- landing_forces_t4kai_mod: AttackPowerModifier;
333
- t4_tank_group_mod: AttackPowerModifier;
334
- t4_tank_kai_mod: AttackPowerModifier;
335
- postcap_general_mod: AttackPowerModifier;
336
- pt_mod: AttackPowerModifier | null;
337
- }
338
-
339
- export interface CustomPowerModifiers {
340
- precap_mod?: AttackPowerModifier;
341
- postcap_mod?: AttackPowerModifier;
342
- basic_power_mod?: AttackPowerModifier;
343
- historical_mod?: AttackPowerModifier;
344
- }
345
-
346
- export interface AttackPowerModifier {
347
- a?: number;
348
- b?: number;
349
- }
350
-
351
- export type OrgType =
352
- | "Single"
353
- | "CarrierTaskForce"
354
- | "SurfaceTaskForce"
355
- | "TransportEscort"
356
- | "EnemySingle"
357
- | "EnemyCombined";
358
-
359
- export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
360
-
361
- export type AirState =
362
- | "AirSupremacy"
363
- | "AirSuperiority"
364
- | "AirParity"
365
- | "AirDenial"
366
- | "AirIncapability";
367
-
368
- export type Formation = SingleFormation | CombinedFormation;
369
-
370
- export type CombinedFormation =
371
- | "Cruising1"
372
- | "Cruising2"
373
- | "Cruising3"
374
- | "Cruising4";
375
-
376
- export type SingleFormation =
377
- | "LineAhead"
378
- | "DoubleLine"
379
- | "Diamond"
380
- | "Echelon"
381
- | "LineAbreast"
382
- | "Vanguard";
383
-
384
- export interface CompAntiAirAnalysis {
385
- fleet_adjusted_anti_air: number;
386
- ships: AntiAirReport[];
387
- anti_air_cutin_chance: [number, number][];
388
- }
389
-
390
- export interface AntiAirReport {
391
- ship_id: number;
392
- role: Role;
393
- index: number;
394
- adjusted_anti_air: number | null;
395
- proportional_shotdown_rate: number | null;
396
- fixed_shotdown_number: number | null;
397
- guaranteed: number | null;
398
- anti_air_cutin_chance: [number, number][];
399
- anti_air_propellant_barrage_chance: number | null;
400
- }
401
-
402
- export interface FleetCutinAttackReport<T> extends AttackReport<T> {
403
- index: number;
404
- ship_id: number;
405
- power_mod: number;
406
- }
407
-
408
- export interface FleetCutinReport<T> {
409
- cutin: FleetCutin;
410
- rate: number | null;
411
- formation: Formation;
412
- attacks: FleetCutinAttackReport<T>[];
413
- }
414
-
415
- export type DayCutinLike = DayCutin | FleetCutin;
416
-
417
- export type NightCutin =
418
- | "MainTorpRadar"
419
- | "TorpLookoutRadar"
420
- | "TorpTsloTorp"
421
- | "TorpTsloDrum"
422
- | "NightZuiun2Radar"
423
- | "NightZuiun2"
424
- | "NightZuiunRadar"
425
- | "NightZuiun"
163
+ export type DayCutin =
164
+ | "Zuiun"
165
+ | "AirSea"
166
+ | "MainMain"
167
+ | "MainAp"
168
+ | "MainRadar"
169
+ | "MainSec"
426
170
  | "DoubleAttack"
427
- | "TorpTorpMain"
428
- | "TorpTorpTorp"
429
- | "MainMainSec"
430
- | "MainMainMain"
431
- | "SubTorpTorp"
432
- | "SubRadarTorp"
433
- | "Cvci1_25"
434
- | "Cvci1_20"
435
- | "Cvci1_18"
436
- | "Photobomber";
171
+ | "FBA"
172
+ | "BBA"
173
+ | "BA";
437
174
 
438
175
  export type FleetCutin =
439
176
  | "NelsonTouch"
@@ -447,18 +184,6 @@ export type FleetCutin =
447
184
 
448
185
  export type NightCutinLike = NightCutin | FleetCutin;
449
186
 
450
- export type DayCutin =
451
- | "Zuiun"
452
- | "AirSea"
453
- | "MainMain"
454
- | "MainAp"
455
- | "MainRadar"
456
- | "MainSec"
457
- | "DoubleAttack"
458
- | "FBA"
459
- | "BBA"
460
- | "BA";
461
-
462
187
  export type GearType =
463
188
  | "Unknown"
464
189
  | "SmallMainGun"
@@ -537,16 +262,6 @@ export type GearCategory =
537
262
  | "LandBased"
538
263
  | "Misc";
539
264
 
540
- export type ShipCategory =
541
- | "Battleship"
542
- | "AircraftCarrier"
543
- | "HeavyCruiser"
544
- | "LightCruiser"
545
- | "Destroyer"
546
- | "CoastalDefenseShip"
547
- | "Submarine"
548
- | "AuxiliaryShip";
549
-
550
265
  export type ShipType =
551
266
  | "Unknown"
552
267
  | "DE"
@@ -572,15 +287,15 @@ export type ShipType =
572
287
  | "CT"
573
288
  | "AO";
574
289
 
575
- export interface AttackPower {
576
- precap: number;
577
- is_capped: boolean;
578
- capped: number;
579
- normal: number;
580
- critical: number;
581
- armor_penetration: number;
582
- remaining_ammo_mod: number;
583
- }
290
+ export type ShipCategory =
291
+ | "Battleship"
292
+ | "AircraftCarrier"
293
+ | "HeavyCruiser"
294
+ | "LightCruiser"
295
+ | "Destroyer"
296
+ | "CoastalDefenseShip"
297
+ | "Submarine"
298
+ | "AuxiliaryShip";
584
299
 
585
300
  export interface AttackPowerParams {
586
301
  is_cutin: boolean;
@@ -599,6 +314,22 @@ export interface AttackPowerParams {
599
314
  custom_mods: CustomPowerModifiers;
600
315
  }
601
316
 
317
+ export interface AttackPower {
318
+ precap: number;
319
+ is_capped: boolean;
320
+ capped: number;
321
+ normal: number;
322
+ critical: number;
323
+ armor_penetration: number;
324
+ remaining_ammo_mod: number;
325
+ }
326
+
327
+ export interface HitRate {
328
+ normal: number;
329
+ critical: number;
330
+ total: number;
331
+ }
332
+
602
333
  export interface HitRateParams {
603
334
  accuracy_term: number;
604
335
  evasion_term: number;
@@ -608,12 +339,6 @@ export interface HitRateParams {
608
339
  hit_percentage_bonus: number;
609
340
  }
610
341
 
611
- export interface HitRate {
612
- normal: number;
613
- critical: number;
614
- total: number;
615
- }
616
-
617
342
  export interface AttackAnalysis {
618
343
  attacker_is_player: boolean;
619
344
  attacker_ship_id: number;
@@ -626,40 +351,6 @@ export interface AttackAnalysis {
626
351
  support_shelling: ActionReport<SupportShellingStyle>;
627
352
  }
628
353
 
629
- export interface MasterGear {
630
- gear_id: number;
631
- name: string;
632
- types: GearTypeIdArray;
633
- special_type?: number;
634
- max_hp?: number;
635
- firepower?: number;
636
- armor?: number;
637
- torpedo?: number;
638
- anti_air?: number;
639
- speed?: number;
640
- bombing?: number;
641
- asw?: number;
642
- los?: number;
643
- luck?: number;
644
- accuracy?: number;
645
- evasion?: number;
646
- range?: number;
647
- radius?: number;
648
- cost?: number;
649
- improvable?: boolean;
650
- ship_anti_air_resist?: number;
651
- fleet_anti_air_resist?: number;
652
- historical_aircraft_group?: number;
653
- }
654
-
655
- export interface MasterBattleDefinitions {
656
- formation: NestedFormationDef[];
657
- anti_air_cutin: AntiAirCutinDef[];
658
- day_cutin: DayCutinDef[];
659
- night_cutin: NightCutinDef[];
660
- historical_bonuses?: HistoricalBonusDef[];
661
- }
662
-
663
354
  export interface FleetState {
664
355
  id?: string;
665
356
  len?: number;
@@ -672,23 +363,15 @@ export interface FleetState {
672
363
  s7?: ShipState;
673
364
  }
674
365
 
675
- export type ContactRank = "Rank1" | "Rank2" | "Rank3";
366
+ export type SpeedGroup = "A" | "B1" | "B2" | "C";
676
367
 
677
- export interface ActionReport<T> {
678
- data: Record<string, AttackReport<T>>;
679
- damage_state_density: Histogram<DamageState, number> | null;
680
- is_active: boolean;
681
- }
368
+ export type FhResult<T> = { Ok: T } | { Err: string };
682
369
 
683
- export interface AttackReport<T> {
684
- style: T;
685
- proc_rate: number | null;
686
- attack_power: AttackPower | null;
687
- attack_power_params: AttackPowerParams | null;
688
- hits: number;
689
- hit_rate: HitRate | null;
690
- hit_rate_params: HitRateParams | null;
691
- damage: DamageReport | null;
370
+ export interface ShipAnalyzerConfig {
371
+ air_state?: AirState;
372
+ engagement?: Engagement;
373
+ left?: AttackAnalyzerShipConfig;
374
+ right?: AttackAnalyzerShipConfig;
692
375
  }
693
376
 
694
377
  export interface MoveShipPayload {
@@ -700,14 +383,6 @@ export type AirWaveType = "Jet" | "LandBase" | "Carrier";
700
383
 
701
384
  export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
702
385
 
703
- export interface SlotSizeVecState {
704
- ss1?: number;
705
- ss2?: number;
706
- ss3?: number;
707
- ss4?: number;
708
- ss5?: number;
709
- }
710
-
711
386
  export interface ShipState extends GearVecState, SlotSizeVecState {
712
387
  id?: string;
713
388
  ship_id: number;
@@ -732,15 +407,23 @@ export interface ShipState extends GearVecState, SlotSizeVecState {
732
407
 
733
408
  export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
734
409
 
735
- export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
410
+ export interface SlotSizeVecState {
411
+ ss1?: number;
412
+ ss2?: number;
413
+ ss3?: number;
414
+ ss4?: number;
415
+ ss5?: number;
416
+ }
736
417
 
737
- export type AirSquadronMode = "Sortie" | "AirDefense";
418
+ export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
738
419
 
739
420
  export interface AirSquadronState extends GearVecState, SlotSizeVecState {
740
421
  id?: string;
741
422
  mode?: AirSquadronMode;
742
423
  }
743
424
 
425
+ export type AirSquadronMode = "Sortie" | "AirDefense";
426
+
744
427
  export type SpecialEnemyType =
745
428
  | "None"
746
429
  | "SoftSkinned"
@@ -758,12 +441,6 @@ export type SpecialEnemyType =
758
441
  | "SummerAircraftCarrierDemon"
759
442
  | "EuropeanWaterPrincess";
760
443
 
761
- export interface FleetMeta {
762
- id: string;
763
- len: number;
764
- ships: [string, ShipMeta | null][];
765
- }
766
-
767
444
  export interface ShipMeta {
768
445
  id: string;
769
446
  ship_id: number;
@@ -773,19 +450,18 @@ export interface CompMeta {
773
450
  fleets: Record<FleetType, FleetMeta>;
774
451
  }
775
452
 
453
+ export interface FleetMeta {
454
+ id: string;
455
+ len: number;
456
+ ships: [string, ShipMeta | null][];
457
+ }
458
+
776
459
  export type Role = "Main" | "Escort";
777
460
 
778
461
  export type Side = "Player" | "Enemy";
779
462
 
780
463
  export type Align = "Left" | "Right";
781
464
 
782
- export interface ShipInput {
783
- ship_id: number;
784
- ctype: number;
785
- stype: number;
786
- yomi: string;
787
- }
788
-
789
465
  export interface GearInput {
790
466
  gear_id: number;
791
467
  types: GearTypeIdArray;
@@ -804,6 +480,15 @@ export interface GearInput {
804
480
  ace: number;
805
481
  }
806
482
 
483
+ export interface ShipInput {
484
+ ship_id: number;
485
+ ctype: number;
486
+ stype: number;
487
+ yomi: string;
488
+ }
489
+
490
+ export type GearVecInput = GearInput[];
491
+
807
492
  export interface EBonuses {
808
493
  firepower: number;
809
494
  torpedo: number;
@@ -817,8 +502,6 @@ export interface EBonuses {
817
502
  range: number;
818
503
  }
819
504
 
820
- export type GearVecInput = GearInput[];
821
-
822
505
  export interface OrgState {
823
506
  id?: string;
824
507
  f1?: FleetState;
@@ -842,6 +525,21 @@ export interface CompNightAnalysis {
842
525
  fleet_cutin: FleetCutinReport<NightAttackStyle>[];
843
526
  }
844
527
 
528
+ export interface CompAnalyzerConfig {
529
+ engagement: Engagement;
530
+ formation: Formation;
531
+ anti_air_cutin: number | null;
532
+ ship_anti_air_resist: number;
533
+ fleet_anti_air_resist: number;
534
+ left_night_fleet_conditions: NightFleetConditions;
535
+ right_night_fleet_conditions: NightFleetConditions;
536
+ }
537
+
538
+ export interface CompDayAnalysis {
539
+ day_cutin: CompDayCutinAnalysis;
540
+ fleet_cutin: FleetCutinReport<ShellingStyle>[];
541
+ }
542
+
845
543
  export interface CompAnalysis {
846
544
  day: CompDayAnalysis;
847
545
  night: CompNightAnalysis;
@@ -849,130 +547,446 @@ export interface CompAnalysis {
849
547
  anti_air: CompAntiAirAnalysis;
850
548
  }
851
549
 
852
- export interface CompDayAnalysis {
853
- day_cutin: CompDayCutinAnalysis;
854
- fleet_cutin: FleetCutinReport<ShellingStyle>[];
550
+ export interface AttackAnalyzerShipConfig
551
+ extends ShipConditions,
552
+ NightFleetConditions {
553
+ balloons?: number;
554
+ fleet_los_mod?: number | null;
855
555
  }
856
556
 
857
- export interface CompAnalyzerConfig {
858
- engagement: Engagement;
859
- formation: Formation;
860
- anti_air_cutin: number | null;
861
- ship_anti_air_resist: number;
862
- fleet_anti_air_resist: number;
863
- left_night_fleet_conditions: NightFleetConditions;
864
- right_night_fleet_conditions: NightFleetConditions;
557
+ export interface SimulatorResult {
558
+ items: SimulatorResultItem[];
559
+ sunk_vec: [number, number, number][];
560
+ }
561
+
562
+ export interface SimulatorResultItem {
563
+ id: string;
564
+ fleet_type: FleetType;
565
+ index: number;
566
+ damage_state_map: Record<DamageState, number>;
567
+ }
568
+
569
+ export type NodeId = string;
570
+
571
+ export interface NodeState {
572
+ map?: number;
573
+ node?: NodeId;
574
+ phase?: number;
575
+ debuff?: boolean;
576
+ disable_historical_mod?: boolean;
577
+ landing_battle?: boolean;
578
+ }
579
+
580
+ export type AttackType =
581
+ | { t: "Asw"; c: AswAttackType }
582
+ | { t: "Shelling"; c: ShellingType }
583
+ | { t: "Night"; c: NightAttackType }
584
+ | { t: "Torpedo" }
585
+ | { t: "SupportShelling"; c: SupportShellingType };
586
+
587
+ export type NightAttackType = "Normal" | "Swordfish" | "Aerial";
588
+
589
+ export type ShellingType = "Normal" | "Aerial";
590
+
591
+ export type AswAttackType = "DepthCharge" | "Aerial";
592
+
593
+ export type NightPhaseAttackType =
594
+ | { t: "Night"; c: NightAttackType }
595
+ | { t: "Asw"; c: AswAttackType };
596
+
597
+ export type TorpedoAttackType = null;
598
+
599
+ export type DayPhaseAttackType =
600
+ | { t: "Shelling"; c: ShellingType }
601
+ | { t: "Asw"; c: AswAttackType };
602
+
603
+ export type SupportShellingType = ShellingType;
604
+
605
+ export type SlotSizeVec = (number | null)[];
606
+
607
+ export type GearTypeIdArray = [number, number, number, number, number];
608
+
609
+ export interface DamageReport {
610
+ miss_damage_min: number;
611
+ miss_damage_max: number;
612
+ normal_damage_min: number;
613
+ normal_damage_max: number;
614
+ critical_damage_min: number;
615
+ critical_damage_max: number;
616
+ normal_scratch_rate: number;
617
+ critical_scratch_rate: number;
618
+ damage_density: Histogram<number, number>;
619
+ damage_state_density: Histogram<DamageState, number>;
620
+ }
621
+
622
+ export interface ContactAnalysis {
623
+ single: DayContactChance[] | null;
624
+ combined: DayContactChance[] | null;
625
+ }
626
+
627
+ export interface DayContactChance {
628
+ air_state: AirState;
629
+ trigger_rate: number;
630
+ rank3: number;
631
+ rank2: number;
632
+ rank1: number;
633
+ total: number;
634
+ }
635
+
636
+ export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
637
+ observation_term: number | null;
638
+ }
639
+
640
+ export interface ShipDayCutinAnalysis {
641
+ ship_id: number;
642
+ role: Role;
643
+ index: number;
644
+ rank3: DayCutinReport;
645
+ rank2: DayCutinReport;
646
+ }
647
+
648
+ export interface CompDayCutinAnalysis {
649
+ rank3_air_state: AirState;
650
+ rank2_air_state: AirState;
651
+ main_fleet_los_mod: number | null;
652
+ escort_fleet_los_mod: number | null;
653
+ ships: ShipDayCutinAnalysis[];
654
+ }
655
+
656
+ export interface CompNightCutinAnalysis {
657
+ night_contact_chance: NightContactChance;
658
+ ships: ShipNightCutinAnalysis[];
659
+ }
660
+
661
+ export interface NightCutinActionReport
662
+ extends ActionReport<NightPhaseAttackStyle> {
663
+ cutin_term: number | null;
664
+ }
665
+
666
+ export interface NightContactChance {
667
+ rank1: number;
668
+ rank2: number;
669
+ rank3: number;
670
+ }
671
+
672
+ export interface ShipNightCutinAnalysis {
673
+ ship_id: number;
674
+ index: number;
675
+ normal: NightCutinActionReport;
676
+ chuuha: NightCutinActionReport;
677
+ }
678
+
679
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
680
+
681
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
682
+
683
+ export interface NightCutinDef {
684
+ tag: NightCutin;
685
+ hits: number;
686
+ type_factor: number | null;
687
+ power_mod: number | null;
688
+ accuracy_mod: number | null;
689
+ }
690
+
691
+ export interface FormationCombatModifiersDef {
692
+ power_mod?: number;
693
+ accuracy_mod?: number;
694
+ evasion_mod?: number;
695
+ }
696
+
697
+ export interface BattleDefinitions {
698
+ formation: Record<Formation, NestedFormationDef>;
699
+ anti_air_cutin: Record<number, AntiAirCutinDef>;
700
+ day_cutin: Record<DayCutin, DayCutinDef>;
701
+ night_cutin: Record<NightCutin, NightCutinDef>;
702
+ historical_bonuses: HistoricalBonusDef[];
703
+ }
704
+
705
+ export interface HistoricalBonusDef {
706
+ map?: number;
707
+ node?: CompiledEvaler;
708
+ phase?: number;
709
+ debuff?: boolean;
710
+ ship?: CompiledEvaler;
711
+ enemy?: CompiledEvaler;
712
+ power_mod?: AttackPowerModifier;
713
+ armor_penetration?: number;
714
+ accuracy_mod?: number;
715
+ evasion_mod?: number;
716
+ }
717
+
718
+ export interface FormationDef {
719
+ tag: Formation;
720
+ protection_rate: number | null;
721
+ fleet_anti_air_mod: number;
722
+ shelling: FormationCombatModifiersDef;
723
+ torpedo: FormationCombatModifiersDef;
724
+ asw: FormationCombatModifiersDef;
725
+ night: FormationCombatModifiersDef;
726
+ support_shelling: FormationCombatModifiersDef;
727
+ }
728
+
729
+ export interface HistoricalParams {
730
+ power_mod: AttackPowerModifier;
731
+ armor_penetration: number;
732
+ accuracy_mod: number;
733
+ target_evasion_mod: number;
734
+ }
735
+
736
+ export interface AntiAirCutinDef {
737
+ id: number;
738
+ type_factor: number | null;
739
+ multiplier: number | null;
740
+ guaranteed: number | null;
741
+ sequential: boolean | null;
742
+ }
743
+
744
+ export interface DayCutinDef {
745
+ tag: DayCutin;
746
+ hits: number;
747
+ type_factor: number | null;
748
+ power_mod: number | null;
749
+ accuracy_mod: number | null;
750
+ }
751
+
752
+ export type NestedFormationDef =
753
+ | FormationDef
754
+ | { top_half: FormationDef; bottom_half: FormationDef };
755
+
756
+ export interface AttackPowerModifier {
757
+ a?: number;
758
+ b?: number;
759
+ }
760
+
761
+ export interface SpecialEnemyModifiers {
762
+ precap_general_mod: AttackPowerModifier;
763
+ stype_mod: AttackPowerModifier;
764
+ landing_craft_synergy_mod: AttackPowerModifier;
765
+ toku_daihatsu_tank_mod: AttackPowerModifier;
766
+ m4a1dd_mod: AttackPowerModifier;
767
+ honi_mod: AttackPowerModifier;
768
+ toku_daihatsu_chiha_mod: AttackPowerModifier;
769
+ toku_daihatsu_chiha_kai_mod: AttackPowerModifier;
770
+ army_infantry_mod: AttackPowerModifier;
771
+ army_infantry_chiha_kai_mod: AttackPowerModifier;
772
+ t97_tank_chiha_mod: AttackPowerModifier;
773
+ t97_tank_chiha_kai_mod: AttackPowerModifier;
774
+ landing_forces_mod: AttackPowerModifier;
775
+ landing_forces_group_mod: AttackPowerModifier;
776
+ landing_forces_t4_mod: AttackPowerModifier;
777
+ landing_forces_t4kai_mod: AttackPowerModifier;
778
+ t4_tank_group_mod: AttackPowerModifier;
779
+ t4_tank_kai_mod: AttackPowerModifier;
780
+ postcap_general_mod: AttackPowerModifier;
781
+ pt_mod: AttackPowerModifier | null;
782
+ }
783
+
784
+ export interface CustomPowerModifiers {
785
+ precap_mod?: AttackPowerModifier;
786
+ postcap_mod?: AttackPowerModifier;
787
+ basic_power_mod?: AttackPowerModifier;
788
+ historical_mod?: AttackPowerModifier;
789
+ }
790
+
791
+ export type OrgType =
792
+ | "Single"
793
+ | "CarrierTaskForce"
794
+ | "SurfaceTaskForce"
795
+ | "TransportEscort"
796
+ | "EnemySingle"
797
+ | "EnemyCombined";
798
+
799
+ export type AirState =
800
+ | "AirSupremacy"
801
+ | "AirSuperiority"
802
+ | "AirParity"
803
+ | "AirDenial"
804
+ | "AirIncapability";
805
+
806
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
807
+
808
+ export type SingleFormation =
809
+ | "LineAhead"
810
+ | "DoubleLine"
811
+ | "Diamond"
812
+ | "Echelon"
813
+ | "LineAbreast"
814
+ | "Vanguard";
815
+
816
+ export type CombinedFormation =
817
+ | "Cruising1"
818
+ | "Cruising2"
819
+ | "Cruising3"
820
+ | "Cruising4";
821
+
822
+ export type Formation = SingleFormation | CombinedFormation;
823
+
824
+ export interface CompAntiAirAnalysis {
825
+ fleet_adjusted_anti_air: number;
826
+ ships: AntiAirReport[];
827
+ anti_air_cutin_chance: [number, number][];
828
+ }
829
+
830
+ export interface AntiAirReport {
831
+ ship_id: number;
832
+ role: Role;
833
+ index: number;
834
+ adjusted_anti_air: number | null;
835
+ proportional_shotdown_rate: number | null;
836
+ fixed_shotdown_number: number | null;
837
+ guaranteed: number | null;
838
+ anti_air_cutin_chance: [number, number][];
839
+ anti_air_propellant_barrage_chance: number | null;
865
840
  }
866
841
 
867
- export interface AttackAnalyzerShipConfig
868
- extends ShipConditions,
869
- NightFleetConditions {
870
- balloons?: number;
871
- fleet_los_mod?: number | null;
842
+ export interface FleetCutinReport<T> {
843
+ cutin: FleetCutin;
844
+ rate: number | null;
845
+ formation: Formation;
846
+ attacks: FleetCutinAttackReport<T>[];
872
847
  }
873
848
 
874
- export interface SimulatorResultItem {
875
- id: string;
876
- fleet_type: FleetType;
849
+ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
877
850
  index: number;
878
- damage_state_map: Record<DamageState, number>;
851
+ ship_id: number;
852
+ power_mod: number;
879
853
  }
880
854
 
881
- export interface SimulatorResult {
882
- items: SimulatorResultItem[];
883
- sunk_vec: [number, number, number][];
855
+ export interface MasterGear {
856
+ gear_id: number;
857
+ name: string;
858
+ types: GearTypeIdArray;
859
+ special_type?: number;
860
+ max_hp?: number;
861
+ firepower?: number;
862
+ armor?: number;
863
+ torpedo?: number;
864
+ anti_air?: number;
865
+ speed?: number;
866
+ bombing?: number;
867
+ asw?: number;
868
+ los?: number;
869
+ luck?: number;
870
+ accuracy?: number;
871
+ evasion?: number;
872
+ range?: number;
873
+ radius?: number;
874
+ cost?: number;
875
+ improvable?: boolean;
876
+ ship_anti_air_resist?: number;
877
+ fleet_anti_air_resist?: number;
878
+ historical_aircraft_group?: number;
884
879
  }
885
880
 
886
- export type SpeedGroup = "A" | "B1" | "B2" | "C";
881
+ export type StatInterval = [number | null, number | null];
887
882
 
888
- export interface MasterData extends MasterBattleDefinitions {
889
- created_at: number;
890
- gears: MasterGear[];
891
- gear_attrs: MasterAttrRule<GearAttr>[];
892
- ships: MasterShip[];
893
- ship_attrs: MasterAttrRule<ShipAttr>[];
894
- ibonuses: MasterIBonuses;
895
- equippability: MasterEquippability;
883
+ export interface MasterShip {
884
+ ship_id: number;
885
+ name: string;
886
+ yomi: string;
887
+ stype: number;
888
+ ctype: number;
889
+ nationality?: number;
890
+ sort_id?: number;
891
+ max_hp: StatInterval;
892
+ firepower: StatInterval;
893
+ armor: StatInterval;
894
+ torpedo: StatInterval;
895
+ evasion: StatInterval;
896
+ anti_air: StatInterval;
897
+ asw: StatInterval;
898
+ los: StatInterval;
899
+ luck: StatInterval;
900
+ torpedo_accuracy?: number;
901
+ basic_evasion_term?: number;
902
+ speed: number;
903
+ range?: number;
904
+ fuel?: number;
905
+ ammo?: number;
906
+ next_id?: number;
907
+ next_level?: number;
908
+ slotnum: number;
909
+ slots: SlotSizeVec;
910
+ stock: GearState[];
911
+ speed_group?: SpeedGroup;
912
+ useful?: boolean;
896
913
  }
897
914
 
898
- export interface MasterAttrRule<T> {
899
- tag: T;
900
- name: string;
901
- expr: CompiledEvaler;
915
+ export interface GearVecState {
916
+ g1?: GearState;
917
+ g2?: GearState;
918
+ g3?: GearState;
919
+ g4?: GearState;
920
+ g5?: GearState;
921
+ gx?: GearState;
902
922
  }
903
923
 
904
- export interface NationalityDef {
905
- id: number;
906
- ctypes: number[];
924
+ export interface GearState {
925
+ id?: string;
926
+ gear_id: number;
927
+ exp?: number;
928
+ stars?: number;
907
929
  }
908
930
 
909
- export type CompiledEvaler = string;
931
+ export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
910
932
 
911
- export interface NightFleetConditions {
912
- night_contact_rank?: ContactRank | null;
913
- starshell_index?: number | null;
914
- searchlight_index?: number | null;
915
- activates_large_searchlight?: boolean;
933
+ export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
934
+
935
+ export interface AswAttackStyle {
936
+ tag: "AswAttackStyle";
937
+ attack_type: AswAttackType;
916
938
  }
917
939
 
918
- export interface BattleConditions {
919
- org_type: OrgType;
920
- role: Role;
921
- ship_index: number;
922
- fleet_len: number;
923
- formation: Formation;
924
- fleet_los_mod: number | null;
925
- night_conditions: NightFleetConditions;
940
+ export interface ShellingStyle {
941
+ tag: "ShellingStyle";
942
+ attack_type: ShellingType;
943
+ cutin: DayCutinLike | null;
944
+ power_mod: number;
945
+ accuracy_mod: number;
946
+ hits: number;
926
947
  }
927
948
 
928
- export interface NightConditions {
929
- player?: NightFleetConditions;
930
- enemy?: NightFleetConditions;
949
+ export interface TorpedoAttackStyle {
950
+ tag: "TorpedoAttackStyle";
951
+ attack_type: TorpedoAttackType;
931
952
  }
932
953
 
933
- export interface ShipPosition {
934
- org_type?: OrgType;
935
- fleet_type?: FleetType;
936
- fleet_len?: number;
937
- index?: number;
954
+ export interface NightAttackStyle {
955
+ tag: "NightAttackStyle";
956
+ attack_type: NightAttackType;
957
+ cutin: NightCutinLike | null;
958
+ power_mod: number;
959
+ accuracy_mod: number;
960
+ hits: number;
938
961
  }
939
962
 
940
- export type GearAttr =
941
- | "Unknown"
942
- | "HighAngleMount"
943
- | "NightFighter"
944
- | "NightAttacker"
945
- | "HeavyBomber"
946
- | "NightRecon"
947
- | "MainGun"
948
- | "Radar"
949
- | "SurfaceRadar"
950
- | "AirRadar"
951
- | "DepthChargeProjector"
952
- | "SynergisticDepthCharge"
953
- | "AntiSubMortar"
954
- | "AntiSubWeapon"
955
- | "ApDepthCharge"
956
- | "AntiSubAircraft"
957
- | "LateModelBowTorpedo"
958
- | "Seaplane"
959
- | "CbAircraft"
960
- | "LbAircraft"
961
- | "JetAircraft"
962
- | "Fighter"
963
- | "Recon"
964
- | "ObservationSeaplane"
965
- | "CbFighterBomber"
966
- | "AntiInstDiveBomber"
967
- | "CbSwordfish"
968
- | "SemiNightPlane"
969
- | "HighAltitudeInterceptor";
963
+ export interface SupportShellingStyle {
964
+ tag: "SupportShellingStyle";
965
+ attack_type: SupportShellingType;
966
+ }
970
967
 
971
- export type FhResult<T> = { Ok: T } | { Err: string };
968
+ export interface ShipConditions extends ShipPosition {
969
+ formation?: Formation;
970
+ amagiri_index?: number | null;
971
+ }
972
972
 
973
- export interface MasterIBonusRule {
974
- expr: CompiledEvaler;
975
- formula: CompiledEvaler;
973
+ export interface NodeAttackAnalyzerConfig {
974
+ air_state?: AirState;
975
+ engagement?: Engagement;
976
+ node_state?: NodeState;
977
+ left?: NodeAttackAnalyzerShipConfig;
978
+ right?: NodeAttackAnalyzerShipConfig;
979
+ }
980
+
981
+ export interface NodeAttackAnalysis {
982
+ left: AttackAnalysis;
983
+ right: AttackAnalysis;
984
+ shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
985
+ night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
986
+ }
987
+
988
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
989
+ formation?: Formation;
976
990
  }
977
991
 
978
992
  export interface MasterIBonuses {
@@ -995,13 +1009,9 @@ export interface MasterIBonuses {
995
1009
  elos: MasterIBonusRule[];
996
1010
  }
997
1011
 
998
- export interface MstEquipShip {
999
- api_equip_type: Record<number, MstEquipShipValue>;
1000
- }
1001
-
1002
- export interface MstStype {
1003
- api_id: number;
1004
- api_equip_type: Record<number, number>;
1012
+ export interface MasterIBonusRule {
1013
+ expr: CompiledEvaler;
1014
+ formula: CompiledEvaler;
1005
1015
  }
1006
1016
 
1007
1017
  export interface MstEquipExslotShip {
@@ -1010,15 +1020,6 @@ export interface MstEquipExslotShip {
1010
1020
  api_stypes: Record<number, number> | null;
1011
1021
  }
1012
1022
 
1013
- export interface EquippabilityRule {
1014
- ship: CompiledEvaler;
1015
- keys?: string[];
1016
- include?: string;
1017
- exclude?: string;
1018
- }
1019
-
1020
- export type MstEquipShipValue = null | number[];
1021
-
1022
1023
  export interface MasterEquippability {
1023
1024
  equip_stype: MstStype[];
1024
1025
  equip_exslot: number[];
@@ -1027,22 +1028,22 @@ export interface MasterEquippability {
1027
1028
  rules: EquippabilityRule[];
1028
1029
  }
1029
1030
 
1030
- export interface NodeState {
1031
- map?: number;
1032
- node?: NodeId;
1033
- phase?: number;
1034
- debuff?: boolean;
1035
- disable_historical_mod?: boolean;
1036
- landing_battle?: boolean;
1031
+ export interface EquippabilityRule {
1032
+ ship: CompiledEvaler;
1033
+ keys?: string[];
1034
+ include?: string;
1035
+ exclude?: string;
1037
1036
  }
1038
1037
 
1039
- export type NodeId = string;
1038
+ export type MstEquipShipValue = null | number[];
1040
1039
 
1041
- export interface ShipAnalyzerConfig {
1042
- air_state?: AirState;
1043
- engagement?: Engagement;
1044
- left?: AttackAnalyzerShipConfig;
1045
- right?: AttackAnalyzerShipConfig;
1040
+ export interface MstStype {
1041
+ api_id: number;
1042
+ api_equip_type: Record<number, number>;
1043
+ }
1044
+
1045
+ export interface MstEquipShip {
1046
+ api_equip_type: Record<number, MstEquipShipValue>;
1046
1047
  }
1047
1048
 
1048
1049
  export interface SupportShellingSimulatorParams {
@@ -1213,6 +1214,7 @@ export class Gear {
1213
1214
  is_night_plane(): boolean;
1214
1215
  max_exp_eq_120(): boolean;
1215
1216
  has_proficiency(): boolean;
1217
+ is_night_bomber(): boolean;
1216
1218
  expedition_bonus(): number;
1217
1219
  is_night_fighter(): boolean;
1218
1220
  is_night_attacker(): boolean;