fleethub-core 1.10.0 → 1.10.2

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.
@@ -8,179 +8,10 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
8
8
  /**
9
9
  */
10
10
  export function set_panic_hook(): void;
11
- export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
12
-
13
- export interface ShipConditions extends ShipPosition {
14
- formation?: Formation;
15
- amagiri_index?: number | null;
16
- }
17
-
18
- export interface ShipPosition {
19
- org_type?: OrgType;
20
- fleet_type?: FleetType;
21
- fleet_len?: number;
22
- index?: number;
23
- }
24
-
25
- export interface NodeState {
26
- map?: number;
27
- node?: NodeId;
28
- phase?: number;
29
- debuff?: boolean;
30
- }
31
-
32
- export type NodeId = string;
33
-
34
- export interface CompMeta {
35
- fleets: Record<FleetType, FleetMeta>;
36
- }
37
-
38
- export interface FleetMeta {
39
- id: string;
40
- len: number;
41
- ships: [string, ShipMeta | null][];
42
- }
43
-
44
- export interface ShipMeta {
45
- id: string;
46
- ship_id: number;
47
- }
48
-
49
- export type GearCategory =
50
- | "Fighter"
51
- | "Bomber"
52
- | "Recon"
53
- | "MainGun"
54
- | "Secondary"
55
- | "Torpedo"
56
- | "AntiSub"
57
- | "Radar"
58
- | "Landing"
59
- | "Ration"
60
- | "LandBased"
61
- | "Misc";
62
-
63
- export type GearType =
64
- | "Unknown"
65
- | "SmallMainGun"
66
- | "MediumMainGun"
67
- | "LargeMainGun"
68
- | "SecondaryGun"
69
- | "Torpedo"
70
- | "CbFighter"
71
- | "CbDiveBomber"
72
- | "CbTorpedoBomber"
73
- | "CbRecon"
74
- | "ReconSeaplane"
75
- | "SeaplaneBomber"
76
- | "SmallRadar"
77
- | "LargeRadar"
78
- | "Sonar"
79
- | "DepthCharge"
80
- | "ExtraArmor"
81
- | "Engine"
82
- | "AntiAirShell"
83
- | "ApShell"
84
- | "VtFuze"
85
- | "AntiAirGun"
86
- | "MidgetSubmarine"
87
- | "EmergencyRepair"
88
- | "LandingCraft"
89
- | "Rotorcraft"
90
- | "AntiSubPatrolAircraft"
91
- | "MediumArmor"
92
- | "LargeArmor"
93
- | "Searchlight"
94
- | "SupplyContainer"
95
- | "ShipRepairFacility"
96
- | "SubmarineTorpedo"
97
- | "Starshell"
98
- | "CommandFacility"
99
- | "AviationPersonnel"
100
- | "AntiAirFireDirector"
101
- | "AntiGroundEquipment"
102
- | "LargeMainGun2"
103
- | "ShipPersonnel"
104
- | "LargeSonar"
105
- | "LargeFlyingBoat"
106
- | "LargeSearchlight"
107
- | "CombatRation"
108
- | "Supplies"
109
- | "SeaplaneFighter"
110
- | "AmphibiousTank"
111
- | "LbAttacker"
112
- | "LbFighter"
113
- | "LbRecon"
114
- | "TransportationMaterial"
115
- | "SubmarineEquipment"
116
- | "LargeLbAircraft"
117
- | "JetFighter"
118
- | "JetFighterBomber"
119
- | "JetTorpedoBomber"
120
- | "JetRecon"
121
- | "LargeRadar2"
122
- | "CbRecon2"
123
- | "SecondaryGun2";
124
-
125
- export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
126
-
127
- export type TorpedoAttackType = null;
128
-
129
- export type NightPhaseAttackType =
130
- | { t: "Night"; c: NightAttackType }
131
- | { t: "Asw"; c: AswAttackType };
132
-
133
- export type DayPhaseAttackType =
134
- | { t: "Shelling"; c: ShellingType }
135
- | { t: "Asw"; c: AswAttackType };
136
-
137
- export type AttackType =
138
- | { t: "Asw"; c: AswAttackType }
139
- | { t: "Shelling"; c: ShellingType }
140
- | { t: "Night"; c: NightAttackType }
141
- | { t: "Torpedo" }
142
- | { t: "SupportShelling"; c: SupportShellingType };
143
-
144
- export type SupportShellingType = ShellingType;
145
-
146
- export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
147
-
148
- export type ShellingType = "Normal" | "Carrier";
149
-
150
- export type AswAttackType = "DepthCharge" | "Aircraft";
151
-
152
- export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
153
-
154
- export type AirState =
155
- | "AirSupremacy"
156
- | "AirSuperiority"
157
- | "AirParity"
158
- | "AirDenial"
159
- | "AirIncapability";
160
-
161
- export interface MasterData extends MasterBattleDefinitions {
162
- created_at: number;
163
- gears: MasterGear[];
164
- gear_attrs: MasterAttrRule<GearAttr>[];
165
- ships: MasterShip[];
166
- ship_attrs: MasterAttrRule<ShipAttr>[];
167
- ibonuses: MasterIBonuses;
168
- equippability: MasterEquippability;
169
- }
170
-
171
- export interface NationalityDef {
172
- id: number;
173
- ctypes: number[];
174
- }
175
-
176
- export interface MasterAttrRule<T> {
177
- tag: T;
178
- name: string;
179
- expr: CompiledEvaler;
180
- }
181
-
182
11
  export type SpeedGroup = "A" | "B1" | "B2" | "C";
