fleethub-core 0.5.0 → 0.7.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.
package/bindings.d.ts CHANGED
@@ -305,6 +305,8 @@ export type AirState =
305
305
  | "AirDenial"
306
306
  | "AirIncapability";
307
307
 
308
+ export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
309
+
308
310
  export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
309
311
 
310
312
  export type Formation = SingleFormation | CombinedFormation;
@@ -490,6 +492,7 @@ export interface OrgState {
490
492
  a3?: AirSquadronState;
491
493
  hq_level?: number;
492
494
  org_type?: OrgType;
495
+ sortie?: string;
493
496
  route_sup?: string;
494
497
  boss_sup?: string;
495
498
  }
@@ -687,7 +690,7 @@ export interface AttackPower {
687
690
  export interface HitRateParams {
688
691
  accuracy_term: number;
689
692
  evasion_term: number;
690
- morale_mod: number;
693
+ target_morale_mod: number;
691
694
  critical_rate_constant: number;
692
695
  critical_percentage_bonus: number;
693
696
  hit_percentage_bonus: number;
package/node/fh_core.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ */
5
+ export function set_panic_hook(): void;
6
+ /**
4
7
  * @param {Gear} gear
5
8
  * @returns {boolean}
6
9
  */
7
10
  export function air_squadron_can_equip(gear: Gear): boolean;
8
11
  /**
9
- */
10
- export function set_panic_hook(): void;
11
- /**
12
12
  * @param {bindings.OrgType} org_type
13
13
  * @returns {boolean}
14
14
  */
@@ -83,9 +83,57 @@ export class AirSquadron {
83
83
  }
84
84
  /**
85
85
  */
86
+ export class Analyzer {
87
+ free(): void;
88
+ /**
89
+ * @param {Comp} comp
90
+ * @param {bindings.Formation} formation
91
+ * @param {number | undefined} adjusted_anti_air_resist
92
+ * @param {number | undefined} fleet_anti_air_resist
93
+ * @param {number | undefined} aaci
94
+ * @returns {bindings.CompAntiAirInfo}
95
+ */
96
+ analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist?: number, fleet_anti_air_resist?: number, aaci?: number): bindings.CompAntiAirInfo;
97
+ /**
98
+ * @param {Comp} comp
99
+ * @returns {bindings.CompDayCutinRateInfo}
100
+ */
101
+ analyze_day_cutin(comp: Comp): bindings.CompDayCutinRateInfo;
102
+ /**
103
+ * @param {Comp} comp
104
+ * @param {bindings.NightSituation} attacker_situation
105
+ * @param {bindings.NightSituation} target_situation
106
+ * @returns {bindings.FleetNightCutinRateInfo}
107
+ */
108
+ analyze_night_cutin(comp: Comp, attacker_situation: bindings.NightSituation, target_situation: bindings.NightSituation): bindings.FleetNightCutinRateInfo;
109
+ /**
110
+ * @param {Comp} comp
111
+ * @returns {bindings.CompContactChanceInfo}
112
+ */
113
+ analyze_contact_chance(comp: Comp): bindings.CompContactChanceInfo;
114
+ /**
115
+ * @param {bindings.WarfareAnalyzerContext} params
116
+ * @param {Ship} attacker
117
+ * @param {Ship} target
118
+ * @returns {bindings.WarfareInfo}
119
+ */
120
+ analyze_warfare(params: bindings.WarfareAnalyzerContext, attacker: Ship, target: Ship): bindings.WarfareInfo;
121
+ /**
122
+ * @param {Comp} comp
123
+ * @param {bindings.Engagement} engagement
124
+ * @returns {bindings.FleetCutinAnalysis}
125
+ */
126
+ analyze_fleet_cutin(comp: Comp, engagement: bindings.Engagement): bindings.FleetCutinAnalysis;
127
+ }
128
+ /**
129
+ */
86
130
  export class Comp {
87
131
  free(): void;
88
132
  /**
133
+ * @returns {bindings.Side}
134
+ */
135
+ side(): bindings.Side;
136
+ /**
89
137
  * @returns {boolean}
90
138
  */
91
139
  is_combined(): boolean;
@@ -138,11 +186,10 @@ export class Comp {
138
186
  fighter_power(anti_combined: boolean, anti_lbas: boolean): number | undefined;
139
187
  /**
140
188
  * マップ索敵
141
- * @param {number} hq_level
142
189
  * @param {number} node_divaricated_factor
143
190
  * @returns {number | undefined}
144
191
  */
145
- elos(hq_level: number, node_divaricated_factor: number): number | undefined;
192
+ elos(node_divaricated_factor: number): number | undefined;
146
193
  /**
147
194
  * 輸送物資量(TP)
148
195
  * @returns {number}
@@ -155,6 +202,9 @@ export class Comp {
155
202
  */
156
203
  escort?: Fleet;
157
204
  /**
205
+ */
206
+ hq_level: number;
207
+ /**
158
208
  */
159
209
  main: Fleet;
160
210
  /**
@@ -206,50 +256,17 @@ export class FhCore {
206
256
  /**
207
257
  * @param {Uint16Array} main
208
258
  * @param {Uint16Array | undefined} escort
259
+ * @returns {Comp}
209
260
  */
210
- create_comp_by_map_enemy(main: Uint16Array, escort?: Uint16Array): void;
261
+ create_comp_by_map_enemy(main: Uint16Array, escort?: Uint16Array): Comp;
211
262
  /**
212
263
  * @returns {Ship}
213
264
  */
214
265
  create_default_ship(): Ship;
215
266
  /**
216
- * @param {Comp} comp
217
- * @param {bindings.Formation} formation
218
- * @param {number | undefined} adjusted_anti_air_resist
219
- * @param {number | undefined} fleet_anti_air_resist
220
- * @returns {bindings.CompAntiAirInfo}
221
- */
222
- analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist?: number, fleet_anti_air_resist?: number): bindings.CompAntiAirInfo;
223
- /**
224
- * @param {Comp} comp
225
- * @returns {bindings.CompDayCutinRateInfo}
226
- */
227
- analyze_day_cutin(comp: Comp): bindings.CompDayCutinRateInfo;
228
- /**
229
- * @param {Comp} comp
230
- * @param {bindings.NightSituation} attacker_situation
231
- * @param {bindings.NightSituation} target_situation
232
- * @returns {bindings.FleetNightCutinRateInfo}
233
- */
234
- analyze_night_cutin(comp: Comp, attacker_situation: bindings.NightSituation, target_situation: bindings.NightSituation): bindings.FleetNightCutinRateInfo;
235
- /**
236
- * @param {Comp} comp
237
- * @returns {bindings.CompContactChanceInfo}
238
- */
239
- analyze_contact_chance(comp: Comp): bindings.CompContactChanceInfo;
240
- /**
241
- * @param {bindings.WarfareAnalyzerContext} params
242
- * @param {Ship} attacker
243
- * @param {Ship} target
244
- * @returns {bindings.WarfareInfo}
245
- */
246
- analyze_warfare(params: bindings.WarfareAnalyzerContext, attacker: Ship, target: Ship): bindings.WarfareInfo;
247
- /**
248
- * @param {Comp} comp
249
- * @param {bindings.Engagement} engagement
250
- * @returns {bindings.FleetCutinAnalysis}
267
+ * @returns {Analyzer}
251
268
  */
252
- analyze_fleet_cutin(comp: Comp, engagement: bindings.Engagement): bindings.FleetCutinAnalysis;
269
+ create_analyzer(): Analyzer;
253
270
  /**
254
271
  * @param {Comp} player
255
272
  * @param {Comp} enemy
@@ -418,10 +435,10 @@ export class Gear {
418
435
  */
419
436
  is_contact_selection_plane(): boolean;
420
437
  /**
421
- * @param {number} air_state_modifier
438
+ * @param {bindings.AirStateRank} rank
422
439
  * @returns {number}
423
440
  */
424
- contact_selection_rate(air_state_modifier: number): number;
441
+ contact_selection_rate(rank: bindings.AirStateRank): number;
425
442
  /**
426
443
  * @param {number} level
427
444
  * @returns {number}
@@ -443,6 +460,10 @@ export class Gear {
443
460
  elos(): number;
444
461
  /**
445
462
  * @returns {boolean}
463
+ */
464
+ is_abyssal(): boolean;
465
+ /**
466
+ * @returns {boolean}
446
467
  */
447
468
  is_abyssal_cuttlefish_torpedo(): boolean;
448
469
  /**
@@ -635,16 +656,6 @@ export class Org {
635
656
  air_squadron_ids(): (string)[];
636
657
  /**
637
658
  * @param {bindings.Role} role
638
- * @returns {(string)[]}
639
- */
640
- ship_keys(role: bindings.Role): (string)[];
641
- /**
642
- * @param {bindings.Role} role
643
- * @returns {(string)[] | undefined}
644
- */
645
- sortie_ship_keys(role: bindings.Role): (string)[] | undefined;
646
- /**
647
- * @param {bindings.Role} role
648
659
  * @returns {number | undefined}
649
660
  */
650
661
  fleet_los_mod(role: bindings.Role): number | undefined;
@@ -678,6 +689,10 @@ export class Org {
678
689
  */
679
690
  get_fleet_id_by_role(role: bindings.Role): string;
680
691
  /**
692
+ * @returns {Comp}
693
+ */
694
+ create_comp(): Comp;
695
+ /**
681
696
  * @param {string} key
682
697
  * @returns {Comp}
683
698
  */
@@ -712,29 +727,6 @@ export class Org {
712
727
  */
713
728
  is_combined(): boolean;
714
729
  /**
715
- * @returns {bindings.Formation}
716
- */
717
- default_formation(): bindings.Formation;
718
- /**
719
- * 艦隊対空値
720
- * @param {number} formation_mod
721
- * @returns {number}
722
- */
723
- fleet_anti_air(formation_mod: number): number;
724
- /**
725
- * 制空値
726
- * @param {boolean} anti_combined
727
- * @param {boolean} anti_lbas
728
- * @returns {number | undefined}
729
- */
730
- fighter_power(anti_combined: boolean, anti_lbas: boolean): number | undefined;
731
- /**
732
- * マップ索敵
733
- * @param {number} node_divaricated_factor
734
- * @returns {number | undefined}
735
- */
736
- elos(node_divaricated_factor: number): number | undefined;
737
- /**
738
730
  * 防空時の基地制空値
739
731
  * @returns {number}
740
732
  */
@@ -745,12 +737,6 @@ export class Org {
745
737
  */
746
738
  high_altitude_interception_power(): number;
747
739
  /**
748
- * 輸送物資量(TP)
749
- * @param {string} key
750
- * @returns {number}
751
- */
752
- transport_point(key: string): number;
753
- /**
754
740
  * @param {Ship} ship
755
741
  * @param {bindings.Formation} formation
756
742
  * @returns {bindings.WarfareShipEnvironment}
@@ -776,6 +762,9 @@ export class Org {
776
762
  */
777
763
  route_sup?: string;
778
764
  /**
765
+ */
766
+ sortie: string;
767
+ /**
779
768
  * @returns {string}
780
769
  */
781
770
  readonly xxh3: string;