fleethub-core 1.8.3 → 1.8.6

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.
@@ -26,22 +26,25 @@ declare namespace Role {
26
26
 
27
27
  export type Role = Role.Main | Role.Escort;
28
28
 
29
- declare namespace OrgType {
30
- export type Single = "Single";
31
- export type CarrierTaskForce = "CarrierTaskForce";
32
- export type SurfaceTaskForce = "SurfaceTaskForce";
33
- export type TransportEscort = "TransportEscort";
34
- export type EnemySingle = "EnemySingle";
35
- export type EnemyCombined = "EnemyCombined";
29
+ export interface ShipPosition {
30
+ org_type?: OrgType;
31
+ fleet_type?: FleetType;
32
+ fleet_len?: number;
33
+ index?: number;
36
34
  }
37
35
 
38
- export type OrgType =
39
- | OrgType.Single
40
- | OrgType.CarrierTaskForce
41
- | OrgType.SurfaceTaskForce
42
- | OrgType.TransportEscort
43
- | OrgType.EnemySingle
44
- | OrgType.EnemyCombined;
36
+ declare namespace Engagement {
37
+ export type GreenT = "GreenT";
38
+ export type Parallel = "Parallel";
39
+ export type HeadOn = "HeadOn";
40
+ export type RedT = "RedT";
41
+ }
42
+
43
+ export type Engagement =
44
+ | Engagement.GreenT
45
+ | Engagement.Parallel
46
+ | Engagement.HeadOn
47
+ | Engagement.RedT;
45
48
 
46
49
  export interface BattleDefinitions {
47
50
  formation: Record<Formation, NestedFormationDef>;
@@ -134,6 +137,19 @@ export type SpecialEnemyType =
134
137
  | SpecialEnemyType.BattleshipSummerPrincess
135
138
  | SpecialEnemyType.HeavyCruiserSummerPrincess;
136
139
 
140
+ declare namespace MoraleState {
141
+ export type Sparkle = "Sparkle";
142
+ export type Normal = "Normal";
143
+ export type Orange = "Orange";
144
+ export type Red = "Red";
145
+ }
146
+
147
+ export type MoraleState =
148
+ | MoraleState.Sparkle
149
+ | MoraleState.Normal
150
+ | MoraleState.Orange
151
+ | MoraleState.Red;
152
+
137
153
  type __NightCutinLikeFleetCutin = FleetCutin;
138
154
  type __NightCutinLikeNightCutin = NightCutin;
139
155
  declare namespace NightCutinLike {
@@ -434,34 +450,6 @@ export type DamageState =
434
450
  | DamageState.Taiha
435
451
  | DamageState.Sunk;
436
452
 
437
- declare namespace AirStateRank {
438
- export type Rank0 = "Rank0";
439
- export type Rank1 = "Rank1";
440
- export type Rank2 = "Rank2";
441
- export type Rank3 = "Rank3";
442
- }
443
-
444
- export type AirStateRank =
445
- | AirStateRank.Rank0
446
- | AirStateRank.Rank1
447
- | AirStateRank.Rank2
448
- | AirStateRank.Rank3;
449
-
450
- declare namespace AirState {
451
- export type AirSupremacy = "AirSupremacy";
452
- export type AirSuperiority = "AirSuperiority";
453
- export type AirParity = "AirParity";
454
- export type AirDenial = "AirDenial";
455
- export type AirIncapability = "AirIncapability";
456
- }
457
-
458
- export type AirState =
459
- | AirState.AirSupremacy
460
- | AirState.AirSuperiority
461
- | AirState.AirParity
462
- | AirState.AirDenial
463
- | AirState.AirIncapability;
464
-
465
453
  export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
466
454
  formation?: Formation;
467
455
  }
@@ -478,13 +466,6 @@ export interface NodeAttackAnalysis {
478
466
  right: AttackAnalysis;
479
467
  }
480
468
 
481
- export interface ShipPosition {
482
- org_type?: OrgType;
483
- fleet_type?: FleetType;
484
- fleet_len?: number;
485
- index?: number;
486
- }
487
-
488
469
  export interface CompMeta {
489
470
  fleets: Record<FleetType, FleetMeta>;
490
471
  }
@@ -500,19 +481,6 @@ export interface ShipMeta {
500
481
  ship_id: number;
501
482
  }
502
483
 
503
- declare namespace Engagement {
504
- export type GreenT = "GreenT";
505
- export type Parallel = "Parallel";
506
- export type HeadOn = "HeadOn";
507
- export type RedT = "RedT";
508
- }
509
-
510
- export type Engagement =
511
- | Engagement.GreenT
512
- | Engagement.Parallel
513
- | Engagement.HeadOn
514
- | Engagement.RedT;
515
-
516
484
  export type TorpedoAttackType = null;
517
485
 
518
486
  type __NightPhaseAttackTypeAswAttackType = AswAttackType;
@@ -586,7 +554,36 @@ declare namespace AswAttackType {
586
554
 
587
555
  export type AswAttackType = AswAttackType.DepthCharge | AswAttackType.Aircraft;
588
556
 
557
+ declare namespace AirStateRank {
558
+ export type Rank0 = "Rank0";
559
+ export type Rank1 = "Rank1";
560
+ export type Rank2 = "Rank2";
561
+ export type Rank3 = "Rank3";
562
+ }
563
+
564
+ export type AirStateRank =
565
+ | AirStateRank.Rank0
566
+ | AirStateRank.Rank1
567
+ | AirStateRank.Rank2
568
+ | AirStateRank.Rank3;
569
+
570
+ declare namespace AirState {
571
+ export type AirSupremacy = "AirSupremacy";
572
+ export type AirSuperiority = "AirSuperiority";
573
+ export type AirParity = "AirParity";
574
+ export type AirDenial = "AirDenial";
575
+ export type AirIncapability = "AirIncapability";
576
+ }
577
+
578
+ export type AirState =
579
+ | AirState.AirSupremacy
580
+ | AirState.AirSuperiority
581
+ | AirState.AirParity
582
+ | AirState.AirDenial
583
+ | AirState.AirIncapability;
584
+
589
585
  export interface MasterData {
586
+ created_at: number;
590
587
  gears: MasterGear[];
591
588
  gear_attrs: MasterAttrRule<GearAttr>[];
592
589
  ships: MasterShip[];
@@ -685,12 +682,23 @@ export type ShipAttr =
685
682
  | ShipAttr.BattleshipSummerPrincess
686
683
  | ShipAttr.HeavyCruiserSummerPrincess;
687
684
 
688
- export interface SupportShellingSimulatorParams {
689
- attacker_formation?: Formation;
690
- target_formation?: Formation;
691
- engagement: Engagement;
685
+ declare namespace OrgType {
686
+ export type Single = "Single";
687
+ export type CarrierTaskForce = "CarrierTaskForce";
688
+ export type SurfaceTaskForce = "SurfaceTaskForce";
689
+ export type TransportEscort = "TransportEscort";
690
+ export type EnemySingle = "EnemySingle";
691
+ export type EnemyCombined = "EnemyCombined";
692
692
  }
693
693
 
694
+ export type OrgType =
695
+ | OrgType.Single
696
+ | OrgType.CarrierTaskForce
697
+ | OrgType.SurfaceTaskForce
698
+ | OrgType.TransportEscort
699
+ | OrgType.EnemySingle
700
+ | OrgType.EnemyCombined;
701
+
694
702
  declare namespace GearAttr {
695
703
  export type Unknown = "Unknown";
696
704
  export type Abyssal = "Abyssal";
@@ -811,6 +819,12 @@ export interface ShellingStyle {
811
819
  hits: number;
812
820
  }
813
821
 
822
+ export interface SupportShellingSimulatorParams {
823
+ attacker_formation?: Formation;
824
+ target_formation?: Formation;
825
+ engagement: Engagement;
826
+ }
827
+
814
828
  export interface MasterIBonuses {
815
829
  shelling_power: MasterIBonusRule[];
816
830
  carrier_shelling_power: MasterIBonusRule[];
@@ -871,12 +885,6 @@ export interface DamageReport {
871
885
  damage_state_density: Histogram<DamageState, number>;
872
886
  }
873
887
 
874
- export interface AttackAnalyzerShipConfig
875
- extends ShipConditions,
876
- NightFleetConditions {
877
- fleet_los_mod?: number | null;
878
- }
879
-
880
888
  export interface CompAntiAirAnalysis {
881
889
  fleet_adjusted_anti_air: number;
882
890
  ships: AntiAirReport[];
@@ -1077,6 +1085,12 @@ export interface DayContactChance {
1077
1085
  total: number;
1078
1086
  }
1079
1087
 
1088
+ export interface AttackAnalyzerShipConfig
1089
+ extends ShipConditions,
1090
+ NightFleetConditions {
1091
+ fleet_los_mod?: number | null;
1092
+ }
1093
+
1080
1094
  export interface AttackAnalysis {
1081
1095
  attacker_is_player: boolean;
1082
1096
  attacker_ship_id: number;
@@ -1143,31 +1157,6 @@ export interface MasterShip {
1143
1157
 
1144
1158
  export type StatInterval = [number | null, number | null];
1145
1159
 
1146
- export interface MasterGear {
1147
- gear_id: number;
1148
- name: string;
1149
- types: GearTypeIdArray;
1150
- special_type?: number;
1151
- max_hp?: number;
1152
- firepower?: number;
1153
- armor?: number;
1154
- torpedo?: number;
1155
- anti_air?: number;
1156
- speed?: number;
1157
- bombing?: number;
1158
- asw?: number;
1159
- los?: number;
1160
- luck?: number;
1161
- accuracy?: number;
1162
- evasion?: number;
1163
- range?: number;
1164
- radius?: number;
1165
- cost?: number;
1166
- improvable?: boolean;
1167
- ship_anti_air_resist?: number;
1168
- fleet_anti_air_resist?: number;
1169
- }
1170
-
1171
1160
  export interface CompAnalyzerConfig {
1172
1161
  engagement: Engagement;
1173
1162
  formation: Formation;
@@ -1330,10 +1319,29 @@ export type SpeedGroup =
1330
1319
 
1331
1320
  export type SlotSizeVec = (number | null)[];
1332
1321
 
1333
- export interface ActionReport<T> {
1334
- data: Record<string, AttackReport<T>>;
1335
- damage_state_density: Histogram<DamageState, number> | null;
1336
- is_active: boolean;
1322
+ export interface MasterGear {
1323
+ gear_id: number;
1324
+ name: string;
1325
+ types: GearTypeIdArray;
1326
+ special_type?: number;
1327
+ max_hp?: number;
1328
+ firepower?: number;
1329
+ armor?: number;
1330
+ torpedo?: number;
1331
+ anti_air?: number;
1332
+ speed?: number;
1333
+ bombing?: number;
1334
+ asw?: number;
1335
+ los?: number;
1336
+ luck?: number;
1337
+ accuracy?: number;
1338
+ evasion?: number;
1339
+ range?: number;
1340
+ radius?: number;
1341
+ cost?: number;
1342
+ improvable?: boolean;
1343
+ ship_anti_air_resist?: number;
1344
+ fleet_anti_air_resist?: number;
1337
1345
  }
1338
1346
 
1339
1347
  export type GearTypeIdArray = [number, number, number, number, number];
@@ -1410,19 +1418,6 @@ export type ShipCategory =
1410
1418
  | ShipCategory.Submarine
1411
1419
  | ShipCategory.AuxiliaryShip;
1412
1420
 
1413
- declare namespace MoraleState {
1414
- export type Sparkle = "Sparkle";
1415
- export type Normal = "Normal";
1416
- export type Orange = "Orange";
1417
- export type Red = "Red";
1418
- }
1419
-
1420
- export type MoraleState =
1421
- | MoraleState.Sparkle
1422
- | MoraleState.Normal
1423
- | MoraleState.Orange
1424
- | MoraleState.Red;
1425
-
1426
1421
  export interface FleetCutinAnalysis {
1427
1422
  shelling: FleetCutinReport<ShellingStyle>[];
1428
1423
  night: FleetCutinReport<NightAttackStyle>[];
@@ -1441,6 +1436,12 @@ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1441
1436
  power_mod: number;
1442
1437
  }
1443
1438
 
1439
+ export interface ActionReport<T> {
1440
+ data: Record<string, AttackReport<T>>;
1441
+ damage_state_density: Histogram<DamageState, number> | null;
1442
+ is_active: boolean;
1443
+ }
1444
+
1444
1445
  /**
1445
1446
  */
1446
1447
  export class AirSquadron {
@@ -1835,10 +1836,6 @@ export class Gear {
1835
1836
  * @returns {boolean}
1836
1837
  */
1837
1838
  max_exp_eq_120(): boolean;
1838
- /**
1839
- * @returns {number}
1840
- */
1841
- exp_critical_bonus(): number;
1842
1839
  /**
1843
1840
  * @param {number} slot_size
1844
1841
  * @returns {number}
@@ -2323,6 +2320,10 @@ export class Ship {
2323
2320
  * @returns {boolean}
2324
2321
  */
2325
2322
  is_installation(): boolean;
2323
+ /**
2324
+ * @returns {boolean}
2325
+ */
2326
+ is_pt_imp(): boolean;
2326
2327
  /**
2327
2328
  * @param {number} index
2328
2329
  * @returns {number | undefined}
@@ -122,21 +122,30 @@ module.exports.parse_ship_conditions = function(value) {
122
122
  return takeObject(ret);
123
123
  };
124
124
 
125
- const u32CvtShim = new Uint32Array(2);
125
+ function isLikeNone(x) {
126
+ return x === undefined || x === null;
127
+ }
126
128
 
127
- const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
129
+ let cachedUint16Memory0 = new Uint16Array();
128
130
 
129
- function getArrayU8FromWasm0(ptr, len) {
130
- return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
131
+ function getUint16Memory0() {
132
+ if (cachedUint16Memory0.byteLength === 0) {
133
+ cachedUint16Memory0 = new Uint16Array(wasm.memory.buffer);
134
+ }
135
+ return cachedUint16Memory0;
131
136
  }
132
137
 
133
- function passArray8ToWasm0(arg, malloc) {
134
- const ptr = malloc(arg.length * 1);
135
- getUint8Memory0().set(arg, ptr / 1);
138
+ function passArray16ToWasm0(arg, malloc) {
139
+ const ptr = malloc(arg.length * 2);
140
+ getUint16Memory0().set(arg, ptr / 2);
136
141
  WASM_VECTOR_LEN = arg.length;
137
142
  return ptr;
138
143
  }
139
144
 
145
+ const u32CvtShim = new Uint32Array(2);
146
+
147
+ const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
148
+
140
149
  function _assertClass(instance, klass) {
141
150
  if (!(instance instanceof klass)) {
142
151
  throw new Error(`expected instance of ${klass.name}`);
@@ -153,8 +162,15 @@ function getFloat64Memory0() {
153
162
  return cachedFloat64Memory0;
154
163
  }
155
164
 
156
- function isLikeNone(x) {
157
- return x === undefined || x === null;
165
+ function getArrayU8FromWasm0(ptr, len) {
166
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
167
+ }
168
+
169
+ function passArray8ToWasm0(arg, malloc) {
170
+ const ptr = malloc(arg.length * 1);
171
+ getUint8Memory0().set(arg, ptr / 1);
172
+ WASM_VECTOR_LEN = arg.length;
173
+ return ptr;
158
174
  }
159
175
 
160
176
  let cachedUint32Memory0 = new Uint32Array();
@@ -176,15 +192,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
176
192
  return result;
177
193
  }
178
194
 
179
- let cachedUint16Memory0 = new Uint16Array();
180
-
181
- function getUint16Memory0() {
182
- if (cachedUint16Memory0.byteLength === 0) {
183
- cachedUint16Memory0 = new Uint16Array(wasm.memory.buffer);
184
- }
185
- return cachedUint16Memory0;
186
- }
187
-
188
195
  function getArrayU16FromWasm0(ptr, len) {
189
196
  return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
190
197
  }
@@ -194,13 +201,6 @@ module.exports.set_panic_hook = function() {
194
201
  wasm.set_panic_hook();
195
202
  };
196
203
 
197
- function passArray16ToWasm0(arg, malloc) {
198
- const ptr = malloc(arg.length * 2);
199
- getUint16Memory0().set(arg, ptr / 2);
200
- WASM_VECTOR_LEN = arg.length;
201
- return ptr;
202
- }
203
-
204
204
  function handleError(f, args) {
205
205
  try {
206
206
  return f.apply(this, args);
@@ -1519,13 +1519,6 @@ class Gear {
1519
1519
  return ret !== 0;
1520
1520
  }
1521
1521
  /**
1522
- * @returns {number}
1523
- */
1524
- exp_critical_bonus() {
1525
- const ret = wasm.gear_exp_critical_bonus(this.ptr);
1526
- return ret;
1527
- }
1528
- /**
1529
1522
  * @param {number} slot_size
1530
1523
  * @returns {number}
1531
1524
  */
@@ -2893,6 +2886,13 @@ class Ship {
2893
2886
  return ret !== 0;
2894
2887
  }
2895
2888
  /**
2889
+ * @returns {boolean}
2890
+ */
2891
+ is_pt_imp() {
2892
+ const ret = wasm.ship_is_pt_imp(this.ptr);
2893
+ return ret !== 0;
2894
+ }
2895
+ /**
2896
2896
  * @param {number} index
2897
2897
  * @returns {number | undefined}
2898
2898
  */
@@ -3137,7 +3137,7 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
3137
3137
  return addHeapObject(ret);
3138
3138
  };
3139
3139
 
3140
- module.exports.__wbg_createEquipmentBonuses_d215617bb16aa6f4 = function(arg0, arg1) {
3140
+ module.exports.__wbg_createEquipmentBonuses_821511525288eda4 = function(arg0, arg1) {
3141
3141
  const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
3142
3142
  return addHeapObject(ret);
3143
3143
  };
Binary file