183
12
 
13
+ export type SlotSizeVec = (number | null)[];
14
+
184
15
  export interface NightFleetConditions {
185
16
  night_contact_rank?: ContactRank | null;
186
17
  starshell_index?: number | null;
@@ -226,36 +57,34 @@ export interface MasterGear {
226
57
  improvable?: boolean;
227
58
  ship_anti_air_resist?: number;
228
59
  fleet_anti_air_resist?: number;
60
+ historical_aircraft_group?: number;
229
61
  }
230
62
 
231
- export interface EquippabilityRule {
232
- ship: CompiledEvaler;
233
- keys?: string[];
234
- include?: string;
235
- exclude?: string;
236
- }
237
-
238
- export interface MasterEquippability {
239
- equip_stype: EquipStype[];
240
- equip_exslot: number[];
241
- equip_ship: MstEquipShip[];
242
- equip_exslot_ship: MstEquipExslotShip[];
243
- rules: EquippabilityRule[];
63
+ export interface CompAnalyzerConfig {
64
+ engagement: Engagement;
65
+ formation: Formation;
66
+ anti_air_cutin: number | null;
67
+ ship_anti_air_resist: number;
68
+ fleet_anti_air_resist: number;
69
+ left_night_fleet_conditions: NightFleetConditions;
70
+ right_night_fleet_conditions: NightFleetConditions;
244
71
  }
245
72
 
246
- export interface MstEquipExslotShip {
247
- api_slotitem_id: number;
248
- api_ship_ids: number[];
73
+ export interface CompNightAnalysis {
74
+ night_cutin: CompNightCutinAnalysis;
75
+ fleet_cutin: FleetCutinReport<NightAttackStyle>[];
249
76
  }
250
77
 
251
- export interface MstEquipShip {
252
- api_ship_id: number;
253
- api_equip_type: number[];
78
+ export interface CompDayAnalysis {
79
+ day_cutin: CompDayCutinAnalysis;
80
+ fleet_cutin: FleetCutinReport<ShellingStyle>[];
254
81
  }
255
82
 
256
- export interface EquipStype {
257
- id: number;
258
- equip_type: number[];
83
+ export interface CompAnalysis {
84
+ day: CompDayAnalysis;
85
+ night: CompNightAnalysis;
86
+ contact: ContactAnalysis;
87
+ anti_air: CompAntiAirAnalysis;
259
88
  }
260
89
 
261
90
  export interface OrgState {
@@ -339,8 +168,6 @@ export interface GearState {
339
168
  stars?: number;
340
169
  }
341
170
 
342
- export type SlotSizeVec = (number | null)[];
343
-
344
171
  export type ShipType =
345
172
  | "Unknown"
346
173
  | "DE"
@@ -407,9 +234,30 @@ export type Align = "Left" | "Right";
407
234
 
408
235
  export type Side = "Player" | "Enemy";
409
236
 
410
- export type Role = "Main" | "Escort";
237
+ export interface MasterIBonuses {
238
+ shelling_power: MasterIBonusRule[];
239
+ shelling_accuracy: MasterIBonusRule[];
240
+ shelling_aerial_power: MasterIBonusRule[];
241
+ torpedo_power: MasterIBonusRule[];
242
+ torpedo_accuracy: MasterIBonusRule[];
243
+ torpedo_evasion: MasterIBonusRule[];
244
+ asw_power: MasterIBonusRule[];
245
+ asw_accuracy: MasterIBonusRule[];
246
+ night_power: MasterIBonusRule[];
247
+ night_aerial_power: MasterIBonusRule[];
248
+ night_accuracy: MasterIBonusRule[];
249
+ defense_power: MasterIBonusRule[];
250
+ contact_selection: MasterIBonusRule[];
251
+ fighter_power: MasterIBonusRule[];
252
+ ship_anti_air: MasterIBonusRule[];
253
+ fleet_anti_air: MasterIBonusRule[];
254
+ elos: MasterIBonusRule[];
255
+ }
411
256
 
412
- export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
257
+ export interface MasterIBonusRule {
258
+ expr: CompiledEvaler;
259
+ formula: CompiledEvaler;
260
+ }
413
261
 
414
262
  export interface AttackReport<T> {
415
263
  style: T;
@@ -427,6 +275,10 @@ export interface MoveShipPayload {
427
275
  target: [string | null, string, ShipKey];
428
276
  }
429
277
 
278
+ export type Role = "Main" | "Escort";
279
+
280
+ export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
281
+
430
282
  export type NightCutinLike = NightCutin | FleetCutin;
431
283
 
432
284
  export type DayCutinLike = DayCutin | FleetCutin;
@@ -468,46 +320,9 @@ export type DayCutin =
468
320
  | "BBA"
469
321
  | "BA";
470
322
 
471
- export type ContactRank = "Rank1" | "Rank2" | "Rank3";
472
-
473
323
  export type AirWaveType = "Jet" | "LandBase" | "Carrier";
474
324
 
475
- export interface SimulatorResult {
476
- items: SimulatorResultItem[];
477
- sunk_vec: [number, number, number][];
478
- }
479
-
480
- export interface SimulatorResultItem {
481
- id: string;
482
- fleet_type: FleetType;
483
- index: number;
484
- damage_state_map: Record<DamageState, number>;
485
- }
486
-
487
- export interface MasterIBonuses {
488
- shelling_power: MasterIBonusRule[];
489
- shelling_accuracy: MasterIBonusRule[];
490
- shelling_aerial_power: MasterIBonusRule[];
491
- torpedo_power: MasterIBonusRule[];
492
- torpedo_accuracy: MasterIBonusRule[];
493
- torpedo_evasion: MasterIBonusRule[];
494
- asw_power: MasterIBonusRule[];
495
- asw_accuracy: MasterIBonusRule[];
496
- night_power: MasterIBonusRule[];
497
- night_aerial_power: MasterIBonusRule[];
498
- night_accuracy: MasterIBonusRule[];
499
- defense_power: MasterIBonusRule[];
500
- contact_selection: MasterIBonusRule[];
501
- fighter_power: MasterIBonusRule[];
502
- ship_anti_air: MasterIBonusRule[];
503
- fleet_anti_air: MasterIBonusRule[];
504
- elos: MasterIBonusRule[];
505
- }
506
-
507
- export interface MasterIBonusRule {
508
- expr: CompiledEvaler;
509
- formula: CompiledEvaler;
510
- }
325
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
511
326
 
512
327
  export interface BattleDefinitions {
513
328
  formation: Record<Formation, NestedFormationDef>;
@@ -527,7 +342,7 @@ export interface NightCutinDef {
527
342
 
528
343
  export interface HistoricalBonusDef {
529
344
  map?: number;
530
- node?: NodeId;
345
+ node?: CompiledEvaler;
531
346
  phase?: number;
532
347
  debuff?: boolean;
533
348
  ship?: CompiledEvaler;
@@ -574,17 +389,233 @@ export interface FormationCombatModifiersDef {
574
389
  evasion_mod?: number;
575
390
  }
576
391
 
577
- export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
392
+ export interface SimulatorResult {
393
+ items: SimulatorResultItem[];
394
+ sunk_vec: [number, number, number][];
395
+ }
396
+
397
+ export interface SimulatorResultItem {
398
+ id: string;
399
+ fleet_type: FleetType;
400
+ index: number;
401
+ damage_state_map: Record<DamageState, number>;
402
+ }
403
+
404
+ export interface AttackPower {
405
+ precap: number;
406
+ is_capped: boolean;
407
+ capped: number;
408
+ normal: number;
409
+ critical: number;
410
+ armor_penetration: number;
411
+ remaining_ammo_mod: number;
412
+ }
413
+
414
+ export interface AttackPowerParams {
415
+ basic: number;
416
+ cap: number;
417
+ precap_mod: AttackPowerModifier;
418
+ postcap_mod: AttackPowerModifier;
419
+ ap_shell_mod: number | null;
420
+ aerial_power: number | null;
421
+ proficiency_critical_mod: number;
422
+ armor_penetration: number;
423
+ remaining_ammo_mod: number;
424
+ special_enemy_mods: SpecialEnemyModifiers;
425
+ historical_mod: number;
426
+ custom_mods: CustomPowerModifiers;
427
+ }
428
+
429
+ export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
430
+
431
+ export interface ShipConditions extends ShipPosition {
432
+ formation?: Formation;
433
+ amagiri_index?: number | null;
434
+ }
435
+
436
+ export type GearCategory =
437
+ | "Fighter"
438
+ | "Bomber"
439
+ | "Recon"
440
+ | "MainGun"
441
+ | "Secondary"
442
+ | "Torpedo"
443
+ | "AntiSub"
444
+ | "Radar"
445
+ | "Landing"
446
+ | "Ration"
447
+ | "LandBased"
448
+ | "Misc";
449
+
450
+ export type GearType =
451
+ | "Unknown"
452
+ | "SmallMainGun"
453
+ | "MediumMainGun"
454
+ | "LargeMainGun"
455
+ | "SecondaryGun"
456
+ | "Torpedo"
457
+ | "CbFighter"
458
+ | "CbDiveBomber"
459
+ | "CbTorpedoBomber"
460
+ | "CbRecon"
461
+ | "ReconSeaplane"
462
+ | "SeaplaneBomber"
463
+ | "SmallRadar"
464
+ | "LargeRadar"
465
+ | "Sonar"
466
+ | "DepthCharge"
467
+ | "ExtraArmor"
468
+ | "Engine"
469
+ | "AntiAirShell"
470
+ | "ApShell"
471
+ | "VtFuze"
472
+ | "AntiAirGun"
473
+ | "MidgetSubmarine"
474
+ | "EmergencyRepair"
475
+ | "LandingCraft"
476
+ | "Rotorcraft"
477
+ | "AntiSubPatrolAircraft"
478
+ | "MediumArmor"
479
+ | "LargeArmor"
480
+ | "Searchlight"
481
+ | "SupplyContainer"
482
+ | "ShipRepairFacility"
483
+ | "SubmarineTorpedo"
484
+ | "Starshell"
485
+ | "CommandFacility"
486
+ | "AviationPersonnel"
487
+ | "AntiAirFireDirector"
488
+ | "AntiGroundEquipment"
489
+ | "LargeMainGun2"
490
+ | "ShipPersonnel"
491
+ | "LargeSonar"
492
+ | "LargeFlyingBoat"
493
+ | "LargeSearchlight"
494
+ | "CombatRation"
495
+ | "Supplies"
496
+ | "SeaplaneFighter"
497
+ | "AmphibiousTank"
498
+ | "LbAttacker"
499
+ | "LbFighter"
500
+ | "LbRecon"
501
+ | "TransportationMaterial"
502
+ | "SubmarineEquipment"
503
+ | "LargeLbAircraft"
504
+ | "JetFighter"
505
+ | "JetFighterBomber"
506
+ | "JetTorpedoBomber"
507
+ | "JetRecon"
508
+ | "LargeRadar2"
509
+ | "CbRecon2"
510
+ | "SecondaryGun2";
511
+
512
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
513
+
514
+ export interface MasterData extends MasterBattleDefinitions {
515
+ created_at: number;
516
+ gears: MasterGear[];
517
+ gear_attrs: MasterAttrRule<GearAttr>[];
518
+ ships: MasterShip[];
519
+ ship_attrs: MasterAttrRule<ShipAttr>[];
520
+ ibonuses: MasterIBonuses;
521
+ equippability: MasterEquippability;
522
+ }
523
+
524
+ export interface NationalityDef {
525
+ id: number;
526
+ ctypes: number[];
527
+ }
528
+
529
+ export interface MasterAttrRule<T> {
530
+ tag: T;
531
+ name: string;
532
+ expr: CompiledEvaler;
533
+ }
534
+
535
+ export interface CompMeta {
536
+ fleets: Record<FleetType, FleetMeta>;
537
+ }
538
+
539
+ export interface FleetMeta {
540
+ id: string;
541
+ len: number;
542
+ ships: [string, ShipMeta | null][];
543
+ }
544
+
545
+ export interface ShipMeta {
546
+ id: string;
547
+ ship_id: number;
548
+ }
549
+
550
+ export type TorpedoAttackType = null;
551
+
552
+ export type NightPhaseAttackType =
553
+ | { t: "Night"; c: NightAttackType }
554
+ | { t: "Asw"; c: AswAttackType };
555
+
556
+ export type DayPhaseAttackType =
557
+ | { t: "Shelling"; c: ShellingType }
558
+ | { t: "Asw"; c: AswAttackType };
559
+
560
+ export type AttackType =
561
+ | { t: "Asw"; c: AswAttackType }
562
+ | { t: "Shelling"; c: ShellingType }
563
+ | { t: "Night"; c: NightAttackType }
564
+ | { t: "Torpedo" }
565
+ | { t: "SupportShelling"; c: SupportShellingType };
566
+
567
+ export type SupportShellingType = ShellingType;
568
+
569
+ export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
570
+
571
+ export type ShellingType = "Normal" | "Carrier";
572
+
573
+ export type AswAttackType = "DepthCharge" | "Aircraft";
574
+
575
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
576
+
577
+ export type AirState =
578
+ | "AirSupremacy"
579
+ | "AirSuperiority"
580
+ | "AirParity"
581
+ | "AirDenial"
582
+ | "AirIncapability";
578
583
 
579
584
  export type FhResult<T> = { Ok: T } | { Err: string };
580
585
 
581
- export interface ShipAnalyzerConfig {
582
- air_state?: AirState;
583
- engagement?: Engagement;
584
- left?: AttackAnalyzerShipConfig;
585
- right?: AttackAnalyzerShipConfig;
586
+ export interface ShipPosition {
587
+ org_type?: OrgType;
588
+ fleet_type?: FleetType;
589
+ fleet_len?: number;
590
+ index?: number;
591
+ }
592
+
593
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
594
+
595
+ export interface CustomPowerModifiers {
596
+ precap_mod?: AttackPowerModifier;
597
+ postcap_mod?: AttackPowerModifier;
598
+ basic_power_mod?: AttackPowerModifier;
586
599
  }
587
600
 
601
+ export interface SpecialEnemyModifiers {
602
+ precap_general_mod: AttackPowerModifier;
603
+ stype_mod: AttackPowerModifier;
604
+ landing_craft_synergy_mod: AttackPowerModifier;
605
+ toku_daihatsu_tank_mod: AttackPowerModifier;
606
+ m4a1dd_mod: AttackPowerModifier;
607
+ honi_mod: AttackPowerModifier;
608
+ postcap_general_mod: AttackPowerModifier;
609
+ pt_mod: AttackPowerModifier;
610
+ }
611
+
612
+ export interface AttackPowerModifier {
613
+ a?: number;
614
+ b?: number;
615
+ }
616
+
617
+ export type CompiledEvaler = string;
618
+
588
619
  export interface EBonuses {
589
620
  firepower: number;
590
621
  torpedo: number;
@@ -623,32 +654,102 @@ export interface GearInput {
623
654
  ace: number;
624
655
  }
625
656
 
626
- export type GearVecInput = GearInput[];
657
+ export type GearVecInput = GearInput[];
658
+
659
+ export type ShipAttr =
660
+ | "Unknown"
661
+ | "Abyssal"
662
+ | "NightCarrier"
663
+ | "Installation"
664
+ | "RoyalNavy"
665
+ | "Kai2"
666
+ | "TurbineSpeedBonus"
667
+ | "Pillbox"
668
+ | "IsolatedIsland"
669
+ | "HarbourSummerPrincess"
670
+ | "SupplyDepot"
671
+ | "NewSupplyDepot"
672
+ | "PtImp"
673
+ | "BattleshipSummerPrincess"
674
+ | "HeavyCruiserSummerPrincess";
675
+
676
+ export type OrgType =
677
+ | "Single"
678
+ | "CarrierTaskForce"
679
+ | "SurfaceTaskForce"
680
+ | "TransportEscort"
681
+ | "EnemySingle"
682
+ | "EnemyCombined";
683
+
684
+ export type FleetKey = "f1" | "f2" | "f3" | "f4";
685
+
686
+ export interface SupportShellingSimulatorParams {
687
+ attacker_formation?: Formation;
688
+ target_formation?: Formation;
689
+ engagement: Engagement;
690
+ }
691
+
692
+ export interface MasterBattleDefinitions {
693
+ formation: NestedFormationDef[];
694
+ anti_air_cutin: AntiAirCutinDef[];
695
+ day_cutin: DayCutinDef[];
696
+ night_cutin: NightCutinDef[];
697
+ historical_bonuses?: HistoricalBonusDef[];
698
+ }
699
+
700
+ export interface ShipAnalyzerConfig {
701
+ air_state?: AirState;
702
+ engagement?: Engagement;
703
+ left?: AttackAnalyzerShipConfig;
704
+ right?: AttackAnalyzerShipConfig;
705
+ }
706
+
707
+ export interface NightContactChance {
708
+ rank1: number;
709
+ rank2: number;
710
+ rank3: number;
711
+ }
712
+
713
+ export interface CompNightCutinAnalysis {
714
+ night_contact_chance: NightContactChance;
715
+ ships: ShipNightCutinAnalysis[];
716
+ }
717
+
718
+ export interface ShipNightCutinAnalysis {
719
+ ship_id: number;
720
+ index: number;
721
+ normal: NightCutinActionReport;
722
+ chuuha: NightCutinActionReport;
723
+ }
627
724
 
628
- export type ShipAttr =
629
- | "Unknown"
630
- | "Abyssal"
631
- | "NightCarrier"
632
- | "Installation"
633
- | "RoyalNavy"
634
- | "Kai2"
635
- | "TurbineSpeedBonus"
636
- | "Pillbox"
637
- | "IsolatedIsland"
638
- | "HarbourSummerPrincess"
639
- | "SupplyDepot"
640
- | "NewSupplyDepot"
641
- | "PtImp"
642
- | "BattleshipSummerPrincess"
643
- | "HeavyCruiserSummerPrincess";
725
+ export interface NightCutinActionReport
726
+ extends ActionReport<NightPhaseAttackStyle> {
727
+ cutin_term: number | null;
728
+ }
644
729
 
645
- export type OrgType =
646
- | "Single"
647
- | "CarrierTaskForce"
648
- | "SurfaceTaskForce"
649
- | "TransportEscort"
650
- | "EnemySingle"
651
- | "EnemyCombined";
730
+ export interface AttackAnalyzerShipConfig
731
+ extends ShipConditions,
732
+ NightFleetConditions {
733
+ fleet_los_mod?: number | null;
734
+ }
735
+
736
+ export interface CompAntiAirAnalysis {
737
+ fleet_adjusted_anti_air: number;
738
+ ships: AntiAirReport[];
739
+ anti_air_cutin_chance: [number, number][];
740
+ }
741
+
742
+ export interface AntiAirReport {
743
+ ship_id: number;
744
+ role: Role;
745
+ index: number;
746
+ adjusted_anti_air: number | null;
747
+ proportional_shotdown_rate: number | null;
748
+ fixed_shotdown_number: number | null;
749
+ guaranteed: number | null;
750
+ anti_air_cutin_chance: [number, number][];
751
+ anti_air_propellant_barrage_chance: number | null;
752
+ }
652
753
 
653
754
  export type GearAttr =
654
755
  | "Unknown"
@@ -682,27 +783,7 @@ export type GearAttr =
682
783
  | "SemiNightPlane"
683
784
  | "HighAltitudeInterceptor";
684
785
 
685
- export type FleetKey = "f1" | "f2" | "f3" | "f4";
686
-
687
- export interface SupportShellingSimulatorParams {
688
- attacker_formation?: Formation;
689
- target_formation?: Formation;
690
- engagement: Engagement;
691
- }
692
-
693
- export interface MasterBattleDefinitions {
694
- formation: NestedFormationDef[];
695
- anti_air_cutin: AntiAirCutinDef[];
696
- day_cutin: DayCutinDef[];
697
- night_cutin: NightCutinDef[];
698
- historical_bonuses?: HistoricalBonusDef[];
699
- }
700
-
701
- export interface AttackAnalyzerShipConfig
702
- extends ShipConditions,
703
- NightFleetConditions {
704
- fleet_los_mod?: number | null;
705
- }
786
+ export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
706
787
 
707
788
  export interface SupportShellingStyle {
708
789
  tag: "SupportShellingStyle";
@@ -741,29 +822,6 @@ export interface ShellingStyle {
741
822
  hits: number;
742
823
  }
743
824
 
744
- export interface NightContactChance {
745
- rank1: number;
746
- rank2: number;
747
- rank3: number;
748
- }
749
-
750
- export interface CompNightCutinAnalysis {
751
- night_contact_chance: NightContactChance;
752
- ships: ShipNightCutinAnalysis[];
753
- }
754
-
755
- export interface ShipNightCutinAnalysis {
756
- ship_id: number;
757
- index: number;
758
- normal: NightCutinActionReport;
759
- chuuha: NightCutinActionReport;
760
- }
761
-
762
- export interface NightCutinActionReport
763
- extends ActionReport<NightPhaseAttackStyle> {
764
- cutin_term: number | null;
765
- }
766
-
767
825
  export interface FleetCutinReport<T> {
768
826
  cutin: FleetCutin;
769
827
  rate: number | null;
@@ -790,26 +848,6 @@ export interface DamageReport {
790
848
  damage_state_density: Histogram<DamageState, number>;
791
849
  }
792
850
 
793
- export interface CompAntiAirAnalysis {
794
- fleet_adjusted_anti_air: number;
795
- ships: AntiAirReport[];
796
- anti_air_cutin_chance: [number, number][];
797
- }
798
-
799
- export interface AntiAirReport {
800
- ship_id: number;
801
- role: Role;
802
- index: number;
803
- adjusted_anti_air: number | null;
804
- proportional_shotdown_rate: number | null;
805
- fixed_shotdown_number: number | null;
806
- guaranteed: number | null;
807
- anti_air_cutin_chance: [number, number][];
808
- anti_air_propellant_barrage_chance: number | null;
809
- }
810
-
811
- export type CompiledEvaler = string;
812
-
813
851
  export type Formation = SingleFormation | CombinedFormation;
814
852
 
815
853
  export type CombinedFormation =
@@ -826,66 +864,6 @@ export type SingleFormation =
826
864
  | "LineAbreast"
827
865
  | "Vanguard";
828
866
 
829
- export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
830
-
831
- export interface CustomPowerModifiers {
832
- precap_mod?: AttackPowerModifier;
833
- postcap_mod?: AttackPowerModifier;
834
- basic_power_mod?: AttackPowerModifier;
835
- }
836
-
837
- export interface SpecialEnemyModifiers {
838
- precap_general_mod: AttackPowerModifier;
839
- stype_mod: AttackPowerModifier;
840
- landing_craft_synergy_mod: AttackPowerModifier;
841
- toku_daihatsu_tank_mod: AttackPowerModifier;
842
- m4a1dd_mod: AttackPowerModifier;
843
- honi_mod: AttackPowerModifier;
844
- postcap_general_mod: AttackPowerModifier;
845
- pt_mod: AttackPowerModifier;
846
- }
847
-
848
- export interface AttackPowerModifier {
849
- a?: number;
850
- b?: number;
851
- }
852
-
853
- export interface AttackPower {
854
- precap: number;
855
- is_capped: boolean;
856
- capped: number;
857
- normal: number;
858
- critical: number;
859
- armor_penetration: number;
860
- remaining_ammo_mod: number;
861
- }
862
-
863
- export interface AttackPowerParams {
864
- basic: number;
865
- cap: number;
866
- precap_mod: AttackPowerModifier;
867
- postcap_mod: AttackPowerModifier;
868
- ap_shell_mod: number | null;
869
- aerial_power: number | null;
870
- proficiency_critical_mod: number;
871
- armor_penetration: number;
872
- remaining_ammo_mod: number;
873
- special_enemy_mods: SpecialEnemyModifiers;
874
- historical_mod: number;
875
- custom_mods: CustomPowerModifiers;
876
- }
877
-
878
- export interface SpecialEnemyModifiers {
879
- precap_general_mod: AttackPowerModifier;
880
- stype_mod: AttackPowerModifier;
881
- landing_craft_synergy_mod: AttackPowerModifier;
882
- toku_daihatsu_tank_mod: AttackPowerModifier;
883
- m4a1dd_mod: AttackPowerModifier;
884
- honi_mod: AttackPowerModifier;
885
- postcap_general_mod: AttackPowerModifier;
886
- pt_mod: AttackPowerModifier;
887
- }
888
-
889
867
  export interface CompDayCutinAnalysis {
890
868
  rank3_air_state: AirState;
891
869
  rank2_air_state: AirState;
@@ -931,6 +909,15 @@ export type SpecialEnemyType =
931
909
  | "BattleshipSummerPrincess"
932
910
  | "HeavyCruiserSummerPrincess";
933
911
 
912
+ export interface NodeState {
913
+ map?: number;
914
+ node?: NodeId;
915
+ phase?: number;
916
+ debuff?: boolean;
917
+ }
918
+
919
+ export type NodeId = string;
920
+
934
921
  export interface MasterShip {
935
922
  ship_id: number;
936
923
  name: string;
@@ -965,6 +952,36 @@ export interface MasterShip {
965
952
 
966
953
  export type StatInterval = [number | null, number | null];
967
954
 
955
+ export interface EquippabilityRule {
956
+ ship: CompiledEvaler;
957
+ keys?: string[];
958
+ include?: string;
959
+ exclude?: string;
960
+ }
961
+
962
+ export interface MasterEquippability {
963
+ equip_stype: EquipStype[];
964
+ equip_exslot: number[];
965
+ equip_ship: MstEquipShip[];
966
+ equip_exslot_ship: MstEquipExslotShip[];
967
+ rules: EquippabilityRule[];
968
+ }
969
+
970
+ export interface MstEquipExslotShip {
971
+ api_slotitem_id: number;
972
+ api_ship_ids: number[];
973
+ }
974
+
975
+ export interface MstEquipShip {
976
+ api_ship_id: number;
977
+ api_equip_type: number[];
978
+ }
979
+
980
+ export interface EquipStype {
981
+ id: number;
982
+ equip_type: number[];
983
+ }
984
+
968
985
  export interface HitRate {
969
986
  normal: number;
970
987
  critical: number;
@@ -994,33 +1011,6 @@ export interface DayContactChance {
994
1011
  total: number;
995
1012
  }
996
1013
 
997
- export interface CompAnalyzerConfig {
998
- engagement: Engagement;
999
- formation: Formation;
1000
- anti_air_cutin: number | null;
1001
- ship_anti_air_resist: number;
1002
- fleet_anti_air_resist: number;
1003
- left_night_fleet_conditions: NightFleetConditions;
1004
- right_night_fleet_conditions: NightFleetConditions;
1005
- }
1006
-
1007
- export interface CompNightAnalysis {
1008
- night_cutin: CompNightCutinAnalysis;
1009
- fleet_cutin: FleetCutinReport<NightAttackStyle>[];
1010
- }
1011
-
1012
- export interface CompDayAnalysis {
1013
- day_cutin: CompDayCutinAnalysis;
1014
- fleet_cutin: FleetCutinReport<ShellingStyle>[];
1015
- }
1016
-
1017
- export interface CompAnalysis {
1018
- day: CompDayAnalysis;
1019
- night: CompNightAnalysis;
1020
- contact: ContactAnalysis;
1021
- anti_air: CompAntiAirAnalysis;
1022
- }
1023
-
1024
1014
  /**
1025
1015
  */
1026
1016
  export class AirSquadron {
@@ -1135,6 +1125,15 @@ export class Comp {
1135
1125
  * @returns {boolean}
1136
1126
  */
1137
1127
  is_enemy(): boolean;
1128
+ /**
1129
+ * @param {string} id
1130
+ * @returns {boolean}
1131
+ */
1132
+ has_ship_eid(id: string): boolean;
1133
+ /**
1134
+ * @returns {string | undefined}
1135
+ */
1136
+ first_ship_id(): string | undefined;
1138
1137
  /**
1139
1138
  * @returns {boolean}
1140
1139
  */