fleethub-core 1.12.1 → 1.12.3

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,2156 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * @param {ShipConditions} value
5
- * @returns {ShipConditions}
6
- */
7
- export function parse_ship_conditions(value: ShipConditions): ShipConditions;
8
- /**
9
- */
10
- export function set_panic_hook(): void;
11
- export interface MasterShip {
12
- ship_id: number;
13
- name: string;
14
- yomi: string;
15
- stype: number;
16
- ctype: number;
17
- nationality?: number;
18
- sort_id?: number;
19
- max_hp: StatInterval;
20
- firepower: StatInterval;
21
- armor: StatInterval;
22
- torpedo: StatInterval;
23
- evasion: StatInterval;
24
- anti_air: StatInterval;
25
- asw: StatInterval;
26
- los: StatInterval;
27
- luck: StatInterval;
28
- torpedo_accuracy?: number;
29
- basic_evasion_term?: number;
30
- speed: number;
31
- range?: number;
32
- fuel?: number;
33
- ammo?: number;
34
- next_id?: number;
35
- next_level?: number;
36
- slotnum: number;
37
- slots: SlotSizeVec;
38
- stock: GearState[];
39
- speed_group?: SpeedGroup;
40
- useful?: boolean;
41
- }
42
-
43
- export type StatInterval = [number | null, number | null];
44
-
45
- export interface AttackPower {
46
- precap: number;
47
- is_capped: boolean;
48
- capped: number;
49
- normal: number;
50
- critical: number;
51
- armor_penetration: number;
52
- remaining_ammo_mod: number;
53
- }
54
-
55
- export interface AttackPowerParams {
56
- is_cutin: boolean;
57
- basic: number;
58
- cap: number;
59
- precap_mod: AttackPowerModifier;
60
- postcap_mod: AttackPowerModifier;
61
- ap_shell_mod: number | null;
62
- aerial_power: number | null;
63
- proficiency_critical_mod: number;
64
- armor_penetration: number;
65
- remaining_ammo_mod: number;
66
- balloon_mod: number;
67
- special_enemy_mods: SpecialEnemyModifiers;
68
- historical_mod: AttackPowerModifier;
69
- custom_mods: CustomPowerModifiers;
70
- }
71
-
72
- export interface AttackReport<T> {
73
- style: T;
74
- proc_rate: number | null;
75
- attack_power: AttackPower | null;
76
- attack_power_params: AttackPowerParams | null;
77
- hits: number;
78
- hit_rate: HitRate | null;
79
- hit_rate_params: HitRateParams | null;
80
- damage: DamageReport | null;
81
- }
82
-
83
- export interface AttackAnalysis {
84
- attacker_is_player: boolean;
85
- attacker_ship_id: number;
86
- target_ship_id: number;
87
- historical_params: HistoricalParams;
88
- day: ActionReport<DayPhaseAttackStyle>;
89
- night: ActionReport<NightPhaseAttackStyle>;
90
- closing_torpedo: ActionReport<TorpedoAttackStyle>;
91
- opening_asw: ActionReport<AswAttackStyle>;
92
- support_shelling: ActionReport<SupportShellingStyle>;
93
- }
94
-
95
- export type AirWaveType = "Jet" | "LandBase" | "Carrier";
96
-
97
- export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
98
-
99
- export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
100
-
101
- export type OrgType =
102
- | "Single"
103
- | "CarrierTaskForce"
104
- | "SurfaceTaskForce"
105
- | "TransportEscort"
106
- | "EnemySingle"
107
- | "EnemyCombined";
108
-
109
- export interface ShipPosition {
110
- org_type?: OrgType;
111
- fleet_type?: FleetType;
112
- fleet_len?: number;
113
- index?: number;
114
- }
115
-
116
- export type ShipCategory =
117
- | "Battleship"
118
- | "AircraftCarrier"
119
- | "HeavyCruiser"
120
- | "LightCruiser"
121
- | "Destroyer"
122
- | "CoastalDefenseShip"
123
- | "Submarine"
124
- | "AuxiliaryShip";
125
-
126
- export type ShipType =
127
- | "Unknown"
128
- | "DE"
129
- | "DD"
130
- | "CL"
131
- | "CLT"
132
- | "CA"
133
- | "CAV"
134
- | "CVL"
135
- | "FBB"
136
- | "BB"
137
- | "BBV"
138
- | "CV"
139
- | "XBB"
140
- | "SS"
141
- | "SSV"
142
- | "AP"
143
- | "AV"
144
- | "LHA"
145
- | "CVB"
146
- | "AR"
147
- | "AS"
148
- | "CT"
149
- | "AO";
150
-
151
- export interface FleetCutinReport<T> {
152
- cutin: FleetCutin;
153
- rate: number | null;
154
- formation: Formation;
155
- attacks: FleetCutinAttackReport<T>[];
156
- }
157
-
158
- export interface FleetCutinAttackReport<T> extends AttackReport<T> {
159
- index: number;
160
- ship_id: number;
161
- power_mod: number;
162
- }
163
-
164
- export interface DamageReport {
165
- miss_damage_min: number;
166
- miss_damage_max: number;
167
- normal_damage_min: number;
168
- normal_damage_max: number;
169
- critical_damage_min: number;
170
- critical_damage_max: number;
171
- normal_scratch_rate: number;
172
- critical_scratch_rate: number;
173
- damage_density: Histogram<number, number>;
174
- damage_state_density: Histogram<DamageState, number>;
175
- }
176
-
177
- export type AswAttackType = "DepthCharge" | "Aerial";
178
-
179
- export type ShellingType = "Normal" | "Aerial";
180
-
181
- export type NightAttackType = "Normal" | "Swordfish" | "Aerial";
182
-
183
- export type SupportShellingType = ShellingType;
184
-
185
- export type AttackType =
186
- | { t: "Asw"; c: AswAttackType }
187
- | { t: "Shelling"; c: ShellingType }
188
- | { t: "Night"; c: NightAttackType }
189
- | { t: "Torpedo" }
190
- | { t: "SupportShelling"; c: SupportShellingType };
191
-
192
- export type DayPhaseAttackType =
193
- | { t: "Shelling"; c: ShellingType }
194
- | { t: "Asw"; c: AswAttackType };
195
-
196
- export type NightPhaseAttackType =
197
- | { t: "Night"; c: NightAttackType }
198
- | { t: "Asw"; c: AswAttackType };
199
-
200
- export type TorpedoAttackType = null;
201
-
202
- export type GearType =
203
- | "Unknown"
204
- | "SmallMainGun"
205
- | "MediumMainGun"
206
- | "LargeMainGun"
207
- | "SecondaryGun"
208
- | "Torpedo"
209
- | "CbFighter"
210
- | "CbDiveBomber"
211
- | "CbTorpedoBomber"
212
- | "CbRecon"
213
- | "ReconSeaplane"
214
- | "SeaplaneBomber"
215
- | "SmallRadar"
216
- | "LargeRadar"
217
- | "Sonar"
218
- | "DepthCharge"
219
- | "ExtraArmor"
220
- | "Engine"
221
- | "AntiAirShell"
222
- | "ApShell"
223
- | "VtFuze"
224
- | "AntiAirGun"
225
- | "MidgetSubmarine"
226
- | "EmergencyRepair"
227
- | "LandingCraft"
228
- | "Rotorcraft"
229
- | "AntiSubPatrolAircraft"
230
- | "MediumArmor"
231
- | "LargeArmor"
232
- | "Searchlight"
233
- | "SupplyContainer"
234
- | "ShipRepairFacility"
235
- | "SubmarineTorpedo"
236
- | "Starshell"
237
- | "CommandFacility"
238
- | "AviationPersonnel"
239
- | "AntiAirFireDirector"
240
- | "AntiGroundEquipment"
241
- | "LargeMainGun2"
242
- | "ShipPersonnel"
243
- | "LargeSonar"
244
- | "LargeFlyingBoat"
245
- | "LargeSearchlight"
246
- | "CombatRation"
247
- | "Supplies"
248
- | "SeaplaneFighter"
249
- | "AmphibiousTank"
250
- | "LbAttacker"
251
- | "LbFighter"
252
- | "LbRecon"
253
- | "TransportationMaterial"
254
- | "SubmarineEquipment"
255
- | "LandingForce"
256
- | "LargeLbAircraft"
257
- | "SurfaceEquipment"
258
- | "JetFighter"
259
- | "JetFighterBomber"
260
- | "JetTorpedoBomber"
261
- | "JetRecon"
262
- | "LargeRadar2"
263
- | "CbRecon2"
264
- | "SecondaryGun2";
265
-
266
- export type GearCategory =
267
- | "Fighter"
268
- | "Bomber"
269
- | "Recon"
270
- | "MainGun"
271
- | "Secondary"
272
- | "Torpedo"
273
- | "AntiSub"
274
- | "Radar"
275
- | "Landing"
276
- | "Ration"
277
- | "LandBased"
278
- | "Misc";
279
-
280
- export type NodeId = string;
281
-
282
- export interface NodeState {
283
- map?: number;
284
- node?: NodeId;
285
- phase?: number;
286
- debuff?: boolean;
287
- disable_historical_mod?: boolean;
288
- landing_battle?: boolean;
289
- }
290
-
291
- export type GearTypeIdArray = [number, number, number, number, number];
292
-
293
- export interface SupportShellingSimulatorParams {
294
- attacker_formation?: Formation;
295
- target_formation?: Formation;
296
- engagement: Engagement;
297
- node_state: NodeState;
298
- }
299
-
300
- export type ContactRank = "Rank1" | "Rank2" | "Rank3";
301
-
302
- export type DayCutin =
303
- | "Zuiun"
304
- | "AirSea"
305
- | "MainMain"
306
- | "MainAp"
307
- | "MainRadar"
308
- | "MainSec"
309
- | "DoubleAttack"
310
- | "FBA"
311
- | "BBA"
312
- | "BA";
313
-
314
- export type NightCutin =
315
- | "MainTorpRadar"
316
- | "TorpLookoutRadar"
317
- | "TorpTsloTorp"
318
- | "TorpTsloDrum"
319
- | "NightZuiun2Radar"
320
- | "NightZuiun2"
321
- | "NightZuiunRadar"
322
- | "NightZuiun"
323
- | "DoubleAttack"
324
- | "TorpTorpMain"
325
- | "TorpTorpTorp"
326
- | "MainMainSec"
327
- | "MainMainMain"
328
- | "SubTorpTorp"
329
- | "SubRadarTorp"
330
- | "Cvci1_25"
331
- | "Cvci1_20"
332
- | "Cvci1_18"
333
- | "Photobomber";
334
-
335
- export type FleetCutin =
336
- | "NelsonTouch"
337
- | "NagatoClassCutin"
338
- | "ColoradoClassCutin"
339
- | "KongouClassCutin"
340
- | "Yamato2ShipCutin"
341
- | "Yamato3ShipCutin";
342
-
343
- export type DayCutinLike = DayCutin | FleetCutin;
344
-
345
- export type NightCutinLike = NightCutin | FleetCutin;
346
-
347
- export interface FleetState {
348
- id?: string;
349
- len?: number;
350
- s1?: ShipState;
351
- s2?: ShipState;
352
- s3?: ShipState;
353
- s4?: ShipState;
354
- s5?: ShipState;
355
- s6?: ShipState;
356
- s7?: ShipState;
357
- }
358
-
359
- export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
360
-
361
- export type Role = "Main" | "Escort";
362
-
363
- export type SpecialEnemyType =
364
- | "None"
365
- | "SoftSkinned"
366
- | "Pillbox"
367
- | "IsolatedIsland"
368
- | "SupplyDepot"
369
- | "NewSupplyDepot"
370
- | "HarbourSummerPrincess"
371
- | "PtImp"
372
- | "BattleshipSummerPrincess"
373
- | "HeavyCruiserSummerPrincess"
374
- | "FrenchBattleshipPrincess"
375
- | "AnchorageWaterDemonVacationMode"
376
- | "DockPrincess"
377
- | "SummerAircraftCarrierDemon";
378
-
379
- export interface SimulatorResult {
380
- items: SimulatorResultItem[];
381
- sunk_vec: [number, number, number][];
382
- }
383
-
384
- export interface SimulatorResultItem {
385
- id: string;
386
- fleet_type: FleetType;
387
- index: number;
388
- damage_state_map: Record<DamageState, number>;
389
- }
390
-
391
- export interface HitRate {
392
- normal: number;
393
- critical: number;
394
- total: number;
395
- }
396
-
397
- export interface HitRateParams {
398
- accuracy_term: number;
399
- evasion_term: number;
400
- target_morale_mod: number;
401
- critical_rate_constant: number;
402
- critical_percentage_bonus: number;
403
- hit_percentage_bonus: number;
404
- }
405
-
406
- export interface NightContactChance {
407
- rank1: number;
408
- rank2: number;
409
- rank3: number;
410
- }
411
-
412
- export interface CompNightCutinAnalysis {
413
- night_contact_chance: NightContactChance;
414
- ships: ShipNightCutinAnalysis[];
415
- }
416
-
417
- export interface ShipNightCutinAnalysis {
418
- ship_id: number;
419
- index: number;
420
- normal: NightCutinActionReport;
421
- chuuha: NightCutinActionReport;
422
- }
423
-
424
- export interface NightCutinActionReport
425
- extends ActionReport<NightPhaseAttackStyle> {
426
- cutin_term: number | null;
427
- }
428
-
429
- export interface CompDayCutinAnalysis {
430
- rank3_air_state: AirState;
431
- rank2_air_state: AirState;
432
- main_fleet_los_mod: number | null;
433
- escort_fleet_los_mod: number | null;
434
- ships: ShipDayCutinAnalysis[];
435
- }
436
-
437
- export interface ShipDayCutinAnalysis {
438
- ship_id: number;
439
- role: Role;
440
- index: number;
441
- rank3: DayCutinReport;
442
- rank2: DayCutinReport;
443
- }
444
-
445
- export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
446
- observation_term: number | null;
447
- }
448
-
449
- export interface ActionReport<T> {
450
- data: Record<string, AttackReport<T>>;
451
- damage_state_density: Histogram<DamageState, number> | null;
452
- is_active: boolean;
453
- }
454
-
455
- export interface ShipMeta {
456
- id: string;
457
- ship_id: number;
458
- }
459
-
460
- export interface FleetMeta {
461
- id: string;
462
- len: number;
463
- ships: [string, ShipMeta | null][];
464
- }
465
-
466
- export interface CompMeta {
467
- fleets: Record<FleetType, FleetMeta>;
468
- }
469
-
470
- export interface MasterData extends MasterBattleDefinitions {
471
- created_at: number;
472
- gears: MasterGear[];
473
- gear_attrs: MasterAttrRule<GearAttr>[];
474
- ships: MasterShip[];
475
- ship_attrs: MasterAttrRule<ShipAttr>[];
476
- ibonuses: MasterIBonuses;
477
- equippability: MasterEquippability;
478
- }
479
-
480
- export interface NationalityDef {
481
- id: number;
482
- ctypes: number[];
483
- }
484
-
485
- export interface MasterAttrRule<T> {
486
- tag: T;
487
- name: string;
488
- expr: CompiledEvaler;
489
- }
490
-
491
- export interface BattleConditions {
492
- org_type: OrgType;
493
- role: Role;
494
- ship_index: number;
495
- fleet_len: number;
496
- formation: Formation;
497
- fleet_los_mod: number | null;
498
- night_conditions: NightFleetConditions;
499
- }
500
-
501
- export interface NightConditions {
502
- player?: NightFleetConditions;
503
- enemy?: NightFleetConditions;
504
- }
505
-
506
- export interface NightFleetConditions {
507
- night_contact_rank?: ContactRank | null;
508
- starshell_index?: number | null;
509
- searchlight_index?: number | null;
510
- activates_large_searchlight?: boolean;
511
- }
512
-
513
- export type GearAttr =
514
- | "Unknown"
515
- | "HighAngleMount"
516
- | "NightFighter"
517
- | "NightAttacker"
518
- | "HeavyBomber"
519
- | "NightRecon"
520
- | "MainGun"
521
- | "Radar"
522
- | "SurfaceRadar"
523
- | "AirRadar"
524
- | "DepthChargeProjector"
525
- | "SynergisticDepthCharge"
526
- | "AntiSubMortar"
527
- | "AntiSubWeapon"
528
- | "ApDepthCharge"
529
- | "AntiSubAircraft"
530
- | "LateModelBowTorpedo"
531
- | "Seaplane"
532
- | "CbAircraft"
533
- | "LbAircraft"
534
- | "JetAircraft"
535
- | "Fighter"
536
- | "Recon"
537
- | "ObservationSeaplane"
538
- | "CbFighterBomber"
539
- | "AntiInstDiveBomber"
540
- | "CbSwordfish"
541
- | "SemiNightPlane"
542
- | "HighAltitudeInterceptor";
543
-
544
- export type ShipAttr =
545
- | "Unknown"
546
- | "NightCarrier"
547
- | "Installation"
548
- | "RoyalNavy"
549
- | "Kai2"
550
- | "TurbineSpeedBonus"
551
- | "NewModelBoilerSpeedBonus"
552
- | "Pillbox"
553
- | "IsolatedIsland"
554
- | "HarbourSummerPrincess"
555
- | "SupplyDepot"
556
- | "NewSupplyDepot"
557
- | "PtImp"
558
- | "BattleshipSummerPrincess"
559
- | "HeavyCruiserSummerPrincess"
560
- | "AnchorageWaterDemonVacationMode"
561
- | "FrenchBattleshipPrincess"
562
- | "DockPrincess"
563
- | "SummerAircraftCarrierDemon";
564
-
565
- export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
566
-
567
- export interface MasterBattleDefinitions {
568
- formation: NestedFormationDef[];
569
- anti_air_cutin: AntiAirCutinDef[];
570
- day_cutin: DayCutinDef[];
571
- night_cutin: NightCutinDef[];
572
- historical_bonuses?: HistoricalBonusDef[];
573
- }
574
-
575
- export interface MoveShipPayload {
576
- current: [string, string, ShipKey];
577
- target: [string | null, string, ShipKey];
578
- }
579
-
580
- export type GearVecInput = GearInput[];
581
-
582
- export interface GearInput {
583
- gear_id: number;
584
- types: GearTypeIdArray;
585
- firepower: number;
586
- torpedo: number;
587
- anti_air: number;
588
- armor: number;
589
- evasion: number;
590
- asw: number;
591
- los: number;
592
- bombing: number;
593
- accuracy: number;
594
- range: number;
595
- radius: number;
596
- stars: number;
597
- ace: number;
598
- }
599
-
600
- export interface ShipInput {
601
- ship_id: number;
602
- ctype: number;
603
- stype: number;
604
- yomi: string;
605
- }
606
-
607
- export interface EBonuses {
608
- firepower: number;
609
- torpedo: number;
610
- anti_air: number;
611
- armor: number;
612
- evasion: number;
613
- asw: number;
614
- los: number;
615
- bombing: number;
616
- accuracy: number;
617
- range: number;
618
- }
619
-
620
- export type FhResult<T> = { Ok: T } | { Err: string };
621
-
622
- export interface MasterIBonuses {
623
- shelling_power: MasterIBonusRule[];
624
- shelling_accuracy: MasterIBonusRule[];
625
- shelling_aerial_power: MasterIBonusRule[];
626
- torpedo_power: MasterIBonusRule[];
627
- torpedo_accuracy: MasterIBonusRule[];
628
- torpedo_evasion: MasterIBonusRule[];
629
- asw_power: MasterIBonusRule[];
630
- asw_accuracy: MasterIBonusRule[];
631
- night_power: MasterIBonusRule[];
632
- night_aerial_power: MasterIBonusRule[];
633
- night_accuracy: MasterIBonusRule[];
634
- defense_power: MasterIBonusRule[];
635
- contact_selection: MasterIBonusRule[];
636
- fighter_power: MasterIBonusRule[];
637
- ship_anti_air: MasterIBonusRule[];
638
- fleet_anti_air: MasterIBonusRule[];
639
- elos: MasterIBonusRule[];
640
- }
641
-
642
- export interface MasterIBonusRule {
643
- expr: CompiledEvaler;
644
- formula: CompiledEvaler;
645
- }
646
-
647
- export interface MasterGear {
648
- gear_id: number;
649
- name: string;
650
- types: GearTypeIdArray;
651
- special_type?: number;
652
- max_hp?: number;
653
- firepower?: number;
654
- armor?: number;
655
- torpedo?: number;
656
- anti_air?: number;
657
- speed?: number;
658
- bombing?: number;
659
- asw?: number;
660
- los?: number;
661
- luck?: number;
662
- accuracy?: number;
663
- evasion?: number;
664
- range?: number;
665
- radius?: number;
666
- cost?: number;
667
- improvable?: boolean;
668
- ship_anti_air_resist?: number;
669
- fleet_anti_air_resist?: number;
670
- historical_aircraft_group?: number;
671
- }
672
-
673
- export interface ShipAnalyzerConfig {
674
- air_state?: AirState;
675
- engagement?: Engagement;
676
- left?: AttackAnalyzerShipConfig;
677
- right?: AttackAnalyzerShipConfig;
678
- }
679
-
680
- export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
681
- formation?: Formation;
682
- }
683
-
684
- export interface NodeAttackAnalyzerConfig {
685
- air_state?: AirState;
686
- engagement?: Engagement;
687
- node_state?: NodeState;
688
- left?: NodeAttackAnalyzerShipConfig;
689
- right?: NodeAttackAnalyzerShipConfig;
690
- }
691
-
692
- export interface NodeAttackAnalysis {
693
- left: AttackAnalysis;
694
- right: AttackAnalysis;
695
- shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
696
- night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
697
- }
698
-
699
- export interface CompAnalyzerConfig {
700
- engagement: Engagement;
701
- formation: Formation;
702
- anti_air_cutin: number | null;
703
- ship_anti_air_resist: number;
704
- fleet_anti_air_resist: number;
705
- left_night_fleet_conditions: NightFleetConditions;
706
- right_night_fleet_conditions: NightFleetConditions;
707
- }
708
-
709
- export interface CompNightAnalysis {
710
- night_cutin: CompNightCutinAnalysis;
711
- fleet_cutin: FleetCutinReport<NightAttackStyle>[];
712
- }
713
-
714
- export interface CompDayAnalysis {
715
- day_cutin: CompDayCutinAnalysis;
716
- fleet_cutin: FleetCutinReport<ShellingStyle>[];
717
- }
718
-
719
- export interface CompAnalysis {
720
- day: CompDayAnalysis;
721
- night: CompNightAnalysis;
722
- contact: ContactAnalysis;
723
- anti_air: CompAntiAirAnalysis;
724
- }
725
-
726
- export interface AttackAnalyzerShipConfig
727
- extends ShipConditions,
728
- NightFleetConditions {
729
- balloons?: number;
730
- fleet_los_mod?: number | null;
731
- }
732
-
733
- export interface AttackPowerModifier {
734
- a?: number;
735
- b?: number;
736
- }
737
-
738
- export interface SpecialEnemyModifiers {
739
- precap_general_mod: AttackPowerModifier;
740
- stype_mod: AttackPowerModifier;
741
- landing_craft_synergy_mod: AttackPowerModifier;
742
- toku_daihatsu_tank_mod: AttackPowerModifier;
743
- m4a1dd_mod: AttackPowerModifier;
744
- honi_mod: AttackPowerModifier;
745
- toku_daihatsu_chiha_mod: AttackPowerModifier;
746
- toku_daihatsu_chiha_kai_mod: AttackPowerModifier;
747
- t4_tank_group_mod: AttackPowerModifier;
748
- t4_tank_kai_mod: AttackPowerModifier;
749
- postcap_general_mod: AttackPowerModifier;
750
- pt_mod: AttackPowerModifier | null;
751
- }
752
-
753
- export interface CustomPowerModifiers {
754
- precap_mod?: AttackPowerModifier;
755
- postcap_mod?: AttackPowerModifier;
756
- basic_power_mod?: AttackPowerModifier;
757
- historical_mod?: AttackPowerModifier;
758
- }
759
-
760
- export interface GearState {
761
- id?: string;
762
- gear_id: number;
763
- exp?: number;
764
- stars?: number;
765
- }
766
-
767
- export interface GearVecState {
768
- g1?: GearState;
769
- g2?: GearState;
770
- g3?: GearState;
771
- g4?: GearState;
772
- g5?: GearState;
773
- gx?: GearState;
774
- }
775
-
776
- export interface ShipConditions extends ShipPosition {
777
- formation?: Formation;
778
- amagiri_index?: number | null;
779
- }
780
-
781
- export interface ContactAnalysis {
782
- single: DayContactChance[] | null;
783
- combined: DayContactChance[] | null;
784
- }
785
-
786
- export interface DayContactChance {
787
- air_state: AirState;
788
- trigger_rate: number;
789
- rank3: number;
790
- rank2: number;
791
- rank1: number;
792
- total: number;
793
- }
794
-
795
- export type AirSquadronMode = "Sortie" | "AirDefense";
796
-
797
- export interface AirSquadronState extends GearVecState, SlotSizeVecState {
798
- id?: string;
799
- mode?: AirSquadronMode;
800
- }
801
-
802
- export interface ShellingStyle {
803
- tag: "ShellingStyle";
804
- attack_type: ShellingType;
805
- cutin: DayCutinLike | null;
806
- power_mod: number;
807
- accuracy_mod: number;
808
- hits: number;
809
- }
810
-
811
- export interface NightAttackStyle {
812
- tag: "NightAttackStyle";
813
- attack_type: NightAttackType;
814
- cutin: NightCutinLike | null;
815
- power_mod: number;
816
- accuracy_mod: number;
817
- hits: number;
818
- }
819
-
820
- export interface AswAttackStyle {
821
- tag: "AswAttackStyle";
822
- attack_type: AswAttackType;
823
- }
824
-
825
- export interface TorpedoAttackStyle {
826
- tag: "TorpedoAttackStyle";
827
- attack_type: TorpedoAttackType;
828
- }
829
-
830
- export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
831
-
832
- export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
833
-
834
- export interface SupportShellingStyle {
835
- tag: "SupportShellingStyle";
836
- attack_type: SupportShellingType;
837
- }
838
-
839
- export interface SlotSizeVecState {
840
- ss1?: number;
841
- ss2?: number;
842
- ss3?: number;
843
- ss4?: number;
844
- ss5?: number;
845
- }
846
-
847
- export interface ShipState extends GearVecState, SlotSizeVecState {
848
- id?: string;
849
- ship_id: number;
850
- level?: number;
851
- current_hp?: number;
852
- morale?: number;
853
- ammo?: number;
854
- fuel?: number;
855
- max_hp_mod?: number;
856
- firepower_mod?: number;
857
- torpedo_mod?: number;
858
- armor_mod?: number;
859
- anti_air_mod?: number;
860
- evasion_mod?: number;
861
- asw_mod?: number;
862
- los_mod?: number;
863
- luck_mod?: number;
864
- day_gunfit_accuracy?: number;
865
- night_gunfit_accuracy?: number;
866
- custom_power_mods?: CustomPowerModifiers;
867
- }
868
-
869
- export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
870
-
871
- export type SlotSizeVec = (number | null)[];
872
-
873
- export type CompiledEvaler = string;
874
-
875
- export interface EquippabilityRule {
876
- ship: CompiledEvaler;
877
- keys?: string[];
878
- include?: string;
879
- exclude?: string;
880
- }
881
-
882
- export interface MasterEquippability {
883
- equip_stype: EquipStype[];
884
- equip_exslot: number[];
885
- equip_ship: MstEquipShip[];
886
- equip_exslot_ship: Record<number, MstEquipExslotShip>;
887
- rules: EquippabilityRule[];
888
- }
889
-
890
- export interface MstEquipExslotShip {
891
- api_ctypes: Record<number, number> | null;
892
- api_ship_ids: Record<number, number> | null;
893
- api_stypes: Record<number, number> | null;
894
- }
895
-
896
- export interface MstEquipShip {
897
- api_ship_id: number;
898
- api_equip_type: number[];
899
- }
900
-
901
- export interface EquipStype {
902
- id: number;
903
- equip_type: number[];
904
- }
905
-
906
- export interface CompAntiAirAnalysis {
907
- fleet_adjusted_anti_air: number;
908
- ships: AntiAirReport[];
909
- anti_air_cutin_chance: [number, number][];
910
- }
911
-
912
- export interface AntiAirReport {
913
- ship_id: number;
914
- role: Role;
915
- index: number;
916
- adjusted_anti_air: number | null;
917
- proportional_shotdown_rate: number | null;
918
- fixed_shotdown_number: number | null;
919
- guaranteed: number | null;
920
- anti_air_cutin_chance: [number, number][];
921
- anti_air_propellant_barrage_chance: number | null;
922
- }
923
-
924
- export type AirState =
925
- | "AirSupremacy"
926
- | "AirSuperiority"
927
- | "AirParity"
928
- | "AirDenial"
929
- | "AirIncapability";
930
-
931
- export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
932
-
933
- export interface FormationCombatModifiersDef {
934
- power_mod?: number;
935
- accuracy_mod?: number;
936
- evasion_mod?: number;
937
- }
938
-
939
- export interface FormationDef {
940
- tag: Formation;
941
- protection_rate: number | null;
942
- fleet_anti_air_mod: number;
943
- shelling: FormationCombatModifiersDef;
944
- torpedo: FormationCombatModifiersDef;
945
- asw: FormationCombatModifiersDef;
946
- night: FormationCombatModifiersDef;
947
- support_shelling: FormationCombatModifiersDef;
948
- }
949
-
950
- export type NestedFormationDef =
951
- | FormationDef
952
- | { top_half: FormationDef; bottom_half: FormationDef };
953
-
954
- export interface AntiAirCutinDef {
955
- id: number;
956
- type_factor: number | null;
957
- multiplier: number | null;
958
- guaranteed: number | null;
959
- sequential: boolean | null;
960
- }
961
-
962
- export interface DayCutinDef {
963
- tag: DayCutin;
964
- hits: number;
965
- type_factor: number | null;
966
- power_mod: number | null;
967
- accuracy_mod: number | null;
968
- }
969
-
970
- export interface HistoricalBonusDef {
971
- map?: number;
972
- node?: CompiledEvaler;
973
- phase?: number;
974
- debuff?: boolean;
975
- ship?: CompiledEvaler;
976
- enemy?: CompiledEvaler;
977
- power_mod?: AttackPowerModifier;
978
- armor_penetration?: number;
979
- accuracy_mod?: number;
980
- evasion_mod?: number;
981
- }
982
-
983
- export interface HistoricalParams {
984
- power_mod: AttackPowerModifier;
985
- armor_penetration: number;
986
- accuracy_mod: number;
987
- target_evasion_mod: number;
988
- }
989
-
990
- export interface NightCutinDef {
991
- tag: NightCutin;
992
- hits: number;
993
- type_factor: number | null;
994
- power_mod: number | null;
995
- accuracy_mod: number | null;
996
- }
997
-
998
- export interface BattleDefinitions {
999
- formation: Record<Formation, NestedFormationDef>;
1000
- anti_air_cutin: Record<number, AntiAirCutinDef>;
1001
- day_cutin: Record<DayCutin, DayCutinDef>;
1002
- night_cutin: Record<NightCutin, NightCutinDef>;
1003
- historical_bonuses: HistoricalBonusDef[];
1004
- }
1005
-
1006
- export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
1007
-
1008
- export type SingleFormation =
1009
- | "LineAhead"
1010
- | "DoubleLine"
1011
- | "Diamond"
1012
- | "Echelon"
1013
- | "LineAbreast"
1014
- | "Vanguard";
1015
-
1016
- export type CombinedFormation =
1017
- | "Cruising1"
1018
- | "Cruising2"
1019
- | "Cruising3"
1020
- | "Cruising4";
1021
-
1022
- export type Formation = SingleFormation | CombinedFormation;
1023
-
1024
- export interface OrgState {
1025
- id?: string;
1026
- f1?: FleetState;
1027
- f2?: FleetState;
1028
- f3?: FleetState;
1029
- f4?: FleetState;
1030
- a1?: AirSquadronState;
1031
- a2?: AirSquadronState;
1032
- a3?: AirSquadronState;
1033
- hq_level?: number;
1034
- org_type?: OrgType;
1035
- sortie?: FleetKey;
1036
- route_sup?: FleetKey;
1037
- boss_sup?: FleetKey;
1038
- }
1039
-
1040
- export type FleetKey = "f1" | "f2" | "f3" | "f4";
1041
-
1042
- export type Side = "Player" | "Enemy";
1043
-
1044
- export type Align = "Left" | "Right";
1045
-
1046
- export type SpeedGroup = "A" | "B1" | "B2" | "C";
1047
-
1048
- /**
1049
- */
1050
- export class AirSquadron {
1051
- free(): void;
1052
- /**
1053
- * @param {string} key
1054
- * @returns {Gear | undefined}
1055
- */
1056
- get_gear(key: string): Gear | undefined;
1057
- /**
1058
- * @param {number} index
1059
- * @returns {number}
1060
- */
1061
- get_slot_size(index: number): number;
1062
- /**
1063
- * @param {number} index
1064
- * @returns {number}
1065
- */
1066
- get_max_slot_size(index: number): number;
1067
- /**
1068
- * @returns {number}
1069
- */
1070
- fighter_power(): number;
1071
- /**
1072
- * @returns {number}
1073
- */
1074
- interception_power(): number;
1075
- /**
1076
- * 行動半径
1077
- * @returns {number}
1078
- */
1079
- radius(): number;
1080
- /**
1081
- */
1082
- hash: bigint;
1083
- /**
1084
- */
1085
- id: string;
1086
- /**
1087
- */
1088
- mode: AirSquadronMode;
1089
- }
1090
- /**
1091
- */
1092
- export class Analyzer {
1093
- free(): void;
1094
- /**
1095
- * @param {ShipAnalyzerConfig} config
1096
- * @param {Ship} left
1097
- * @param {Ship} right
1098
- * @param {boolean} attacker_is_left
1099
- * @returns {AttackAnalysis}
1100
- */
1101
- analyze_ship_attack(
1102
- config: ShipAnalyzerConfig,
1103
- left: Ship,
1104
- right: Ship,
1105
- attacker_is_left: boolean,
1106
- ): AttackAnalysis;
1107
- /**
1108
- * @param {NodeAttackAnalyzerConfig} config
1109
- * @param {Comp} left_comp
1110
- * @param {Ship} left_ship
1111
- * @param {Comp} right_comp
1112
- * @param {Ship} right_ship
1113
- * @returns {NodeAttackAnalysis}
1114
- */
1115
- analyze_node_attack(
1116
- config: NodeAttackAnalyzerConfig,
1117
- left_comp: Comp,
1118
- left_ship: Ship,
1119
- right_comp: Comp,
1120
- right_ship: Ship,
1121
- ): NodeAttackAnalysis;
1122
- /**
1123
- * @param {Comp} comp
1124
- * @param {CompAnalyzerConfig} config
1125
- * @returns {CompAnalysis}
1126
- */
1127
- analyze_comp(comp: Comp, config: CompAnalyzerConfig): CompAnalysis;
1128
- /**
1129
- * @param {Comp} player_comp
1130
- * @param {Comp} enemy_comp
1131
- * @param {NodeAttackAnalyzerConfig} config
1132
- * @param {number} times
1133
- * @returns {SimulatorResult}
1134
- */
1135
- simulate_support_shelling(
1136
- player_comp: Comp,
1137
- enemy_comp: Comp,
1138
- config: NodeAttackAnalyzerConfig,
1139
- times: number,
1140
- ): SimulatorResult;
1141
- }
1142
- /**
1143
- */
1144
- export class Comp {
1145
- free(): void;
1146
- /**
1147
- * @returns {Side}
1148
- */
1149
- side(): Side;
1150
- /**
1151
- * @returns {boolean}
1152
- */
1153
- is_combined(): boolean;
1154
- /**
1155
- * @returns {boolean}
1156
- */
1157
- is_player(): boolean;
1158
- /**
1159
- * @returns {boolean}
1160
- */
1161
- is_enemy(): boolean;
1162
- /**
1163
- * @param {string} id
1164
- * @returns {boolean}
1165
- */
1166
- has_ship_eid(id: string): boolean;
1167
- /**
1168
- * @returns {string | undefined}
1169
- */
1170
- first_ship_id(): string | undefined;
1171
- /**
1172
- * @returns {boolean}
1173
- */
1174
- has_route_sup(): boolean;
1175
- /**
1176
- * @returns {CompMeta}
1177
- */
1178
- meta(): CompMeta;
1179
- /**
1180
- * @param {FleetType} ft
1181
- * @returns {string | undefined}
1182
- */
1183
- get_fleet_id(ft: FleetType): string | undefined;
1184
- /**
1185
- * @param {FleetType} ft
1186
- * @param {ShipKey} key
1187
- * @returns {Ship | undefined}
1188
- */
1189
- get_ship_with_clone(ft: FleetType, key: ShipKey): Ship | undefined;
1190
- /**
1191
- * @param {FleetType} ft
1192
- * @param {ShipKey} key
1193
- * @returns {string | undefined}
1194
- */
1195
- get_ship_entity_id(ft: FleetType, key: ShipKey): string | undefined;
1196
- /**
1197
- * @param {string} id
1198
- * @returns {Ship | undefined}
1199
- */
1200
- get_ship_by_eid_with_clone(id: string): Ship | undefined;
1201
- /**
1202
- * @returns {Formation}
1203
- */
1204
- default_formation(): Formation;
1205
- /**
1206
- * 艦隊防空値
1207
- * @param {number} formation_mod
1208
- * @returns {number}
1209
- */
1210
- adjusted_anti_air(formation_mod: number): number;
1211
- /**
1212
- * 制空値
1213
- * @param {boolean} escort_participates
1214
- * @param {AirWaveType} air_type
1215
- * @returns {number | undefined}
1216
- */
1217
- fighter_power(
1218
- escort_participates: boolean,
1219
- air_type: AirWaveType,
1220
- ): number | undefined;
1221
- /**
1222
- * マップ索敵
1223
- * @param {number} node_divaricated_factor
1224
- * @returns {number | undefined}
1225
- */
1226
- elos(node_divaricated_factor: number): number | undefined;
1227
- /**
1228
- * 輸送物資量(TP)
1229
- * @returns {number}
1230
- */
1231
- transport_point(): number;
1232
- /**
1233
- * @param {Ship} ship
1234
- * @param {Formation | undefined} [formation]
1235
- * @returns {ShipConditions}
1236
- */
1237
- get_ship_conditions(ship: Ship, formation?: Formation): ShipConditions;
1238
- /**
1239
- * @param {FleetType} fleet_type
1240
- * @returns {number | undefined}
1241
- */
1242
- fleet_los_mod(fleet_type: FleetType): number | undefined;
1243
- /**
1244
- * @returns {number}
1245
- */
1246
- balloons(): number;
1247
- /**
1248
- */
1249
- boss_sup?: Fleet;
1250
- /**
1251
- */
1252
- escort?: Fleet;
1253
- /**
1254
- */
1255
- readonly hq_level: number;
1256
- /**
1257
- */
1258
- main: Fleet;
1259
- /**
1260
- */
1261
- readonly org_type: OrgType;
1262
- /**
1263
- */
1264
- route_sup?: Fleet;
1265
- }
1266
- /**
1267
- */
1268
- export class FhCore {
1269
- free(): void;
1270
- /**
1271
- * @param {MasterData} js_master
1272
- */
1273
- constructor(js_master: MasterData);
1274
- /**
1275
- * @param {GearState | undefined} [input]
1276
- * @returns {Gear | undefined}
1277
- */
1278
- create_gear(input?: GearState): Gear | undefined;
1279
- /**
1280
- * @param {ShipState | undefined} [input]
1281
- * @returns {Ship | undefined}
1282
- */
1283
- create_ship(input?: ShipState): Ship | undefined;
1284
- /**
1285
- * @param {AirSquadronState | undefined} [input]
1286
- * @returns {AirSquadron}
1287
- */
1288
- create_air_squadron(input?: AirSquadronState): AirSquadron;
1289
- /**
1290
- * @param {FleetState | undefined} [input]
1291
- * @returns {Fleet}
1292
- */
1293
- create_fleet(input?: FleetState): Fleet;
1294
- /**
1295
- * @param {OrgState | undefined} [input]
1296
- * @returns {Org | undefined}
1297
- */
1298
- create_org(input?: OrgState): Org | undefined;
1299
- /**
1300
- * @param {number} ship_id
1301
- * @returns {ShipState | undefined}
1302
- */
1303
- create_ship_state_by_id(ship_id: number): ShipState | undefined;
1304
- /**
1305
- * @param {number} ship_id
1306
- * @returns {Ship | undefined}
1307
- */
1308
- create_ship_by_id(ship_id: number): Ship | undefined;
1309
- /**
1310
- * @returns {Ship[]}
1311
- */
1312
- create_all_ships(): Ship[];
1313
- /**
1314
- * @param {Uint16Array} main
1315
- * @param {Uint16Array | undefined} [escort]
1316
- * @returns {Comp}
1317
- */
1318
- create_comp_by_map_enemy(main: Uint16Array, escort?: Uint16Array): Comp;
1319
- /**
1320
- * @returns {Ship}
1321
- */
1322
- create_default_ship(): Ship;
1323
- /**
1324
- * @returns {Analyzer}
1325
- */
1326
- create_analyzer(): Analyzer;
1327
- }
1328
- /**
1329
- */
1330
- export class Fleet {
1331
- free(): void;
1332
- /**
1333
- * @returns {FleetMeta}
1334
- */
1335
- meta(): FleetMeta;
1336
- /**
1337
- * @returns {(string)[]}
1338
- */
1339
- ship_keys(): string[];
1340
- /**
1341
- * @returns {(string)[]}
1342
- */
1343
- ship_ids(): string[];
1344
- /**
1345
- * @returns {(string)[]}
1346
- */
1347
- get_gear_ids_by_improvable(): string[];
1348
- /**
1349
- * @returns {(string)[]}
1350
- */
1351
- get_gear_ids_by_proficiency(): string[];
1352
- /**
1353
- * @param {string} id
1354
- * @param {DamageState} state
1355
- * @returns {number | undefined}
1356
- */
1357
- get_damage_bound(id: string, state: DamageState): number | undefined;
1358
- /**
1359
- * @param {string} id
1360
- * @param {number} rate
1361
- * @param {boolean} ceil
1362
- * @returns {number | undefined}
1363
- */
1364
- get_remaining_fuel(
1365
- id: string,
1366
- rate: number,
1367
- ceil: boolean,
1368
- ): number | undefined;
1369
- /**
1370
- * @param {string} id
1371
- * @param {number} rate
1372
- * @param {boolean} ceil
1373
- * @returns {number | undefined}
1374
- */
1375
- get_remaining_ammo(
1376
- id: string,
1377
- rate: number,
1378
- ceil: boolean,
1379
- ): number | undefined;
1380
- /**
1381
- * @returns {number}
1382
- */
1383
- count_ships(): number;
1384
- /**
1385
- * @param {ShipKey} key
1386
- * @returns {Ship | undefined}
1387
- */
1388
- get_ship(key: ShipKey): Ship | undefined;
1389
- /**
1390
- * @param {AirWaveType} air_type
1391
- * @returns {number | undefined}
1392
- */
1393
- fighter_power(air_type: AirWaveType): number | undefined;
1394
- /**
1395
- * マップ索敵
1396
- * @param {number} hq_level
1397
- * @param {number} node_divaricated_factor
1398
- * @returns {number | undefined}
1399
- */
1400
- elos(hq_level: number, node_divaricated_factor: number): number | undefined;
1401
- /**
1402
- * 航空索敵スコア
1403
- * @returns {number | undefined}
1404
- */
1405
- aviation_detection_score(): number | undefined;
1406
- /**
1407
- * 遠征ボーナス
1408
- * @returns {number}
1409
- */
1410
- expedition_bonus(): number;
1411
- /**
1412
- * @param {string} key
1413
- * @returns {number | undefined}
1414
- */
1415
- sum_ship_stat_by(key: string): number | undefined;
1416
- /**
1417
- */
1418
- reset_battle_state(): void;
1419
- /**
1420
- */
1421
- readonly fleet_los_mod: number | undefined;
1422
- /**
1423
- */
1424
- readonly hash: bigint;
1425
- /**
1426
- */
1427
- id: string;
1428
- /**
1429
- */
1430
- readonly len: number;
1431
- }
1432
- /**
1433
- */
1434
- export class Gear {
1435
- free(): void;
1436
- /**
1437
- * @returns {Gear}
1438
- */
1439
- static default(): Gear;
1440
- /**
1441
- * @param {GearAttr} attr
1442
- * @returns {boolean}
1443
- */
1444
- has_attr(attr: GearAttr): boolean;
1445
- /**
1446
- * @returns {GearCategory}
1447
- */
1448
- category(): GearCategory;
1449
- /**
1450
- * @returns {boolean}
1451
- */
1452
- is_high_angle_mount(): boolean;
1453
- /**
1454
- * @returns {boolean}
1455
- */
1456
- is_carrier_shelling_plane(): boolean;
1457
- /**
1458
- * @returns {boolean}
1459
- */
1460
- is_hayabusa_20th_squadron(): boolean;
1461
- /**
1462
- * @returns {boolean}
1463
- */
1464
- has_proficiency(): boolean;
1465
- /**
1466
- * @returns {boolean}
1467
- */
1468
- max_exp_eq_120(): boolean;
1469
- /**
1470
- * @param {number} slot_size
1471
- * @returns {number}
1472
- */
1473
- calc_fighter_power(slot_size: number): number;
1474
- /**
1475
- * @param {number} slot_size
1476
- * @returns {number}
1477
- */
1478
- calc_interception_power(slot_size: number): number;
1479
- /**
1480
- * @returns {number}
1481
- */
1482
- fleet_anti_air_mod(): number;
1483
- /**
1484
- * @returns {number}
1485
- */
1486
- ship_anti_air_mod(): number;
1487
- /**
1488
- * @param {number} slot_size
1489
- * @returns {number}
1490
- */
1491
- calc_contact_trigger_factor(slot_size: number): number;
1492
- /**
1493
- * @param {AirStateRank} rank
1494
- * @returns {number}
1495
- */
1496
- contact_selection_rate(rank: AirStateRank): number;
1497
- /**
1498
- * @param {number} level
1499
- * @returns {number}
1500
- */
1501
- night_contact_rate(level: number): number;
1502
- /**
1503
- * @returns {boolean}
1504
- */
1505
- is_night_attacker(): boolean;
1506
- /**
1507
- * @returns {boolean}
1508
- */
1509
- is_night_fighter(): boolean;
1510
- /**
1511
- * @returns {boolean}
1512
- */
1513
- is_night_plane(): boolean;
1514
- /**
1515
- * @param {number} slot_size
1516
- * @param {boolean} anti_inst
1517
- * @returns {number}
1518
- */
1519
- night_plane_power(slot_size: number, anti_inst: boolean): number;
1520
- /**
1521
- * @returns {number}
1522
- */
1523
- elos(): number;
1524
- /**
1525
- * @returns {boolean}
1526
- */
1527
- is_abyssal(): boolean;
1528
- /**
1529
- * @returns {boolean}
1530
- */
1531
- is_abyssal_cuttlefish_torpedo(): boolean;
1532
- /**
1533
- * @returns {boolean}
1534
- */
1535
- is_abyssal_patrolling_attack_hawk(): boolean;
1536
- /**
1537
- * @returns {number}
1538
- */
1539
- expedition_bonus(): number;
1540
- /**
1541
- * @returns {boolean}
1542
- */
1543
- can_be_deployed_to_land_base(): boolean;
1544
- /**
1545
- * @returns {boolean}
1546
- */
1547
- is_balloon(): boolean;
1548
- /**
1549
- */
1550
- readonly accuracy: number;
1551
- /**
1552
- */
1553
- readonly ace: number;
1554
- /**
1555
- */
1556
- readonly anti_air: number;
1557
- /**
1558
- */
1559
- readonly anti_bomber: number;
1560
- /**
1561
- */
1562
- readonly armor: number;
1563
- /**
1564
- */
1565
- readonly asw: number;
1566
- /**
1567
- */
1568
- readonly bombing: number;
1569
- /**
1570
- */
1571
- readonly cost: number;
1572
- /**
1573
- */
1574
- readonly default_exp: number;
1575
- /**
1576
- */
1577
- readonly evasion: number;
1578
- /**
1579
- */
1580
- readonly exp: number;
1581
- /**
1582
- */
1583
- readonly firepower: number;
1584
- /**
1585
- */
1586
- readonly fleet_anti_air_resist: number;
1587
- /**
1588
- */
1589
- readonly gear_id: number;
1590
- /**
1591
- */
1592
- readonly gear_type: GearType;
1593
- /**
1594
- */
1595
- readonly gear_type_id: number;
1596
- /**
1597
- */
1598
- readonly hash: bigint;
1599
- /**
1600
- */
1601
- readonly icon_id: number;
1602
- /**
1603
- */
1604
- id: string;
1605
- /**
1606
- */
1607
- readonly improvable: boolean;
1608
- /**
1609
- */
1610
- readonly interception: number;
1611
- /**
1612
- */
1613
- readonly los: number;
1614
- /**
1615
- */
1616
- readonly luck: number;
1617
- /**
1618
- */
1619
- readonly max_hp: number;
1620
- /**
1621
- */
1622
- name: string;
1623
- /**
1624
- */
1625
- readonly radius: number;
1626
- /**
1627
- */
1628
- readonly range: number;
1629
- /**
1630
- */
1631
- readonly ship_anti_air_resist: number;
1632
- /**
1633
- */
1634
- readonly special_type: number;
1635
- /**
1636
- */
1637
- readonly speed: number;
1638
- /**
1639
- */
1640
- readonly stars: number;
1641
- /**
1642
- */
1643
- readonly torpedo: number;
1644
- /**
1645
- */
1646
- types: Uint8Array;
1647
- }
1648
- /**
1649
- */
1650
- export class Org {
1651
- free(): void;
1652
- /**
1653
- * @returns {string | undefined}
1654
- */
1655
- first_ship_id(): string | undefined;
1656
- /**
1657
- * @param {FleetKey} fleet_key
1658
- * @param {ShipKey} ship_key
1659
- * @returns {number | undefined}
1660
- */
1661
- get_ship_mid(fleet_key: FleetKey, ship_key: ShipKey): number | undefined;
1662
- /**
1663
- * @param {FleetKey} fleet_key
1664
- * @param {ShipKey} ship_key
1665
- * @returns {string | undefined}
1666
- */
1667
- get_ship_eid(fleet_key: FleetKey, ship_key: ShipKey): string | undefined;
1668
- /**
1669
- * @param {FleetKey} key
1670
- * @returns {string}
1671
- */
1672
- get_fleet_id(key: FleetKey): string;
1673
- /**
1674
- * @returns {(string)[]}
1675
- */
1676
- air_squadron_ids(): string[];
1677
- /**
1678
- * @returns {Uint16Array}
1679
- */
1680
- main_ship_ids(): Uint16Array;
1681
- /**
1682
- * @returns {Uint16Array}
1683
- */
1684
- escort_ship_ids(): Uint16Array;
1685
- /**
1686
- * @param {FleetKey} key
1687
- * @returns {Fleet}
1688
- */
1689
- clone_fleet(key: FleetKey): Fleet;
1690
- /**
1691
- * @param {FleetKey} fleet_key
1692
- * @param {ShipKey} ship_key
1693
- * @returns {Ship | undefined}
1694
- */
1695
- clone_ship(fleet_key: FleetKey, ship_key: ShipKey): Ship | undefined;
1696
- /**
1697
- * @param {string} id
1698
- * @returns {Ship | undefined}
1699
- */
1700
- get_ship_by_id(id: string): Ship | undefined;
1701
- /**
1702
- * @param {FleetKey} key
1703
- * @returns {(string)[]}
1704
- */
1705
- ship_keys(key: FleetKey): string[];
1706
- /**
1707
- * @returns {Comp}
1708
- */
1709
- create_comp(): Comp;
1710
- /**
1711
- * @param {FleetKey} key
1712
- * @returns {Comp}
1713
- */
1714
- create_comp_by_key(key: FleetKey): Comp;
1715
- /**
1716
- * @param {string} key
1717
- * @returns {AirSquadron}
1718
- */
1719
- get_air_squadron(key: string): AirSquadron;
1720
- /**
1721
- * @returns {(string)[]}
1722
- */
1723
- get_air_squadron_gear_ids_by_improvable(): string[];
1724
- /**
1725
- * @returns {(string)[]}
1726
- */
1727
- get_air_squadron_gear_ids_by_proficiency(): string[];
1728
- /**
1729
- * @returns {Side}
1730
- */
1731
- side(): Side;
1732
- /**
1733
- * @returns {boolean}
1734
- */
1735
- is_player(): boolean;
1736
- /**
1737
- * @returns {boolean}
1738
- */
1739
- is_enemy(): boolean;
1740
- /**
1741
- * @returns {boolean}
1742
- */
1743
- is_single(): boolean;
1744
- /**
1745
- * @returns {boolean}
1746
- */
1747
- is_combined(): boolean;
1748
- /**
1749
- * 防空時の基地制空値
1750
- * @returns {number}
1751
- */
1752
- interception_power(): number;
1753
- /**
1754
- * 高高度迎撃時の基地制空値
1755
- * @returns {number}
1756
- */
1757
- high_altitude_interception_power(): number;
1758
- /**
1759
- * @param {string} id
1760
- * @param {number} x
1761
- * @param {number} y
1762
- * @returns {MoveShipPayload | undefined}
1763
- */
1764
- create_move_ship_payload(
1765
- id: string,
1766
- x: number,
1767
- y: number,
1768
- ): MoveShipPayload | undefined;
1769
- /**
1770
- * @param {FleetKey} key
1771
- * @returns {FleetType | undefined}
1772
- */
1773
- get_fleet_type(key: FleetKey): FleetType | undefined;
1774
- /**
1775
- */
1776
- readonly boss_sup: FleetKey | undefined;
1777
- /**
1778
- */
1779
- readonly hash: bigint;
1780
- /**
1781
- */
1782
- readonly hq_level: number;
1783
- /**
1784
- */
1785
- id: string;
1786
- /**
1787
- */
1788
- readonly org_type: OrgType;
1789
- /**
1790
- */
1791
- readonly route_sup: FleetKey | undefined;
1792
- /**
1793
- */
1794
- readonly sortie: FleetKey;
1795
- }
1796
- /**
1797
- */
1798
- export class Ship {
1799
- free(): void;
1800
- /**
1801
- * @returns {Ship}
1802
- */
1803
- static default(): Ship;
1804
- /**
1805
- * @param {string} id
1806
- * @returns {boolean}
1807
- */
1808
- eq_id(id: string): boolean;
1809
- /**
1810
- * @returns {ShipState}
1811
- */
1812
- state(): ShipState;
1813
- /**
1814
- * @returns {CustomPowerModifiers}
1815
- */
1816
- custom_power_mods(): CustomPowerModifiers;
1817
- /**
1818
- * @returns {ShipMeta}
1819
- */
1820
- meta(): ShipMeta;
1821
- /**
1822
- * @returns {DamageState}
1823
- */
1824
- damage_state(): DamageState;
1825
- /**
1826
- * @returns {MoraleState}
1827
- */
1828
- morale_state(): MoraleState;
1829
- /**
1830
- * @returns {ShipCategory}
1831
- */
1832
- category(): ShipCategory;
1833
- /**
1834
- * @param {ShipAttr} attr
1835
- * @returns {boolean}
1836
- */
1837
- has_attr(attr: ShipAttr): boolean;
1838
- /**
1839
- * @returns {(string)[]}
1840
- */
1841
- gear_keys(): string[];
1842
- /**
1843
- * @param {string} key
1844
- * @returns {Gear | undefined}
1845
- */
1846
- get_gear(key: string): Gear | undefined;
1847
- /**
1848
- * @param {DamageState} state
1849
- * @returns {number | undefined}
1850
- */
1851
- get_damage_bound(state: DamageState): number | undefined;
1852
- /**
1853
- * @param {number} rate
1854
- * @param {boolean} ceil
1855
- * @returns {number}
1856
- */
1857
- get_remaining_fuel(rate: number, ceil: boolean): number;
1858
- /**
1859
- * @param {number} rate
1860
- * @param {boolean} ceil
1861
- * @returns {number}
1862
- */
1863
- get_remaining_ammo(rate: number, ceil: boolean): number;
1864
- /**
1865
- * @param {string} key
1866
- * @returns {boolean}
1867
- */
1868
- has_unknown_stat(key: string): boolean;
1869
- /**
1870
- * @param {string} key
1871
- * @returns {number | undefined}
1872
- */
1873
- get_naked_stat(key: string): number | undefined;
1874
- /**
1875
- * @param {string} key
1876
- * @returns {number | undefined}
1877
- */
1878
- get_stat_interval_left(key: string): number | undefined;
1879
- /**
1880
- * @param {string} key
1881
- * @returns {number | undefined}
1882
- */
1883
- get_stat_interval_right(key: string): number | undefined;
1884
- /**
1885
- * @param {string} key
1886
- * @returns {number}
1887
- */
1888
- get_gear_stat(key: string): number;
1889
- /**
1890
- * @param {string} key
1891
- * @returns {number}
1892
- */
1893
- get_ebonus(key: string): number;
1894
- /**
1895
- * @param {string} key
1896
- * @returns {number | undefined}
1897
- */
1898
- get_stat_mod(key: string): number | undefined;
1899
- /**
1900
- * @returns {boolean}
1901
- */
1902
- is_abyssal(): boolean;
1903
- /**
1904
- * @returns {boolean}
1905
- */
1906
- is_submarine(): boolean;
1907
- /**
1908
- * @returns {boolean}
1909
- */
1910
- is_amagiri(): boolean;
1911
- /**
1912
- * @param {Gear} gear
1913
- * @param {string} key
1914
- * @returns {boolean}
1915
- */
1916
- can_equip(gear: Gear, key: string): boolean;
1917
- /**
1918
- * @returns {boolean}
1919
- */
1920
- is_installation(): boolean;
1921
- /**
1922
- * @returns {boolean}
1923
- */
1924
- is_pt_imp(): boolean;
1925
- /**
1926
- * @returns {SpecialEnemyType}
1927
- */
1928
- special_enemy_type(): SpecialEnemyType;
1929
- /**
1930
- * @returns {boolean}
1931
- */
1932
- is_attackable_by_torpedo(): boolean;
1933
- /**
1934
- * @param {number} index
1935
- * @returns {number | undefined}
1936
- */
1937
- get_slot_size(index: number): number | undefined;
1938
- /**
1939
- * @param {number} index
1940
- * @returns {number | undefined}
1941
- */
1942
- get_max_slot_size(index: number): number | undefined;
1943
- /**
1944
- * @returns {number}
1945
- */
1946
- remaining_ammo_mod(): number;
1947
- /**
1948
- * @returns {number}
1949
- */
1950
- remaining_fuel_mod(): number;
1951
- /**
1952
- * @param {AirWaveType} air_type
1953
- * @returns {number | undefined}
1954
- */
1955
- fighter_power(air_type: AirWaveType): number | undefined;
1956
- /**
1957
- * @returns {number | undefined}
1958
- */
1959
- fleet_los_factor(): number | undefined;
1960
- /**
1961
- * 加重対空
1962
- * @param {Side} side
1963
- * @returns {number | undefined}
1964
- */
1965
- ship_adjusted_anti_air(side: Side): number | undefined;
1966
- /**
1967
- * 艦隊対空補正
1968
- * @returns {number}
1969
- */
1970
- fleet_anti_air_mod(): number;
1971
- /**
1972
- * @returns {number}
1973
- */
1974
- cruiser_fit_bonus(): number;
1975
- /**
1976
- * @returns {number | undefined}
1977
- */
1978
- basic_accuracy_term(): number | undefined;
1979
- /**
1980
- * @returns {number | undefined}
1981
- */
1982
- basic_evasion_term(): number | undefined;
1983
- /**
1984
- * @param {number} formation_mod
1985
- * @param {number} postcap_additive
1986
- * @param {number} postcap_multiplicative
1987
- * @returns {number | undefined}
1988
- */
1989
- evasion_term(
1990
- formation_mod: number,
1991
- postcap_additive: number,
1992
- postcap_multiplicative: number,
1993
- ): number | undefined;
1994
- /**
1995
- * @param {number} armor_penetration
1996
- * @returns {number | undefined}
1997
- */
1998
- basic_defense_power(armor_penetration: number): number | undefined;
1999
- /**
2000
- * @returns {number}
2001
- */
2002
- transport_point(): number;
2003
- /**
2004
- * @param {number} node_divaricated_factor
2005
- * @returns {number | undefined}
2006
- */
2007
- elos(node_divaricated_factor: number): number | undefined;
2008
- /**
2009
- * 確殺攻撃力
2010
- * @returns {number | undefined}
2011
- */
2012
- ohko_power(): number | undefined;
2013
- /**
2014
- * @returns {number | undefined}
2015
- */
2016
- state_day_gunfit_accuracy(): number | undefined;
2017
- /**
2018
- * @returns {number | undefined}
2019
- */
2020
- state_night_gunfit_accuracy(): number | undefined;
2021
- /**
2022
- * フィット砲補正
2023
- * @param {boolean} is_night
2024
- * @returns {number}
2025
- */
2026
- gunfit_accuracy(is_night: boolean): number;
2027
- /**
2028
- */
2029
- readonly accuracy: number;
2030
- /**
2031
- */
2032
- readonly ammo: number;
2033
- /**
2034
- */
2035
- readonly anti_air: number | undefined;
2036
- /**
2037
- */
2038
- readonly armor: number | undefined;
2039
- /**
2040
- */
2041
- readonly asw: number | undefined;
2042
- /**
2043
- */
2044
- readonly ctype: number;
2045
- /**
2046
- */
2047
- readonly current_hp: number;
2048
- /**
2049
- */
2050
- readonly evasion: number | undefined;
2051
- /**
2052
- */
2053
- readonly firepower: number | undefined;
2054
- /**
2055
- */
2056
- readonly fuel: number;
2057
- /**
2058
- */
2059
- readonly hash: bigint;
2060
- /**
2061
- */
2062
- id: string;
2063
- /**
2064
- */
2065
- readonly innate_torpedo_accuracy: number;
2066
- /**
2067
- */
2068
- readonly level: number;
2069
- /**
2070
- */
2071
- readonly los: number | undefined;
2072
- /**
2073
- */
2074
- readonly luck: number | undefined;
2075
- /**
2076
- */
2077
- readonly max_ammo: number;
2078
- /**
2079
- */
2080
- readonly max_fuel: number;
2081
- /**
2082
- */
2083
- readonly max_hp: number | undefined;
2084
- /**
2085
- */
2086
- readonly morale: number;
2087
- /**
2088
- */
2089
- readonly naked_anti_air: number | undefined;
2090
- /**
2091
- */
2092
- readonly naked_armor: number | undefined;
2093
- /**
2094
- */
2095
- readonly naked_asw: number | undefined;
2096
- /**
2097
- */
2098
- readonly naked_evasion: number | undefined;
2099
- /**
2100
- */
2101
- readonly naked_firepower: number | undefined;
2102
- /**
2103
- */
2104
- readonly naked_los: number | undefined;
2105
- /**
2106
- */
2107
- readonly naked_range: number | undefined;
2108
- /**
2109
- */
2110
- readonly naked_speed: number;
2111
- /**
2112
- */
2113
- readonly naked_torpedo: number | undefined;
2114
- /**
2115
- */
2116
- readonly name: string;
2117
- /**
2118
- */
2119
- readonly next_id: number;
2120
- /**
2121
- */
2122
- readonly range: number | undefined;
2123
- /**
2124
- */
2125
- readonly remodel_rank: number;
2126
- /**
2127
- */
2128
- readonly ship_id: number;
2129
- /**
2130
- */
2131
- readonly ship_type: ShipType;
2132
- /**
2133
- */
2134
- readonly slotnum: number;
2135
- /**
2136
- */
2137
- slots: SlotSizeVec;
2138
- /**
2139
- */
2140
- readonly sort_id: number;
2141
- /**
2142
- */
2143
- readonly speed: number;
2144
- /**
2145
- */
2146
- readonly stype: number;
2147
- /**
2148
- */
2149
- readonly torpedo: number | undefined;
2150
- /**
2151
- */
2152
- readonly useful: boolean;
2153
- /**
2154
- */
2155
- readonly yomi: string;
2156
- }