fleethub-core 1.8.9 → 1.8.12
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 +398 -317
- package/node/fleethub_core.js +203 -194
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +75 -67
- package/package.json +2 -2
- package/pkg/fleethub_core.d.ts +398 -317
- package/pkg/fleethub_core_bg.js +203 -194
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +75 -67
package/node/fleethub_core.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
*/
|
|
5
|
-
export function set_panic_hook(): void;
|
|
6
3
|
/**
|
|
7
4
|
* @param {ShipConditions} value
|
|
8
5
|
* @returns {ShipConditions}
|
|
9
6
|
*/
|
|
10
7
|
export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
/**
|
|
9
|
+
*/
|
|
10
|
+
export function set_panic_hook(): void;
|
|
13
11
|
export interface ShipPosition {
|
|
14
12
|
org_type?: OrgType;
|
|
15
13
|
fleet_type?: FleetType;
|
|
@@ -34,58 +32,6 @@ export interface ShipMeta {
|
|
|
34
32
|
|
|
35
33
|
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
36
34
|
|
|
37
|
-
export interface BattleDefinitions {
|
|
38
|
-
formation: Record<Formation, NestedFormationDef>;
|
|
39
|
-
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
40
|
-
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
41
|
-
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface NightCutinDef {
|
|
45
|
-
tag: NightCutin;
|
|
46
|
-
hits: number;
|
|
47
|
-
type_factor: number | null;
|
|
48
|
-
power_mod: number | null;
|
|
49
|
-
accuracy_mod: number | null;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export interface DayCutinDef {
|
|
53
|
-
tag: DayCutin;
|
|
54
|
-
hits: number;
|
|
55
|
-
type_factor: number | null;
|
|
56
|
-
power_mod: number | null;
|
|
57
|
-
accuracy_mod: number | null;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface AntiAirCutinDef {
|
|
61
|
-
id: number;
|
|
62
|
-
type_factor: number | null;
|
|
63
|
-
multiplier: number | null;
|
|
64
|
-
guaranteed: number | null;
|
|
65
|
-
sequential: boolean | null;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type NestedFormationDef =
|
|
69
|
-
| FormationDef
|
|
70
|
-
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
71
|
-
|
|
72
|
-
export interface FormationDef {
|
|
73
|
-
tag: Formation;
|
|
74
|
-
protection_rate: number | null;
|
|
75
|
-
fleet_anti_air_mod: number;
|
|
76
|
-
shelling: FormationCombatModifiersDef;
|
|
77
|
-
torpedo: FormationCombatModifiersDef;
|
|
78
|
-
asw: FormationCombatModifiersDef;
|
|
79
|
-
night: FormationCombatModifiersDef;
|
|
80
|
-
support_shelling: FormationCombatModifiersDef;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export interface FormationCombatModifiersDef {
|
|
84
|
-
power_mod?: number;
|
|
85
|
-
accuracy_mod?: number;
|
|
86
|
-
evasion_mod?: number;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
35
|
export type TorpedoAttackType = null;
|
|
90
36
|
|
|
91
37
|
export type NightPhaseAttackType =
|
|
@@ -111,19 +57,146 @@ export type ShellingType = "Normal" | "Carrier";
|
|
|
111
57
|
|
|
112
58
|
export type AswAttackType = "DepthCharge" | "Aircraft";
|
|
113
59
|
|
|
114
|
-
export type
|
|
60
|
+
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
115
61
|
|
|
116
|
-
export
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
| "AirParity"
|
|
120
|
-
| "AirDenial"
|
|
121
|
-
| "AirIncapability";
|
|
62
|
+
export interface NodeAttackAnalysis2 {
|
|
63
|
+
data: AttackAnalysis[];
|
|
64
|
+
}
|
|
122
65
|
|
|
123
66
|
export type CompiledEvaler = string;
|
|
124
67
|
|
|
68
|
+
export interface OrgState {
|
|
69
|
+
id?: string;
|
|
70
|
+
f1?: FleetState;
|
|
71
|
+
f2?: FleetState;
|
|
72
|
+
f3?: FleetState;
|
|
73
|
+
f4?: FleetState;
|
|
74
|
+
a1?: AirSquadronState;
|
|
75
|
+
a2?: AirSquadronState;
|
|
76
|
+
a3?: AirSquadronState;
|
|
77
|
+
hq_level?: number;
|
|
78
|
+
org_type?: OrgType;
|
|
79
|
+
sortie?: FleetKey;
|
|
80
|
+
route_sup?: FleetKey;
|
|
81
|
+
boss_sup?: FleetKey;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
85
|
+
id?: string;
|
|
86
|
+
mode?: AirSquadronMode;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
90
|
+
|
|
91
|
+
export interface FleetState {
|
|
92
|
+
id?: string;
|
|
93
|
+
len?: number;
|
|
94
|
+
s1?: ShipState;
|
|
95
|
+
s2?: ShipState;
|
|
96
|
+
s3?: ShipState;
|
|
97
|
+
s4?: ShipState;
|
|
98
|
+
s5?: ShipState;
|
|
99
|
+
s6?: ShipState;
|
|
100
|
+
s7?: ShipState;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
104
|
+
id?: string;
|
|
105
|
+
ship_id: number;
|
|
106
|
+
level?: number;
|
|
107
|
+
current_hp?: number;
|
|
108
|
+
morale?: number;
|
|
109
|
+
ammo?: number;
|
|
110
|
+
fuel?: number;
|
|
111
|
+
max_hp_mod?: number;
|
|
112
|
+
firepower_mod?: number;
|
|
113
|
+
torpedo_mod?: number;
|
|
114
|
+
armor_mod?: number;
|
|
115
|
+
anti_air_mod?: number;
|
|
116
|
+
evasion_mod?: number;
|
|
117
|
+
asw_mod?: number;
|
|
118
|
+
los_mod?: number;
|
|
119
|
+
luck_mod?: number;
|
|
120
|
+
day_gunfit_accuracy?: number;
|
|
121
|
+
night_gunfit_accuracy?: number;
|
|
122
|
+
custom_power_mods?: CustomPowerModifiers;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface SlotSizeVecState {
|
|
126
|
+
ss1?: number;
|
|
127
|
+
ss2?: number;
|
|
128
|
+
ss3?: number;
|
|
129
|
+
ss4?: number;
|
|
130
|
+
ss5?: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface GearVecState {
|
|
134
|
+
g1?: GearState;
|
|
135
|
+
g2?: GearState;
|
|
136
|
+
g3?: GearState;
|
|
137
|
+
g4?: GearState;
|
|
138
|
+
g5?: GearState;
|
|
139
|
+
gx?: GearState;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface GearState {
|
|
143
|
+
id?: string;
|
|
144
|
+
gear_id: number;
|
|
145
|
+
exp?: number;
|
|
146
|
+
stars?: number;
|
|
147
|
+
}
|
|
148
|
+
|
|
125
149
|
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
126
150
|
|
|
151
|
+
export type SlotSizeVec = (number | null)[];
|
|
152
|
+
|
|
153
|
+
export interface NightFleetConditions {
|
|
154
|
+
night_contact_rank?: ContactRank | null;
|
|
155
|
+
starshell_index?: number | null;
|
|
156
|
+
searchlight_index?: number | null;
|
|
157
|
+
activates_large_searchlight?: boolean;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface NightConditions {
|
|
161
|
+
player?: NightFleetConditions;
|
|
162
|
+
enemy?: NightFleetConditions;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export interface BattleConditions {
|
|
166
|
+
org_type: OrgType;
|
|
167
|
+
role: Role;
|
|
168
|
+
ship_index: number;
|
|
169
|
+
fleet_len: number;
|
|
170
|
+
formation: Formation;
|
|
171
|
+
fleet_los_mod: number | null;
|
|
172
|
+
night_conditions: NightFleetConditions;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface MasterGear {
|
|
176
|
+
gear_id: number;
|
|
177
|
+
name: string;
|
|
178
|
+
types: GearTypeIdArray;
|
|
179
|
+
special_type?: number;
|
|
180
|
+
max_hp?: number;
|
|
181
|
+
firepower?: number;
|
|
182
|
+
armor?: number;
|
|
183
|
+
torpedo?: number;
|
|
184
|
+
anti_air?: number;
|
|
185
|
+
speed?: number;
|
|
186
|
+
bombing?: number;
|
|
187
|
+
asw?: number;
|
|
188
|
+
los?: number;
|
|
189
|
+
luck?: number;
|
|
190
|
+
accuracy?: number;
|
|
191
|
+
evasion?: number;
|
|
192
|
+
range?: number;
|
|
193
|
+
radius?: number;
|
|
194
|
+
cost?: number;
|
|
195
|
+
improvable?: boolean;
|
|
196
|
+
ship_anti_air_resist?: number;
|
|
197
|
+
fleet_anti_air_resist?: number;
|
|
198
|
+
}
|
|
199
|
+
|
|
127
200
|
export interface ActionReport<T> {
|
|
128
201
|
data: Record<string, AttackReport<T>>;
|
|
129
202
|
damage_state_density: Histogram<DamageState, number> | null;
|
|
@@ -132,6 +205,10 @@ export interface ActionReport<T> {
|
|
|
132
205
|
|
|
133
206
|
export type GearTypeIdArray = [number, number, number, number, number];
|
|
134
207
|
|
|
208
|
+
export type Align = "Left" | "Right";
|
|
209
|
+
|
|
210
|
+
export type Side = "Player" | "Enemy";
|
|
211
|
+
|
|
135
212
|
export type ShipType =
|
|
136
213
|
| "Unknown"
|
|
137
214
|
| "DE"
|
|
@@ -167,48 +244,7 @@ export type ShipCategory =
|
|
|
167
244
|
| "Submarine"
|
|
168
245
|
| "AuxiliaryShip";
|
|
169
246
|
|
|
170
|
-
export type
|
|
171
|
-
|
|
172
|
-
export type NightCutinLike = NightCutin | FleetCutin;
|
|
173
|
-
|
|
174
|
-
export type DayCutinLike = DayCutin | FleetCutin;
|
|
175
|
-
|
|
176
|
-
export type FleetCutin =
|
|
177
|
-
| "NelsonTouch"
|
|
178
|
-
| "NagatoClassCutin"
|
|
179
|
-
| "ColoradoClassCutin"
|
|
180
|
-
| "KongouClassCutin"
|
|
181
|
-
| "Yamato2ShipCutin"
|
|
182
|
-
| "Yamato3ShipCutin";
|
|
183
|
-
|
|
184
|
-
export type NightCutin =
|
|
185
|
-
| "MainTorpRadar"
|
|
186
|
-
| "TorpLookoutRadar"
|
|
187
|
-
| "TorpTsloTorp"
|
|
188
|
-
| "TorpTsloDrum"
|
|
189
|
-
| "DoubleAttack"
|
|
190
|
-
| "TorpTorpMain"
|
|
191
|
-
| "TorpTorpTorp"
|
|
192
|
-
| "MainMainSec"
|
|
193
|
-
| "MainMainMain"
|
|
194
|
-
| "SubTorpTorp"
|
|
195
|
-
| "SubRadarTorp"
|
|
196
|
-
| "Cvci1_25"
|
|
197
|
-
| "Cvci1_20"
|
|
198
|
-
| "Cvci1_18"
|
|
199
|
-
| "Photobomber";
|
|
200
|
-
|
|
201
|
-
export type DayCutin =
|
|
202
|
-
| "Zuiun"
|
|
203
|
-
| "AirSea"
|
|
204
|
-
| "MainMain"
|
|
205
|
-
| "MainAp"
|
|
206
|
-
| "MainRadar"
|
|
207
|
-
| "MainSec"
|
|
208
|
-
| "DoubleAttack"
|
|
209
|
-
| "FBA"
|
|
210
|
-
| "BBA"
|
|
211
|
-
| "BA";
|
|
247
|
+
export type Role = "Main" | "Escort";
|
|
212
248
|
|
|
213
249
|
export interface MasterIBonuses {
|
|
214
250
|
shelling_power: MasterIBonusRule[];
|
|
@@ -253,16 +289,53 @@ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
|
|
|
253
289
|
power_mod: number;
|
|
254
290
|
}
|
|
255
291
|
|
|
256
|
-
export
|
|
257
|
-
|
|
258
|
-
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
292
|
+
export interface MoveShipPayload {
|
|
293
|
+
current: [string, string, ShipKey];
|
|
294
|
+
target: [string | null, string, ShipKey];
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
|
|
298
|
+
|
|
299
|
+
export type NightCutinLike = NightCutin | FleetCutin;
|
|
300
|
+
|
|
301
|
+
export type DayCutinLike = DayCutin | FleetCutin;
|
|
302
|
+
|
|
303
|
+
export type FleetCutin =
|
|
304
|
+
| "NelsonTouch"
|
|
305
|
+
| "NagatoClassCutin"
|
|
306
|
+
| "ColoradoClassCutin"
|
|
307
|
+
| "KongouClassCutin"
|
|
308
|
+
| "Yamato2ShipCutin"
|
|
309
|
+
| "Yamato3ShipCutin";
|
|
310
|
+
|
|
311
|
+
export type NightCutin =
|
|
312
|
+
| "MainTorpRadar"
|
|
313
|
+
| "TorpLookoutRadar"
|
|
314
|
+
| "TorpTsloTorp"
|
|
315
|
+
| "TorpTsloDrum"
|
|
316
|
+
| "DoubleAttack"
|
|
317
|
+
| "TorpTorpMain"
|
|
318
|
+
| "TorpTorpTorp"
|
|
319
|
+
| "MainMainSec"
|
|
320
|
+
| "MainMainMain"
|
|
321
|
+
| "SubTorpTorp"
|
|
322
|
+
| "SubRadarTorp"
|
|
323
|
+
| "Cvci1_25"
|
|
324
|
+
| "Cvci1_20"
|
|
325
|
+
| "Cvci1_18"
|
|
326
|
+
| "Photobomber";
|
|
327
|
+
|
|
328
|
+
export type DayCutin =
|
|
329
|
+
| "Zuiun"
|
|
330
|
+
| "AirSea"
|
|
331
|
+
| "MainMain"
|
|
332
|
+
| "MainAp"
|
|
333
|
+
| "MainRadar"
|
|
334
|
+
| "MainSec"
|
|
335
|
+
| "DoubleAttack"
|
|
336
|
+
| "FBA"
|
|
337
|
+
| "BBA"
|
|
338
|
+
| "BA";
|
|
266
339
|
|
|
267
340
|
export type ContactRank = "Rank1" | "Rank2" | "Rank3";
|
|
268
341
|
|
|
@@ -280,6 +353,8 @@ export interface SimulatorResultItem {
|
|
|
280
353
|
damage_state_map: Record<DamageState, number>;
|
|
281
354
|
}
|
|
282
355
|
|
|
356
|
+
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
357
|
+
|
|
283
358
|
export type GearCategory =
|
|
284
359
|
| "Fighter"
|
|
285
360
|
| "Bomber"
|
|
@@ -358,7 +433,14 @@ export type GearType =
|
|
|
358
433
|
|
|
359
434
|
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
360
435
|
|
|
361
|
-
export type
|
|
436
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
437
|
+
|
|
438
|
+
export type AirState =
|
|
439
|
+
| "AirSupremacy"
|
|
440
|
+
| "AirSuperiority"
|
|
441
|
+
| "AirParity"
|
|
442
|
+
| "AirDenial"
|
|
443
|
+
| "AirIncapability";
|
|
362
444
|
|
|
363
445
|
export interface MasterData extends MasterBattleDefinitions {
|
|
364
446
|
created_at: number;
|
|
@@ -437,33 +519,10 @@ export interface GearInput {
|
|
|
437
519
|
|
|
438
520
|
export type GearVecInput = GearInput[];
|
|
439
521
|
|
|
440
|
-
export type Side = "Player" | "Enemy";
|
|
441
|
-
|
|
442
522
|
export interface ShipConditions extends ShipPosition {
|
|
443
523
|
formation?: Formation;
|
|
444
524
|
}
|
|
445
525
|
|
|
446
|
-
export type OrgType =
|
|
447
|
-
| "Single"
|
|
448
|
-
| "CarrierTaskForce"
|
|
449
|
-
| "SurfaceTaskForce"
|
|
450
|
-
| "TransportEscort"
|
|
451
|
-
| "EnemySingle"
|
|
452
|
-
| "EnemyCombined";
|
|
453
|
-
|
|
454
|
-
export interface SupportShellingSimulatorParams {
|
|
455
|
-
attacker_formation?: Formation;
|
|
456
|
-
target_formation?: Formation;
|
|
457
|
-
engagement: Engagement;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
export interface ShipAnalyzerConfig {
|
|
461
|
-
air_state?: AirState;
|
|
462
|
-
engagement?: Engagement;
|
|
463
|
-
left?: AttackAnalyzerShipConfig;
|
|
464
|
-
right?: AttackAnalyzerShipConfig;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
526
|
export type ShipAttr =
|
|
468
527
|
| "Unknown"
|
|
469
528
|
| "Abyssal"
|
|
@@ -476,10 +535,78 @@ export type ShipAttr =
|
|
|
476
535
|
| "IsolatedIsland"
|
|
477
536
|
| "HarbourSummerPrincess"
|
|
478
537
|
| "SupplyDepot"
|
|
538
|
+
| "NewSupplyDepot"
|
|
479
539
|
| "PtImp"
|
|
480
540
|
| "BattleshipSummerPrincess"
|
|
481
541
|
| "HeavyCruiserSummerPrincess";
|
|
482
542
|
|
|
543
|
+
export type OrgType =
|
|
544
|
+
| "Single"
|
|
545
|
+
| "CarrierTaskForce"
|
|
546
|
+
| "SurfaceTaskForce"
|
|
547
|
+
| "TransportEscort"
|
|
548
|
+
| "EnemySingle"
|
|
549
|
+
| "EnemyCombined";
|
|
550
|
+
|
|
551
|
+
export interface BattleDefinitions {
|
|
552
|
+
formation: Record<Formation, NestedFormationDef>;
|
|
553
|
+
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
554
|
+
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
555
|
+
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
export interface NightCutinDef {
|
|
559
|
+
tag: NightCutin;
|
|
560
|
+
hits: number;
|
|
561
|
+
type_factor: number | null;
|
|
562
|
+
power_mod: number | null;
|
|
563
|
+
accuracy_mod: number | null;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export interface DayCutinDef {
|
|
567
|
+
tag: DayCutin;
|
|
568
|
+
hits: number;
|
|
569
|
+
type_factor: number | null;
|
|
570
|
+
power_mod: number | null;
|
|
571
|
+
accuracy_mod: number | null;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
export interface AntiAirCutinDef {
|
|
575
|
+
id: number;
|
|
576
|
+
type_factor: number | null;
|
|
577
|
+
multiplier: number | null;
|
|
578
|
+
guaranteed: number | null;
|
|
579
|
+
sequential: boolean | null;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export type NestedFormationDef =
|
|
583
|
+
| FormationDef
|
|
584
|
+
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
585
|
+
|
|
586
|
+
export interface FormationDef {
|
|
587
|
+
tag: Formation;
|
|
588
|
+
protection_rate: number | null;
|
|
589
|
+
fleet_anti_air_mod: number;
|
|
590
|
+
shelling: FormationCombatModifiersDef;
|
|
591
|
+
torpedo: FormationCombatModifiersDef;
|
|
592
|
+
asw: FormationCombatModifiersDef;
|
|
593
|
+
night: FormationCombatModifiersDef;
|
|
594
|
+
support_shelling: FormationCombatModifiersDef;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export interface FormationCombatModifiersDef {
|
|
598
|
+
power_mod?: number;
|
|
599
|
+
accuracy_mod?: number;
|
|
600
|
+
evasion_mod?: number;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export interface ShipAnalyzerConfig {
|
|
604
|
+
air_state?: AirState;
|
|
605
|
+
engagement?: Engagement;
|
|
606
|
+
left?: AttackAnalyzerShipConfig;
|
|
607
|
+
right?: AttackAnalyzerShipConfig;
|
|
608
|
+
}
|
|
609
|
+
|
|
483
610
|
export type GearAttr =
|
|
484
611
|
| "Unknown"
|
|
485
612
|
| "Abyssal"
|
|
@@ -512,6 +639,14 @@ export type GearAttr =
|
|
|
512
639
|
| "SemiNightPlane"
|
|
513
640
|
| "HighAltitudeInterceptor";
|
|
514
641
|
|
|
642
|
+
export type FleetKey = "f1" | "f2" | "f3" | "f4";
|
|
643
|
+
|
|
644
|
+
export interface SupportShellingSimulatorParams {
|
|
645
|
+
attacker_formation?: Formation;
|
|
646
|
+
target_formation?: Formation;
|
|
647
|
+
engagement: Engagement;
|
|
648
|
+
}
|
|
649
|
+
|
|
515
650
|
export interface CompAntiAirAnalysis {
|
|
516
651
|
fleet_adjusted_anti_air: number;
|
|
517
652
|
ships: AntiAirReport[];
|
|
@@ -569,28 +704,6 @@ export interface ShellingStyle {
|
|
|
569
704
|
hits: number;
|
|
570
705
|
}
|
|
571
706
|
|
|
572
|
-
export interface CustomPowerModifiers {
|
|
573
|
-
precap_mod?: AttackPowerModifier;
|
|
574
|
-
postcap_mod?: AttackPowerModifier;
|
|
575
|
-
basic_power_mod?: AttackPowerModifier;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
export interface SpecialEnemyModifiers {
|
|
579
|
-
precap_general_mod: AttackPowerModifier;
|
|
580
|
-
stype_mod: AttackPowerModifier;
|
|
581
|
-
landing_craft_synergy_mod: AttackPowerModifier;
|
|
582
|
-
toku_daihatsu_tank_mod: AttackPowerModifier;
|
|
583
|
-
m4a1dd_mod: AttackPowerModifier;
|
|
584
|
-
honi_mod: AttackPowerModifier;
|
|
585
|
-
postcap_general_mod: AttackPowerModifier;
|
|
586
|
-
pt_mod: AttackPowerModifier;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
export interface AttackPowerModifier {
|
|
590
|
-
a?: number;
|
|
591
|
-
b?: number;
|
|
592
|
-
}
|
|
593
|
-
|
|
594
707
|
export interface AttackPower {
|
|
595
708
|
precap: number;
|
|
596
709
|
is_capped: boolean;
|
|
@@ -670,6 +783,18 @@ export interface AttackAnalyzerShipConfig
|
|
|
670
783
|
|
|
671
784
|
export type Histogram<K, V> = Partial<Record<K, V>>;
|
|
672
785
|
|
|
786
|
+
export type SpecialEnemyType =
|
|
787
|
+
| "None"
|
|
788
|
+
| "SoftSkinned"
|
|
789
|
+
| "Pillbox"
|
|
790
|
+
| "IsolatedIsland"
|
|
791
|
+
| "SupplyDepot"
|
|
792
|
+
| "NewSupplyDepot"
|
|
793
|
+
| "HarbourSummerPrincess"
|
|
794
|
+
| "PtImp"
|
|
795
|
+
| "BattleshipSummerPrincess"
|
|
796
|
+
| "HeavyCruiserSummerPrincess";
|
|
797
|
+
|
|
673
798
|
export type Formation = SingleFormation | CombinedFormation;
|
|
674
799
|
|
|
675
800
|
export type CombinedFormation =
|
|
@@ -686,11 +811,26 @@ export type SingleFormation =
|
|
|
686
811
|
| "LineAbreast"
|
|
687
812
|
| "Vanguard";
|
|
688
813
|
|
|
689
|
-
export interface
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
814
|
+
export interface CustomPowerModifiers {
|
|
815
|
+
precap_mod?: AttackPowerModifier;
|
|
816
|
+
postcap_mod?: AttackPowerModifier;
|
|
817
|
+
basic_power_mod?: AttackPowerModifier;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export interface SpecialEnemyModifiers {
|
|
821
|
+
precap_general_mod: AttackPowerModifier;
|
|
822
|
+
stype_mod: AttackPowerModifier;
|
|
823
|
+
landing_craft_synergy_mod: AttackPowerModifier;
|
|
824
|
+
toku_daihatsu_tank_mod: AttackPowerModifier;
|
|
825
|
+
m4a1dd_mod: AttackPowerModifier;
|
|
826
|
+
honi_mod: AttackPowerModifier;
|
|
827
|
+
postcap_general_mod: AttackPowerModifier;
|
|
828
|
+
pt_mod: AttackPowerModifier;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export interface AttackPowerModifier {
|
|
832
|
+
a?: number;
|
|
833
|
+
b?: number;
|
|
694
834
|
}
|
|
695
835
|
|
|
696
836
|
export interface HitRate {
|
|
@@ -817,6 +957,13 @@ export interface EquipStype {
|
|
|
817
957
|
equip_type: number[];
|
|
818
958
|
}
|
|
819
959
|
|
|
960
|
+
export interface MasterBattleDefinitions {
|
|
961
|
+
formation: NestedFormationDef[];
|
|
962
|
+
anti_air_cutin: AntiAirCutinDef[];
|
|
963
|
+
day_cutin: DayCutinDef[];
|
|
964
|
+
night_cutin: NightCutinDef[];
|
|
965
|
+
}
|
|
966
|
+
|
|
820
967
|
export interface CompAnalyzerConfig {
|
|
821
968
|
engagement: Engagement;
|
|
822
969
|
formation: Formation;
|
|
@@ -855,140 +1002,6 @@ export interface AttackReport<T> {
|
|
|
855
1002
|
damage: DamageReport | null;
|
|
856
1003
|
}
|
|
857
1004
|
|
|
858
|
-
export type ShipStateMap = Record<ShipKey, ShipState>;
|
|
859
|
-
|
|
860
|
-
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
861
|
-
|
|
862
|
-
export interface OrgState {
|
|
863
|
-
id?: string;
|
|
864
|
-
f1?: FleetState;
|
|
865
|
-
f2?: FleetState;
|
|
866
|
-
f3?: FleetState;
|
|
867
|
-
f4?: FleetState;
|
|
868
|
-
a1?: AirSquadronState;
|
|
869
|
-
a2?: AirSquadronState;
|
|
870
|
-
a3?: AirSquadronState;
|
|
871
|
-
hq_level?: number;
|
|
872
|
-
org_type?: OrgType;
|
|
873
|
-
sortie?: string;
|
|
874
|
-
route_sup?: string;
|
|
875
|
-
boss_sup?: string;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
879
|
-
id?: string;
|
|
880
|
-
mode?: AirSquadronMode;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
884
|
-
|
|
885
|
-
export interface FleetState {
|
|
886
|
-
id?: string;
|
|
887
|
-
len?: number;
|
|
888
|
-
s1?: ShipState;
|
|
889
|
-
s2?: ShipState;
|
|
890
|
-
s3?: ShipState;
|
|
891
|
-
s4?: ShipState;
|
|
892
|
-
s5?: ShipState;
|
|
893
|
-
s6?: ShipState;
|
|
894
|
-
s7?: ShipState;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
898
|
-
id?: string;
|
|
899
|
-
ship_id: number;
|
|
900
|
-
level?: number;
|
|
901
|
-
current_hp?: number;
|
|
902
|
-
morale?: number;
|
|
903
|
-
ammo?: number;
|
|
904
|
-
fuel?: number;
|
|
905
|
-
max_hp_mod?: number;
|
|
906
|
-
firepower_mod?: number;
|
|
907
|
-
torpedo_mod?: number;
|
|
908
|
-
armor_mod?: number;
|
|
909
|
-
anti_air_mod?: number;
|
|
910
|
-
evasion_mod?: number;
|
|
911
|
-
asw_mod?: number;
|
|
912
|
-
los_mod?: number;
|
|
913
|
-
luck_mod?: number;
|
|
914
|
-
day_gunfit_accuracy?: number;
|
|
915
|
-
night_gunfit_accuracy?: number;
|
|
916
|
-
custom_power_mods?: CustomPowerModifiers;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
export interface SlotSizeVecState {
|
|
920
|
-
ss1?: number;
|
|
921
|
-
ss2?: number;
|
|
922
|
-
ss3?: number;
|
|
923
|
-
ss4?: number;
|
|
924
|
-
ss5?: number;
|
|
925
|
-
}
|
|
926
|
-
|
|
927
|
-
export interface GearVecState {
|
|
928
|
-
g1?: GearState;
|
|
929
|
-
g2?: GearState;
|
|
930
|
-
g3?: GearState;
|
|
931
|
-
g4?: GearState;
|
|
932
|
-
g5?: GearState;
|
|
933
|
-
gx?: GearState;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export interface GearState {
|
|
937
|
-
id?: string;
|
|
938
|
-
gear_id: number;
|
|
939
|
-
exp?: number;
|
|
940
|
-
stars?: number;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
export type SlotSizeVec = (number | null)[];
|
|
944
|
-
|
|
945
|
-
export interface NightFleetConditions {
|
|
946
|
-
night_contact_rank?: ContactRank | null;
|
|
947
|
-
starshell_index?: number | null;
|
|
948
|
-
searchlight_index?: number | null;
|
|
949
|
-
activates_large_searchlight?: boolean;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
export interface NightConditions {
|
|
953
|
-
player?: NightFleetConditions;
|
|
954
|
-
enemy?: NightFleetConditions;
|
|
955
|
-
}
|
|
956
|
-
|
|
957
|
-
export interface BattleConditions {
|
|
958
|
-
org_type: OrgType;
|
|
959
|
-
role: Role;
|
|
960
|
-
ship_index: number;
|
|
961
|
-
fleet_len: number;
|
|
962
|
-
formation: Formation;
|
|
963
|
-
fleet_los_mod: number | null;
|
|
964
|
-
night_conditions: NightFleetConditions;
|
|
965
|
-
}
|
|
966
|
-
|
|
967
|
-
export interface MasterGear {
|
|
968
|
-
gear_id: number;
|
|
969
|
-
name: string;
|
|
970
|
-
types: GearTypeIdArray;
|
|
971
|
-
special_type?: number;
|
|
972
|
-
max_hp?: number;
|
|
973
|
-
firepower?: number;
|
|
974
|
-
armor?: number;
|
|
975
|
-
torpedo?: number;
|
|
976
|
-
anti_air?: number;
|
|
977
|
-
speed?: number;
|
|
978
|
-
bombing?: number;
|
|
979
|
-
asw?: number;
|
|
980
|
-
los?: number;
|
|
981
|
-
luck?: number;
|
|
982
|
-
accuracy?: number;
|
|
983
|
-
evasion?: number;
|
|
984
|
-
range?: number;
|
|
985
|
-
radius?: number;
|
|
986
|
-
cost?: number;
|
|
987
|
-
improvable?: boolean;
|
|
988
|
-
ship_anti_air_resist?: number;
|
|
989
|
-
fleet_anti_air_resist?: number;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
1005
|
/**
|
|
993
1006
|
*/
|
|
994
1007
|
export class AirSquadron {
|
|
@@ -1063,6 +1076,19 @@ export class Analyzer {
|
|
|
1063
1076
|
right_comp: Comp,
|
|
1064
1077
|
right_ship: Ship
|
|
1065
1078
|
): NodeAttackAnalysis;
|
|
1079
|
+
/**
|
|
1080
|
+
* @param {NodeAttackAnalyzerConfig} config
|
|
1081
|
+
* @param {Comp} left_comp
|
|
1082
|
+
* @param {Comp} right_comp
|
|
1083
|
+
* @param {string} attacker_id
|
|
1084
|
+
* @returns {NodeAttackAnalysis2 | undefined}
|
|
1085
|
+
*/
|
|
1086
|
+
analyze_node_attack2(
|
|
1087
|
+
config: NodeAttackAnalyzerConfig,
|
|
1088
|
+
left_comp: Comp,
|
|
1089
|
+
right_comp: Comp,
|
|
1090
|
+
attacker_id: string
|
|
1091
|
+
): NodeAttackAnalysis2 | undefined;
|
|
1066
1092
|
/**
|
|
1067
1093
|
* @param {Comp} comp
|
|
1068
1094
|
* @param {CompAnalyzerConfig} config
|
|
@@ -1118,16 +1144,16 @@ export class Comp {
|
|
|
1118
1144
|
get_fleet_id(ft: FleetType): string | undefined;
|
|
1119
1145
|
/**
|
|
1120
1146
|
* @param {FleetType} ft
|
|
1121
|
-
* @param {
|
|
1147
|
+
* @param {ShipKey} key
|
|
1122
1148
|
* @returns {Ship | undefined}
|
|
1123
1149
|
*/
|
|
1124
|
-
get_ship_with_clone(ft: FleetType, key:
|
|
1150
|
+
get_ship_with_clone(ft: FleetType, key: ShipKey): Ship | undefined;
|
|
1125
1151
|
/**
|
|
1126
1152
|
* @param {FleetType} ft
|
|
1127
|
-
* @param {
|
|
1153
|
+
* @param {ShipKey} key
|
|
1128
1154
|
* @returns {string | undefined}
|
|
1129
1155
|
*/
|
|
1130
|
-
get_ship_entity_id(ft: FleetType, key:
|
|
1156
|
+
get_ship_entity_id(ft: FleetType, key: ShipKey): string | undefined;
|
|
1131
1157
|
/**
|
|
1132
1158
|
* @param {string} id
|
|
1133
1159
|
* @returns {Ship | undefined}
|
|
@@ -1170,6 +1196,11 @@ export class Comp {
|
|
|
1170
1196
|
* @returns {ShipConditions}
|
|
1171
1197
|
*/
|
|
1172
1198
|
get_ship_conditions(ship: Ship, formation?: Formation): ShipConditions;
|
|
1199
|
+
/**
|
|
1200
|
+
* @param {FleetType} fleet_type
|
|
1201
|
+
* @returns {number | undefined}
|
|
1202
|
+
*/
|
|
1203
|
+
fleet_los_mod(fleet_type: FleetType): number | undefined;
|
|
1173
1204
|
/**
|
|
1174
1205
|
*/
|
|
1175
1206
|
boss_sup?: Fleet;
|
|
@@ -1303,10 +1334,10 @@ export class Fleet {
|
|
|
1303
1334
|
*/
|
|
1304
1335
|
count_ships(): number;
|
|
1305
1336
|
/**
|
|
1306
|
-
* @param {
|
|
1337
|
+
* @param {ShipKey} key
|
|
1307
1338
|
* @returns {Ship | undefined}
|
|
1308
1339
|
*/
|
|
1309
|
-
get_ship(key:
|
|
1340
|
+
get_ship(key: ShipKey): Ship | undefined;
|
|
1310
1341
|
/**
|
|
1311
1342
|
* @param {AirWaveType} air_type
|
|
1312
1343
|
* @returns {number | undefined}
|
|
@@ -1563,11 +1594,26 @@ export class Gear {
|
|
|
1563
1594
|
export class Org {
|
|
1564
1595
|
free(): void;
|
|
1565
1596
|
/**
|
|
1566
|
-
* @param {Role} role
|
|
1567
|
-
* @param {string} key
|
|
1568
1597
|
* @returns {string | undefined}
|
|
1569
1598
|
*/
|
|
1570
|
-
|
|
1599
|
+
first_ship_id(): string | undefined;
|
|
1600
|
+
/**
|
|
1601
|
+
* @param {FleetKey} fleet_key
|
|
1602
|
+
* @param {ShipKey} ship_key
|
|
1603
|
+
* @returns {number | undefined}
|
|
1604
|
+
*/
|
|
1605
|
+
get_ship_mid(fleet_key: FleetKey, ship_key: ShipKey): number | undefined;
|
|
1606
|
+
/**
|
|
1607
|
+
* @param {FleetKey} fleet_key
|
|
1608
|
+
* @param {ShipKey} ship_key
|
|
1609
|
+
* @returns {string | undefined}
|
|
1610
|
+
*/
|
|
1611
|
+
get_ship_eid(fleet_key: FleetKey, ship_key: ShipKey): string | undefined;
|
|
1612
|
+
/**
|
|
1613
|
+
* @param {FleetKey} key
|
|
1614
|
+
* @returns {string}
|
|
1615
|
+
*/
|
|
1616
|
+
get_fleet_id(key: FleetKey): string;
|
|
1571
1617
|
/**
|
|
1572
1618
|
* @returns {(string)[]}
|
|
1573
1619
|
*/
|
|
@@ -1581,24 +1627,35 @@ export class Org {
|
|
|
1581
1627
|
*/
|
|
1582
1628
|
escort_ship_ids(): Uint16Array;
|
|
1583
1629
|
/**
|
|
1584
|
-
* @param {
|
|
1630
|
+
* @param {FleetKey} key
|
|
1585
1631
|
* @returns {Fleet}
|
|
1586
1632
|
*/
|
|
1587
|
-
clone_fleet(key:
|
|
1633
|
+
clone_fleet(key: FleetKey): Fleet;
|
|
1634
|
+
/**
|
|
1635
|
+
* @param {FleetKey} fleet_key
|
|
1636
|
+
* @param {ShipKey} ship_key
|
|
1637
|
+
* @returns {Ship | undefined}
|
|
1638
|
+
*/
|
|
1639
|
+
clone_ship(fleet_key: FleetKey, ship_key: ShipKey): Ship | undefined;
|
|
1588
1640
|
/**
|
|
1589
1641
|
* @param {string} id
|
|
1590
1642
|
* @returns {Ship | undefined}
|
|
1591
1643
|
*/
|
|
1592
1644
|
get_ship_by_id(id: string): Ship | undefined;
|
|
1645
|
+
/**
|
|
1646
|
+
* @param {FleetKey} key
|
|
1647
|
+
* @returns {(string)[]}
|
|
1648
|
+
*/
|
|
1649
|
+
ship_keys(key: FleetKey): string[];
|
|
1593
1650
|
/**
|
|
1594
1651
|
* @returns {Comp}
|
|
1595
1652
|
*/
|
|
1596
1653
|
create_comp(): Comp;
|
|
1597
1654
|
/**
|
|
1598
|
-
* @param {
|
|
1655
|
+
* @param {FleetKey} key
|
|
1599
1656
|
* @returns {Comp}
|
|
1600
1657
|
*/
|
|
1601
|
-
create_comp_by_key(key:
|
|
1658
|
+
create_comp_by_key(key: FleetKey): Comp;
|
|
1602
1659
|
/**
|
|
1603
1660
|
* @param {string} key
|
|
1604
1661
|
* @returns {AirSquadron}
|
|
@@ -1642,9 +1699,25 @@ export class Org {
|
|
|
1642
1699
|
* @returns {number}
|
|
1643
1700
|
*/
|
|
1644
1701
|
high_altitude_interception_power(): number;
|
|
1702
|
+
/**
|
|
1703
|
+
* @param {string} id
|
|
1704
|
+
* @param {number} x
|
|
1705
|
+
* @param {number} y
|
|
1706
|
+
* @returns {MoveShipPayload | undefined}
|
|
1707
|
+
*/
|
|
1708
|
+
create_move_ship_payload(
|
|
1709
|
+
id: string,
|
|
1710
|
+
x: number,
|
|
1711
|
+
y: number
|
|
1712
|
+
): MoveShipPayload | undefined;
|
|
1713
|
+
/**
|
|
1714
|
+
* @param {FleetKey} key
|
|
1715
|
+
* @returns {FleetType | undefined}
|
|
1716
|
+
*/
|
|
1717
|
+
get_fleet_type(key: FleetKey): FleetType | undefined;
|
|
1645
1718
|
/**
|
|
1646
1719
|
*/
|
|
1647
|
-
boss_sup
|
|
1720
|
+
readonly boss_sup: FleetKey | undefined;
|
|
1648
1721
|
/**
|
|
1649
1722
|
*/
|
|
1650
1723
|
readonly hash: bigint;
|
|
@@ -1659,10 +1732,10 @@ export class Org {
|
|
|
1659
1732
|
readonly org_type: OrgType;
|
|
1660
1733
|
/**
|
|
1661
1734
|
*/
|
|
1662
|
-
route_sup
|
|
1735
|
+
readonly route_sup: FleetKey | undefined;
|
|
1663
1736
|
/**
|
|
1664
1737
|
*/
|
|
1665
|
-
sortie:
|
|
1738
|
+
readonly sortie: FleetKey;
|
|
1666
1739
|
}
|
|
1667
1740
|
/**
|
|
1668
1741
|
*/
|
|
@@ -1807,6 +1880,14 @@ export class Ship {
|
|
|
1807
1880
|
* @returns {boolean}
|
|
1808
1881
|
*/
|
|
1809
1882
|
is_pt_imp(): boolean;
|
|
1883
|
+
/**
|
|
1884
|
+
* @returns {SpecialEnemyType}
|
|
1885
|
+
*/
|
|
1886
|
+
special_enemy_type(): SpecialEnemyType;
|
|
1887
|
+
/**
|
|
1888
|
+
* @returns {boolean}
|
|
1889
|
+
*/
|
|
1890
|
+
is_attackable_by_torpedo(): boolean;
|
|
1810
1891
|
/**
|
|
1811
1892
|
* @param {number} index
|
|
1812
1893
|
* @returns {number | undefined}
|