fleethub-core 0.4.4 → 0.5.0
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.
- package/bindings.d.ts +5 -7
- package/node/fh_core.d.ts +86 -125
- package/node/fh_core.js +403 -205
- package/node/fh_core_bg.wasm +0 -0
- package/node/fh_core_bg.wasm.d.ts +109 -69
- package/package.json +1 -1
- package/pkg/fh_core.d.ts +86 -125
- package/pkg/fh_core_bg.js +403 -205
- package/pkg/fh_core_bg.wasm +0 -0
- package/pkg/fh_core_bg.wasm.d.ts +109 -69
package/bindings.d.ts
CHANGED
|
@@ -753,7 +753,7 @@ export interface FleetDayCutinRateInfo {
|
|
|
753
753
|
ships: Array<ShipDayCutinRateInfo>;
|
|
754
754
|
}
|
|
755
755
|
|
|
756
|
-
export interface
|
|
756
|
+
export interface CompDayCutinRateInfo {
|
|
757
757
|
main: FleetDayCutinRateInfo;
|
|
758
758
|
escort: FleetDayCutinRateInfo | null;
|
|
759
759
|
}
|
|
@@ -768,7 +768,7 @@ export interface ShipAntiAirInfo {
|
|
|
768
768
|
anti_air_propellant_barrage_chance: number | null;
|
|
769
769
|
}
|
|
770
770
|
|
|
771
|
-
export interface
|
|
771
|
+
export interface CompAntiAirInfo {
|
|
772
772
|
fleet_anti_air: number;
|
|
773
773
|
ships: Array<ShipAntiAirInfo>;
|
|
774
774
|
anti_air_cutin_chance: Array<[number, number]>;
|
|
@@ -806,15 +806,11 @@ export interface AirstrikeContactChance {
|
|
|
806
806
|
total: number;
|
|
807
807
|
}
|
|
808
808
|
|
|
809
|
-
export interface
|
|
809
|
+
export interface CompContactChanceInfo {
|
|
810
810
|
single: Array<AirstrikeContactChance> | null;
|
|
811
811
|
combined: Array<AirstrikeContactChance> | null;
|
|
812
812
|
}
|
|
813
813
|
|
|
814
|
-
export interface OrgAirstrikeInfo {
|
|
815
|
-
contact_chance: OrgContactChanceInfo;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
814
|
export interface AttackStats {
|
|
819
815
|
attack_power: AttackPower | null;
|
|
820
816
|
attack_power_params: AttackPowerParams | null;
|
|
@@ -911,3 +907,5 @@ export interface SimulatorResult {
|
|
|
911
907
|
items: Array<SimulatorResultItem>;
|
|
912
908
|
sunk_vec: Array<[number, number, number]>;
|
|
913
909
|
}
|
|
910
|
+
|
|
911
|
+
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
package/node/fh_core.d.ts
CHANGED
|
@@ -71,13 +71,11 @@ export class AirSquadron {
|
|
|
71
71
|
*/
|
|
72
72
|
radius(): number;
|
|
73
73
|
/**
|
|
74
|
-
* @returns {string}
|
|
75
74
|
*/
|
|
76
75
|
id: string;
|
|
77
76
|
/**
|
|
78
|
-
* @returns {bindings.AirSquadronMode}
|
|
79
77
|
*/
|
|
80
|
-
|
|
78
|
+
mode: bindings.AirSquadronMode;
|
|
81
79
|
/**
|
|
82
80
|
* @returns {string}
|
|
83
81
|
*/
|
|
@@ -122,23 +120,47 @@ export class Comp {
|
|
|
122
120
|
*/
|
|
123
121
|
get_ship_by_eid_with_clone(id: string): Ship | undefined;
|
|
124
122
|
/**
|
|
125
|
-
* @returns {
|
|
123
|
+
* @returns {bindings.Formation}
|
|
124
|
+
*/
|
|
125
|
+
default_formation(): bindings.Formation;
|
|
126
|
+
/**
|
|
127
|
+
* 艦隊対空値
|
|
128
|
+
* @param {number} formation_mod
|
|
129
|
+
* @returns {number}
|
|
130
|
+
*/
|
|
131
|
+
fleet_anti_air(formation_mod: number): number;
|
|
132
|
+
/**
|
|
133
|
+
* 制空値
|
|
134
|
+
* @param {boolean} anti_combined
|
|
135
|
+
* @param {boolean} anti_lbas
|
|
136
|
+
* @returns {number | undefined}
|
|
137
|
+
*/
|
|
138
|
+
fighter_power(anti_combined: boolean, anti_lbas: boolean): number | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* マップ索敵
|
|
141
|
+
* @param {number} hq_level
|
|
142
|
+
* @param {number} node_divaricated_factor
|
|
143
|
+
* @returns {number | undefined}
|
|
144
|
+
*/
|
|
145
|
+
elos(hq_level: number, node_divaricated_factor: number): number | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* 輸送物資量(TP)
|
|
148
|
+
* @returns {number}
|
|
149
|
+
*/
|
|
150
|
+
transport_point(): number;
|
|
151
|
+
/**
|
|
126
152
|
*/
|
|
127
153
|
boss_sup?: Fleet;
|
|
128
154
|
/**
|
|
129
|
-
* @returns {Fleet | undefined}
|
|
130
155
|
*/
|
|
131
156
|
escort?: Fleet;
|
|
132
157
|
/**
|
|
133
|
-
* @returns {Fleet}
|
|
134
158
|
*/
|
|
135
159
|
main: Fleet;
|
|
136
160
|
/**
|
|
137
|
-
* @returns {bindings.OrgType}
|
|
138
161
|
*/
|
|
139
162
|
org_type: bindings.OrgType;
|
|
140
163
|
/**
|
|
141
|
-
* @returns {Fleet | undefined}
|
|
142
164
|
*/
|
|
143
165
|
route_sup?: Fleet;
|
|
144
166
|
}
|
|
@@ -182,42 +204,39 @@ export class FhCore {
|
|
|
182
204
|
*/
|
|
183
205
|
create_ship_by_id(ship_id: number): Ship | undefined;
|
|
184
206
|
/**
|
|
185
|
-
* @
|
|
207
|
+
* @param {Uint16Array} main
|
|
208
|
+
* @param {Uint16Array | undefined} escort
|
|
186
209
|
*/
|
|
187
|
-
|
|
210
|
+
create_comp_by_map_enemy(main: Uint16Array, escort?: Uint16Array): void;
|
|
188
211
|
/**
|
|
189
|
-
* @returns {
|
|
212
|
+
* @returns {Ship}
|
|
190
213
|
*/
|
|
191
|
-
|
|
214
|
+
create_default_ship(): Ship;
|
|
192
215
|
/**
|
|
193
|
-
* @param {
|
|
194
|
-
* @param {string} key
|
|
216
|
+
* @param {Comp} comp
|
|
195
217
|
* @param {bindings.Formation} formation
|
|
196
218
|
* @param {number | undefined} adjusted_anti_air_resist
|
|
197
219
|
* @param {number | undefined} fleet_anti_air_resist
|
|
198
|
-
* @returns {
|
|
220
|
+
* @returns {bindings.CompAntiAirInfo}
|
|
199
221
|
*/
|
|
200
|
-
analyze_anti_air(
|
|
222
|
+
analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist?: number, fleet_anti_air_resist?: number): bindings.CompAntiAirInfo;
|
|
201
223
|
/**
|
|
202
|
-
* @param {
|
|
203
|
-
* @
|
|
204
|
-
* @returns {any}
|
|
224
|
+
* @param {Comp} comp
|
|
225
|
+
* @returns {bindings.CompDayCutinRateInfo}
|
|
205
226
|
*/
|
|
206
|
-
analyze_day_cutin(
|
|
227
|
+
analyze_day_cutin(comp: Comp): bindings.CompDayCutinRateInfo;
|
|
207
228
|
/**
|
|
208
|
-
* @param {
|
|
209
|
-
* @param {string} key
|
|
229
|
+
* @param {Comp} comp
|
|
210
230
|
* @param {bindings.NightSituation} attacker_situation
|
|
211
|
-
* @param {bindings.NightSituation}
|
|
212
|
-
* @returns {
|
|
231
|
+
* @param {bindings.NightSituation} target_situation
|
|
232
|
+
* @returns {bindings.FleetNightCutinRateInfo}
|
|
213
233
|
*/
|
|
214
|
-
analyze_night_cutin(
|
|
234
|
+
analyze_night_cutin(comp: Comp, attacker_situation: bindings.NightSituation, target_situation: bindings.NightSituation): bindings.FleetNightCutinRateInfo;
|
|
215
235
|
/**
|
|
216
|
-
* @param {
|
|
217
|
-
* @
|
|
218
|
-
* @returns {any}
|
|
236
|
+
* @param {Comp} comp
|
|
237
|
+
* @returns {bindings.CompContactChanceInfo}
|
|
219
238
|
*/
|
|
220
|
-
analyze_contact_chance(
|
|
239
|
+
analyze_contact_chance(comp: Comp): bindings.CompContactChanceInfo;
|
|
221
240
|
/**
|
|
222
241
|
* @param {bindings.WarfareAnalyzerContext} params
|
|
223
242
|
* @param {Ship} attacker
|
|
@@ -226,12 +245,11 @@ export class FhCore {
|
|
|
226
245
|
*/
|
|
227
246
|
analyze_warfare(params: bindings.WarfareAnalyzerContext, attacker: Ship, target: Ship): bindings.WarfareInfo;
|
|
228
247
|
/**
|
|
229
|
-
* @param {
|
|
230
|
-
* @param {string} key
|
|
248
|
+
* @param {Comp} comp
|
|
231
249
|
* @param {bindings.Engagement} engagement
|
|
232
250
|
* @returns {bindings.FleetCutinAnalysis}
|
|
233
251
|
*/
|
|
234
|
-
analyze_fleet_cutin(
|
|
252
|
+
analyze_fleet_cutin(comp: Comp, engagement: bindings.Engagement): bindings.FleetCutinAnalysis;
|
|
235
253
|
/**
|
|
236
254
|
* @param {Comp} player
|
|
237
255
|
* @param {Comp} enemy
|
|
@@ -329,13 +347,11 @@ export class Fleet {
|
|
|
329
347
|
*/
|
|
330
348
|
readonly fleet_los_mod: number | undefined;
|
|
331
349
|
/**
|
|
332
|
-
* @returns {string}
|
|
333
350
|
*/
|
|
334
351
|
id: string;
|
|
335
352
|
/**
|
|
336
|
-
* @returns {number}
|
|
337
353
|
*/
|
|
338
|
-
|
|
354
|
+
len: number;
|
|
339
355
|
/**
|
|
340
356
|
* @returns {string}
|
|
341
357
|
*/
|
|
@@ -438,69 +454,55 @@ export class Gear {
|
|
|
438
454
|
*/
|
|
439
455
|
expedition_bonus(): number;
|
|
440
456
|
/**
|
|
441
|
-
* @returns {number}
|
|
442
457
|
*/
|
|
443
|
-
|
|
458
|
+
accuracy: number;
|
|
444
459
|
/**
|
|
445
460
|
* @returns {number}
|
|
446
461
|
*/
|
|
447
462
|
readonly ace: number;
|
|
448
463
|
/**
|
|
449
|
-
* @returns {number}
|
|
450
464
|
*/
|
|
451
|
-
|
|
465
|
+
adjusted_anti_air_resistance: number;
|
|
452
466
|
/**
|
|
453
|
-
* @returns {number}
|
|
454
467
|
*/
|
|
455
|
-
|
|
468
|
+
anti_air: number;
|
|
456
469
|
/**
|
|
457
470
|
* @returns {number}
|
|
458
471
|
*/
|
|
459
472
|
readonly anti_bomber: number;
|
|
460
473
|
/**
|
|
461
|
-
* @returns {number}
|
|
462
474
|
*/
|
|
463
|
-
|
|
475
|
+
armor: number;
|
|
464
476
|
/**
|
|
465
|
-
* @returns {number}
|
|
466
477
|
*/
|
|
467
|
-
|
|
478
|
+
asw: number;
|
|
468
479
|
/**
|
|
469
|
-
* @returns {number}
|
|
470
480
|
*/
|
|
471
|
-
|
|
481
|
+
bombing: number;
|
|
472
482
|
/**
|
|
473
|
-
* @returns {number}
|
|
474
483
|
*/
|
|
475
|
-
|
|
484
|
+
cost: number;
|
|
476
485
|
/**
|
|
477
|
-
* @returns {number}
|
|
478
486
|
*/
|
|
479
|
-
|
|
487
|
+
default_exp: number;
|
|
480
488
|
/**
|
|
481
|
-
* @returns {number}
|
|
482
489
|
*/
|
|
483
|
-
|
|
490
|
+
evasion: number;
|
|
484
491
|
/**
|
|
485
|
-
* @returns {number}
|
|
486
492
|
*/
|
|
487
|
-
|
|
493
|
+
exp: number;
|
|
488
494
|
/**
|
|
489
|
-
* @returns {number}
|
|
490
495
|
*/
|
|
491
|
-
|
|
496
|
+
firepower: number;
|
|
492
497
|
/**
|
|
493
|
-
* @returns {number}
|
|
494
498
|
*/
|
|
495
|
-
|
|
499
|
+
fleet_anti_air_resistance: number;
|
|
496
500
|
/**
|
|
497
|
-
* @returns {number}
|
|
498
501
|
*/
|
|
499
|
-
|
|
502
|
+
gear_id: number;
|
|
500
503
|
/**
|
|
501
|
-
* @returns {bindings.GearType}
|
|
502
504
|
*/
|
|
503
|
-
|
|
505
|
+
gear_type: bindings.GearType;
|
|
504
506
|
/**
|
|
505
507
|
* @returns {number}
|
|
506
508
|
*/
|
|
@@ -510,57 +512,46 @@ export class Gear {
|
|
|
510
512
|
*/
|
|
511
513
|
readonly icon_id: number;
|
|
512
514
|
/**
|
|
513
|
-
* @returns {string}
|
|
514
515
|
*/
|
|
515
516
|
id: string;
|
|
516
517
|
/**
|
|
517
|
-
* @returns {boolean}
|
|
518
518
|
*/
|
|
519
|
-
|
|
519
|
+
improvable: boolean;
|
|
520
520
|
/**
|
|
521
521
|
* @returns {number}
|
|
522
522
|
*/
|
|
523
523
|
readonly interception: number;
|
|
524
524
|
/**
|
|
525
|
-
* @returns {number}
|
|
526
525
|
*/
|
|
527
|
-
|
|
526
|
+
los: number;
|
|
528
527
|
/**
|
|
529
|
-
* @returns {number}
|
|
530
528
|
*/
|
|
531
|
-
|
|
529
|
+
luck: number;
|
|
532
530
|
/**
|
|
533
|
-
* @returns {number}
|
|
534
531
|
*/
|
|
535
|
-
|
|
532
|
+
max_hp: number;
|
|
536
533
|
/**
|
|
537
|
-
* @returns {string}
|
|
538
534
|
*/
|
|
539
535
|
name: string;
|
|
540
536
|
/**
|
|
541
|
-
* @returns {number}
|
|
542
537
|
*/
|
|
543
|
-
|
|
538
|
+
radius: number;
|
|
544
539
|
/**
|
|
545
|
-
* @returns {number}
|
|
546
540
|
*/
|
|
547
|
-
|
|
541
|
+
range: number;
|
|
548
542
|
/**
|
|
549
543
|
* @returns {number}
|
|
550
544
|
*/
|
|
551
545
|
readonly special_type_id: number;
|
|
552
546
|
/**
|
|
553
|
-
* @returns {number}
|
|
554
547
|
*/
|
|
555
|
-
|
|
548
|
+
speed: number;
|
|
556
549
|
/**
|
|
557
|
-
* @returns {number}
|
|
558
550
|
*/
|
|
559
|
-
|
|
551
|
+
stars: number;
|
|
560
552
|
/**
|
|
561
|
-
* @returns {number}
|
|
562
553
|
*/
|
|
563
|
-
|
|
554
|
+
torpedo: number;
|
|
564
555
|
/**
|
|
565
556
|
* @returns {any}
|
|
566
557
|
*/
|
|
@@ -575,67 +566,51 @@ export class Gear {
|
|
|
575
566
|
export class IBonuses {
|
|
576
567
|
free(): void;
|
|
577
568
|
/**
|
|
578
|
-
* @returns {number}
|
|
579
569
|
*/
|
|
580
570
|
adjusted_anti_air: number;
|
|
581
571
|
/**
|
|
582
|
-
* @returns {number}
|
|
583
572
|
*/
|
|
584
573
|
asw_accuracy: number;
|
|
585
574
|
/**
|
|
586
|
-
* @returns {number}
|
|
587
575
|
*/
|
|
588
576
|
asw_power: number;
|
|
589
577
|
/**
|
|
590
|
-
* @returns {number}
|
|
591
578
|
*/
|
|
592
579
|
carrier_shelling_power: number;
|
|
593
580
|
/**
|
|
594
|
-
* @returns {number}
|
|
595
581
|
*/
|
|
596
582
|
contact_selection: number;
|
|
597
583
|
/**
|
|
598
|
-
* @returns {number}
|
|
599
584
|
*/
|
|
600
585
|
defense_power: number;
|
|
601
586
|
/**
|
|
602
|
-
* @returns {number}
|
|
603
587
|
*/
|
|
604
588
|
elos: number;
|
|
605
589
|
/**
|
|
606
|
-
* @returns {number}
|
|
607
590
|
*/
|
|
608
591
|
fighter_power: number;
|
|
609
592
|
/**
|
|
610
|
-
* @returns {number}
|
|
611
593
|
*/
|
|
612
594
|
fleet_anti_air: number;
|
|
613
595
|
/**
|
|
614
|
-
* @returns {number}
|
|
615
596
|
*/
|
|
616
597
|
night_accuracy: number;
|
|
617
598
|
/**
|
|
618
|
-
* @returns {number}
|
|
619
599
|
*/
|
|
620
600
|
night_power: number;
|
|
621
601
|
/**
|
|
622
|
-
* @returns {number}
|
|
623
602
|
*/
|
|
624
603
|
shelling_accuracy: number;
|
|
625
604
|
/**
|
|
626
|
-
* @returns {number}
|
|
627
605
|
*/
|
|
628
606
|
shelling_power: number;
|
|
629
607
|
/**
|
|
630
|
-
* @returns {number}
|
|
631
608
|
*/
|
|
632
609
|
torpedo_accuracy: number;
|
|
633
610
|
/**
|
|
634
|
-
* @returns {number}
|
|
635
611
|
*/
|
|
636
612
|
torpedo_evasion: number;
|
|
637
613
|
/**
|
|
638
|
-
* @returns {number}
|
|
639
614
|
*/
|
|
640
615
|
torpedo_power: number;
|
|
641
616
|
}
|
|
@@ -786,25 +761,20 @@ export class Org {
|
|
|
786
761
|
*/
|
|
787
762
|
static default(): Org;
|
|
788
763
|
/**
|
|
789
|
-
* @returns {string}
|
|
790
764
|
*/
|
|
791
|
-
boss_sup
|
|
765
|
+
boss_sup?: string;
|
|
792
766
|
/**
|
|
793
|
-
* @returns {number}
|
|
794
767
|
*/
|
|
795
|
-
|
|
768
|
+
hq_level: number;
|
|
796
769
|
/**
|
|
797
|
-
* @returns {string}
|
|
798
770
|
*/
|
|
799
771
|
id: string;
|
|
800
772
|
/**
|
|
801
|
-
* @returns {bindings.OrgType}
|
|
802
773
|
*/
|
|
803
|
-
|
|
774
|
+
org_type: bindings.OrgType;
|
|
804
775
|
/**
|
|
805
|
-
* @returns {string}
|
|
806
776
|
*/
|
|
807
|
-
route_sup
|
|
777
|
+
route_sup?: string;
|
|
808
778
|
/**
|
|
809
779
|
* @returns {string}
|
|
810
780
|
*/
|
|
@@ -1008,9 +978,8 @@ export class Ship {
|
|
|
1008
978
|
*/
|
|
1009
979
|
readonly accuracy: number;
|
|
1010
980
|
/**
|
|
1011
|
-
* @returns {number}
|
|
1012
981
|
*/
|
|
1013
|
-
|
|
982
|
+
ammo: number;
|
|
1014
983
|
/**
|
|
1015
984
|
* @returns {number | undefined}
|
|
1016
985
|
*/
|
|
@@ -1028,9 +997,8 @@ export class Ship {
|
|
|
1028
997
|
*/
|
|
1029
998
|
readonly ctype: number;
|
|
1030
999
|
/**
|
|
1031
|
-
* @returns {number}
|
|
1032
1000
|
*/
|
|
1033
|
-
|
|
1001
|
+
current_hp: number;
|
|
1034
1002
|
/**
|
|
1035
1003
|
* @returns {number | undefined}
|
|
1036
1004
|
*/
|
|
@@ -1040,17 +1008,14 @@ export class Ship {
|
|
|
1040
1008
|
*/
|
|
1041
1009
|
readonly firepower: number | undefined;
|
|
1042
1010
|
/**
|
|
1043
|
-
* @returns {number}
|
|
1044
1011
|
*/
|
|
1045
|
-
|
|
1012
|
+
fuel: number;
|
|
1046
1013
|
/**
|
|
1047
|
-
* @returns {string}
|
|
1048
1014
|
*/
|
|
1049
1015
|
id: string;
|
|
1050
1016
|
/**
|
|
1051
|
-
* @returns {number}
|
|
1052
1017
|
*/
|
|
1053
|
-
|
|
1018
|
+
level: number;
|
|
1054
1019
|
/**
|
|
1055
1020
|
* @returns {number | undefined}
|
|
1056
1021
|
*/
|
|
@@ -1072,9 +1037,8 @@ export class Ship {
|
|
|
1072
1037
|
*/
|
|
1073
1038
|
readonly max_hp: number | undefined;
|
|
1074
1039
|
/**
|
|
1075
|
-
* @returns {number}
|
|
1076
1040
|
*/
|
|
1077
|
-
|
|
1041
|
+
morale: number;
|
|
1078
1042
|
/**
|
|
1079
1043
|
* @returns {number | undefined}
|
|
1080
1044
|
*/
|
|
@@ -1124,17 +1088,14 @@ export class Ship {
|
|
|
1124
1088
|
*/
|
|
1125
1089
|
readonly range: number | undefined;
|
|
1126
1090
|
/**
|
|
1127
|
-
* @returns {bindings.ShipClass}
|
|
1128
1091
|
*/
|
|
1129
|
-
|
|
1092
|
+
ship_class: bindings.ShipClass;
|
|
1130
1093
|
/**
|
|
1131
|
-
* @returns {number}
|
|
1132
1094
|
*/
|
|
1133
|
-
|
|
1095
|
+
ship_id: number;
|
|
1134
1096
|
/**
|
|
1135
|
-
* @returns {bindings.ShipType}
|
|
1136
1097
|
*/
|
|
1137
|
-
|
|
1098
|
+
ship_type: bindings.ShipType;
|
|
1138
1099
|
/**
|
|
1139
1100
|
* @returns {number}
|
|
1140
1101
|
*/
|