fleethub-core 1.11.16 → 1.11.17

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,31 +8,19 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
8
8
  /**
9
9
  */
10
10
  export function set_panic_hook(): void;
11
- export interface CompAnalyzerConfig {
12
- engagement: Engagement;
13
- formation: Formation;
14
- anti_air_cutin: number | null;
15
- ship_anti_air_resist: number;
16
- fleet_anti_air_resist: number;
17
- left_night_fleet_conditions: NightFleetConditions;
18
- right_night_fleet_conditions: NightFleetConditions;
19
- }
20
-
21
- export interface CompNightAnalysis {
22
- night_cutin: CompNightCutinAnalysis;
23
- fleet_cutin: FleetCutinReport<NightAttackStyle>[];
24
- }
25
-
26
- export interface CompDayAnalysis {
27
- day_cutin: CompDayCutinAnalysis;
28
- fleet_cutin: FleetCutinReport<ShellingStyle>[];
29
- }
11
+ export type GearTypeIdArray = [number, number, number, number, number];
30
12
 
31
- export interface CompAnalysis {
32
- day: CompDayAnalysis;
33
- night: CompNightAnalysis;
34
- contact: ContactAnalysis;
35
- anti_air: CompAntiAirAnalysis;
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>;
36
24
  }
37
25
 
38
26
  export type AirSquadronMode = "Sortie" | "AirDefense";
@@ -51,54 +39,11 @@ export type AirState =
51
39
 
52
40
  export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
53
41
 
54
- export type ContactRank = "Rank1" | "Rank2" | "Rank3";
55
-
56
- export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
57
-
58
- export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
59
-
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
42
  export interface ShipConditions extends ShipPosition {
81
43
  formation?: Formation;
82
44
  amagiri_index?: number | null;
83
45
  }
