fleethub-core 1.8.8 → 1.8.11
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 +352 -352
- package/node/fleethub_core.js +187 -412
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +122 -153
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +352 -352
- package/pkg/fleethub_core_bg.js +186 -410
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +122 -153
package/node/fleethub_core.d.ts
CHANGED
|
@@ -15,62 +15,143 @@ export interface ShipPosition {
|
|
|
15
15
|
index?: number;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export interface
|
|
19
|
-
|
|
20
|
-
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
21
|
-
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
22
|
-
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
18
|
+
export interface CompMeta {
|
|
19
|
+
fleets: Record<FleetType, FleetMeta>;
|
|
23
20
|
}
|
|
24
21
|
|
|
25
|
-
export interface
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
power_mod: number | null;
|
|
30
|
-
accuracy_mod: number | null;
|
|
22
|
+
export interface FleetMeta {
|
|
23
|
+
id: string;
|
|
24
|
+
len: number;
|
|
25
|
+
ships: [string, ShipMeta | null][];
|
|
31
26
|
}
|
|
32
27
|
|
|
33
|
-
export interface
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
type_factor: number | null;
|
|
37
|
-
power_mod: number | null;
|
|
38
|
-
accuracy_mod: number | null;
|
|
28
|
+
export interface ShipMeta {
|
|
29
|
+
id: string;
|
|
30
|
+
ship_id: number;
|
|
39
31
|
}
|
|
40
32
|
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
34
|
+
|
|
35
|
+
export type TorpedoAttackType = null;
|
|
36
|
+
|
|
37
|
+
export type NightPhaseAttackType =
|
|
38
|
+
| { t: "Night"; c: NightAttackType }
|
|
39
|
+
| { t: "Asw"; c: AswAttackType };
|
|
40
|
+
|
|
41
|
+
export type DayPhaseAttackType =
|
|
42
|
+
| { t: "Shelling"; c: ShellingType }
|
|
43
|
+
| { t: "Asw"; c: AswAttackType };
|
|
44
|
+
|
|
45
|
+
export type AttackType =
|
|
46
|
+
| { t: "Asw"; c: AswAttackType }
|
|
47
|
+
| { t: "Shelling"; c: ShellingType }
|
|
48
|
+
| { t: "Night"; c: NightAttackType }
|
|
49
|
+
| { t: "Torpedo" }
|
|
50
|
+
| { t: "SupportShelling"; c: SupportShellingType };
|
|
51
|
+
|
|
52
|
+
export type SupportShellingType = ShellingType;
|
|
53
|
+
|
|
54
|
+
export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
|
|
55
|
+
|
|
56
|
+
export type ShellingType = "Normal" | "Carrier";
|
|
57
|
+
|
|
58
|
+
export type AswAttackType = "DepthCharge" | "Aircraft";
|
|
59
|
+
|
|
60
|
+
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
61
|
+
|
|
62
|
+
export interface NodeAttackAnalysis2 {
|
|
63
|
+
data: AttackAnalysis[];
|
|
47
64
|
}
|
|
48
65
|
|
|
49
|
-
export type
|
|
50
|
-
| FormationDef
|
|
51
|
-
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
66
|
+
export type CompiledEvaler = string;
|
|
52
67
|
|
|
53
|
-
export interface
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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;
|
|
62
82
|
}
|
|
63
83
|
|
|
64
|
-
export interface
|
|
65
|
-
|
|
66
|
-
|
|
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;
|
|
67
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;
|
|
68
123
|
}
|
|
69
124
|
|
|
70
|
-
export
|
|
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
|
+
}
|
|
71
148
|
|
|
72
149
|
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
73
150
|
|
|
151
|
+
export type SlotSizeVec = (number | null)[];
|
|
152
|
+
|
|
153
|
+
export type Role = "Main" | "Escort";
|
|
154
|
+
|
|
74
155
|
export interface ActionReport<T> {
|
|
75
156
|
data: Record<string, AttackReport<T>>;
|
|
76
157
|
damage_state_density: Histogram<DamageState, number> | null;
|
|
@@ -79,6 +160,22 @@ export interface ActionReport<T> {
|
|
|
79
160
|
|
|
80
161
|
export type GearTypeIdArray = [number, number, number, number, number];
|
|
81
162
|
|
|
163
|
+
export type SpecialEnemyType =
|
|
164
|
+
| "None"
|
|
165
|
+
| "SoftSkinned"
|
|
166
|
+
| "Pillbox"
|
|
167
|
+
| "IsolatedIsland"
|
|
168
|
+
| "SupplyDepot"
|
|
169
|
+
| "NewSupplyDepot"
|
|
170
|
+
| "HarbourSummerPrincess"
|
|
171
|
+
| "PtImp"
|
|
172
|
+
| "BattleshipSummerPrincess"
|
|
173
|
+
| "HeavyCruiserSummerPrincess";
|
|
174
|
+
|
|
175
|
+
export type Align = "Left" | "Right";
|
|
176
|
+
|
|
177
|
+
export type Side = "Player" | "Enemy";
|
|
178
|
+
|
|
82
179
|
export type ShipType =
|
|
83
180
|
| "Unknown"
|
|
84
181
|
| "DE"
|
|
@@ -114,6 +211,54 @@ export type ShipCategory =
|
|
|
114
211
|
| "Submarine"
|
|
115
212
|
| "AuxiliaryShip";
|
|
116
213
|
|
|
214
|
+
export interface MasterIBonuses {
|
|
215
|
+
shelling_power: MasterIBonusRule[];
|
|
216
|
+
shelling_accuracy: MasterIBonusRule[];
|
|
217
|
+
shelling_aerial_power: MasterIBonusRule[];
|
|
218
|
+
torpedo_power: MasterIBonusRule[];
|
|
219
|
+
torpedo_accuracy: MasterIBonusRule[];
|
|
220
|
+
torpedo_evasion: MasterIBonusRule[];
|
|
221
|
+
asw_power: MasterIBonusRule[];
|
|
222
|
+
asw_accuracy: MasterIBonusRule[];
|
|
223
|
+
night_power: MasterIBonusRule[];
|
|
224
|
+
night_aerial_power: MasterIBonusRule[];
|
|
225
|
+
night_accuracy: MasterIBonusRule[];
|
|
226
|
+
defense_power: MasterIBonusRule[];
|
|
227
|
+
contact_selection: MasterIBonusRule[];
|
|
228
|
+
fighter_power: MasterIBonusRule[];
|
|
229
|
+
ship_anti_air: MasterIBonusRule[];
|
|
230
|
+
fleet_anti_air: MasterIBonusRule[];
|
|
231
|
+
elos: MasterIBonusRule[];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface MasterIBonusRule {
|
|
235
|
+
expr: CompiledEvaler;
|
|
236
|
+
formula: CompiledEvaler;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export interface FleetCutinAnalysis {
|
|
240
|
+
shelling: FleetCutinReport<ShellingStyle>[];
|
|
241
|
+
night: FleetCutinReport<NightAttackStyle>[];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export interface FleetCutinReport<T> {
|
|
245
|
+
cutin: FleetCutin;
|
|
246
|
+
rate: number | null;
|
|
247
|
+
formation: Formation;
|
|
248
|
+
attacks: FleetCutinAttackReport<T>[];
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface FleetCutinAttackReport<T> extends AttackReport<T> {
|
|
252
|
+
index: number;
|
|
253
|
+
ship_id: number;
|
|
254
|
+
power_mod: number;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface MoveShipPayload {
|
|
258
|
+
current: [string, string, ShipKey];
|
|
259
|
+
target: [string | null, string, ShipKey];
|
|
260
|
+
}
|
|
261
|
+
|
|
117
262
|
export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
|
|
118
263
|
|
|
119
264
|
export type NightCutinLike = NightCutin | FleetCutin;
|
|
@@ -157,24 +302,6 @@ export type DayCutin =
|
|
|
157
302
|
| "BBA"
|
|
158
303
|
| "BA";
|
|
159
304
|
|
|
160
|
-
export interface FleetCutinAnalysis {
|
|
161
|
-
shelling: FleetCutinReport<ShellingStyle>[];
|
|
162
|
-
night: FleetCutinReport<NightAttackStyle>[];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface FleetCutinReport<T> {
|
|
166
|
-
cutin: FleetCutin;
|
|
167
|
-
rate: number | null;
|
|
168
|
-
formation: Formation;
|
|
169
|
-
attacks: FleetCutinAttackReport<T>[];
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export interface FleetCutinAttackReport<T> extends AttackReport<T> {
|
|
173
|
-
index: number;
|
|
174
|
-
ship_id: number;
|
|
175
|
-
power_mod: number;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
305
|
export type ContactRank = "Rank1" | "Rank2" | "Rank3";
|
|
179
306
|
|
|
180
307
|
export type AirWaveType = "Jet" | "LandBase" | "Carrier";
|
|
@@ -191,16 +318,7 @@ export interface SimulatorResultItem {
|
|
|
191
318
|
damage_state_map: Record<DamageState, number>;
|
|
192
319
|
}
|
|
193
320
|
|
|
194
|
-
export type
|
|
195
|
-
| "None"
|
|
196
|
-
| "SoftSkinned"
|
|
197
|
-
| "Pillbox"
|
|
198
|
-
| "IsolatedIsland"
|
|
199
|
-
| "SupplyDepot"
|
|
200
|
-
| "HarbourSummerPrincess"
|
|
201
|
-
| "PtImp"
|
|
202
|
-
| "BattleshipSummerPrincess"
|
|
203
|
-
| "HeavyCruiserSummerPrincess";
|
|
321
|
+
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
204
322
|
|
|
205
323
|
export type GearCategory =
|
|
206
324
|
| "Fighter"
|
|
@@ -280,6 +398,15 @@ export type GearType =
|
|
|
280
398
|
|
|
281
399
|
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
282
400
|
|
|
401
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
402
|
+
|
|
403
|
+
export type AirState =
|
|
404
|
+
| "AirSupremacy"
|
|
405
|
+
| "AirSuperiority"
|
|
406
|
+
| "AirParity"
|
|
407
|
+
| "AirDenial"
|
|
408
|
+
| "AirIncapability";
|
|
409
|
+
|
|
283
410
|
export interface MasterData extends MasterBattleDefinitions {
|
|
284
411
|
created_at: number;
|
|
285
412
|
gears: MasterGear[];
|
|
@@ -301,57 +428,6 @@ export interface MasterAttrRule<T> {
|
|
|
301
428
|
expr: CompiledEvaler;
|
|
302
429
|
}
|
|
303
430
|
|
|
304
|
-
export interface CompMeta {
|
|
305
|
-
fleets: Record<FleetType, FleetMeta>;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export interface FleetMeta {
|
|
309
|
-
id: string;
|
|
310
|
-
len: number;
|
|
311
|
-
ships: [string, ShipMeta | null][];
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
export interface ShipMeta {
|
|
315
|
-
id: string;
|
|
316
|
-
ship_id: number;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
export type TorpedoAttackType = null;
|
|
320
|
-
|
|
321
|
-
export type NightPhaseAttackType =
|
|
322
|
-
| { t: "Night"; c: NightAttackType }
|
|
323
|
-
| { t: "Asw"; c: AswAttackType };
|
|
324
|
-
|
|
325
|
-
export type DayPhaseAttackType =
|
|
326
|
-
| { t: "Shelling"; c: ShellingType }
|
|
327
|
-
| { t: "Asw"; c: AswAttackType };
|
|
328
|
-
|
|
329
|
-
export type AttackType =
|
|
330
|
-
| { t: "Asw"; c: AswAttackType }
|
|
331
|
-
| { t: "Shelling"; c: ShellingType }
|
|
332
|
-
| { t: "Night"; c: NightAttackType }
|
|
333
|
-
| { t: "Torpedo" }
|
|
334
|
-
| { t: "SupportShelling"; c: SupportShellingType };
|
|
335
|
-
|
|
336
|
-
export type SupportShellingType = ShellingType;
|
|
337
|
-
|
|
338
|
-
export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
|
|
339
|
-
|
|
340
|
-
export type ShellingType = "Normal" | "Carrier";
|
|
341
|
-
|
|
342
|
-
export type AswAttackType = "DepthCharge" | "Aircraft";
|
|
343
|
-
|
|
344
|
-
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
345
|
-
|
|
346
|
-
export type AirState =
|
|
347
|
-
| "AirSupremacy"
|
|
348
|
-
| "AirSuperiority"
|
|
349
|
-
| "AirParity"
|
|
350
|
-
| "AirDenial"
|
|
351
|
-
| "AirIncapability";
|
|
352
|
-
|
|
353
|
-
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
354
|
-
|
|
355
431
|
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
356
432
|
formation?: Formation;
|
|
357
433
|
}
|
|
@@ -368,19 +444,6 @@ export interface NodeAttackAnalysis {
|
|
|
368
444
|
right: AttackAnalysis;
|
|
369
445
|
}
|
|
370
446
|
|
|
371
|
-
export type Side = "Player" | "Enemy";
|
|
372
|
-
|
|
373
|
-
export type Role = "Main" | "Escort";
|
|
374
|
-
|
|
375
|
-
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
376
|
-
|
|
377
|
-
export interface ShipAnalyzerConfig {
|
|
378
|
-
air_state?: AirState;
|
|
379
|
-
engagement?: Engagement;
|
|
380
|
-
left?: AttackAnalyzerShipConfig;
|
|
381
|
-
right?: AttackAnalyzerShipConfig;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
447
|
export interface EBonuses {
|
|
385
448
|
firepower: number;
|
|
386
449
|
torpedo: number;
|
|
@@ -437,6 +500,7 @@ export type ShipAttr =
|
|
|
437
500
|
| "IsolatedIsland"
|
|
438
501
|
| "HarbourSummerPrincess"
|
|
439
502
|
| "SupplyDepot"
|
|
503
|
+
| "NewSupplyDepot"
|
|
440
504
|
| "PtImp"
|
|
441
505
|
| "BattleshipSummerPrincess"
|
|
442
506
|
| "HeavyCruiserSummerPrincess";
|
|
@@ -449,52 +513,63 @@ export type OrgType =
|
|
|
449
513
|
| "EnemySingle"
|
|
450
514
|
| "EnemyCombined";
|
|
451
515
|
|
|
452
|
-
export interface
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
516
|
+
export interface BattleDefinitions {
|
|
517
|
+
formation: Record<Formation, NestedFormationDef>;
|
|
518
|
+
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
519
|
+
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
520
|
+
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export interface NightCutinDef {
|
|
524
|
+
tag: NightCutin;
|
|
525
|
+
hits: number;
|
|
526
|
+
type_factor: number | null;
|
|
527
|
+
power_mod: number | null;
|
|
528
|
+
accuracy_mod: number | null;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
export interface DayCutinDef {
|
|
532
|
+
tag: DayCutin;
|
|
533
|
+
hits: number;
|
|
534
|
+
type_factor: number | null;
|
|
535
|
+
power_mod: number | null;
|
|
536
|
+
accuracy_mod: number | null;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export interface AntiAirCutinDef {
|
|
540
|
+
id: number;
|
|
541
|
+
type_factor: number | null;
|
|
542
|
+
multiplier: number | null;
|
|
543
|
+
guaranteed: number | null;
|
|
544
|
+
sequential: boolean | null;
|
|
456
545
|
}
|
|
457
546
|
|
|
458
|
-
export
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
shelling_accuracy: MasterIBonusRule[];
|
|
462
|
-
torpedo_power: MasterIBonusRule[];
|
|
463
|
-
torpedo_accuracy: MasterIBonusRule[];
|
|
464
|
-
torpedo_evasion: MasterIBonusRule[];
|
|
465
|
-
asw_power: MasterIBonusRule[];
|
|
466
|
-
asw_accuracy: MasterIBonusRule[];
|
|
467
|
-
night_power: MasterIBonusRule[];
|
|
468
|
-
night_accuracy: MasterIBonusRule[];
|
|
469
|
-
defense_power: MasterIBonusRule[];
|
|
470
|
-
contact_selection: MasterIBonusRule[];
|
|
471
|
-
fighter_power: MasterIBonusRule[];
|
|
472
|
-
ship_anti_air: MasterIBonusRule[];
|
|
473
|
-
fleet_anti_air: MasterIBonusRule[];
|
|
474
|
-
elos: MasterIBonusRule[];
|
|
475
|
-
}
|
|
547
|
+
export type NestedFormationDef =
|
|
548
|
+
| FormationDef
|
|
549
|
+
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
476
550
|
|
|
477
|
-
export interface
|
|
478
|
-
|
|
479
|
-
|
|
551
|
+
export interface FormationDef {
|
|
552
|
+
tag: Formation;
|
|
553
|
+
protection_rate: number | null;
|
|
554
|
+
fleet_anti_air_mod: number;
|
|
555
|
+
shelling: FormationCombatModifiersDef;
|
|
556
|
+
torpedo: FormationCombatModifiersDef;
|
|
557
|
+
asw: FormationCombatModifiersDef;
|
|
558
|
+
night: FormationCombatModifiersDef;
|
|
559
|
+
support_shelling: FormationCombatModifiersDef;
|
|
480
560
|
}
|
|
481
561
|
|
|
482
|
-
export interface
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
562
|
+
export interface FormationCombatModifiersDef {
|
|
563
|
+
power_mod?: number;
|
|
564
|
+
accuracy_mod?: number;
|
|
565
|
+
evasion_mod?: number;
|
|
486
566
|
}
|
|
487
567
|
|
|
488
|
-
export interface
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
proportional_shotdown_rate: number | null;
|
|
494
|
-
fixed_shotdown_number: number | null;
|
|
495
|
-
guaranteed: number | null;
|
|
496
|
-
anti_air_cutin_chance: [number, number][];
|
|
497
|
-
anti_air_propellant_barrage_chance: number | null;
|
|
568
|
+
export interface ShipAnalyzerConfig {
|
|
569
|
+
air_state?: AirState;
|
|
570
|
+
engagement?: Engagement;
|
|
571
|
+
left?: AttackAnalyzerShipConfig;
|
|
572
|
+
right?: AttackAnalyzerShipConfig;
|
|
498
573
|
}
|
|
499
574
|
|
|
500
575
|
export type GearAttr =
|
|
@@ -529,6 +604,32 @@ export type GearAttr =
|
|
|
529
604
|
| "SemiNightPlane"
|
|
530
605
|
| "HighAltitudeInterceptor";
|
|
531
606
|
|
|
607
|
+
export type FleetKey = "f1" | "f2" | "f3" | "f4";
|
|
608
|
+
|
|
609
|
+
export interface SupportShellingSimulatorParams {
|
|
610
|
+
attacker_formation?: Formation;
|
|
611
|
+
target_formation?: Formation;
|
|
612
|
+
engagement: Engagement;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
export interface CompAntiAirAnalysis {
|
|
616
|
+
fleet_adjusted_anti_air: number;
|
|
617
|
+
ships: AntiAirReport[];
|
|
618
|
+
anti_air_cutin_chance: [number, number][];
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export interface AntiAirReport {
|
|
622
|
+
ship_id: number;
|
|
623
|
+
role: Role;
|
|
624
|
+
index: number;
|
|
625
|
+
adjusted_anti_air: number | null;
|
|
626
|
+
proportional_shotdown_rate: number | null;
|
|
627
|
+
fixed_shotdown_number: number | null;
|
|
628
|
+
guaranteed: number | null;
|
|
629
|
+
anti_air_cutin_chance: [number, number][];
|
|
630
|
+
anti_air_propellant_barrage_chance: number | null;
|
|
631
|
+
}
|
|
632
|
+
|
|
532
633
|
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
533
634
|
|
|
534
635
|
export interface SupportShellingStyle {
|
|
@@ -584,7 +685,7 @@ export interface AttackPowerParams {
|
|
|
584
685
|
precap_mod: AttackPowerModifier;
|
|
585
686
|
postcap_mod: AttackPowerModifier;
|
|
586
687
|
ap_shell_mod: number | null;
|
|
587
|
-
|
|
688
|
+
aerial_power: number | null;
|
|
588
689
|
proficiency_critical_mod: number;
|
|
589
690
|
armor_penetration: number;
|
|
590
691
|
remaining_ammo_mod: number;
|
|
@@ -843,104 +944,6 @@ export interface CompAnalysis {
|
|
|
843
944
|
anti_air: CompAntiAirAnalysis;
|
|
844
945
|
}
|
|
845
946
|
|
|
846
|
-
export interface AttackReport<T> {
|
|
847
|
-
style: T;
|
|
848
|
-
proc_rate: number | null;
|
|
849
|
-
attack_power: AttackPower | null;
|
|
850
|
-
attack_power_params: AttackPowerParams | null;
|
|
851
|
-
hits: number;
|
|
852
|
-
hit_rate: HitRate | null;
|
|
853
|
-
hit_rate_params: HitRateParams | null;
|
|
854
|
-
damage: DamageReport | null;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
export type ShipStateMap = Record<ShipKey, ShipState>;
|
|
858
|
-
|
|
859
|
-
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
860
|
-
|
|
861
|
-
export interface OrgState {
|
|
862
|
-
id?: string;
|
|
863
|
-
f1?: FleetState;
|
|
864
|
-
f2?: FleetState;
|
|
865
|
-
f3?: FleetState;
|
|
866
|
-
f4?: FleetState;
|
|
867
|
-
a1?: AirSquadronState;
|
|
868
|
-
a2?: AirSquadronState;
|
|
869
|
-
a3?: AirSquadronState;
|
|
870
|
-
hq_level?: number;
|
|
871
|
-
org_type?: OrgType;
|
|
872
|
-
sortie?: string;
|
|
873
|
-
route_sup?: string;
|
|
874
|
-
boss_sup?: string;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
878
|
-
id?: string;
|
|
879
|
-
mode?: AirSquadronMode;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
883
|
-
|
|
884
|
-
export interface FleetState {
|
|
885
|
-
id?: string;
|
|
886
|
-
len?: number;
|
|
887
|
-
s1?: ShipState;
|
|
888
|
-
s2?: ShipState;
|
|
889
|
-
s3?: ShipState;
|
|
890
|
-
s4?: ShipState;
|
|
891
|
-
s5?: ShipState;
|
|
892
|
-
s6?: ShipState;
|
|
893
|
-
s7?: ShipState;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
897
|
-
id?: string;
|
|
898
|
-
ship_id: number;
|
|
899
|
-
level?: number;
|
|
900
|
-
current_hp?: number;
|
|
901
|
-
morale?: number;
|
|
902
|
-
ammo?: number;
|
|
903
|
-
fuel?: number;
|
|
904
|
-
max_hp_mod?: number;
|
|
905
|
-
firepower_mod?: number;
|
|
906
|
-
torpedo_mod?: number;
|
|
907
|
-
armor_mod?: number;
|
|
908
|
-
anti_air_mod?: number;
|
|
909
|
-
evasion_mod?: number;
|
|
910
|
-
asw_mod?: number;
|
|
911
|
-
los_mod?: number;
|
|
912
|
-
luck_mod?: number;
|
|
913
|
-
day_gunfit_accuracy?: number;
|
|
914
|
-
night_gunfit_accuracy?: number;
|
|
915
|
-
custom_power_mods?: CustomPowerModifiers;
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
export interface SlotSizeVecState {
|
|
919
|
-
ss1?: number;
|
|
920
|
-
ss2?: number;
|
|
921
|
-
ss3?: number;
|
|
922
|
-
ss4?: number;
|
|
923
|
-
ss5?: number;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
export interface GearVecState {
|
|
927
|
-
g1?: GearState;
|
|
928
|
-
g2?: GearState;
|
|
929
|
-
g3?: GearState;
|
|
930
|
-
g4?: GearState;
|
|
931
|
-
g5?: GearState;
|
|
932
|
-
gx?: GearState;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
export interface GearState {
|
|
936
|
-
id?: string;
|
|
937
|
-
gear_id: number;
|
|
938
|
-
exp?: number;
|
|
939
|
-
stars?: number;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
export type SlotSizeVec = (number | null)[];
|
|
943
|
-
|
|
944
947
|
export interface NightFleetConditions {
|
|
945
948
|
night_contact_rank?: ContactRank | null;
|
|
946
949
|
starshell_index?: number | null;
|
|
@@ -988,6 +991,17 @@ export interface MasterGear {
|
|
|
988
991
|
fleet_anti_air_resist?: number;
|
|
989
992
|
}
|
|
990
993
|
|
|
994
|
+
export interface AttackReport<T> {
|
|
995
|
+
style: T;
|
|
996
|
+
proc_rate: number | null;
|
|
997
|
+
attack_power: AttackPower | null;
|
|
998
|
+
attack_power_params: AttackPowerParams | null;
|
|
999
|
+
hits: number;
|
|
1000
|
+
hit_rate: HitRate | null;
|
|
1001
|
+
hit_rate_params: HitRateParams | null;
|
|
1002
|
+
damage: DamageReport | null;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
991
1005
|
/**
|
|
992
1006
|
*/
|
|
993
1007
|
export class AirSquadron {
|
|
@@ -1062,6 +1076,19 @@ export class Analyzer {
|
|
|
1062
1076
|
right_comp: Comp,
|
|
1063
1077
|
right_ship: Ship
|
|
1064
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;
|
|
1065
1092
|
/**
|
|
1066
1093
|
* @param {Comp} comp
|
|
1067
1094
|
* @param {CompAnalyzerConfig} config
|
|
@@ -1117,16 +1144,16 @@ export class Comp {
|
|
|
1117
1144
|
get_fleet_id(ft: FleetType): string | undefined;
|
|
1118
1145
|
/**
|
|
1119
1146
|
* @param {FleetType} ft
|
|
1120
|
-
* @param {
|
|
1147
|
+
* @param {ShipKey} key
|
|
1121
1148
|
* @returns {Ship | undefined}
|
|
1122
1149
|
*/
|
|
1123
|
-
get_ship_with_clone(ft: FleetType, key:
|
|
1150
|
+
get_ship_with_clone(ft: FleetType, key: ShipKey): Ship | undefined;
|
|
1124
1151
|
/**
|
|
1125
1152
|
* @param {FleetType} ft
|
|
1126
|
-
* @param {
|
|
1153
|
+
* @param {ShipKey} key
|
|
1127
1154
|
* @returns {string | undefined}
|
|
1128
1155
|
*/
|
|
1129
|
-
get_ship_entity_id(ft: FleetType, key:
|
|
1156
|
+
get_ship_entity_id(ft: FleetType, key: ShipKey): string | undefined;
|
|
1130
1157
|
/**
|
|
1131
1158
|
* @param {string} id
|
|
1132
1159
|
* @returns {Ship | undefined}
|
|
@@ -1169,6 +1196,11 @@ export class Comp {
|
|
|
1169
1196
|
* @returns {ShipConditions}
|
|
1170
1197
|
*/
|
|
1171
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;
|
|
1172
1204
|
/**
|
|
1173
1205
|
*/
|
|
1174
1206
|
boss_sup?: Fleet;
|
|
@@ -1302,10 +1334,10 @@ export class Fleet {
|
|
|
1302
1334
|
*/
|
|
1303
1335
|
count_ships(): number;
|
|
1304
1336
|
/**
|
|
1305
|
-
* @param {
|
|
1337
|
+
* @param {ShipKey} key
|
|
1306
1338
|
* @returns {Ship | undefined}
|
|
1307
1339
|
*/
|
|
1308
|
-
get_ship(key:
|
|
1340
|
+
get_ship(key: ShipKey): Ship | undefined;
|
|
1309
1341
|
/**
|
|
1310
1342
|
* @param {AirWaveType} air_type
|
|
1311
1343
|
* @returns {number | undefined}
|
|
@@ -1559,81 +1591,33 @@ export class Gear {
|
|
|
1559
1591
|
}
|
|
1560
1592
|
/**
|
|
1561
1593
|
*/
|
|
1562
|
-
export class
|
|
1594
|
+
export class Org {
|
|
1563
1595
|
free(): void;
|
|
1564
1596
|
/**
|
|
1597
|
+
* @returns {string | undefined}
|
|
1565
1598
|
*/
|
|
1566
|
-
|
|
1567
|
-
/**
|
|
1568
|
-
*/
|
|
1569
|
-
asw_power: number;
|
|
1570
|
-
/**
|
|
1571
|
-
*/
|
|
1572
|
-
carrier_shelling_power: number;
|
|
1573
|
-
/**
|
|
1574
|
-
*/
|
|
1575
|
-
contact_selection: number;
|
|
1576
|
-
/**
|
|
1577
|
-
*/
|
|
1578
|
-
defense_power: number;
|
|
1579
|
-
/**
|
|
1580
|
-
*/
|
|
1581
|
-
elos: number;
|
|
1582
|
-
/**
|
|
1583
|
-
*/
|
|
1584
|
-
fighter_power: number;
|
|
1585
|
-
/**
|
|
1586
|
-
*/
|
|
1587
|
-
fleet_anti_air: number;
|
|
1588
|
-
/**
|
|
1589
|
-
*/
|
|
1590
|
-
night_accuracy: number;
|
|
1591
|
-
/**
|
|
1592
|
-
*/
|
|
1593
|
-
night_power: number;
|
|
1594
|
-
/**
|
|
1595
|
-
*/
|
|
1596
|
-
shelling_accuracy: number;
|
|
1597
|
-
/**
|
|
1598
|
-
*/
|
|
1599
|
-
shelling_power: number;
|
|
1600
|
-
/**
|
|
1601
|
-
*/
|
|
1602
|
-
ship_anti_air: number;
|
|
1603
|
-
/**
|
|
1604
|
-
*/
|
|
1605
|
-
torpedo_accuracy: number;
|
|
1606
|
-
/**
|
|
1607
|
-
*/
|
|
1608
|
-
torpedo_evasion: number;
|
|
1599
|
+
first_ship_id(): string | undefined;
|
|
1609
1600
|
/**
|
|
1601
|
+
* @param {FleetKey} fleet_key
|
|
1602
|
+
* @param {ShipKey} ship_key
|
|
1603
|
+
* @returns {number | undefined}
|
|
1610
1604
|
*/
|
|
1611
|
-
|
|
1612
|
-
}
|
|
1613
|
-
/**
|
|
1614
|
-
*/
|
|
1615
|
-
export class Org {
|
|
1616
|
-
free(): void;
|
|
1605
|
+
get_ship_mid(fleet_key: FleetKey, ship_key: ShipKey): number | undefined;
|
|
1617
1606
|
/**
|
|
1618
|
-
* @param {
|
|
1619
|
-
* @
|
|
1607
|
+
* @param {FleetKey} fleet_key
|
|
1608
|
+
* @param {ShipKey} ship_key
|
|
1609
|
+
* @returns {string | undefined}
|
|
1620
1610
|
*/
|
|
1621
|
-
|
|
1611
|
+
get_ship_eid(fleet_key: FleetKey, ship_key: ShipKey): string | undefined;
|
|
1622
1612
|
/**
|
|
1623
|
-
* @param {
|
|
1624
|
-
* @
|
|
1625
|
-
* @returns {string | undefined}
|
|
1613
|
+
* @param {FleetKey} key
|
|
1614
|
+
* @returns {string}
|
|
1626
1615
|
*/
|
|
1627
|
-
|
|
1616
|
+
get_fleet_id(key: FleetKey): string;
|
|
1628
1617
|
/**
|
|
1629
1618
|
* @returns {(string)[]}
|
|
1630
1619
|
*/
|
|
1631
1620
|
air_squadron_ids(): string[];
|
|
1632
|
-
/**
|
|
1633
|
-
* @param {Role} role
|
|
1634
|
-
* @returns {number | undefined}
|
|
1635
|
-
*/
|
|
1636
|
-
fleet_los_mod(role: Role): number | undefined;
|
|
1637
1621
|
/**
|
|
1638
1622
|
* @returns {Uint16Array}
|
|
1639
1623
|
*/
|
|
@@ -1643,35 +1627,35 @@ export class Org {
|
|
|
1643
1627
|
*/
|
|
1644
1628
|
escort_ship_ids(): Uint16Array;
|
|
1645
1629
|
/**
|
|
1646
|
-
* @param {
|
|
1630
|
+
* @param {FleetKey} key
|
|
1647
1631
|
* @returns {Fleet}
|
|
1648
1632
|
*/
|
|
1649
|
-
clone_fleet(key:
|
|
1633
|
+
clone_fleet(key: FleetKey): Fleet;
|
|
1650
1634
|
/**
|
|
1651
|
-
* @param {
|
|
1652
|
-
* @param {
|
|
1635
|
+
* @param {FleetKey} fleet_key
|
|
1636
|
+
* @param {ShipKey} ship_key
|
|
1653
1637
|
* @returns {Ship | undefined}
|
|
1654
1638
|
*/
|
|
1655
|
-
|
|
1639
|
+
clone_ship(fleet_key: FleetKey, ship_key: ShipKey): Ship | undefined;
|
|
1656
1640
|
/**
|
|
1657
1641
|
* @param {string} id
|
|
1658
1642
|
* @returns {Ship | undefined}
|
|
1659
1643
|
*/
|
|
1660
1644
|
get_ship_by_id(id: string): Ship | undefined;
|
|
1661
1645
|
/**
|
|
1662
|
-
* @param {
|
|
1663
|
-
* @returns {string}
|
|
1646
|
+
* @param {FleetKey} key
|
|
1647
|
+
* @returns {(string)[]}
|
|
1664
1648
|
*/
|
|
1665
|
-
|
|
1649
|
+
ship_keys(key: FleetKey): string[];
|
|
1666
1650
|
/**
|
|
1667
1651
|
* @returns {Comp}
|
|
1668
1652
|
*/
|
|
1669
1653
|
create_comp(): Comp;
|
|
1670
1654
|
/**
|
|
1671
|
-
* @param {
|
|
1655
|
+
* @param {FleetKey} key
|
|
1672
1656
|
* @returns {Comp}
|
|
1673
1657
|
*/
|
|
1674
|
-
create_comp_by_key(key:
|
|
1658
|
+
create_comp_by_key(key: FleetKey): Comp;
|
|
1675
1659
|
/**
|
|
1676
1660
|
* @param {string} key
|
|
1677
1661
|
* @returns {AirSquadron}
|
|
@@ -1716,12 +1700,24 @@ export class Org {
|
|
|
1716
1700
|
*/
|
|
1717
1701
|
high_altitude_interception_power(): number;
|
|
1718
1702
|
/**
|
|
1719
|
-
* @
|
|
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}
|
|
1720
1716
|
*/
|
|
1721
|
-
|
|
1717
|
+
get_fleet_type(key: FleetKey): FleetType | undefined;
|
|
1722
1718
|
/**
|
|
1723
1719
|
*/
|
|
1724
|
-
boss_sup
|
|
1720
|
+
readonly boss_sup: FleetKey | undefined;
|
|
1725
1721
|
/**
|
|
1726
1722
|
*/
|
|
1727
1723
|
readonly hash: bigint;
|
|
@@ -1736,10 +1732,10 @@ export class Org {
|
|
|
1736
1732
|
readonly org_type: OrgType;
|
|
1737
1733
|
/**
|
|
1738
1734
|
*/
|
|
1739
|
-
route_sup
|
|
1735
|
+
readonly route_sup: FleetKey | undefined;
|
|
1740
1736
|
/**
|
|
1741
1737
|
*/
|
|
1742
|
-
sortie:
|
|
1738
|
+
readonly sortie: FleetKey;
|
|
1743
1739
|
}
|
|
1744
1740
|
/**
|
|
1745
1741
|
*/
|
|
@@ -1884,6 +1880,10 @@ export class Ship {
|
|
|
1884
1880
|
* @returns {boolean}
|
|
1885
1881
|
*/
|
|
1886
1882
|
is_pt_imp(): boolean;
|
|
1883
|
+
/**
|
|
1884
|
+
* @returns {boolean}
|
|
1885
|
+
*/
|
|
1886
|
+
is_attackable_by_torpedo(): boolean;
|
|
1887
1887
|
/**
|
|
1888
1888
|
* @param {number} index
|
|
1889
1889
|
* @returns {number | undefined}
|