fleethub-core 1.7.2 → 1.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/node/fleethub_core.d.ts +113 -113
- package/node/fleethub_core.js +92 -63
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +5 -3
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +113 -113
- package/pkg/fleethub_core_bg.js +92 -63
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +5 -3
package/node/fleethub_core.d.ts
CHANGED
|
@@ -100,8 +100,6 @@ export interface WarfareShipEnvironment {
|
|
|
100
100
|
fleet_los_mod: number | null;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export type Role = "Main" | "Escort";
|
|
104
|
-
|
|
105
103
|
export interface CompMeta {
|
|
106
104
|
fleets: Record<FleetType, FleetMeta>;
|
|
107
105
|
}
|
|
@@ -213,6 +211,8 @@ export interface DayCutinRateInfo {
|
|
|
213
211
|
|
|
214
212
|
export type NumMap<K, V> = Partial<Record<K, V>>;
|
|
215
213
|
|
|
214
|
+
export type Role = "Main" | "Escort";
|
|
215
|
+
|
|
216
216
|
export type GearCategory =
|
|
217
217
|
| "Fighter"
|
|
218
218
|
| "Bomber"
|
|
@@ -417,6 +417,37 @@ export type ShipAttr =
|
|
|
417
417
|
| "BattleshipSummerPrincess"
|
|
418
418
|
| "HeavyCruiserSummerPrincess";
|
|
419
419
|
|
|
420
|
+
export type GearAttr =
|
|
421
|
+
| "Unknown"
|
|
422
|
+
| "Abyssal"
|
|
423
|
+
| "HighAngleMount"
|
|
424
|
+
| "NightFighter"
|
|
425
|
+
| "NightAttacker"
|
|
426
|
+
| "HeavyBomber"
|
|
427
|
+
| "MainGun"
|
|
428
|
+
| "Radar"
|
|
429
|
+
| "SurfaceRadar"
|
|
430
|
+
| "AirRadar"
|
|
431
|
+
| "DepthChargeProjector"
|
|
432
|
+
| "SynergisticDepthCharge"
|
|
433
|
+
| "AntiSubMortar"
|
|
434
|
+
| "AntiSubWeapon"
|
|
435
|
+
| "AntiSubAircraft"
|
|
436
|
+
| "LateModelBowTorpedo"
|
|
437
|
+
| "Seaplane"
|
|
438
|
+
| "CbAircraft"
|
|
439
|
+
| "LbAircraft"
|
|
440
|
+
| "JetAircraft"
|
|
441
|
+
| "Fighter"
|
|
442
|
+
| "Recon"
|
|
443
|
+
| "ObservationSeaplane"
|
|
444
|
+
| "CbFighterBomber"
|
|
445
|
+
| "AntiInstDiveBomber"
|
|
446
|
+
| "NightRecon"
|
|
447
|
+
| "CbSwordfish"
|
|
448
|
+
| "SemiNightPlane"
|
|
449
|
+
| "HighAltitudeInterceptor";
|
|
450
|
+
|
|
420
451
|
export type Formation = SingleFormation | CombinedFormation;
|
|
421
452
|
|
|
422
453
|
export type CombinedFormation =
|
|
@@ -433,8 +464,6 @@ export type SingleFormation =
|
|
|
433
464
|
| "LineAbreast"
|
|
434
465
|
| "Vanguard";
|
|
435
466
|
|
|
436
|
-
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
437
|
-
|
|
438
467
|
export interface CompAntiAirInfo {
|
|
439
468
|
fleet_adjusted_anti_air: number;
|
|
440
469
|
ships: ShipAntiAirInfo[];
|
|
@@ -465,63 +494,7 @@ export interface AirstrikeContactChance {
|
|
|
465
494
|
total: number;
|
|
466
495
|
}
|
|
467
496
|
|
|
468
|
-
export type
|
|
469
|
-
|
|
470
|
-
export type GearAttr =
|
|
471
|
-
| "Unknown"
|
|
472
|
-
| "Abyssal"
|
|
473
|
-
| "HighAngleMount"
|
|
474
|
-
| "NightFighter"
|
|
475
|
-
| "NightAttacker"
|
|
476
|
-
| "HeavyBomber"
|
|
477
|
-
| "MainGun"
|
|
478
|
-
| "Radar"
|
|
479
|
-
| "SurfaceRadar"
|
|
480
|
-
| "AirRadar"
|
|
481
|
-
| "DepthChargeProjector"
|
|
482
|
-
| "SynergisticDepthCharge"
|
|
483
|
-
| "AntiSubMortar"
|
|
484
|
-
| "AntiSubWeapon"
|
|
485
|
-
| "AntiSubAircraft"
|
|
486
|
-
| "LateModelBowTorpedo"
|
|
487
|
-
| "Seaplane"
|
|
488
|
-
| "CbAircraft"
|
|
489
|
-
| "LbAircraft"
|
|
490
|
-
| "JetAircraft"
|
|
491
|
-
| "Fighter"
|
|
492
|
-
| "Recon"
|
|
493
|
-
| "ObservationSeaplane"
|
|
494
|
-
| "CbFighterBomber"
|
|
495
|
-
| "AntiInstDiveBomber"
|
|
496
|
-
| "NightRecon"
|
|
497
|
-
| "CbSwordfish"
|
|
498
|
-
| "SemiNightPlane"
|
|
499
|
-
| "HighAltitudeInterceptor";
|
|
500
|
-
|
|
501
|
-
export interface MasterGear {
|
|
502
|
-
gear_id: number;
|
|
503
|
-
name: string;
|
|
504
|
-
types: GearTypeIdArray;
|
|
505
|
-
special_type?: number;
|
|
506
|
-
max_hp?: number;
|
|
507
|
-
firepower?: number;
|
|
508
|
-
armor?: number;
|
|
509
|
-
torpedo?: number;
|
|
510
|
-
anti_air?: number;
|
|
511
|
-
speed?: number;
|
|
512
|
-
bombing?: number;
|
|
513
|
-
asw?: number;
|
|
514
|
-
los?: number;
|
|
515
|
-
luck?: number;
|
|
516
|
-
accuracy?: number;
|
|
517
|
-
evasion?: number;
|
|
518
|
-
range?: number;
|
|
519
|
-
radius?: number;
|
|
520
|
-
cost?: number;
|
|
521
|
-
improvable?: boolean;
|
|
522
|
-
ship_anti_air_resistance?: number;
|
|
523
|
-
fleet_anti_air_resistance?: number;
|
|
524
|
-
}
|
|
497
|
+
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
525
498
|
|
|
526
499
|
export interface MasterEquippable {
|
|
527
500
|
equip_stype: EquipStype[];
|
|
@@ -545,21 +518,6 @@ export interface EquipStype {
|
|
|
545
518
|
equip_type: number[];
|
|
546
519
|
}
|
|
547
520
|
|
|
548
|
-
export interface HitRate {
|
|
549
|
-
total: number;
|
|
550
|
-
normal: number;
|
|
551
|
-
critical: number;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export interface HitRateParams {
|
|
555
|
-
accuracy_term: number;
|
|
556
|
-
evasion_term: number;
|
|
557
|
-
target_morale_mod: number;
|
|
558
|
-
critical_rate_constant: number;
|
|
559
|
-
critical_percentage_bonus: number;
|
|
560
|
-
hit_percentage_bonus: number;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
521
|
export type NightBattleAttackType =
|
|
564
522
|
| { t: "NightAttack"; c: NightAttackType }
|
|
565
523
|
| { t: "Asw"; c: AswAttackType };
|
|
@@ -609,20 +567,9 @@ export interface OrgState {
|
|
|
609
567
|
boss_sup?: string;
|
|
610
568
|
}
|
|
611
569
|
|
|
612
|
-
export interface AirSquadronState {
|
|
570
|
+
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
613
571
|
id?: string;
|
|
614
572
|
mode?: AirSquadronMode;
|
|
615
|
-
g1?: GearState;
|
|
616
|
-
g2?: GearState;
|
|
617
|
-
g3?: GearState;
|
|
618
|
-
g4?: GearState;
|
|
619
|
-
g5?: GearState;
|
|
620
|
-
gx?: GearState;
|
|
621
|
-
ss1?: number;
|
|
622
|
-
ss2?: number;
|
|
623
|
-
ss3?: number;
|
|
624
|
-
ss4?: number;
|
|
625
|
-
ss5?: number;
|
|
626
573
|
}
|
|
627
574
|
|
|
628
575
|
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
@@ -656,6 +603,8 @@ export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
|
656
603
|
asw_mod?: number;
|
|
657
604
|
los_mod?: number;
|
|
658
605
|
luck_mod?: number;
|
|
606
|
+
day_gunfit_accuracy?: number;
|
|
607
|
+
night_gunfit_accuracy?: number;
|
|
659
608
|
}
|
|
660
609
|
|
|
661
610
|
export interface SlotSizeVecState {
|
|
@@ -705,30 +654,44 @@ export type NightCutin =
|
|
|
705
654
|
| "Cvci1_18"
|
|
706
655
|
| "Photobomber";
|
|
707
656
|
|
|
708
|
-
export interface
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
657
|
+
export interface MasterGear {
|
|
658
|
+
gear_id: number;
|
|
659
|
+
name: string;
|
|
660
|
+
types: GearTypeIdArray;
|
|
661
|
+
special_type?: number;
|
|
662
|
+
max_hp?: number;
|
|
663
|
+
firepower?: number;
|
|
664
|
+
armor?: number;
|
|
665
|
+
torpedo?: number;
|
|
666
|
+
anti_air?: number;
|
|
667
|
+
speed?: number;
|
|
668
|
+
bombing?: number;
|
|
669
|
+
asw?: number;
|
|
670
|
+
los?: number;
|
|
671
|
+
luck?: number;
|
|
672
|
+
accuracy?: number;
|
|
673
|
+
evasion?: number;
|
|
674
|
+
range?: number;
|
|
675
|
+
radius?: number;
|
|
676
|
+
cost?: number;
|
|
677
|
+
improvable?: boolean;
|
|
678
|
+
ship_anti_air_resistance?: number;
|
|
679
|
+
fleet_anti_air_resistance?: number;
|
|
714
680
|
}
|
|
715
681
|
|
|
716
|
-
export interface
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
air_state: AirState;
|
|
682
|
+
export interface HitRate {
|
|
683
|
+
total: number;
|
|
684
|
+
normal: number;
|
|
685
|
+
critical: number;
|
|
721
686
|
}
|
|
722
687
|
|
|
723
|
-
export interface
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
night_situation: NightSituation;
|
|
731
|
-
custom_mods: CustomModifiers;
|
|
688
|
+
export interface HitRateParams {
|
|
689
|
+
accuracy_term: number;
|
|
690
|
+
evasion_term: number;
|
|
691
|
+
target_morale_mod: number;
|
|
692
|
+
critical_rate_constant: number;
|
|
693
|
+
critical_percentage_bonus: number;
|
|
694
|
+
hit_percentage_bonus: number;
|
|
732
695
|
}
|
|
733
696
|
|
|
734
697
|
export interface BattleConfig {
|
|
@@ -816,8 +779,36 @@ export interface MasterShip {
|
|
|
816
779
|
|
|
817
780
|
export type StatInterval = [number | null, number | null];
|
|
818
781
|
|
|
782
|
+
export interface WarfareInfo {
|
|
783
|
+
day: AttackInfo<DayBattleAttackType, DayCutin | null> | null;
|
|
784
|
+
closing_torpedo: AttackInfo<null, null> | null;
|
|
785
|
+
night: AttackInfo<NightBattleAttackType, NightCutin | null> | null;
|
|
786
|
+
shelling_support: AttackInfo<null, null> | null;
|
|
787
|
+
opening_asw: AttackInfo<null, null> | null;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export interface WarfareAnalyzerContext {
|
|
791
|
+
attacker_env: WarfareAnalyzerShipEnvironment;
|
|
792
|
+
target_env: WarfareAnalyzerShipEnvironment;
|
|
793
|
+
engagement: Engagement;
|
|
794
|
+
air_state: AirState;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export interface WarfareAnalyzerShipEnvironment {
|
|
798
|
+
org_type: OrgType;
|
|
799
|
+
role: Role;
|
|
800
|
+
ship_index: number;
|
|
801
|
+
fleet_len: number;
|
|
802
|
+
formation: Formation;
|
|
803
|
+
fleet_los_mod: number | null;
|
|
804
|
+
night_situation: NightSituation;
|
|
805
|
+
custom_mods: CustomModifiers;
|
|
806
|
+
}
|
|
807
|
+
|
|
819
808
|
export type GearTypeIdArray = [number, number, number, number, number];
|
|
820
809
|
|
|
810
|
+
export type SlotSizeVec = (number | null)[];
|
|
811
|
+
|
|
821
812
|
export type Side = "Player" | "Enemy";
|
|
822
813
|
|
|
823
814
|
export type SpecialEnemyType =
|
|
@@ -1814,11 +1805,6 @@ export class Ship {
|
|
|
1814
1805
|
* @returns {number}
|
|
1815
1806
|
*/
|
|
1816
1807
|
cruiser_fit_bonus(): number;
|
|
1817
|
-
/**
|
|
1818
|
-
* @param {boolean} is_night
|
|
1819
|
-
* @returns {number}
|
|
1820
|
-
*/
|
|
1821
|
-
fit_gun_bonus(is_night: boolean): number;
|
|
1822
1808
|
/**
|
|
1823
1809
|
* @returns {number | undefined}
|
|
1824
1810
|
*/
|
|
@@ -1861,6 +1847,20 @@ export class Ship {
|
|
|
1861
1847
|
* @param {number} value
|
|
1862
1848
|
*/
|
|
1863
1849
|
take_damage(value: number): void;
|
|
1850
|
+
/**
|
|
1851
|
+
* @returns {number | undefined}
|
|
1852
|
+
*/
|
|
1853
|
+
state_day_gunfit_accuracy(): number | undefined;
|
|
1854
|
+
/**
|
|
1855
|
+
* @returns {number | undefined}
|
|
1856
|
+
*/
|
|
1857
|
+
state_night_gunfit_accuracy(): number | undefined;
|
|
1858
|
+
/**
|
|
1859
|
+
* フィット砲補正
|
|
1860
|
+
* @param {boolean} is_night
|
|
1861
|
+
* @returns {number}
|
|
1862
|
+
*/
|
|
1863
|
+
gunfit_accuracy(is_night: boolean): number;
|
|
1864
1864
|
/**
|
|
1865
1865
|
*/
|
|
1866
1866
|
readonly accuracy: number;
|
package/node/fleethub_core.js
CHANGED
|
@@ -2,15 +2,11 @@ let imports = {};
|
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
4
|
const { createEquipmentBonuses } = require(`equipment-bonus`);
|
|
5
|
-
const {
|
|
5
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
7
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
cachedTextDecoder.decode();
|
|
14
10
|
|
|
15
11
|
let cachedUint8Memory0;
|
|
16
12
|
function getUint8Memory0() {
|
|
@@ -20,6 +16,41 @@ function getUint8Memory0() {
|
|
|
20
16
|
return cachedUint8Memory0;
|
|
21
17
|
}
|
|
22
18
|
|
|
19
|
+
function getStringFromWasm0(ptr, len) {
|
|
20
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const heap = new Array(32).fill(undefined);
|
|
24
|
+
|
|
25
|
+
heap.push(undefined, null, true, false);
|
|
26
|
+
|
|
27
|
+
let heap_next = heap.length;
|
|
28
|
+
|
|
29
|
+
function addHeapObject(obj) {
|
|
30
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
31
|
+
const idx = heap_next;
|
|
32
|
+
heap_next = heap[idx];
|
|
33
|
+
|
|
34
|
+
heap[idx] = obj;
|
|
35
|
+
return idx;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function getObject(idx) { return heap[idx]; }
|
|
39
|
+
|
|
40
|
+
function dropObject(idx) {
|
|
41
|
+
if (idx < 36) return;
|
|
42
|
+
heap[idx] = heap_next;
|
|
43
|
+
heap_next = idx;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function takeObject(idx) {
|
|
47
|
+
const ret = getObject(idx);
|
|
48
|
+
dropObject(idx);
|
|
49
|
+
return ret;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let WASM_VECTOR_LEN = 0;
|
|
53
|
+
|
|
23
54
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
24
55
|
|
|
25
56
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -81,37 +112,6 @@ function getInt32Memory0() {
|
|
|
81
112
|
return cachedInt32Memory0;
|
|
82
113
|
}
|
|
83
114
|
|
|
84
|
-
let heap_next = heap.length;
|
|
85
|
-
|
|
86
|
-
function dropObject(idx) {
|
|
87
|
-
if (idx < 36) return;
|
|
88
|
-
heap[idx] = heap_next;
|
|
89
|
-
heap_next = idx;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function takeObject(idx) {
|
|
93
|
-
const ret = getObject(idx);
|
|
94
|
-
dropObject(idx);
|
|
95
|
-
return ret;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
99
|
-
|
|
100
|
-
cachedTextDecoder.decode();
|
|
101
|
-
|
|
102
|
-
function getStringFromWasm0(ptr, len) {
|
|
103
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function addHeapObject(obj) {
|
|
107
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
108
|
-
const idx = heap_next;
|
|
109
|
-
heap_next = heap[idx];
|
|
110
|
-
|
|
111
|
-
heap[idx] = obj;
|
|
112
|
-
return idx;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
115
|
const u32CvtShim = new Uint32Array(2);
|
|
116
116
|
|
|
117
117
|
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
@@ -164,11 +164,6 @@ function getUint16Memory0() {
|
|
|
164
164
|
function getArrayU16FromWasm0(ptr, len) {
|
|
165
165
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
166
166
|
}
|
|
167
|
-
/**
|
|
168
|
-
*/
|
|
169
|
-
module.exports.set_panic_hook = function() {
|
|
170
|
-
wasm.set_panic_hook();
|
|
171
|
-
};
|
|
172
167
|
|
|
173
168
|
function passArray16ToWasm0(arg, malloc) {
|
|
174
169
|
const ptr = malloc(arg.length * 2);
|
|
@@ -176,6 +171,11 @@ function passArray16ToWasm0(arg, malloc) {
|
|
|
176
171
|
WASM_VECTOR_LEN = arg.length;
|
|
177
172
|
return ptr;
|
|
178
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
*/
|
|
176
|
+
module.exports.set_panic_hook = function() {
|
|
177
|
+
wasm.set_panic_hook();
|
|
178
|
+
};
|
|
179
179
|
|
|
180
180
|
function getArrayU8FromWasm0(ptr, len) {
|
|
181
181
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -916,7 +916,7 @@ class Fleet {
|
|
|
916
916
|
get xxh3() {
|
|
917
917
|
try {
|
|
918
918
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
919
|
-
wasm.
|
|
919
|
+
wasm.__wbg_get_fleet_xxh3(retptr, this.ptr);
|
|
920
920
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
921
921
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
922
922
|
u32CvtShim[0] = r0;
|
|
@@ -933,7 +933,7 @@ class Fleet {
|
|
|
933
933
|
uint64CvtShim[0] = arg0;
|
|
934
934
|
const low0 = u32CvtShim[0];
|
|
935
935
|
const high0 = u32CvtShim[1];
|
|
936
|
-
wasm.
|
|
936
|
+
wasm.__wbg_set_fleet_xxh3(this.ptr, low0, high0);
|
|
937
937
|
}
|
|
938
938
|
/**
|
|
939
939
|
*/
|
|
@@ -3042,14 +3042,6 @@ class Ship {
|
|
|
3042
3042
|
return ret;
|
|
3043
3043
|
}
|
|
3044
3044
|
/**
|
|
3045
|
-
* @param {boolean} is_night
|
|
3046
|
-
* @returns {number}
|
|
3047
|
-
*/
|
|
3048
|
-
fit_gun_bonus(is_night) {
|
|
3049
|
-
const ret = wasm.ship_fit_gun_bonus(this.ptr, is_night);
|
|
3050
|
-
return ret;
|
|
3051
|
-
}
|
|
3052
|
-
/**
|
|
3053
3045
|
* @returns {number | undefined}
|
|
3054
3046
|
*/
|
|
3055
3047
|
basic_accuracy_term() {
|
|
@@ -3152,9 +3144,55 @@ class Ship {
|
|
|
3152
3144
|
take_damage(value) {
|
|
3153
3145
|
wasm.ship_take_damage(this.ptr, value);
|
|
3154
3146
|
}
|
|
3147
|
+
/**
|
|
3148
|
+
* @returns {number | undefined}
|
|
3149
|
+
*/
|
|
3150
|
+
state_day_gunfit_accuracy() {
|
|
3151
|
+
try {
|
|
3152
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3153
|
+
wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
|
|
3154
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3155
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3156
|
+
return r0 === 0 ? undefined : r2;
|
|
3157
|
+
} finally {
|
|
3158
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
/**
|
|
3162
|
+
* @returns {number | undefined}
|
|
3163
|
+
*/
|
|
3164
|
+
state_night_gunfit_accuracy() {
|
|
3165
|
+
try {
|
|
3166
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3167
|
+
wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
|
|
3168
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3169
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3170
|
+
return r0 === 0 ? undefined : r2;
|
|
3171
|
+
} finally {
|
|
3172
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3173
|
+
}
|
|
3174
|
+
}
|
|
3175
|
+
/**
|
|
3176
|
+
* フィット砲補正
|
|
3177
|
+
* @param {boolean} is_night
|
|
3178
|
+
* @returns {number}
|
|
3179
|
+
*/
|
|
3180
|
+
gunfit_accuracy(is_night) {
|
|
3181
|
+
const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
|
|
3182
|
+
return ret;
|
|
3183
|
+
}
|
|
3155
3184
|
}
|
|
3156
3185
|
module.exports.Ship = Ship;
|
|
3157
3186
|
|
|
3187
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3188
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
3189
|
+
return addHeapObject(ret);
|
|
3190
|
+
};
|
|
3191
|
+
|
|
3192
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
3193
|
+
takeObject(arg0);
|
|
3194
|
+
};
|
|
3195
|
+
|
|
3158
3196
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
3159
3197
|
const obj = getObject(arg1);
|
|
3160
3198
|
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -3164,16 +3202,7 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
3164
3202
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3165
3203
|
};
|
|
3166
3204
|
|
|
3167
|
-
module.exports.
|
|
3168
|
-
takeObject(arg0);
|
|
3169
|
-
};
|
|
3170
|
-
|
|
3171
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3172
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
3173
|
-
return addHeapObject(ret);
|
|
3174
|
-
};
|
|
3175
|
-
|
|
3176
|
-
module.exports.__wbg_createEquipmentBonuses_184e78e66b9cdc65 = function(arg0, arg1) {
|
|
3205
|
+
module.exports.__wbg_createEquipmentBonuses_a27fec520ac90d68 = function(arg0, arg1) {
|
|
3177
3206
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
3178
3207
|
return addHeapObject(ret);
|
|
3179
3208
|
};
|
|
Binary file
|
|
@@ -88,7 +88,6 @@ export function ship_fighter_power(a: number, b: number, c: number): void;
|
|
|
88
88
|
export function ship_fleet_los_factor(a: number, b: number): void;
|
|
89
89
|
export function ship_fleet_anti_air_mod(a: number): number;
|
|
90
90
|
export function ship_cruiser_fit_bonus(a: number): number;
|
|
91
|
-
export function ship_fit_gun_bonus(a: number, b: number): number;
|
|
92
91
|
export function ship_basic_accuracy_term(a: number, b: number): void;
|
|
93
92
|
export function ship_basic_evasion_term(a: number, b: number): void;
|
|
94
93
|
export function ship_evasion_term(a: number, b: number, c: number, d: number, e: number): void;
|
|
@@ -187,6 +186,8 @@ export function airsquadron_radius(a: number): number;
|
|
|
187
186
|
export function __wbg_fleet_free(a: number): void;
|
|
188
187
|
export function __wbg_get_fleet_id(a: number, b: number): void;
|
|
189
188
|
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;
|
|
190
191
|
export function __wbg_get_fleet_len(a: number): number;
|
|
191
192
|
export function __wbg_set_fleet_len(a: number, b: number): void;
|
|
192
193
|
export function fleet_meta(a: number): number;
|
|
@@ -206,8 +207,6 @@ export function fleet_aviation_detection_score(a: number, b: number): void;
|
|
|
206
207
|
export function fleet_expedition_bonus(a: number): number;
|
|
207
208
|
export function fleet_sum_ship_stat_by(a: number, b: number, c: number, d: number): void;
|
|
208
209
|
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;
|
|
211
210
|
export function __wbg_fhcore_free(a: number): void;
|
|
212
211
|
export function fhcore_new(a: number, b: number): void;
|
|
213
212
|
export function fhcore_create_gear(a: number, b: number): number;
|
|
@@ -221,6 +220,9 @@ export function fhcore_create_comp_by_map_enemy(a: number, b: number, c: number,
|
|
|
221
220
|
export function fhcore_create_default_ship(a: number): number;
|
|
222
221
|
export function fhcore_create_analyzer(a: number): number;
|
|
223
222
|
export function fhcore_simulate_shelling_support(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
|
223
|
+
export function ship_state_day_gunfit_accuracy(a: number, b: number): void;
|
|
224
|
+
export function ship_state_night_gunfit_accuracy(a: number, b: number): void;
|
|
225
|
+
export function ship_gunfit_accuracy(a: number, b: number): number;
|
|
224
226
|
export function set_panic_hook(): void;
|
|
225
227
|
export function __wbg_ibonuses_free(a: number): void;
|
|
226
228
|
export function __wbg_get_ibonuses_shelling_power(a: number): number;
|
package/package.json
CHANGED
package/pkg/fleethub_core.d.ts
CHANGED
|
@@ -100,8 +100,6 @@ export interface WarfareShipEnvironment {
|
|
|
100
100
|
fleet_los_mod: number | null;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
export type Role = "Main" | "Escort";
|
|
104
|
-
|
|
105
103
|
export interface CompMeta {
|
|
106
104
|
fleets: Record<FleetType, FleetMeta>;
|
|
107
105
|
}
|
|
@@ -213,6 +211,8 @@ export interface DayCutinRateInfo {
|
|
|
213
211
|
|
|
214
212
|
export type NumMap<K, V> = Partial<Record<K, V>>;
|
|
215
213
|
|
|
214
|
+
export type Role = "Main" | "Escort";
|
|
215
|
+
|
|
216
216
|
export type GearCategory =
|
|
217
217
|
| "Fighter"
|
|
218
218
|
| "Bomber"
|
|
@@ -417,6 +417,37 @@ export type ShipAttr =
|
|
|
417
417
|
| "BattleshipSummerPrincess"
|
|
418
418
|
| "HeavyCruiserSummerPrincess";
|
|
419
419
|
|
|
420
|
+
export type GearAttr =
|
|
421
|
+
| "Unknown"
|
|
422
|
+
| "Abyssal"
|
|
423
|
+
| "HighAngleMount"
|
|
424
|
+
| "NightFighter"
|
|
425
|
+
| "NightAttacker"
|
|
426
|
+
| "HeavyBomber"
|
|
427
|
+
| "MainGun"
|
|
428
|
+
| "Radar"
|
|
429
|
+
| "SurfaceRadar"
|
|
430
|
+
| "AirRadar"
|
|
431
|
+
| "DepthChargeProjector"
|
|
432
|
+
| "SynergisticDepthCharge"
|
|
433
|
+
| "AntiSubMortar"
|
|
434
|
+
| "AntiSubWeapon"
|
|
435
|
+
| "AntiSubAircraft"
|
|
436
|
+
| "LateModelBowTorpedo"
|
|
437
|
+
| "Seaplane"
|
|
438
|
+
| "CbAircraft"
|
|
439
|
+
| "LbAircraft"
|
|
440
|
+
| "JetAircraft"
|
|
441
|
+
| "Fighter"
|
|
442
|
+
| "Recon"
|
|
443
|
+
| "ObservationSeaplane"
|
|
444
|
+
| "CbFighterBomber"
|
|
445
|
+
| "AntiInstDiveBomber"
|
|
446
|
+
| "NightRecon"
|
|
447
|
+
| "CbSwordfish"
|
|
448
|
+
| "SemiNightPlane"
|
|
449
|
+
| "HighAltitudeInterceptor";
|
|
450
|
+
|
|
420
451
|
export type Formation = SingleFormation | CombinedFormation;
|
|
421
452
|
|
|
422
453
|
export type CombinedFormation =
|
|
@@ -433,8 +464,6 @@ export type SingleFormation =
|
|
|
433
464
|
| "LineAbreast"
|
|
434
465
|
| "Vanguard";
|
|
435
466
|
|
|
436
|
-
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
437
|
-
|
|
438
467
|
export interface CompAntiAirInfo {
|
|
439
468
|
fleet_adjusted_anti_air: number;
|
|
440
469
|
ships: ShipAntiAirInfo[];
|
|
@@ -465,63 +494,7 @@ export interface AirstrikeContactChance {
|
|
|
465
494
|
total: number;
|
|
466
495
|
}
|
|
467
496
|
|
|
468
|
-
export type
|
|
469
|
-
|
|
470
|
-
export type GearAttr =
|
|
471
|
-
| "Unknown"
|
|
472
|
-
| "Abyssal"
|
|
473
|
-
| "HighAngleMount"
|
|
474
|
-
| "NightFighter"
|
|
475
|
-
| "NightAttacker"
|
|
476
|
-
| "HeavyBomber"
|
|
477
|
-
| "MainGun"
|
|
478
|
-
| "Radar"
|
|
479
|
-
| "SurfaceRadar"
|
|
480
|
-
| "AirRadar"
|
|
481
|
-
| "DepthChargeProjector"
|
|
482
|
-
| "SynergisticDepthCharge"
|
|
483
|
-
| "AntiSubMortar"
|
|
484
|
-
| "AntiSubWeapon"
|
|
485
|
-
| "AntiSubAircraft"
|
|
486
|
-
| "LateModelBowTorpedo"
|
|
487
|
-
| "Seaplane"
|
|
488
|
-
| "CbAircraft"
|
|
489
|
-
| "LbAircraft"
|
|
490
|
-
| "JetAircraft"
|
|
491
|
-
| "Fighter"
|
|
492
|
-
| "Recon"
|
|
493
|
-
| "ObservationSeaplane"
|
|
494
|
-
| "CbFighterBomber"
|
|
495
|
-
| "AntiInstDiveBomber"
|
|
496
|
-
| "NightRecon"
|
|
497
|
-
| "CbSwordfish"
|
|
498
|
-
| "SemiNightPlane"
|
|
499
|
-
| "HighAltitudeInterceptor";
|
|
500
|
-
|
|
501
|
-
export interface MasterGear {
|
|
502
|
-
gear_id: number;
|
|
503
|
-
name: string;
|
|
504
|
-
types: GearTypeIdArray;
|
|
505
|
-
special_type?: number;
|
|
506
|
-
max_hp?: number;
|
|
507
|
-
firepower?: number;
|
|
508
|
-
armor?: number;
|
|
509
|
-
torpedo?: number;
|
|
510
|
-
anti_air?: number;
|
|
511
|
-
speed?: number;
|
|
512
|
-
bombing?: number;
|
|
513
|
-
asw?: number;
|
|
514
|
-
los?: number;
|
|
515
|
-
luck?: number;
|
|
516
|
-
accuracy?: number;
|
|
517
|
-
evasion?: number;
|
|
518
|
-
range?: number;
|
|
519
|
-
radius?: number;
|
|
520
|
-
cost?: number;
|
|
521
|
-
improvable?: boolean;
|
|
522
|
-
ship_anti_air_resistance?: number;
|
|
523
|
-
fleet_anti_air_resistance?: number;
|
|
524
|
-
}
|
|
497
|
+
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
525
498
|
|
|
526
499
|
export interface MasterEquippable {
|
|
527
500
|
equip_stype: EquipStype[];
|
|
@@ -545,21 +518,6 @@ export interface EquipStype {
|
|
|
545
518
|
equip_type: number[];
|
|
546
519
|
}
|
|
547
520
|
|
|
548
|
-
export interface HitRate {
|
|
549
|
-
total: number;
|
|
550
|
-
normal: number;
|
|
551
|
-
critical: number;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
export interface HitRateParams {
|
|
555
|
-
accuracy_term: number;
|
|
556
|
-
evasion_term: number;
|
|
557
|
-
target_morale_mod: number;
|
|
558
|
-
critical_rate_constant: number;
|
|
559
|
-
critical_percentage_bonus: number;
|
|
560
|
-
hit_percentage_bonus: number;
|
|
561
|
-
}
|
|
562
|
-
|
|
563
521
|
export type NightBattleAttackType =
|
|
564
522
|
| { t: "NightAttack"; c: NightAttackType }
|
|
565
523
|
| { t: "Asw"; c: AswAttackType };
|
|
@@ -609,20 +567,9 @@ export interface OrgState {
|
|
|
609
567
|
boss_sup?: string;
|
|
610
568
|
}
|
|
611
569
|
|
|
612
|
-
export interface AirSquadronState {
|
|
570
|
+
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
613
571
|
id?: string;
|
|
614
572
|
mode?: AirSquadronMode;
|
|
615
|
-
g1?: GearState;
|
|
616
|
-
g2?: GearState;
|
|
617
|
-
g3?: GearState;
|
|
618
|
-
g4?: GearState;
|
|
619
|
-
g5?: GearState;
|
|
620
|
-
gx?: GearState;
|
|
621
|
-
ss1?: number;
|
|
622
|
-
ss2?: number;
|
|
623
|
-
ss3?: number;
|
|
624
|
-
ss4?: number;
|
|
625
|
-
ss5?: number;
|
|
626
573
|
}
|
|
627
574
|
|
|
628
575
|
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
@@ -656,6 +603,8 @@ export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
|
656
603
|
asw_mod?: number;
|
|
657
604
|
los_mod?: number;
|
|
658
605
|
luck_mod?: number;
|
|
606
|
+
day_gunfit_accuracy?: number;
|
|
607
|
+
night_gunfit_accuracy?: number;
|
|
659
608
|
}
|
|
660
609
|
|
|
661
610
|
export interface SlotSizeVecState {
|
|
@@ -705,30 +654,44 @@ export type NightCutin =
|
|
|
705
654
|
| "Cvci1_18"
|
|
706
655
|
| "Photobomber";
|
|
707
656
|
|
|
708
|
-
export interface
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
657
|
+
export interface MasterGear {
|
|
658
|
+
gear_id: number;
|
|
659
|
+
name: string;
|
|
660
|
+
types: GearTypeIdArray;
|
|
661
|
+
special_type?: number;
|
|
662
|
+
max_hp?: number;
|
|
663
|
+
firepower?: number;
|
|
664
|
+
armor?: number;
|
|
665
|
+
torpedo?: number;
|
|
666
|
+
anti_air?: number;
|
|
667
|
+
speed?: number;
|
|
668
|
+
bombing?: number;
|
|
669
|
+
asw?: number;
|
|
670
|
+
los?: number;
|
|
671
|
+
luck?: number;
|
|
672
|
+
accuracy?: number;
|
|
673
|
+
evasion?: number;
|
|
674
|
+
range?: number;
|
|
675
|
+
radius?: number;
|
|
676
|
+
cost?: number;
|
|
677
|
+
improvable?: boolean;
|
|
678
|
+
ship_anti_air_resistance?: number;
|
|
679
|
+
fleet_anti_air_resistance?: number;
|
|
714
680
|
}
|
|
715
681
|
|
|
716
|
-
export interface
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
air_state: AirState;
|
|
682
|
+
export interface HitRate {
|
|
683
|
+
total: number;
|
|
684
|
+
normal: number;
|
|
685
|
+
critical: number;
|
|
721
686
|
}
|
|
722
687
|
|
|
723
|
-
export interface
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
night_situation: NightSituation;
|
|
731
|
-
custom_mods: CustomModifiers;
|
|
688
|
+
export interface HitRateParams {
|
|
689
|
+
accuracy_term: number;
|
|
690
|
+
evasion_term: number;
|
|
691
|
+
target_morale_mod: number;
|
|
692
|
+
critical_rate_constant: number;
|
|
693
|
+
critical_percentage_bonus: number;
|
|
694
|
+
hit_percentage_bonus: number;
|
|
732
695
|
}
|
|
733
696
|
|
|
734
697
|
export interface BattleConfig {
|
|
@@ -816,8 +779,36 @@ export interface MasterShip {
|
|
|
816
779
|
|
|
817
780
|
export type StatInterval = [number | null, number | null];
|
|
818
781
|
|
|
782
|
+
export interface WarfareInfo {
|
|
783
|
+
day: AttackInfo<DayBattleAttackType, DayCutin | null> | null;
|
|
784
|
+
closing_torpedo: AttackInfo<null, null> | null;
|
|
785
|
+
night: AttackInfo<NightBattleAttackType, NightCutin | null> | null;
|
|
786
|
+
shelling_support: AttackInfo<null, null> | null;
|
|
787
|
+
opening_asw: AttackInfo<null, null> | null;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
export interface WarfareAnalyzerContext {
|
|
791
|
+
attacker_env: WarfareAnalyzerShipEnvironment;
|
|
792
|
+
target_env: WarfareAnalyzerShipEnvironment;
|
|
793
|
+
engagement: Engagement;
|
|
794
|
+
air_state: AirState;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export interface WarfareAnalyzerShipEnvironment {
|
|
798
|
+
org_type: OrgType;
|
|
799
|
+
role: Role;
|
|
800
|
+
ship_index: number;
|
|
801
|
+
fleet_len: number;
|
|
802
|
+
formation: Formation;
|
|
803
|
+
fleet_los_mod: number | null;
|
|
804
|
+
night_situation: NightSituation;
|
|
805
|
+
custom_mods: CustomModifiers;
|
|
806
|
+
}
|
|
807
|
+
|
|
819
808
|
export type GearTypeIdArray = [number, number, number, number, number];
|
|
820
809
|
|
|
810
|
+
export type SlotSizeVec = (number | null)[];
|
|
811
|
+
|
|
821
812
|
export type Side = "Player" | "Enemy";
|
|
822
813
|
|
|
823
814
|
export type SpecialEnemyType =
|
|
@@ -1814,11 +1805,6 @@ export class Ship {
|
|
|
1814
1805
|
* @returns {number}
|
|
1815
1806
|
*/
|
|
1816
1807
|
cruiser_fit_bonus(): number;
|
|
1817
|
-
/**
|
|
1818
|
-
* @param {boolean} is_night
|
|
1819
|
-
* @returns {number}
|
|
1820
|
-
*/
|
|
1821
|
-
fit_gun_bonus(is_night: boolean): number;
|
|
1822
1808
|
/**
|
|
1823
1809
|
* @returns {number | undefined}
|
|
1824
1810
|
*/
|
|
@@ -1861,6 +1847,20 @@ export class Ship {
|
|
|
1861
1847
|
* @param {number} value
|
|
1862
1848
|
*/
|
|
1863
1849
|
take_damage(value: number): void;
|
|
1850
|
+
/**
|
|
1851
|
+
* @returns {number | undefined}
|
|
1852
|
+
*/
|
|
1853
|
+
state_day_gunfit_accuracy(): number | undefined;
|
|
1854
|
+
/**
|
|
1855
|
+
* @returns {number | undefined}
|
|
1856
|
+
*/
|
|
1857
|
+
state_night_gunfit_accuracy(): number | undefined;
|
|
1858
|
+
/**
|
|
1859
|
+
* フィット砲補正
|
|
1860
|
+
* @param {boolean} is_night
|
|
1861
|
+
* @returns {number}
|
|
1862
|
+
*/
|
|
1863
|
+
gunfit_accuracy(is_night: boolean): number;
|
|
1864
1864
|
/**
|
|
1865
1865
|
*/
|
|
1866
1866
|
readonly accuracy: number;
|
package/pkg/fleethub_core_bg.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { createEquipmentBonuses } from 'equipment-bonus';
|
|
2
2
|
import * as wasm from './fleethub_core_bg.wasm';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
heap.push(undefined, null, true, false);
|
|
4
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
9
7
|
|
|
10
|
-
|
|
8
|
+
cachedTextDecoder.decode();
|
|
11
9
|
|
|
12
10
|
let cachedUint8Memory0;
|
|
13
11
|
function getUint8Memory0() {
|
|
@@ -17,6 +15,41 @@ function getUint8Memory0() {
|
|
|
17
15
|
return cachedUint8Memory0;
|
|
18
16
|
}
|
|
19
17
|
|
|
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
|
+
|
|
20
53
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
21
54
|
|
|
22
55
|
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
@@ -80,39 +113,6 @@ function getInt32Memory0() {
|
|
|
80
113
|
return cachedInt32Memory0;
|
|
81
114
|
}
|
|
82
115
|
|
|
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);
|
|
@@ -165,11 +165,6 @@ function getUint16Memory0() {
|
|
|
165
165
|
function getArrayU16FromWasm0(ptr, len) {
|
|
166
166
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
167
167
|
}
|
|
168
|
-
/**
|
|
169
|
-
*/
|
|
170
|
-
export function set_panic_hook() {
|
|
171
|
-
wasm.set_panic_hook();
|
|
172
|
-
}
|
|
173
168
|
|
|
174
169
|
function passArray16ToWasm0(arg, malloc) {
|
|
175
170
|
const ptr = malloc(arg.length * 2);
|
|
@@ -177,6 +172,11 @@ function passArray16ToWasm0(arg, malloc) {
|
|
|
177
172
|
WASM_VECTOR_LEN = arg.length;
|
|
178
173
|
return ptr;
|
|
179
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
*/
|
|
177
|
+
export function set_panic_hook() {
|
|
178
|
+
wasm.set_panic_hook();
|
|
179
|
+
}
|
|
180
180
|
|
|
181
181
|
function getArrayU8FromWasm0(ptr, len) {
|
|
182
182
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -913,7 +913,7 @@ export class Fleet {
|
|
|
913
913
|
get xxh3() {
|
|
914
914
|
try {
|
|
915
915
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
916
|
-
wasm.
|
|
916
|
+
wasm.__wbg_get_fleet_xxh3(retptr, this.ptr);
|
|
917
917
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
918
918
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
919
919
|
u32CvtShim[0] = r0;
|
|
@@ -930,7 +930,7 @@ export class Fleet {
|
|
|
930
930
|
uint64CvtShim[0] = arg0;
|
|
931
931
|
const low0 = u32CvtShim[0];
|
|
932
932
|
const high0 = u32CvtShim[1];
|
|
933
|
-
wasm.
|
|
933
|
+
wasm.__wbg_set_fleet_xxh3(this.ptr, low0, high0);
|
|
934
934
|
}
|
|
935
935
|
/**
|
|
936
936
|
*/
|
|
@@ -3035,14 +3035,6 @@ export class Ship {
|
|
|
3035
3035
|
return ret;
|
|
3036
3036
|
}
|
|
3037
3037
|
/**
|
|
3038
|
-
* @param {boolean} is_night
|
|
3039
|
-
* @returns {number}
|
|
3040
|
-
*/
|
|
3041
|
-
fit_gun_bonus(is_night) {
|
|
3042
|
-
const ret = wasm.ship_fit_gun_bonus(this.ptr, is_night);
|
|
3043
|
-
return ret;
|
|
3044
|
-
}
|
|
3045
|
-
/**
|
|
3046
3038
|
* @returns {number | undefined}
|
|
3047
3039
|
*/
|
|
3048
3040
|
basic_accuracy_term() {
|
|
@@ -3145,8 +3137,54 @@ export class Ship {
|
|
|
3145
3137
|
take_damage(value) {
|
|
3146
3138
|
wasm.ship_take_damage(this.ptr, value);
|
|
3147
3139
|
}
|
|
3140
|
+
/**
|
|
3141
|
+
* @returns {number | undefined}
|
|
3142
|
+
*/
|
|
3143
|
+
state_day_gunfit_accuracy() {
|
|
3144
|
+
try {
|
|
3145
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3146
|
+
wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
|
|
3147
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3148
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3149
|
+
return r0 === 0 ? undefined : r2;
|
|
3150
|
+
} finally {
|
|
3151
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
/**
|
|
3155
|
+
* @returns {number | undefined}
|
|
3156
|
+
*/
|
|
3157
|
+
state_night_gunfit_accuracy() {
|
|
3158
|
+
try {
|
|
3159
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3160
|
+
wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
|
|
3161
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3162
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3163
|
+
return r0 === 0 ? undefined : r2;
|
|
3164
|
+
} finally {
|
|
3165
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3166
|
+
}
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* フィット砲補正
|
|
3170
|
+
* @param {boolean} is_night
|
|
3171
|
+
* @returns {number}
|
|
3172
|
+
*/
|
|
3173
|
+
gunfit_accuracy(is_night) {
|
|
3174
|
+
const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
|
|
3175
|
+
return ret;
|
|
3176
|
+
}
|
|
3148
3177
|
}
|
|
3149
3178
|
|
|
3179
|
+
export function __wbindgen_string_new(arg0, arg1) {
|
|
3180
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
3181
|
+
return addHeapObject(ret);
|
|
3182
|
+
};
|
|
3183
|
+
|
|
3184
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
3185
|
+
takeObject(arg0);
|
|
3186
|
+
};
|
|
3187
|
+
|
|
3150
3188
|
export function __wbindgen_json_serialize(arg0, arg1) {
|
|
3151
3189
|
const obj = getObject(arg1);
|
|
3152
3190
|
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -3156,16 +3194,7 @@ export function __wbindgen_json_serialize(arg0, arg1) {
|
|
|
3156
3194
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3157
3195
|
};
|
|
3158
3196
|
|
|
3159
|
-
export function
|
|
3160
|
-
takeObject(arg0);
|
|
3161
|
-
};
|
|
3162
|
-
|
|
3163
|
-
export function __wbindgen_string_new(arg0, arg1) {
|
|
3164
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
3165
|
-
return addHeapObject(ret);
|
|
3166
|
-
};
|
|
3167
|
-
|
|
3168
|
-
export function __wbg_createEquipmentBonuses_184e78e66b9cdc65(arg0, arg1) {
|
|
3197
|
+
export function __wbg_createEquipmentBonuses_a27fec520ac90d68(arg0, arg1) {
|
|
3169
3198
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
3170
3199
|
return addHeapObject(ret);
|
|
3171
3200
|
};
|
|
Binary file
|
|
@@ -88,7 +88,6 @@ export function ship_fighter_power(a: number, b: number, c: number): void;
|
|
|
88
88
|
export function ship_fleet_los_factor(a: number, b: number): void;
|
|
89
89
|
export function ship_fleet_anti_air_mod(a: number): number;
|
|
90
90
|
export function ship_cruiser_fit_bonus(a: number): number;
|
|
91
|
-
export function ship_fit_gun_bonus(a: number, b: number): number;
|
|
92
91
|
export function ship_basic_accuracy_term(a: number, b: number): void;
|
|
93
92
|
export function ship_basic_evasion_term(a: number, b: number): void;
|
|
94
93
|
export function ship_evasion_term(a: number, b: number, c: number, d: number, e: number): void;
|
|
@@ -187,6 +186,8 @@ export function airsquadron_radius(a: number): number;
|
|
|
187
186
|
export function __wbg_fleet_free(a: number): void;
|
|
188
187
|
export function __wbg_get_fleet_id(a: number, b: number): void;
|
|
189
188
|
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;
|
|
190
191
|
export function __wbg_get_fleet_len(a: number): number;
|
|
191
192
|
export function __wbg_set_fleet_len(a: number, b: number): void;
|
|
192
193
|
export function fleet_meta(a: number): number;
|
|
@@ -206,8 +207,6 @@ export function fleet_aviation_detection_score(a: number, b: number): void;
|
|
|
206
207
|
export function fleet_expedition_bonus(a: number): number;
|
|
207
208
|
export function fleet_sum_ship_stat_by(a: number, b: number, c: number, d: number): void;
|
|
208
209
|
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;
|
|
211
210
|
export function __wbg_fhcore_free(a: number): void;
|
|
212
211
|
export function fhcore_new(a: number, b: number): void;
|
|
213
212
|
export function fhcore_create_gear(a: number, b: number): number;
|
|
@@ -221,6 +220,9 @@ export function fhcore_create_comp_by_map_enemy(a: number, b: number, c: number,
|
|
|
221
220
|
export function fhcore_create_default_ship(a: number): number;
|
|
222
221
|
export function fhcore_create_analyzer(a: number): number;
|
|
223
222
|
export function fhcore_simulate_shelling_support(a: number, b: number, c: number, d: number, e: number, f: number): void;
|
|
223
|
+
export function ship_state_day_gunfit_accuracy(a: number, b: number): void;
|
|
224
|
+
export function ship_state_night_gunfit_accuracy(a: number, b: number): void;
|
|
225
|
+
export function ship_gunfit_accuracy(a: number, b: number): number;
|
|
224
226
|
export function set_panic_hook(): void;
|
|
225
227
|
export function __wbg_ibonuses_free(a: number): void;
|
|
226
228
|
export function __wbg_get_ibonuses_shelling_power(a: number): number;
|