fleethub-core 1.10.0 → 1.10.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.
@@ -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;
@@ -228,34 +59,31 @@ export interface MasterGear {
228
59
  fleet_anti_air_resist?: number;
229
60
  }
230
61
 
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[];
62
+ export interface CompAnalyzerConfig {
63
+ engagement: Engagement;
64
+ formation: Formation;
65
+ anti_air_cutin: number | null;
66
+ ship_anti_air_resist: number;
67
+ fleet_anti_air_resist: number;
68
+ left_night_fleet_conditions: NightFleetConditions;
69
+ right_night_fleet_conditions: NightFleetConditions;
244
70
  }
245
71
 
246
- export interface MstEquipExslotShip {
247
- api_slotitem_id: number;
248
- api_ship_ids: number[];
72
+ export interface CompNightAnalysis {
73
+ night_cutin: CompNightCutinAnalysis;
74
+ fleet_cutin: FleetCutinReport<NightAttackStyle>[];
249
75
  }
250
76
 
251
- export interface MstEquipShip {
252
- api_ship_id: number;
253
- api_equip_type: number[];
77
+ export interface CompDayAnalysis {
78
+ day_cutin: CompDayCutinAnalysis;
79
+ fleet_cutin: FleetCutinReport<ShellingStyle>[];
254
80
  }
255
81
 
256
- export interface EquipStype {
257
- id: number;
258
- equip_type: number[];
82
+ export interface CompAnalysis {
83
+ day: CompDayAnalysis;
84
+ night: CompNightAnalysis;
85
+ contact: ContactAnalysis;
86
+ anti_air: CompAntiAirAnalysis;
259
87
  }
260
88
 
261
89
  export interface OrgState {
@@ -339,8 +167,6 @@ export interface GearState {
339
167
  stars?: number;
340
168
  }
341
169
 
342
- export type SlotSizeVec = (number | null)[];
343
-
344
170
  export type ShipType =
345
171
  | "Unknown"
346
172
  | "DE"
@@ -407,9 +233,30 @@ export type Align = "Left" | "Right";
407
233
 
408
234
  export type Side = "Player" | "Enemy";
409
235
 
410
- export type Role = "Main" | "Escort";
236
+ export interface MasterIBonuses {
237
+ shelling_power: MasterIBonusRule[];
238
+ shelling_accuracy: MasterIBonusRule[];
239
+ shelling_aerial_power: MasterIBonusRule[];
240
+ torpedo_power: MasterIBonusRule[];
241
+ torpedo_accuracy: MasterIBonusRule[];
242
+ torpedo_evasion: MasterIBonusRule[];
243
+ asw_power: MasterIBonusRule[];
244
+ asw_accuracy: MasterIBonusRule[];
245
+ night_power: MasterIBonusRule[];
246
+ night_aerial_power: MasterIBonusRule[];
247
+ night_accuracy: MasterIBonusRule[];
248
+ defense_power: MasterIBonusRule[];
249
+ contact_selection: MasterIBonusRule[];
250
+ fighter_power: MasterIBonusRule[];
251
+ ship_anti_air: MasterIBonusRule[];
252
+ fleet_anti_air: MasterIBonusRule[];
253
+ elos: MasterIBonusRule[];
254
+ }
411
255
 
412
- export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
256
+ export interface MasterIBonusRule {
257
+ expr: CompiledEvaler;
258
+ formula: CompiledEvaler;
259
+ }
413
260
 
414
261
  export interface AttackReport<T> {
415
262
  style: T;
@@ -427,6 +274,10 @@ export interface MoveShipPayload {
427
274
  target: [string | null, string, ShipKey];
428
275
  }
429
276
 
277
+ export type Role = "Main" | "Escort";
278
+
279
+ export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
280
+
430
281
  export type NightCutinLike = NightCutin | FleetCutin;
431
282
 
432
283
  export type DayCutinLike = DayCutin | FleetCutin;
@@ -468,46 +319,9 @@ export type DayCutin =
468
319
  | "BBA"
469
320
  | "BA";
470
321
 
471
- export type ContactRank = "Rank1" | "Rank2" | "Rank3";
472
-
473
322
  export type AirWaveType = "Jet" | "LandBase" | "Carrier";
474
323
 
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
- }
324
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
511
325
 
512
326
  export interface BattleDefinitions {
513
327
  formation: Record<Formation, NestedFormationDef>;
@@ -527,7 +341,7 @@ export interface NightCutinDef {
527
341
 
528
342
  export interface HistoricalBonusDef {
529
343
  map?: number;
530
- node?: NodeId;
344
+ node?: CompiledEvaler;
531
345
  phase?: number;
532
346
  debuff?: boolean;
533
347
  ship?: CompiledEvaler;
@@ -574,17 +388,233 @@ export interface FormationCombatModifiersDef {
574
388
  evasion_mod?: number;
575
389
  }
576
390
 
577
- export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
391
+ export interface SimulatorResult {
392
+ items: SimulatorResultItem[];
393
+ sunk_vec: [number, number, number][];
394
+ }
395
+
396
+ export interface SimulatorResultItem {
397
+ id: string;
398
+ fleet_type: FleetType;
399
+ index: number;
400
+ damage_state_map: Record<DamageState, number>;
401
+ }
402
+
403
+ export interface AttackPower {
404
+ precap: number;
405
+ is_capped: boolean;
406
+ capped: number;
407
+ normal: number;
408
+ critical: number;
409
+ armor_penetration: number;
410
+ remaining_ammo_mod: number;
411
+ }
412
+
413
+ export interface AttackPowerParams {
414
+ basic: number;
415
+ cap: number;
416
+ precap_mod: AttackPowerModifier;
417
+ postcap_mod: AttackPowerModifier;
418
+ ap_shell_mod: number | null;
419
+ aerial_power: number | null;
420
+ proficiency_critical_mod: number;
421
+ armor_penetration: number;
422
+ remaining_ammo_mod: number;
423
+ special_enemy_mods: SpecialEnemyModifiers;
424
+ historical_mod: number;
425
+ custom_mods: CustomPowerModifiers;
426
+ }
427
+
428
+ export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
429
+
430
+ export interface ShipConditions extends ShipPosition {
431
+ formation?: Formation;
432
+ amagiri_index?: number | null;
433
+ }
434
+
435
+ export type GearCategory =
436
+ | "Fighter"
437
+ | "Bomber"
438
+ | "Recon"
439
+ | "MainGun"
440
+ | "Secondary"
441
+ | "Torpedo"
442
+ | "AntiSub"
443
+ | "Radar"
444
+ | "Landing"
445
+ | "Ration"
446
+ | "LandBased"
447
+ | "Misc";
448
+
449
+ export type GearType =
450
+ | "Unknown"
451
+ | "SmallMainGun"
452
+ | "MediumMainGun"
453
+ | "LargeMainGun"
454
+ | "SecondaryGun"
455
+ | "Torpedo"
456
+ | "CbFighter"
457
+ | "CbDiveBomber"
458
+ | "CbTorpedoBomber"
459
+ | "CbRecon"
460
+ | "ReconSeaplane"
461
+ | "SeaplaneBomber"
462
+ | "SmallRadar"
463
+ | "LargeRadar"
464
+ | "Sonar"
465
+ | "DepthCharge"
466
+ | "ExtraArmor"
467
+ | "Engine"
468
+ | "AntiAirShell"
469
+ | "ApShell"
470
+ | "VtFuze"
471
+ | "AntiAirGun"
472
+ | "MidgetSubmarine"
473
+ | "EmergencyRepair"
474
+ | "LandingCraft"
475
+ | "Rotorcraft"
476
+ | "AntiSubPatrolAircraft"
477
+ | "MediumArmor"
478
+ | "LargeArmor"
479
+ | "Searchlight"
480
+ | "SupplyContainer"
481
+ | "ShipRepairFacility"
482
+ | "SubmarineTorpedo"
483
+ | "Starshell"
484
+ | "CommandFacility"
485
+ | "AviationPersonnel"
486
+ | "AntiAirFireDirector"
487
+ | "AntiGroundEquipment"
488
+ | "LargeMainGun2"
489
+ | "ShipPersonnel"
490
+ | "LargeSonar"
491
+ | "LargeFlyingBoat"
492
+ | "LargeSearchlight"
493
+ | "CombatRation"
494
+ | "Supplies"
495
+ | "SeaplaneFighter"
496
+ | "AmphibiousTank"
497
+ | "LbAttacker"
498
+ | "LbFighter"
499
+ | "LbRecon"
500
+ | "TransportationMaterial"
501
+ | "SubmarineEquipment"
502
+ | "LargeLbAircraft"
503
+ | "JetFighter"
504
+ | "JetFighterBomber"
505
+ | "JetTorpedoBomber"
506
+ | "JetRecon"
507
+ | "LargeRadar2"
508
+ | "CbRecon2"
509
+ | "SecondaryGun2";
510
+
511
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
512
+
513
+ export interface MasterData extends MasterBattleDefinitions {
514
+ created_at: number;
515
+ gears: MasterGear[];
516
+ gear_attrs: MasterAttrRule<GearAttr>[];
517
+ ships: MasterShip[];
518
+ ship_attrs: MasterAttrRule<ShipAttr>[];
519
+ ibonuses: MasterIBonuses;
520
+ equippability: MasterEquippability;
521
+ }
522
+
523
+ export interface NationalityDef {
524
+ id: number;
525
+ ctypes: number[];
526
+ }
527
+
528
+ export interface MasterAttrRule<T> {
529
+ tag: T;
530
+ name: string;
531
+ expr: CompiledEvaler;
532
+ }
533
+
534
+ export interface CompMeta {
535
+ fleets: Record<FleetType, FleetMeta>;
536
+ }
537
+
538
+ export interface FleetMeta {
539
+ id: string;
540
+ len: number;
541
+ ships: [string, ShipMeta | null][];
542
+ }
543
+
544
+ export interface ShipMeta {
545
+ id: string;
546
+ ship_id: number;
547
+ }
548
+
549
+ export type TorpedoAttackType = null;
550
+
551
+ export type NightPhaseAttackType =
552
+ | { t: "Night"; c: NightAttackType }
553
+ | { t: "Asw"; c: AswAttackType };
554
+
555
+ export type DayPhaseAttackType =
556
+ | { t: "Shelling"; c: ShellingType }
557
+ | { t: "Asw"; c: AswAttackType };
558
+
559
+ export type AttackType =
560
+ | { t: "Asw"; c: AswAttackType }
561
+ | { t: "Shelling"; c: ShellingType }
562
+ | { t: "Night"; c: NightAttackType }
563
+ | { t: "Torpedo" }
564
+ | { t: "SupportShelling"; c: SupportShellingType };
565
+
566
+ export type SupportShellingType = ShellingType;
567
+
568
+ export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
569
+
570
+ export type ShellingType = "Normal" | "Carrier";
571
+
572
+ export type AswAttackType = "DepthCharge" | "Aircraft";
573
+
574
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
575
+
576
+ export type AirState =
577
+ | "AirSupremacy"
578
+ | "AirSuperiority"
579
+ | "AirParity"
580
+ | "AirDenial"
581
+ | "AirIncapability";
578
582
 
579
583
  export type FhResult<T> = { Ok: T } | { Err: string };
580
584
 
581
- export interface ShipAnalyzerConfig {
582
- air_state?: AirState;
583
- engagement?: Engagement;
584
- left?: AttackAnalyzerShipConfig;
585
- right?: AttackAnalyzerShipConfig;
585
+ export interface ShipPosition {
586
+ org_type?: OrgType;
587
+ fleet_type?: FleetType;
588
+ fleet_len?: number;
589
+ index?: number;
590
+ }
591
+
592
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
593
+
594
+ export interface CustomPowerModifiers {
595
+ precap_mod?: AttackPowerModifier;
596
+ postcap_mod?: AttackPowerModifier;
597
+ basic_power_mod?: AttackPowerModifier;
586
598
  }
587
599
 
600
+ export interface SpecialEnemyModifiers {
601
+ precap_general_mod: AttackPowerModifier;
602
+ stype_mod: AttackPowerModifier;
603
+ landing_craft_synergy_mod: AttackPowerModifier;
604
+ toku_daihatsu_tank_mod: AttackPowerModifier;
605
+ m4a1dd_mod: AttackPowerModifier;
606
+ honi_mod: AttackPowerModifier;
607
+ postcap_general_mod: AttackPowerModifier;
608
+ pt_mod: AttackPowerModifier;
609
+ }
610
+
611
+ export interface AttackPowerModifier {
612
+ a?: number;
613
+ b?: number;
614
+ }
615
+
616
+ export type CompiledEvaler = string;
617
+
588
618
  export interface EBonuses {
589
619
  firepower: number;
590
620
  torpedo: number;
@@ -623,32 +653,102 @@ export interface GearInput {
623
653
  ace: number;
624
654
  }
625
655
 
626
- export type GearVecInput = GearInput[];
656
+ export type GearVecInput = GearInput[];
657
+
658
+ export type ShipAttr =
659
+ | "Unknown"
660
+ | "Abyssal"
661
+ | "NightCarrier"
662
+ | "Installation"
663
+ | "RoyalNavy"
664
+ | "Kai2"
665
+ | "TurbineSpeedBonus"
666
+ | "Pillbox"
667
+ | "IsolatedIsland"
668
+ | "HarbourSummerPrincess"
669
+ | "SupplyDepot"
670
+ | "NewSupplyDepot"
671
+ | "PtImp"
672
+ | "BattleshipSummerPrincess"
673
+ | "HeavyCruiserSummerPrincess";
674
+
675
+ export type OrgType =
676
+ | "Single"
677
+ | "CarrierTaskForce"
678
+ | "SurfaceTaskForce"
679
+ | "TransportEscort"
680
+ | "EnemySingle"
681
+ | "EnemyCombined";
682
+
683
+ export type FleetKey = "f1" | "f2" | "f3" | "f4";
684
+
685
+ export interface SupportShellingSimulatorParams {
686
+ attacker_formation?: Formation;
687
+ target_formation?: Formation;
688
+ engagement: Engagement;
689
+ }
690
+
691
+ export interface MasterBattleDefinitions {
692
+ formation: NestedFormationDef[];
693
+ anti_air_cutin: AntiAirCutinDef[];
694
+ day_cutin: DayCutinDef[];
695
+ night_cutin: NightCutinDef[];
696
+ historical_bonuses?: HistoricalBonusDef[];
697
+ }
698
+
699
+ export interface ShipAnalyzerConfig {
700
+ air_state?: AirState;
701
+ engagement?: Engagement;
702
+ left?: AttackAnalyzerShipConfig;
703
+ right?: AttackAnalyzerShipConfig;
704
+ }
705
+
706
+ export interface NightContactChance {
707
+ rank1: number;
708
+ rank2: number;
709
+ rank3: number;
710
+ }
711
+
712
+ export interface CompNightCutinAnalysis {
713
+ night_contact_chance: NightContactChance;
714
+ ships: ShipNightCutinAnalysis[];
715
+ }
716
+
717
+ export interface ShipNightCutinAnalysis {
718
+ ship_id: number;
719
+ index: number;
720
+ normal: NightCutinActionReport;
721
+ chuuha: NightCutinActionReport;
722
+ }
627
723
 
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";
724
+ export interface NightCutinActionReport
725
+ extends ActionReport<NightPhaseAttackStyle> {
726
+ cutin_term: number | null;
727
+ }
644
728
 
645
- export type OrgType =
646
- | "Single"
647
- | "CarrierTaskForce"
648
- | "SurfaceTaskForce"
649
- | "TransportEscort"
650
- | "EnemySingle"
651
- | "EnemyCombined";
729
+ export interface AttackAnalyzerShipConfig
730
+ extends ShipConditions,
731
+ NightFleetConditions {
732
+ fleet_los_mod?: number | null;
733
+ }
734
+
735
+ export interface CompAntiAirAnalysis {
736
+ fleet_adjusted_anti_air: number;
737
+ ships: AntiAirReport[];
738
+ anti_air_cutin_chance: [number, number][];
739
+ }
740
+
741
+ export interface AntiAirReport {
742
+ ship_id: number;
743
+ role: Role;
744
+ index: number;
745
+ adjusted_anti_air: number | null;
746
+ proportional_shotdown_rate: number | null;
747
+ fixed_shotdown_number: number | null;
748
+ guaranteed: number | null;
749
+ anti_air_cutin_chance: [number, number][];
750
+ anti_air_propellant_barrage_chance: number | null;
751
+ }
652
752
 
653
753
  export type GearAttr =
654
754
  | "Unknown"
@@ -682,27 +782,7 @@ export type GearAttr =
682
782
  | "SemiNightPlane"
683
783
  | "HighAltitudeInterceptor";
684
784
 
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
- }
785
+ export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
706
786
 
707
787
  export interface SupportShellingStyle {
708
788
  tag: "SupportShellingStyle";
@@ -741,29 +821,6 @@ export interface ShellingStyle {
741
821
  hits: number;
742
822
  }
743
823
 
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
824
  export interface FleetCutinReport<T> {
768
825
  cutin: FleetCutin;
769
826
  rate: number | null;
@@ -790,26 +847,6 @@ export interface DamageReport {
790
847
  damage_state_density: Histogram<DamageState, number>;
791
848
  }
792
849
 
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
850
  export type Formation = SingleFormation | CombinedFormation;
814
851
 
815
852
  export type CombinedFormation =
@@ -826,66 +863,6 @@ export type SingleFormation =
826
863
  | "LineAbreast"
827
864
  | "Vanguard";
828
865
 
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
866
  export interface CompDayCutinAnalysis {
890
867
  rank3_air_state: AirState;
891
868
  rank2_air_state: AirState;
@@ -931,6 +908,15 @@ export type SpecialEnemyType =
931
908
  | "BattleshipSummerPrincess"
932
909
  | "HeavyCruiserSummerPrincess";
933
910
 
911
+ export interface NodeState {
912
+ map?: number;
913
+ node?: NodeId;
914
+ phase?: number;
915
+ debuff?: boolean;
916
+ }
917
+
918
+ export type NodeId = string;
919
+
934
920
  export interface MasterShip {
935
921
  ship_id: number;
936
922
  name: string;
@@ -965,6 +951,36 @@ export interface MasterShip {
965
951
 
966
952
  export type StatInterval = [number | null, number | null];
967
953
 
954
+ export interface EquippabilityRule {
955
+ ship: CompiledEvaler;
956
+ keys?: string[];
957
+ include?: string;
958
+ exclude?: string;
959
+ }
960
+
961
+ export interface MasterEquippability {
962
+ equip_stype: EquipStype[];
963
+ equip_exslot: number[];
964
+ equip_ship: MstEquipShip[];
965
+ equip_exslot_ship: MstEquipExslotShip[];
966
+ rules: EquippabilityRule[];
967
+ }
968
+
969
+ export interface MstEquipExslotShip {
970
+ api_slotitem_id: number;
971
+ api_ship_ids: number[];
972
+ }
973
+
974
+ export interface MstEquipShip {
975
+ api_ship_id: number;
976
+ api_equip_type: number[];
977
+ }
978
+
979
+ export interface EquipStype {
980
+ id: number;
981
+ equip_type: number[];
982
+ }
983
+
968
984
  export interface HitRate {
969
985
  normal: number;
970
986
  critical: number;
@@ -994,33 +1010,6 @@ export interface DayContactChance {
994
1010
  total: number;
995
1011
  }
996
1012
 
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
1013
  /**
1025
1014
  */
1026
1015
  export class AirSquadron {
@@ -1135,6 +1124,15 @@ export class Comp {
1135
1124
  * @returns {boolean}
1136
1125
  */
1137
1126
  is_enemy(): boolean;
1127
+ /**
1128
+ * @param {string} id
1129
+ * @returns {boolean}
1130
+ */
1131
+ has_ship_eid(id: string): boolean;
1132
+ /**
1133
+ * @returns {string | undefined}
1134
+ */
1135
+ first_ship_id(): string | undefined;
1138
1136
  /**
1139
1137
  * @returns {boolean}
1140
1138
  */