fleethub-core 1.8.4 → 1.8.7

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.
@@ -19,22 +19,32 @@ export interface ShipConditions extends ShipPosition {
19
19
  formation?: Formation;
20
20
  }
21
21
 
22
- declare namespace OrgType {
23
- export type Single = "Single";
24
- export type CarrierTaskForce = "CarrierTaskForce";
25
- export type SurfaceTaskForce = "SurfaceTaskForce";
26
- export type TransportEscort = "TransportEscort";
27
- export type EnemySingle = "EnemySingle";
28
- export type EnemyCombined = "EnemyCombined";
22
+ declare namespace Role {
23
+ export type Main = "Main";
24
+ export type Escort = "Escort";
29
25
  }
30
26
 
31
- export type OrgType =
32
- | OrgType.Single
33
- | OrgType.CarrierTaskForce
34
- | OrgType.SurfaceTaskForce
35
- | OrgType.TransportEscort
36
- | OrgType.EnemySingle
37
- | OrgType.EnemyCombined;
27
+ export type Role = Role.Main | Role.Escort;
28
+
29
+ export interface ShipPosition {
30
+ org_type?: OrgType;
31
+ fleet_type?: FleetType;
32
+ fleet_len?: number;
33
+ index?: number;
34
+ }
35
+
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;
38
48
 
39
49
  export interface BattleDefinitions {
40
50
  formation: Record<Formation, NestedFormationDef>;
@@ -127,6 +137,19 @@ export type SpecialEnemyType =
127
137
  | SpecialEnemyType.BattleshipSummerPrincess
128
138
  | SpecialEnemyType.HeavyCruiserSummerPrincess;
129
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
+
130
153
  type __NightCutinLikeFleetCutin = FleetCutin;
131
154
  type __NightCutinLikeNightCutin = NightCutin;
132
155
  declare namespace NightCutinLike {
@@ -427,34 +450,6 @@ export type DamageState =
427
450
  | DamageState.Taiha
428
451
  | DamageState.Sunk;
429
452
 
430
- declare namespace AirStateRank {
431
- export type Rank0 = "Rank0";
432
- export type Rank1 = "Rank1";
433
- export type Rank2 = "Rank2";
434
- export type Rank3 = "Rank3";
435
- }
436
-
437
- export type AirStateRank =
438
- | AirStateRank.Rank0
439
- | AirStateRank.Rank1
440
- | AirStateRank.Rank2
441
- | AirStateRank.Rank3;
442
-
443
- declare namespace AirState {
444
- export type AirSupremacy = "AirSupremacy";
445
- export type AirSuperiority = "AirSuperiority";
446
- export type AirParity = "AirParity";
447
- export type AirDenial = "AirDenial";
448
- export type AirIncapability = "AirIncapability";
449
- }
450
-
451
- export type AirState =
452
- | AirState.AirSupremacy
453
- | AirState.AirSuperiority
454
- | AirState.AirParity
455
- | AirState.AirDenial
456
- | AirState.AirIncapability;
457
-
458
453
  export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
459
454
  formation?: Formation;
460
455
  }
@@ -471,20 +466,6 @@ export interface NodeAttackAnalysis {
471
466
  right: AttackAnalysis;
472
467
  }
473
468
 
474
- declare namespace Role {
475
- export type Main = "Main";
476
- export type Escort = "Escort";
477
- }
478
-
479
- export type Role = Role.Main | Role.Escort;
480
-
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,6 +554,34 @@ 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 {
590
586
  created_at: number;
591
587
  gears: MasterGear[];
@@ -686,12 +682,23 @@ export type ShipAttr =
686
682
  | ShipAttr.BattleshipSummerPrincess
687
683
  | ShipAttr.HeavyCruiserSummerPrincess;
688
684
 
689
- export interface SupportShellingSimulatorParams {
690
- attacker_formation?: Formation;
691
- target_formation?: Formation;
692
- 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";
693
692
  }
694
693
 
694
+ export type OrgType =
695
+ | OrgType.Single
696
+ | OrgType.CarrierTaskForce
697
+ | OrgType.SurfaceTaskForce
698
+ | OrgType.TransportEscort
699
+ | OrgType.EnemySingle
700
+ | OrgType.EnemyCombined;
701
+
695
702
  declare namespace GearAttr {
696
703
  export type Unknown = "Unknown";
697
704
  export type Abyssal = "Abyssal";
@@ -812,6 +819,12 @@ export interface ShellingStyle {
812
819
  hits: number;
813
820
  }
814
821
 
822
+ export interface SupportShellingSimulatorParams {
823
+ attacker_formation?: Formation;
824
+ target_formation?: Formation;
825
+ engagement: Engagement;
826
+ }
827
+
815
828
  export interface MasterIBonuses {
816
829
  shelling_power: MasterIBonusRule[];
817
830
  carrier_shelling_power: MasterIBonusRule[];
@@ -872,12 +885,6 @@ export interface DamageReport {
872
885
  damage_state_density: Histogram<DamageState, number>;
873
886
  }
874
887
 
875
- export interface AttackAnalyzerShipConfig
876
- extends ShipConditions,
877
- NightFleetConditions {
878
- fleet_los_mod?: number | null;
879
- }
880
-
881
888
  export interface CompAntiAirAnalysis {
882
889
  fleet_adjusted_anti_air: number;
883
890
  ships: AntiAirReport[];
@@ -1078,6 +1085,12 @@ export interface DayContactChance {
1078
1085
  total: number;
1079
1086
  }
1080
1087
 
1088
+ export interface AttackAnalyzerShipConfig
1089
+ extends ShipConditions,
1090
+ NightFleetConditions {
1091
+ fleet_los_mod?: number | null;
1092
+ }
1093
+
1081
1094
  export interface AttackAnalysis {
1082
1095
  attacker_is_player: boolean;
1083
1096
  attacker_ship_id: number;
@@ -1144,31 +1157,6 @@ export interface MasterShip {
1144
1157
 
1145
1158
  export type StatInterval = [number | null, number | null];
1146
1159
 
1147
- export interface MasterGear {
1148
- gear_id: number;
1149
- name: string;
1150
- types: GearTypeIdArray;
1151
- special_type?: number;
1152
- max_hp?: number;
1153
- firepower?: number;
1154
- armor?: number;
1155
- torpedo?: number;
1156
- anti_air?: number;
1157
- speed?: number;
1158
- bombing?: number;
1159
- asw?: number;
1160
- los?: number;
1161
- luck?: number;
1162
- accuracy?: number;
1163
- evasion?: number;
1164
- range?: number;
1165
- radius?: number;
1166
- cost?: number;
1167
- improvable?: boolean;
1168
- ship_anti_air_resist?: number;
1169
- fleet_anti_air_resist?: number;
1170
- }
1171
-
1172
1160
  export interface CompAnalyzerConfig {
1173
1161
  engagement: Engagement;
1174
1162
  formation: Formation;
@@ -1331,10 +1319,29 @@ export type SpeedGroup =
1331
1319
 
1332
1320
  export type SlotSizeVec = (number | null)[];
1333
1321
 
1334
- export interface ActionReport<T> {
1335
- data: Record<string, AttackReport<T>>;
1336
- damage_state_density: Histogram<DamageState, number> | null;
1337
- 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;
1338
1345
  }
1339
1346
 
1340
1347
  export type GearTypeIdArray = [number, number, number, number, number];
@@ -1411,19 +1418,6 @@ export type ShipCategory =
1411
1418
  | ShipCategory.Submarine
1412
1419
  | ShipCategory.AuxiliaryShip;
1413
1420
 
1414
- declare namespace MoraleState {
1415
- export type Sparkle = "Sparkle";
1416
- export type Normal = "Normal";
1417
- export type Orange = "Orange";
1418
- export type Red = "Red";
1419
- }
1420
-
1421
- export type MoraleState =
1422
- | MoraleState.Sparkle
1423
- | MoraleState.Normal
1424
- | MoraleState.Orange
1425
- | MoraleState.Red;
1426
-
1427
1421
  export interface FleetCutinAnalysis {
1428
1422
  shelling: FleetCutinReport<ShellingStyle>[];
1429
1423
  night: FleetCutinReport<NightAttackStyle>[];
@@ -1442,6 +1436,12 @@ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
1442
1436
  power_mod: number;
1443
1437
  }
1444
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
+
1445
1445
  /**
1446
1446
  */
1447
1447
  export class AirSquadron {
@@ -1836,10 +1836,6 @@ export class Gear {
1836
1836
  * @returns {boolean}
1837
1837
  */
1838
1838
  max_exp_eq_120(): boolean;
1839
- /**
1840
- * @returns {number}
1841
- */
1842
- exp_critical_bonus(): number;
1843
1839
  /**
1844
1840
  * @param {number} slot_size
1845
1841
  * @returns {number}
@@ -2324,6 +2320,10 @@ export class Ship {
2324
2320
  * @returns {boolean}
2325
2321
  */
2326
2322
  is_installation(): boolean;
2323
+ /**
2324
+ * @returns {boolean}
2325
+ */
2326
+ is_pt_imp(): boolean;
2327
2327
  /**
2328
2328
  * @param {number} index
2329
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_662742ffd582ab7c = function(arg0, arg1) {
3140
+ module.exports.__wbg_createEquipmentBonuses_970b62943e7f3a74 = function(arg0, arg1) {
3141
3141
  const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
3142
3142
  return addHeapObject(ret);
3143
3143
  };
Binary file