84
46
 
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];
101
-
102
47
  export interface SupportShellingSimulatorParams {
103
48
  attacker_formation?: Formation;
104
49
  target_formation?: Formation;
@@ -158,29 +103,31 @@ export interface AttackPowerParams {
158
103
  custom_mods: CustomPowerModifiers;
159
104
  }
160
105
 
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>;
106
+ export interface CompAnalyzerConfig {
107
+ engagement: Engagement;
108
+ formation: Formation;
109
+ anti_air_cutin: number | null;
110
+ ship_anti_air_resist: number;
111
+ fleet_anti_air_resist: number;
112
+ left_night_fleet_conditions: NightFleetConditions;
113
+ right_night_fleet_conditions: NightFleetConditions;
172
114
  }
173
115
 
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>;
116
+ export interface CompNightAnalysis {
117
+ night_cutin: CompNightCutinAnalysis;
118
+ fleet_cutin: FleetCutinReport<NightAttackStyle>[];
119
+ }
120
+
121
+ export interface CompDayAnalysis {
122
+ day_cutin: CompDayCutinAnalysis;
123
+ fleet_cutin: FleetCutinReport<ShellingStyle>[];
124
+ }
125
+
126
+ export interface CompAnalysis {
127
+ day: CompDayAnalysis;
128
+ night: CompNightAnalysis;
129
+ contact: ContactAnalysis;
130
+ anti_air: CompAntiAirAnalysis;
184
131
  }
185
132
 
186
133
  export interface ActionReport<T> {
@@ -236,6 +183,12 @@ export interface NightFleetConditions {
236
183
  activates_large_searchlight?: boolean;
237
184
  }
238
185
 
186
+ export type ContactRank = "Rank1" | "Rank2" | "Rank3";
187
+
188
+ export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
189
+
190
+ export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
191
+
239
192
  export interface FleetState {
240
193
  id?: string;
241
194
  len?: number;
@@ -263,6 +216,22 @@ export interface CompMeta {
263
216
  fleets: Record<FleetType, FleetMeta>;
264
217
  }
265
218
 
219
+ export type SpecialEnemyType =
220
+ | "None"
221
+ | "SoftSkinned"
222
+ | "Pillbox"
223
+ | "IsolatedIsland"
224
+ | "SupplyDepot"
225
+ | "NewSupplyDepot"
226
+ | "HarbourSummerPrincess"
227
+ | "PtImp"
228
+ | "BattleshipSummerPrincess"
229
+ | "HeavyCruiserSummerPrincess"
230
+ | "FrenchBattleshipPrincess"
231
+ | "AnchorageWaterDemonVacationMode"
232
+ | "DockPrincess"
233
+ | "SummerAircraftCarrierDemon";
234
+
266
235
  export interface MasterData extends MasterBattleDefinitions {
267
236
  created_at: number;
268
237
  gears: MasterGear[];
@@ -776,46 +745,6 @@ export type SlotSizeVec = (number | null)[];
776
745
 
777
746
  export type SpeedGroup = "A" | "B1" | "B2" | "C";
778
747
 
779
- export type GearVecInput = GearInput[];
780
-
781
- export interface GearInput {
782
- gear_id: number;
783
- types: GearTypeIdArray;
784
- firepower: number;
785
- torpedo: number;
786
- anti_air: number;
787
- armor: number;
788
- evasion: number;
789
- asw: number;
790
- los: number;
791
- bombing: number;
792
- accuracy: number;
793
- range: number;
794
- radius: number;
795
- stars: number;
796
- ace: number;
797
- }
798
-
799
- export interface ShipInput {
800
- ship_id: number;
801
- ctype: number;
802
- stype: number;
803
- yomi: string;
804
- }
805
-
806
- export interface EBonuses {
807
- firepower: number;
808
- torpedo: number;
809
- anti_air: number;
810
- armor: number;
811
- evasion: number;
812
- asw: number;
813
- los: number;
814
- bombing: number;
815
- accuracy: number;
816
- range: number;
817
- }
818
-
819
748
  export interface MasterShip {
820
749
  ship_id: number;
821
750
  name: string;
@@ -850,17 +779,16 @@ export interface MasterShip {
850
779
 
851
780
  export type StatInterval = [number | null, number | null];
852
781
 
853
- export interface FleetCutinReport<T> {
854
- cutin: FleetCutin;
855
- rate: number | null;
856
- formation: Formation;
857
- attacks: FleetCutinAttackReport<T>[];
858
- }
859
-
860
- export interface FleetCutinAttackReport<T> extends AttackReport<T> {
861
- index: number;
862
- ship_id: number;
863
- power_mod: number;
782
+ export interface AttackAnalysis {
783
+ attacker_is_player: boolean;
784
+ attacker_ship_id: number;
785
+ target_ship_id: number;
786
+ historical_params: HistoricalParams;
787
+ day: ActionReport<DayPhaseAttackStyle>;
788
+ night: ActionReport<NightPhaseAttackStyle>;
789
+ closing_torpedo: ActionReport<TorpedoAttackStyle>;
790
+ opening_asw: ActionReport<AswAttackStyle>;
791
+ support_shelling: ActionReport<SupportShellingStyle>;
864
792
  }
865
793
 
866
794
  export type DayCutin =
@@ -1002,6 +930,27 @@ export type GearCategory =
1002
930
  | "LandBased"
1003
931
  | "Misc";
1004
932
 
933
+ export type ShipAttr =
934
+ | "Unknown"
935
+ | "NightCarrier"
936
+ | "Installation"
937
+ | "RoyalNavy"
938
+ | "Kai2"
939
+ | "TurbineSpeedBonus"
940
+ | "NewModelBoilerSpeedBonus"
941
+ | "Pillbox"
942
+ | "IsolatedIsland"
943
+ | "HarbourSummerPrincess"
944
+ | "SupplyDepot"
945
+ | "NewSupplyDepot"
946
+ | "PtImp"
947
+ | "BattleshipSummerPrincess"
948
+ | "HeavyCruiserSummerPrincess"
949
+ | "AnchorageWaterDemonVacationMode"
950
+ | "FrenchBattleshipPrincess"
951
+ | "DockPrincess"
952
+ | "SummerAircraftCarrierDemon";
953
+
1005
954
  export type ShipCategory =
1006
955
  | "Battleship"
1007
956
  | "AircraftCarrier"
@@ -1037,6 +986,59 @@ export type ShipType =
1037
986
  | "CT"
1038
987
  | "AO";
1039
988
 
989
+ export type GearVecInput = GearInput[];
990
+
991
+ export interface GearInput {
992
+ gear_id: number;
993
+ types: GearTypeIdArray;
994
+ firepower: number;
995
+ torpedo: number;
996
+ anti_air: number;
997
+ armor: number;
998
+ evasion: number;
999
+ asw: number;
1000
+ los: number;
1001
+ bombing: number;
1002
+ accuracy: number;
1003
+ range: number;
1004
+ radius: number;
1005
+ stars: number;
1006
+ ace: number;
1007
+ }
1008
+
1009
+ export interface ShipInput {
1010
+ ship_id: number;
1011
+ ctype: number;
1012
+ stype: number;
1013
+ yomi: string;
1014
+ }
1015
+
1016
+ export interface EBonuses {
1017
+ firepower: number;
1018
+ torpedo: number;
1019
+ anti_air: number;
1020
+ armor: number;
1021
+ evasion: number;
1022
+ asw: number;
1023
+ los: number;
1024
+ bombing: number;
1025
+ accuracy: number;
1026
+ range: number;
1027
+ }
1028
+
1029
+ export interface FleetCutinReport<T> {
1030
+ cutin: FleetCutin;
1031
+ rate: number | null;
1032
+ formation: Formation;
1033
+ attacks: FleetCutinAttackReport<T>[];
1034
+ }
1035
+
1036
+ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1037
+ index: number;
1038
+ ship_id: number;
1039
+ power_mod: number;
1040
+ }
1041
+
1040
1042
  /**
1041
1043
  */
1042
1044
  export class AirSquadron {
@@ -1776,20 +1778,6 @@ export class Org {
1776
1778
  */
1777
1779
  export class Ship {
1778
1780
  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
1781
  /**
1794
1782
  * @returns {Ship}
1795
1783
  */
@@ -2003,6 +1991,20 @@ export class Ship {
2003
1991
  * @returns {number | undefined}
2004
1992
  */
2005
1993
  ohko_power(): number | undefined;
1994
+ /**
1995
+ * @returns {number | undefined}
1996
+ */
1997
+ state_day_gunfit_accuracy(): number | undefined;
1998
+ /**
1999
+ * @returns {number | undefined}
2000
+ */
2001
+ state_night_gunfit_accuracy(): number | undefined;
2002
+ /**
2003
+ * フィット砲補正
2004
+ * @param {boolean} is_night
2005
+ * @returns {number}
2006
+ */
2007
+ gunfit_accuracy(is_night: boolean): number;
2006
2008
  /**
2007
2009
  */
2008
2010
  readonly accuracy: number;
@@ -118,14 +118,6 @@ function getInt32Memory0() {
118
118
  }
119
119
  return cachedInt32Memory0;
120
120
  }
121
- /**
122
- * @param {ShipConditions} value
123
- * @returns {ShipConditions}
124
- */
125
- module.exports.parse_ship_conditions = function(value) {
126
- const ret = wasm.parse_ship_conditions(addHeapObject(value));
127
- return takeObject(ret);
128
- };
129
121
 
130
122
  let cachedUint32Memory0 = null;
131
123
 
@@ -156,6 +148,21 @@ function getFloat64Memory0() {
156
148
  return cachedFloat64Memory0;
157
149
  }
158
150
 
151
+ function _assertClass(instance, klass) {
152
+ if (!(instance instanceof klass)) {
153
+ throw new Error(`expected instance of ${klass.name}`);
154
+ }
155
+ return instance.ptr;
156
+ }
157
+ /**
158
+ * @param {ShipConditions} value
159
+ * @returns {ShipConditions}
160
+ */
161
+ module.exports.parse_ship_conditions = function(value) {
162
+ const ret = wasm.parse_ship_conditions(addHeapObject(value));
163
+ return takeObject(ret);
164
+ };
165
+
159
166
  function getArrayU8FromWasm0(ptr, len) {
160
167
  ptr = ptr >>> 0;
161
168
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
@@ -167,13 +174,6 @@ function passArray8ToWasm0(arg, malloc) {
167
174
  WASM_VECTOR_LEN = arg.length;
168
175
  return ptr;
169
176
  }
170
-
171
- function _assertClass(instance, klass) {
172
- if (!(instance instanceof klass)) {
173
- throw new Error(`expected instance of ${klass.name}`);
174
- }
175
- return instance.ptr;
176
- }
177
177
  /**
178
178
  */
179
179
  module.exports.set_panic_hook = function() {
@@ -2098,43 +2098,6 @@ class Ship {
2098
2098
  wasm.__wbg_ship_free(ptr);
2099
2099
  }
2100
2100
  /**
2101
- * @returns {number | undefined}
2102
- */
2103
- state_day_gunfit_accuracy() {
2104
- try {
2105
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2106
- wasm.ship_state_day_gunfit_accuracy(retptr, this.__wbg_ptr);
2107
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2108
- var r2 = getFloat64Memory0()[retptr / 8 + 1];
2109
- return r0 === 0 ? undefined : r2;
2110
- } finally {
2111
- wasm.__wbindgen_add_to_stack_pointer(16);
2112
- }
2113
- }
2114
- /**
2115
- * @returns {number | undefined}
2116
- */
2117
- state_night_gunfit_accuracy() {
2118
- try {
2119
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2120
- wasm.ship_state_night_gunfit_accuracy(retptr, this.__wbg_ptr);
2121
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2122
- var r2 = getFloat64Memory0()[retptr / 8 + 1];
2123
- return r0 === 0 ? undefined : r2;
2124
- } finally {
2125
- wasm.__wbindgen_add_to_stack_pointer(16);
2126
- }
2127
- }
2128
- /**
2129
- * フィット砲補正
2130
- * @param {boolean} is_night
2131
- * @returns {number}
2132
- */
2133
- gunfit_accuracy(is_night) {
2134
- const ret = wasm.ship_gunfit_accuracy(this.__wbg_ptr, is_night);
2135
- return ret;
2136
- }
2137
- /**
2138
2101
  * @returns {string}
2139
2102
  */
2140
2103
  get id() {
@@ -2922,6 +2885,43 @@ class Ship {
2922
2885
  wasm.__wbindgen_add_to_stack_pointer(16);
2923
2886
  }
2924
2887
  }
2888
+ /**
2889
+ * @returns {number | undefined}
2890
+ */
2891
+ state_day_gunfit_accuracy() {
2892
+ try {
2893
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2894
+ wasm.ship_state_day_gunfit_accuracy(retptr, this.__wbg_ptr);
2895
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2896
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
2897
+ return r0 === 0 ? undefined : r2;
2898
+ } finally {
2899
+ wasm.__wbindgen_add_to_stack_pointer(16);
2900
+ }
2901
+ }
2902
+ /**
2903
+ * @returns {number | undefined}
2904
+ */
2905
+ state_night_gunfit_accuracy() {
2906
+ try {
2907
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2908
+ wasm.ship_state_night_gunfit_accuracy(retptr, this.__wbg_ptr);
2909
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2910
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
2911
+ return r0 === 0 ? undefined : r2;
2912
+ } finally {
2913
+ wasm.__wbindgen_add_to_stack_pointer(16);
2914
+ }
2915
+ }
2916
+ /**
2917
+ * フィット砲補正
2918
+ * @param {boolean} is_night
2919
+ * @returns {number}
2920
+ */
2921
+ gunfit_accuracy(is_night) {
2922
+ const ret = wasm.ship_gunfit_accuracy(this.__wbg_ptr, is_night);
2923
+ return ret;
2924
+ }
2925
2925
  }
2926
2926
  module.exports.Ship = Ship;
2927
2927
 
@@ -2949,7 +2949,7 @@ module.exports.__wbg_ship_new = function(arg0) {
2949
2949
  return addHeapObject(ret);
2950
2950
  };
2951
2951
 
2952
- module.exports.__wbg_createEquipmentBonuses_1e815d3f82287e3d = function(arg0, arg1) {
2952
+ module.exports.__wbg_createEquipmentBonuses_f047a201d43cb33d = function(arg0, arg1) {
2953
2953
  const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
2954
2954
  return addHeapObject(ret);
2955
2955
  };
Binary file