fleethub-core 1.7.0 → 1.7.1

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.
@@ -1,11 +1,13 @@
1
1
  import { createEquipmentBonuses } from 'equipment-bonus';
2
2
  import * as wasm from './fleethub_core_bg.wasm';
3
3
 
4
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
4
+ const heap = new Array(32).fill(undefined);
5
5
 
6
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
6
+ heap.push(undefined, null, true, false);
7
7
 
8
- cachedTextDecoder.decode();
8
+ function getObject(idx) { return heap[idx]; }
9
+
10
+ let WASM_VECTOR_LEN = 0;
9
11
 
10
12
  let cachegetUint8Memory0 = null;
11
13
  function getUint8Memory0() {
@@ -15,41 +17,6 @@ function getUint8Memory0() {
15
17
  return cachegetUint8Memory0;
16
18
  }
17
19
 
18
- function getStringFromWasm0(ptr, len) {
19
- return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
20
- }
21
-
22
- const heap = new Array(32).fill(undefined);
23
-
24
- heap.push(undefined, null, true, false);
25
-
26
- let heap_next = heap.length;
27
-
28
- function addHeapObject(obj) {
29
- if (heap_next === heap.length) heap.push(heap.length + 1);
30
- const idx = heap_next;
31
- heap_next = heap[idx];
32
-
33
- heap[idx] = obj;
34
- return idx;
35
- }
36
-
37
- function getObject(idx) { return heap[idx]; }
38
-
39
- function dropObject(idx) {
40
- if (idx < 36) return;
41
- heap[idx] = heap_next;
42
- heap_next = idx;
43
- }
44
-
45
- function takeObject(idx) {
46
- const ret = getObject(idx);
47
- dropObject(idx);
48
- return ret;
49
- }
50
-
51
- let WASM_VECTOR_LEN = 0;
52
-
53
20
  const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
54
21
 
55
22
  let cachedTextEncoder = new lTextEncoder('utf-8');
@@ -113,6 +80,39 @@ function getInt32Memory0() {
113
80
  return cachegetInt32Memory0;
114
81
  }
115
82
 
83
+ let heap_next = heap.length;
84
+
85
+ function dropObject(idx) {
86
+ if (idx < 36) return;
87
+ heap[idx] = heap_next;
88
+ heap_next = idx;
89
+ }
90
+
91
+ function takeObject(idx) {
92
+ const ret = getObject(idx);
93
+ dropObject(idx);
94
+ return ret;
95
+ }
96
+
97
+ const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
98
+
99
+ let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
100
+
101
+ cachedTextDecoder.decode();
102
+
103
+ function getStringFromWasm0(ptr, len) {
104
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
105
+ }
106
+
107
+ function addHeapObject(obj) {
108
+ if (heap_next === heap.length) heap.push(heap.length + 1);
109
+ const idx = heap_next;
110
+ heap_next = heap[idx];
111
+
112
+ heap[idx] = obj;
113
+ return idx;
114
+ }
115
+
116
116
  const u32CvtShim = new Uint32Array(2);
117
117
 
118
118
  const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
@@ -923,7 +923,7 @@ export class Fleet {
923
923
  get xxh3() {
924
924
  try {
925
925
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
926
- wasm.__wbg_get_fleet_xxh3(retptr, this.ptr);
926
+ wasm.__wbg_get_airsquadron_xxh3(retptr, this.ptr);
927
927
  var r0 = getInt32Memory0()[retptr / 4 + 0];
928
928
  var r1 = getInt32Memory0()[retptr / 4 + 1];
929
929
  u32CvtShim[0] = r0;
@@ -941,7 +941,7 @@ export class Fleet {
941
941
  uint64CvtShim[0] = arg0;
942
942
  const low0 = u32CvtShim[0];
943
943
  const high0 = u32CvtShim[1];
944
- wasm.__wbg_set_fleet_xxh3(this.ptr, low0, high0);
944
+ wasm.__wbg_set_airsquadron_xxh3(this.ptr, low0, high0);
945
945
  }
946
946
  /**
947
947
  */
@@ -1629,6 +1629,13 @@ export class Gear {
1629
1629
  /**
1630
1630
  * @returns {boolean}
1631
1631
  */
1632
+ is_high_angle_mount() {
1633
+ const ret = wasm.gear_is_high_angle_mount(this.ptr);
1634
+ return ret !== 0;
1635
+ }
1636
+ /**
1637
+ * @returns {boolean}
1638
+ */
1632
1639
  is_carrier_shelling_plane() {
1633
1640
  const ret = wasm.gear_is_carrier_shelling_plane(this.ptr);
1634
1641
  return ret !== 0;
@@ -3054,8 +3061,8 @@ export class Ship {
3054
3061
  /**
3055
3062
  * @returns {number}
3056
3063
  */
3057
- get torpedo_accuracy_mod() {
3058
- const ret = wasm.ship_torpedo_accuracy_mod(this.ptr);
3064
+ get innate_torpedo_accuracy() {
3065
+ const ret = wasm.ship_innate_torpedo_accuracy(this.ptr);
3059
3066
  return ret;
3060
3067
  }
3061
3068
  /**
@@ -3229,6 +3236,21 @@ export class Ship {
3229
3236
  }
3230
3237
  }
3231
3238
  /**
3239
+ * 確殺攻撃力
3240
+ * @returns {number | undefined}
3241
+ */
3242
+ ohko_power() {
3243
+ try {
3244
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3245
+ wasm.ship_ohko_power(retptr, this.ptr);
3246
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
3247
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
3248
+ return r0 === 0 ? undefined : r2;
3249
+ } finally {
3250
+ wasm.__wbindgen_add_to_stack_pointer(16);
3251
+ }
3252
+ }
3253
+ /**
3232
3254
  * @param {number} value
3233
3255
  */
3234
3256
  take_damage(value) {
@@ -3236,15 +3258,6 @@ export class Ship {
3236
3258
  }
3237
3259
  }
3238
3260
 
3239
- export function __wbindgen_string_new(arg0, arg1) {
3240
- const ret = getStringFromWasm0(arg0, arg1);
3241
- return addHeapObject(ret);
3242
- };
3243
-
3244
- export function __wbindgen_object_drop_ref(arg0) {
3245
- takeObject(arg0);
3246
- };
3247
-
3248
3261
  export function __wbindgen_json_serialize(arg0, arg1) {
3249
3262
  const obj = getObject(arg1);
3250
3263
  const ret = JSON.stringify(obj === undefined ? null : obj);
@@ -3254,7 +3267,16 @@ export function __wbindgen_json_serialize(arg0, arg1) {
3254
3267
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
3255
3268
  };
3256
3269
 
3257
- export function __wbg_createEquipmentBonuses_6cd0de83fb0e4aaa(arg0, arg1) {
3270
+ export function __wbindgen_object_drop_ref(arg0) {
3271
+ takeObject(arg0);
3272
+ };
3273
+
3274
+ export function __wbindgen_string_new(arg0, arg1) {
3275
+ const ret = getStringFromWasm0(arg0, arg1);
3276
+ return addHeapObject(ret);
3277
+ };
3278
+
3279
+ export function __wbg_createEquipmentBonuses_2a069c9b82b680dc(arg0, arg1) {
3258
3280
  const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
3259
3281
  return addHeapObject(ret);
3260
3282
  };
@@ -3290,7 +3312,15 @@ export function __wbg_error_09919627ac0992f5(arg0, arg1) {
3290
3312
  }
3291
3313
  };
3292
3314
 
3293
- export function __wbg_process_70251ed1291754d5(arg0) {
3315
+ export function __wbg_randomFillSync_91e2b39becca6147() { return handleError(function (arg0, arg1, arg2) {
3316
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
3317
+ }, arguments) };
3318
+
3319
+ export function __wbg_getRandomValues_b14734aa289bc356() { return handleError(function (arg0, arg1) {
3320
+ getObject(arg0).getRandomValues(getObject(arg1));
3321
+ }, arguments) };
3322
+
3323
+ export function __wbg_process_e56fd54cf6319b6c(arg0) {
3294
3324
  const ret = getObject(arg0).process;
3295
3325
  return addHeapObject(ret);
3296
3326
  };
@@ -3301,12 +3331,12 @@ export function __wbindgen_is_object(arg0) {
3301
3331
  return ret;
3302
3332
  };
3303
3333
 
3304
- export function __wbg_versions_b23f2588cdb2ddbb(arg0) {
3334
+ export function __wbg_versions_77e21455908dad33(arg0) {
3305
3335
  const ret = getObject(arg0).versions;
3306
3336
  return addHeapObject(ret);
3307
3337
  };
3308
3338
 
3309
- export function __wbg_node_61b8c9a82499895d(arg0) {
3339
+ export function __wbg_node_0dd25d832e4785d5(arg0) {
3310
3340
  const ret = getObject(arg0).node;
3311
3341
  return addHeapObject(ret);
3312
3342
  };
@@ -3316,34 +3346,26 @@ export function __wbindgen_is_string(arg0) {
3316
3346
  return ret;
3317
3347
  };
3318
3348
 
3319
- export function __wbg_static_accessor_NODE_MODULE_33b45247c55045b0() {
3349
+ export function __wbg_static_accessor_NODE_MODULE_26b231378c1be7dd() {
3320
3350
  const ret = module;
3321
3351
  return addHeapObject(ret);
3322
3352
  };
3323
3353
 
3324
- export function __wbg_require_2a93bc09fee45aca() { return handleError(function (arg0, arg1, arg2) {
3354
+ export function __wbg_require_0db1598d9ccecb30() { return handleError(function (arg0, arg1, arg2) {
3325
3355
  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
3326
3356
  return addHeapObject(ret);
3327
3357
  }, arguments) };
3328
3358
 
3329
- export function __wbg_crypto_2f56257a38275dbd(arg0) {
3359
+ export function __wbg_crypto_b95d7173266618a9(arg0) {
3330
3360
  const ret = getObject(arg0).crypto;
3331
3361
  return addHeapObject(ret);
3332
3362
  };
3333
3363
 
3334
- export function __wbg_msCrypto_d07655bf62361f21(arg0) {
3364
+ export function __wbg_msCrypto_5a86d77a66230f81(arg0) {
3335
3365
  const ret = getObject(arg0).msCrypto;
3336
3366
  return addHeapObject(ret);
3337
3367
  };
3338
3368
 
3339
- export function __wbg_getRandomValues_fb6b088efb6bead2() { return handleError(function (arg0, arg1) {
3340
- getObject(arg0).getRandomValues(getObject(arg1));
3341
- }, arguments) };
3342
-
3343
- export function __wbg_randomFillSync_654a7797990fb8db() { return handleError(function (arg0, arg1, arg2) {
3344
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
3345
- }, arguments) };
3346
-
3347
3369
  export function __wbg_new_94fb1279cf6afea5() {
3348
3370
  const ret = new Array();
3349
3371
  return addHeapObject(ret);
Binary file
@@ -78,7 +78,7 @@ export function ship_luck(a: number): number;
78
78
  export function ship_range(a: number): number;
79
79
  export function ship_speed(a: number): number;
80
80
  export function ship_accuracy(a: number): number;
81
- export function ship_torpedo_accuracy_mod(a: number): number;
81
+ export function ship_innate_torpedo_accuracy(a: number): number;
82
82
  export function ship_is_installation(a: number): number;
83
83
  export function ship_get_slot_size(a: number, b: number): number;
84
84
  export function ship_get_max_slot_size(a: number, b: number): number;
@@ -95,6 +95,7 @@ export function ship_evasion_term(a: number, b: number, c: number, d: number, e:
95
95
  export function ship_basic_defense_power(a: number, b: number, c: number): void;
96
96
  export function ship_transport_point(a: number): number;
97
97
  export function ship_elos(a: number, b: number, c: number): void;
98
+ export function ship_ohko_power(a: number, b: number): void;
98
99
  export function ship_take_damage(a: number, b: number): void;
99
100
  export function __wbg_org_free(a: number): void;
100
101
  export function __wbg_get_org_id(a: number, b: number): void;
@@ -186,8 +187,6 @@ export function airsquadron_radius(a: number): number;
186
187
  export function __wbg_fleet_free(a: number): void;
187
188
  export function __wbg_get_fleet_id(a: number, b: number): void;
188
189
  export function __wbg_set_fleet_id(a: number, b: number, c: number): void;
189
- export function __wbg_get_fleet_xxh3(a: number, b: number): void;
190
- export function __wbg_set_fleet_xxh3(a: number, b: number, c: number): void;
191
190
  export function __wbg_get_fleet_len(a: number): number;
192
191
  export function __wbg_set_fleet_len(a: number, b: number): void;
193
192
  export function fleet_meta(a: number): number;
@@ -207,6 +206,8 @@ export function fleet_aviation_detection_score(a: number, b: number): void;
207
206
  export function fleet_expedition_bonus(a: number): number;
208
207
  export function fleet_sum_ship_stat_by(a: number, b: number, c: number, d: number): void;
209
208
  export function fleet_reset_battle_state(a: number): void;
209
+ export function __wbg_get_fleet_xxh3(a: number, b: number): void;
210
+ export function __wbg_set_fleet_xxh3(a: number, b: number, c: number): void;
210
211
  export function __wbg_fhcore_free(a: number): void;
211
212
  export function fhcore_new(a: number, b: number): void;
212
213
  export function fhcore_create_gear(a: number, b: number): number;
@@ -318,6 +319,7 @@ export function gear_category(a: number): number;
318
319
  export function gear_ace(a: number): number;
319
320
  export function gear_anti_bomber(a: number): number;
320
321
  export function gear_interception(a: number): number;
322
+ export function gear_is_high_angle_mount(a: number): number;
321
323
  export function gear_is_carrier_shelling_plane(a: number): number;
322
324
  export function gear_max_exp_eq_120(a: number): number;
323
325
  export function gear_proficiency_critical_power_mod(a: number): number;