fleethub-core 1.11.16 → 1.11.18

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,6 +8,21 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
8
8
  /**
9
9
  */
10
10
  export function set_panic_hook(): void;
11
+ export type GearTypeIdArray = [number, number, number, number, number];
12
+
13
+ export interface DamageReport {
14
+ miss_damage_min: number;
15
+ miss_damage_max: number;
16
+ normal_damage_min: number;
17
+ normal_damage_max: number;
18
+ critical_damage_min: number;
19
+ critical_damage_max: number;
20
+ normal_scratch_rate: number;
21
+ critical_scratch_rate: number;
22
+ damage_density: Histogram<number, number>;
23
+ damage_state_density: Histogram<DamageState, number>;
24
+ }
25
+
11
26
  export interface CompAnalyzerConfig {
12
27
  engagement: Engagement;
13
28
  formation: Formation;
@@ -51,53 +66,9 @@ export type AirState =
51
66
 
52
67
  export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
53
68
 
54
- export type ContactRank = "Rank1" | "Rank2" | "Rank3";
55
-
56
- export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
57
-
58
69
  export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
59
70
 
60
- export type ShipAttr =
61
- | "Unknown"
62
- | "NightCarrier"
63
- | "Installation"
64
- | "RoyalNavy"
65
- | "Kai2"
66
- | "TurbineSpeedBonus"
67
- | "NewModelBoilerSpeedBonus"
68
- | "Pillbox"
69
- | "IsolatedIsland"
70
- | "HarbourSummerPrincess"
71
- | "SupplyDepot"
72
- | "NewSupplyDepot"
73
- | "PtImp"
74
- | "BattleshipSummerPrincess"
75
- | "HeavyCruiserSummerPrincess"
76
- | "AnchorageWaterDemonVacationMode"
77
- | "FrenchBattleshipPrincess"
78
- | "DockPrincess";
79
-
80
- export interface ShipConditions extends ShipPosition {
81
- formation?: Formation;
82
- amagiri_index?: number | null;
83
- }
84
-
85
- export type SpecialEnemyType =
86
- | "None"
87
- | "SoftSkinned"
88
- | "Pillbox"
89
- | "IsolatedIsland"
90
- | "SupplyDepot"
91
- | "NewSupplyDepot"
92
- | "HarbourSummerPrincess"
93
- | "PtImp"
94
- | "BattleshipSummerPrincess"
95
- | "HeavyCruiserSummerPrincess"
96
- | "FrenchBattleshipPrincess"
97
- | "AnchorageWaterDemonVacationMode"
98
- | "DockPrincess";
99
-
100
- export type GearTypeIdArray = [number, number, number, number, number];
71
+ export type Role = "Main" | "Escort";
101
72
 
102
73
  export interface SupportShellingSimulatorParams {
103
74
  attacker_formation?: Formation;
@@ -106,8 +77,6 @@ export interface SupportShellingSimulatorParams {
106
77
  node_state: NodeState;
107
78
  }
108
79
 
109
- export type FhResult<T> = { Ok: T } | { Err: string };
110
-
111
80
  export interface MasterIBonuses {
112
81
  shelling_power: MasterIBonusRule[];
113
82
  shelling_accuracy: MasterIBonusRule[];
@@ -144,6 +113,7 @@ export interface AttackPower {
144
113
  }
145
114
 
146
115
  export interface AttackPowerParams {
116
+ is_cutin: boolean;
147
117
  basic: number;
148
118
  cap: number;
149
119
  precap_mod: AttackPowerModifier;
@@ -153,36 +123,12 @@ export interface AttackPowerParams {
153
123
  proficiency_critical_mod: number;
154
124
  armor_penetration: number;
155
125
  remaining_ammo_mod: number;
126
+ balloon_mod: number;
156
127
  special_enemy_mods: SpecialEnemyModifiers;
157
128
  historical_mod: AttackPowerModifier;
158
129
  custom_mods: CustomPowerModifiers;
159
130
  }
160
131
 
161
- export interface DamageReport {
162
- miss_damage_min: number;
163
- miss_damage_max: number;
164
- normal_damage_min: number;
165
- normal_damage_max: number;
166
- critical_damage_min: number;
167
- critical_damage_max: number;
168
- normal_scratch_rate: number;
169
- critical_scratch_rate: number;
170
- damage_density: Histogram<number, number>;
171
- damage_state_density: Histogram<DamageState, number>;
172
- }
173
-
174
- export interface AttackAnalysis {
175
- attacker_is_player: boolean;
176
- attacker_ship_id: number;
177
- target_ship_id: number;
178
- historical_params: HistoricalParams;
179
- day: ActionReport<DayPhaseAttackStyle>;
180
- night: ActionReport<NightPhaseAttackStyle>;
181
- closing_torpedo: ActionReport<TorpedoAttackStyle>;
182
- opening_asw: ActionReport<AswAttackStyle>;
183
- support_shelling: ActionReport<SupportShellingStyle>;
184
- }
185
-
186
132
  export interface ActionReport<T> {
187
133
  data: Record<string, AttackReport<T>>;
188
134
  damage_state_density: Histogram<DamageState, number> | null;
@@ -236,6 +182,8 @@ export interface NightFleetConditions {
236
182
  activates_large_searchlight?: boolean;
237
183
  }
238
184
 
185
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
186
+
239
187
  export interface FleetState {
240
188
  id?: string;
241
189
  len?: number;
@@ -263,6 +211,15 @@ export interface CompMeta {
263
211
  fleets: Record<FleetType, FleetMeta>;
264
212
  }
265
213
 
214
+ export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
215
+
216
+ export interface ShipConditions extends ShipPosition {
217
+ formation?: Formation;
218
+ amagiri_index?: number | null;
219
+ }
220
+
221
+ export type FhResult<T> = { Ok: T } | { Err: string };
222
+
266
223
  export interface MasterData extends MasterBattleDefinitions {
267
224
  created_at: number;
268
225
  gears: MasterGear[];
@@ -284,37 +241,6 @@ export interface MasterAttrRule<T> {
284
241
  expr: CompiledEvaler;
285
242
  }
286
243
 
287
- export interface EquippabilityRule {
288
- ship: CompiledEvaler;
289
- keys?: string[];
290
- include?: string;
291
- exclude?: string;
292
- }
293
-
294
- export interface MasterEquippability {
295
- equip_stype: EquipStype[];
296
- equip_exslot: number[];
297
- equip_ship: MstEquipShip[];
298
- equip_exslot_ship: Record<number, MstEquipExslotShip>;
299
- rules: EquippabilityRule[];
300
- }
301
-
302
- export interface MstEquipExslotShip {
303
- api_ctypes: Record<number, number> | null;
304
- api_ship_ids: Record<number, number> | null;
305
- api_stypes: Record<number, number> | null;
306
- }
307
-
308
- export interface MstEquipShip {
309
- api_ship_id: number;
310
- api_equip_type: number[];
311
- }
312
-
313
- export interface EquipStype {
314
- id: number;
315
- equip_type: number[];
316
- }
317
-
318
244
  export interface MasterBattleDefinitions {
319
245
  formation: NestedFormationDef[];
320
246
  anti_air_cutin: AntiAirCutinDef[];
@@ -366,7 +292,12 @@ export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
366
292
  observation_term: number | null;
367
293
  }
368
294
 
369
- export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
295
+ export interface AttackAnalyzerShipConfig
296
+ extends ShipConditions,
297
+ NightFleetConditions {
298
+ balloons?: number;
299
+ fleet_los_mod?: number | null;
300
+ }
370
301
 
371
302
  export type SingleFormation =
372
303
  | "LineAhead"
@@ -415,8 +346,6 @@ export type GearAttr =
415
346
  | "SemiNightPlane"
416
347
  | "HighAltitudeInterceptor";
417
348
 
418
- export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
419
-
420
349
  export interface OrgState {
421
350
  id?: string;
422
351
  f1?: FleetState;
@@ -443,55 +372,55 @@ export type OrgType =
443
372
  | "EnemySingle"
444
373
  | "EnemyCombined";
445
374
 
446
- export type Role = "Main" | "Escort";
375
+ export interface EquippabilityRule {
376
+ ship: CompiledEvaler;
377
+ keys?: string[];
378
+ include?: string;
379
+ exclude?: string;
380
+ }
447
381
 
448
- export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
382
+ export interface MasterEquippability {
383
+ equip_stype: EquipStype[];
384
+ equip_exslot: number[];
385
+ equip_ship: MstEquipShip[];
386
+ equip_exslot_ship: Record<number, MstEquipExslotShip>;
387
+ rules: EquippabilityRule[];
388
+ }
449
389
 
450
- export interface SimulatorResult {
451
- items: SimulatorResultItem[];
452
- sunk_vec: [number, number, number][];
390
+ export interface MstEquipExslotShip {
391
+ api_ctypes: Record<number, number> | null;
392
+ api_ship_ids: Record<number, number> | null;
393
+ api_stypes: Record<number, number> | null;
453
394
  }
454
395
 
455
- export interface SimulatorResultItem {
456
- id: string;
457
- fleet_type: FleetType;
458
- index: number;
459
- damage_state_map: Record<DamageState, number>;
396
+ export interface MstEquipShip {
397
+ api_ship_id: number;
398
+ api_equip_type: number[];
460
399
  }
461
400
 
462
- export interface AttackReport<T> {
463
- style: T;
464
- proc_rate: number | null;
465
- attack_power: AttackPower | null;
466
- attack_power_params: AttackPowerParams | null;
467
- hits: number;
468
- hit_rate: HitRate | null;
469
- hit_rate_params: HitRateParams | null;
470
- damage: DamageReport | null;
401
+ export interface EquipStype {
402
+ id: number;
403
+ equip_type: number[];
471
404
  }
472
405
 
473
- export interface AttackAnalyzerShipConfig
474
- extends ShipConditions,
475
- NightFleetConditions {
476
- fleet_los_mod?: number | null;
406
+ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
407
+ formation?: Formation;
408
+ balloons?: number;
477
409
  }
478
410
 
479
- export interface CompAntiAirAnalysis {
480
- fleet_adjusted_anti_air: number;
481
- ships: AntiAirReport[];
482
- anti_air_cutin_chance: [number, number][];
411
+ export interface NodeAttackAnalyzerConfig {
412
+ air_state?: AirState;
413
+ engagement?: Engagement;
414
+ node_state?: NodeState;
415
+ left?: NodeAttackAnalyzerShipConfig;
416
+ right?: NodeAttackAnalyzerShipConfig;
483
417
  }
484
418
 
485
- export interface AntiAirReport {
486
- ship_id: number;
487
- role: Role;
488
- index: number;
489
- adjusted_anti_air: number | null;
490
- proportional_shotdown_rate: number | null;
491
- fixed_shotdown_number: number | null;
492
- guaranteed: number | null;
493
- anti_air_cutin_chance: [number, number][];
494
- anti_air_propellant_barrage_chance: number | null;
419
+ export interface NodeAttackAnalysis {
420
+ left: AttackAnalysis;
421
+ right: AttackAnalysis;
422
+ shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
423
+ night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
495
424
  }
496
425
 
497
426
  export interface FormationCombatModifiersDef {
@@ -567,6 +496,8 @@ export interface BattleDefinitions {
567
496
  historical_bonuses: HistoricalBonusDef[];
568
497
  }
569
498
 
499
+ export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
500
+
570
501
  export interface ShipPosition {
571
502
  org_type?: OrgType;
572
503
  fleet_type?: FleetType;
@@ -574,6 +505,49 @@ export interface ShipPosition {
574
505
  index?: number;
575
506
  }
576
507
 
508
+ export interface SimulatorResult {
509
+ items: SimulatorResultItem[];
510
+ sunk_vec: [number, number, number][];
511
+ }
512
+
513
+ export interface SimulatorResultItem {
514
+ id: string;
515
+ fleet_type: FleetType;
516
+ index: number;
517
+ damage_state_map: Record<DamageState, number>;
518
+ }
519
+
520
+ export interface ContactAnalysis {
521
+ single: DayContactChance[] | null;
522
+ combined: DayContactChance[] | null;
523
+ }
524
+
525
+ export interface DayContactChance {
526
+ air_state: AirState;
527
+ trigger_rate: number;
528
+ rank3: number;
529
+ rank2: number;
530
+ rank1: number;
531
+ total: number;
532
+ }
533
+
534
+ export type NodeId = string;
535
+
536
+ export interface NodeState {
537
+ map?: number;
538
+ node?: NodeId;
539
+ phase?: number;
540
+ debuff?: boolean;
541
+ disable_historical_mod?: boolean;
542
+ landing_battle?: boolean;
543
+ }
544
+
545
+ export type Side = "Player" | "Enemy";
546
+
547
+ export type Align = "Left" | "Right";
548
+
549
+ export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
550
+
577
551
  export type CompiledEvaler = string;
578
552
 
579
553
  export interface HitRate {
@@ -598,37 +572,33 @@ export interface ShipAnalyzerConfig {
598
572
  right?: AttackAnalyzerShipConfig;
599
573
  }
600
574
 
601
- export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
602
- formation?: Formation;
603
- }
604
-
605
- export interface NodeAttackAnalyzerConfig {
606
- air_state?: AirState;
607
- engagement?: Engagement;
608
- node_state?: NodeState;
609
- left?: NodeAttackAnalyzerShipConfig;
610
- right?: NodeAttackAnalyzerShipConfig;
611
- }
612
-
613
- export interface NodeAttackAnalysis {
614
- left: AttackAnalysis;
615
- right: AttackAnalysis;
616
- shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
617
- night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
575
+ export interface AttackReport<T> {
576
+ style: T;
577
+ proc_rate: number | null;
578
+ attack_power: AttackPower | null;
579
+ attack_power_params: AttackPowerParams | null;
580
+ hits: number;
581
+ hit_rate: HitRate | null;
582
+ hit_rate_params: HitRateParams | null;
583
+ damage: DamageReport | null;
618
584
  }
619
585
 
620
- export interface ContactAnalysis {
621
- single: DayContactChance[] | null;
622
- combined: DayContactChance[] | null;
586
+ export interface CompAntiAirAnalysis {
587
+ fleet_adjusted_anti_air: number;
588
+ ships: AntiAirReport[];
589
+ anti_air_cutin_chance: [number, number][];
623
590
  }
624
591
 
625
- export interface DayContactChance {
626
- air_state: AirState;
627
- trigger_rate: number;
628
- rank3: number;
629
- rank2: number;
630
- rank1: number;
631
- total: number;
592
+ export interface AntiAirReport {
593
+ ship_id: number;
594
+ role: Role;
595
+ index: number;
596
+ adjusted_anti_air: number | null;
597
+ proportional_shotdown_rate: number | null;
598
+ fixed_shotdown_number: number | null;
599
+ guaranteed: number | null;
600
+ anti_air_cutin_chance: [number, number][];
601
+ anti_air_propellant_barrage_chance: number | null;
632
602
  }
633
603
 
634
604
  export type AirWaveType = "Jet" | "LandBase" | "Carrier";
@@ -658,20 +628,6 @@ export type NightPhaseAttackType =
658
628
 
659
629
  export type TorpedoAttackType = null;
660
630
 
661
- export type NodeId = string;
662
-
663
- export interface NodeState {
664
- map?: number;
665
- node?: NodeId;
666
- phase?: number;
667
- debuff?: boolean;
668
- disable_historical_mod?: boolean;
669
- }
670
-
671
- export type Side = "Player" | "Enemy";
672
-
673
- export type Align = "Left" | "Right";
674
-
675
631
  export interface MoveShipPayload {
676
632
  current: [string, string, ShipKey];
677
633
  target: [string | null, string, ShipKey];
@@ -1037,6 +993,57 @@ export type ShipType =
1037
993
  | "CT"
1038
994
  | "AO";
1039
995
 
996
+ export interface AttackAnalysis {
997
+ attacker_is_player: boolean;
998
+ attacker_ship_id: number;
999
+ target_ship_id: number;
1000
+ historical_params: HistoricalParams;
1001
+ day: ActionReport<DayPhaseAttackStyle>;
1002
+ night: ActionReport<NightPhaseAttackStyle>;
1003
+ closing_torpedo: ActionReport<TorpedoAttackStyle>;
1004
+ opening_asw: ActionReport<AswAttackStyle>;
1005
+ support_shelling: ActionReport<SupportShellingStyle>;
1006
+ }
1007
+
1008
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
1009
+
1010
+ export type ShipAttr =
1011
+ | "Unknown"
1012
+ | "NightCarrier"
1013
+ | "Installation"
1014
+ | "RoyalNavy"
1015
+ | "Kai2"
1016
+ | "TurbineSpeedBonus"
1017
+ | "NewModelBoilerSpeedBonus"
1018
+ | "Pillbox"
1019
+ | "IsolatedIsland"
1020
+ | "HarbourSummerPrincess"
1021
+ | "SupplyDepot"
1022
+ | "NewSupplyDepot"
1023
+ | "PtImp"
1024
+ | "BattleshipSummerPrincess"
1025
+ | "HeavyCruiserSummerPrincess"
1026
+ | "AnchorageWaterDemonVacationMode"
1027
+ | "FrenchBattleshipPrincess"
1028
+ | "DockPrincess"
1029
+ | "SummerAircraftCarrierDemon";
1030
+
1031
+ export type SpecialEnemyType =
1032
+ | "None"
1033
+ | "SoftSkinned"
1034
+ | "Pillbox"
1035
+ | "IsolatedIsland"
1036
+ | "SupplyDepot"
1037
+ | "NewSupplyDepot"
1038
+ | "HarbourSummerPrincess"
1039
+ | "PtImp"
1040
+ | "BattleshipSummerPrincess"
1041
+ | "HeavyCruiserSummerPrincess"
1042
+ | "FrenchBattleshipPrincess"
1043
+ | "AnchorageWaterDemonVacationMode"
1044
+ | "DockPrincess"
1045
+ | "SummerAircraftCarrierDemon";
1046
+
1040
1047
  /**
1041
1048
  */
1042
1049
  export class AirSquadron {
@@ -1232,6 +1239,10 @@ export class Comp {
1232
1239
  * @returns {number | undefined}
1233
1240
  */
1234
1241
  fleet_los_mod(fleet_type: FleetType): number | undefined;
1242
+ /**
1243
+ * @returns {number}
1244
+ */
1245
+ balloons(): number;
1235
1246
  /**
1236
1247
  */
1237
1248
  boss_sup?: Fleet;
@@ -1524,6 +1535,10 @@ export class Gear {
1524
1535
  * @returns {boolean}
1525
1536
  */
1526
1537
  can_be_deployed_to_land_base(): boolean;
1538
+ /**
1539
+ * @returns {boolean}
1540
+ */
1541
+ is_balloon(): boolean;
1527
1542
  /**
1528
1543
  */
1529
1544
  readonly accuracy: number;
@@ -1776,20 +1791,6 @@ export class Org {
1776
1791
  */
1777
1792
  export class Ship {
1778
1793
  free(): void;
1779
- /**
1780
- * @returns {number | undefined}
1781
- */
1782
- state_day_gunfit_accuracy(): number | undefined;
1783
- /**
1784
- * @returns {number | undefined}
1785
- */
1786
- state_night_gunfit_accuracy(): number | undefined;
1787
- /**
1788
- * フィット砲補正
1789
- * @param {boolean} is_night
1790
- * @returns {number}
1791
- */
1792
- gunfit_accuracy(is_night: boolean): number;
1793
1794
  /**
1794
1795
  * @returns {Ship}
1795
1796
  */
@@ -2003,6 +2004,20 @@ export class Ship {
2003
2004
  * @returns {number | undefined}
2004
2005
  */
2005
2006
  ohko_power(): number | undefined;
2007
+ /**
2008
+ * @returns {number | undefined}
2009
+ */
2010
+ state_day_gunfit_accuracy(): number | undefined;
2011
+ /**
2012
+ * @returns {number | undefined}
2013
+ */
2014
+ state_night_gunfit_accuracy(): number | undefined;
2015
+ /**
2016
+ * フィット砲補正
2017
+ * @param {boolean} is_night
2018
+ * @returns {number}
2019
+ */
2020
+ gunfit_accuracy(is_night: boolean): number;
2006
2021
  /**
2007
2022
  */
2008
2023
  readonly accuracy: number;