fleethub-core 1.11.5 → 1.11.6
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 +329 -329
- package/node/fleethub_core.js +83 -83
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +108 -108
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +329 -329
- package/pkg/fleethub_core_bg.js +83 -83
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +108 -108
package/node/fleethub_core.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*/
|
|
5
|
+
export function set_panic_hook(): void;
|
|
3
6
|
/**
|
|
4
7
|
* @param {ShipConditions} value
|
|
5
8
|
* @returns {ShipConditions}
|
|
6
9
|
*/
|
|
7
10
|
export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
export interface SupportShellingSimulatorParams {
|
|
12
|
+
attacker_formation?: Formation;
|
|
13
|
+
target_formation?: Formation;
|
|
14
|
+
engagement: Engagement;
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
export interface AttackPower {
|
|
12
18
|
precap: number;
|
|
13
19
|
is_capped: boolean;
|
|
@@ -33,66 +39,27 @@ export interface AttackPowerParams {
|
|
|
33
39
|
custom_mods: CustomPowerModifiers;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
|
-
export interface
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export interface NodeAttackAnalyzerConfig {
|
|
41
|
-
air_state?: AirState;
|
|
42
|
-
engagement?: Engagement;
|
|
43
|
-
node_state?: NodeState;
|
|
44
|
-
left?: NodeAttackAnalyzerShipConfig;
|
|
45
|
-
right?: NodeAttackAnalyzerShipConfig;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface NodeAttackAnalysis {
|
|
49
|
-
left: AttackAnalysis;
|
|
50
|
-
right: AttackAnalysis;
|
|
51
|
-
shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
52
|
-
night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface AttackAnalyzerShipConfig
|
|
56
|
-
extends ShipConditions,
|
|
57
|
-
NightFleetConditions {
|
|
58
|
-
fleet_los_mod?: number | null;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface ShellingStyle {
|
|
62
|
-
tag: "ShellingStyle";
|
|
63
|
-
attack_type: ShellingType;
|
|
64
|
-
cutin: DayCutinLike | null;
|
|
65
|
-
power_mod: number;
|
|
66
|
-
accuracy_mod: number;
|
|
67
|
-
hits: number;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface NightAttackStyle {
|
|
71
|
-
tag: "NightAttackStyle";
|
|
72
|
-
attack_type: NightAttackType;
|
|
73
|
-
cutin: NightCutinLike | null;
|
|
74
|
-
power_mod: number;
|
|
75
|
-
accuracy_mod: number;
|
|
76
|
-
hits: number;
|
|
42
|
+
export interface NightContactChance {
|
|
43
|
+
rank1: number;
|
|
44
|
+
rank2: number;
|
|
45
|
+
rank3: number;
|
|
77
46
|
}
|
|
78
47
|
|
|
79
|
-
export interface
|
|
80
|
-
|
|
81
|
-
|
|
48
|
+
export interface CompNightCutinAnalysis {
|
|
49
|
+
night_contact_chance: NightContactChance;
|
|
50
|
+
ships: ShipNightCutinAnalysis[];
|
|
82
51
|
}
|
|
83
52
|
|
|
84
|
-
export interface
|
|
85
|
-
|
|
86
|
-
|
|
53
|
+
export interface ShipNightCutinAnalysis {
|
|
54
|
+
ship_id: number;
|
|
55
|
+
index: number;
|
|
56
|
+
normal: NightCutinActionReport;
|
|
57
|
+
chuuha: NightCutinActionReport;
|
|
87
58
|
}
|
|
88
59
|
|
|
89
|
-
export
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
export interface SupportShellingStyle {
|
|
94
|
-
tag: "SupportShellingStyle";
|
|
95
|
-
attack_type: SupportShellingType;
|
|
60
|
+
export interface NightCutinActionReport
|
|
61
|
+
extends ActionReport<NightPhaseAttackStyle> {
|
|
62
|
+
cutin_term: number | null;
|
|
96
63
|
}
|
|
97
64
|
|
|
98
65
|
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
@@ -222,49 +189,67 @@ export interface OrgState {
|
|
|
222
189
|
|
|
223
190
|
export type FleetKey = "f1" | "f2" | "f3" | "f4";
|
|
224
191
|
|
|
225
|
-
export interface
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
ships: ShipDayCutinAnalysis[];
|
|
192
|
+
export interface EquippabilityRule {
|
|
193
|
+
ship: CompiledEvaler;
|
|
194
|
+
keys?: string[];
|
|
195
|
+
include?: string;
|
|
196
|
+
exclude?: string;
|
|
231
197
|
}
|
|
232
198
|
|
|
233
|
-
export interface
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
199
|
+
export interface MasterEquippability {
|
|
200
|
+
equip_stype: EquipStype[];
|
|
201
|
+
equip_exslot: number[];
|
|
202
|
+
equip_ship: MstEquipShip[];
|
|
203
|
+
equip_exslot_ship: MstEquipExslotShip[];
|
|
204
|
+
rules: EquippabilityRule[];
|
|
239
205
|
}
|
|
240
206
|
|
|
241
|
-
export interface
|
|
242
|
-
|
|
207
|
+
export interface MstEquipExslotShip {
|
|
208
|
+
api_slotitem_id: number;
|
|
209
|
+
api_ship_ids: number[];
|
|
243
210
|
}
|
|
244
211
|
|
|
245
|
-
export interface
|
|
246
|
-
|
|
247
|
-
|
|
212
|
+
export interface MstEquipShip {
|
|
213
|
+
api_ship_id: number;
|
|
214
|
+
api_equip_type: number[];
|
|
248
215
|
}
|
|
249
216
|
|
|
250
|
-
export interface
|
|
251
|
-
id:
|
|
252
|
-
|
|
253
|
-
ships: [string, ShipMeta | null][];
|
|
217
|
+
export interface EquipStype {
|
|
218
|
+
id: number;
|
|
219
|
+
equip_type: number[];
|
|
254
220
|
}
|
|
255
221
|
|
|
256
|
-
export interface
|
|
257
|
-
|
|
222
|
+
export interface CompAnalyzerConfig {
|
|
223
|
+
engagement: Engagement;
|
|
224
|
+
formation: Formation;
|
|
225
|
+
anti_air_cutin: number | null;
|
|
226
|
+
ship_anti_air_resist: number;
|
|
227
|
+
fleet_anti_air_resist: number;
|
|
228
|
+
left_night_fleet_conditions: NightFleetConditions;
|
|
229
|
+
right_night_fleet_conditions: NightFleetConditions;
|
|
258
230
|
}
|
|
259
231
|
|
|
260
|
-
export
|
|
232
|
+
export interface CompNightAnalysis {
|
|
233
|
+
night_cutin: CompNightCutinAnalysis;
|
|
234
|
+
fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
235
|
+
}
|
|
261
236
|
|
|
262
|
-
export interface
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
237
|
+
export interface CompDayAnalysis {
|
|
238
|
+
day_cutin: CompDayCutinAnalysis;
|
|
239
|
+
fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface CompAnalysis {
|
|
243
|
+
day: CompDayAnalysis;
|
|
244
|
+
night: CompNightAnalysis;
|
|
245
|
+
contact: ContactAnalysis;
|
|
246
|
+
anti_air: CompAntiAirAnalysis;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export interface AttackAnalyzerShipConfig
|
|
250
|
+
extends ShipConditions,
|
|
251
|
+
NightFleetConditions {
|
|
252
|
+
fleet_los_mod?: number | null;
|
|
268
253
|
}
|
|
269
254
|
|
|
270
255
|
export type OrgType =
|
|
@@ -275,23 +260,6 @@ export type OrgType =
|
|
|
275
260
|
| "EnemySingle"
|
|
276
261
|
| "EnemyCombined";
|
|
277
262
|
|
|
278
|
-
export type SlotSizeVec = (number | null)[];
|
|
279
|
-
|
|
280
|
-
export type SpecialEnemyType =
|
|
281
|
-
| "None"
|
|
282
|
-
| "SoftSkinned"
|
|
283
|
-
| "Pillbox"
|
|
284
|
-
| "IsolatedIsland"
|
|
285
|
-
| "SupplyDepot"
|
|
286
|
-
| "NewSupplyDepot"
|
|
287
|
-
| "HarbourSummerPrincess"
|
|
288
|
-
| "PtImp"
|
|
289
|
-
| "BattleshipSummerPrincess"
|
|
290
|
-
| "HeavyCruiserSummerPrincess"
|
|
291
|
-
| "FrenchBattleshipPrincess"
|
|
292
|
-
| "AnchorageWaterDemonVacationMode"
|
|
293
|
-
| "DockPrincess";
|
|
294
|
-
|
|
295
263
|
export interface MasterShip {
|
|
296
264
|
ship_id: number;
|
|
297
265
|
name: string;
|
|
@@ -326,34 +294,42 @@ export interface MasterShip {
|
|
|
326
294
|
|
|
327
295
|
export type StatInterval = [number | null, number | null];
|
|
328
296
|
|
|
329
|
-
export interface
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
297
|
+
export interface ShellingStyle {
|
|
298
|
+
tag: "ShellingStyle";
|
|
299
|
+
attack_type: ShellingType;
|
|
300
|
+
cutin: DayCutinLike | null;
|
|
301
|
+
power_mod: number;
|
|
302
|
+
accuracy_mod: number;
|
|
303
|
+
hits: number;
|
|
334
304
|
}
|
|
335
305
|
|
|
336
|
-
export interface
|
|
337
|
-
|
|
338
|
-
|
|
306
|
+
export interface NightAttackStyle {
|
|
307
|
+
tag: "NightAttackStyle";
|
|
308
|
+
attack_type: NightAttackType;
|
|
309
|
+
cutin: NightCutinLike | null;
|
|
339
310
|
power_mod: number;
|
|
311
|
+
accuracy_mod: number;
|
|
312
|
+
hits: number;
|
|
340
313
|
}
|
|
341
314
|
|
|
342
|
-
export
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
| "Echelon"
|
|
347
|
-
| "LineAbreast"
|
|
348
|
-
| "Vanguard";
|
|
315
|
+
export interface AswAttackStyle {
|
|
316
|
+
tag: "AswAttackStyle";
|
|
317
|
+
attack_type: AswAttackType;
|
|
318
|
+
}
|
|
349
319
|
|
|
350
|
-
export
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
| "Cruising4";
|
|
320
|
+
export interface TorpedoAttackStyle {
|
|
321
|
+
tag: "TorpedoAttackStyle";
|
|
322
|
+
attack_type: TorpedoAttackType;
|
|
323
|
+
}
|
|
355
324
|
|
|
356
|
-
export type
|
|
325
|
+
export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
|
|
326
|
+
|
|
327
|
+
export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
|
|
328
|
+
|
|
329
|
+
export interface SupportShellingStyle {
|
|
330
|
+
tag: "SupportShellingStyle";
|
|
331
|
+
attack_type: SupportShellingType;
|
|
332
|
+
}
|
|
357
333
|
|
|
358
334
|
export type GearVecInput = GearInput[];
|
|
359
335
|
|
|
@@ -395,6 +371,8 @@ export interface EBonuses {
|
|
|
395
371
|
range: number;
|
|
396
372
|
}
|
|
397
373
|
|
|
374
|
+
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
375
|
+
|
|
398
376
|
export interface MasterGear {
|
|
399
377
|
gear_id: number;
|
|
400
378
|
name: string;
|
|
@@ -421,34 +399,43 @@ export interface MasterGear {
|
|
|
421
399
|
historical_aircraft_group?: number;
|
|
422
400
|
}
|
|
423
401
|
|
|
424
|
-
export interface
|
|
425
|
-
|
|
426
|
-
keys?: string[];
|
|
427
|
-
include?: string;
|
|
428
|
-
exclude?: string;
|
|
402
|
+
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
403
|
+
formation?: Formation;
|
|
429
404
|
}
|
|
430
405
|
|
|
431
|
-
export interface
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
406
|
+
export interface NodeAttackAnalyzerConfig {
|
|
407
|
+
air_state?: AirState;
|
|
408
|
+
engagement?: Engagement;
|
|
409
|
+
node_state?: NodeState;
|
|
410
|
+
left?: NodeAttackAnalyzerShipConfig;
|
|
411
|
+
right?: NodeAttackAnalyzerShipConfig;
|
|
437
412
|
}
|
|
438
413
|
|
|
439
|
-
export interface
|
|
440
|
-
|
|
441
|
-
|
|
414
|
+
export interface NodeAttackAnalysis {
|
|
415
|
+
left: AttackAnalysis;
|
|
416
|
+
right: AttackAnalysis;
|
|
417
|
+
shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
418
|
+
night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
442
419
|
}
|
|
443
420
|
|
|
444
|
-
export interface
|
|
445
|
-
|
|
446
|
-
|
|
421
|
+
export interface CompDayCutinAnalysis {
|
|
422
|
+
rank3_air_state: AirState;
|
|
423
|
+
rank2_air_state: AirState;
|
|
424
|
+
main_fleet_los_mod: number | null;
|
|
425
|
+
escort_fleet_los_mod: number | null;
|
|
426
|
+
ships: ShipDayCutinAnalysis[];
|
|
447
427
|
}
|
|
448
428
|
|
|
449
|
-
export interface
|
|
450
|
-
|
|
451
|
-
|
|
429
|
+
export interface ShipDayCutinAnalysis {
|
|
430
|
+
ship_id: number;
|
|
431
|
+
role: Role;
|
|
432
|
+
index: number;
|
|
433
|
+
rank3: DayCutinReport;
|
|
434
|
+
rank2: DayCutinReport;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
|
|
438
|
+
observation_term: number | null;
|
|
452
439
|
}
|
|
453
440
|
|
|
454
441
|
export interface BattleConditions {
|
|
@@ -518,23 +505,55 @@ export type DayCutinLike = DayCutin | FleetCutin;
|
|
|
518
505
|
|
|
519
506
|
export type NightCutinLike = NightCutin | FleetCutin;
|
|
520
507
|
|
|
508
|
+
export type SingleFormation =
|
|
509
|
+
| "LineAhead"
|
|
510
|
+
| "DoubleLine"
|
|
511
|
+
| "Diamond"
|
|
512
|
+
| "Echelon"
|
|
513
|
+
| "LineAbreast"
|
|
514
|
+
| "Vanguard";
|
|
515
|
+
|
|
516
|
+
export type CombinedFormation =
|
|
517
|
+
| "Cruising1"
|
|
518
|
+
| "Cruising2"
|
|
519
|
+
| "Cruising3"
|
|
520
|
+
| "Cruising4";
|
|
521
|
+
|
|
522
|
+
export type Formation = SingleFormation | CombinedFormation;
|
|
523
|
+
|
|
524
|
+
export type SpecialEnemyType =
|
|
525
|
+
| "None"
|
|
526
|
+
| "SoftSkinned"
|
|
527
|
+
| "Pillbox"
|
|
528
|
+
| "IsolatedIsland"
|
|
529
|
+
| "SupplyDepot"
|
|
530
|
+
| "NewSupplyDepot"
|
|
531
|
+
| "HarbourSummerPrincess"
|
|
532
|
+
| "PtImp"
|
|
533
|
+
| "BattleshipSummerPrincess"
|
|
534
|
+
| "HeavyCruiserSummerPrincess"
|
|
535
|
+
| "FrenchBattleshipPrincess"
|
|
536
|
+
| "AnchorageWaterDemonVacationMode"
|
|
537
|
+
| "DockPrincess";
|
|
538
|
+
|
|
539
|
+
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
540
|
+
|
|
521
541
|
export interface MoveShipPayload {
|
|
522
542
|
current: [string, string, ShipKey];
|
|
523
543
|
target: [string | null, string, ShipKey];
|
|
524
544
|
}
|
|
525
545
|
|
|
526
|
-
export interface
|
|
527
|
-
|
|
528
|
-
|
|
546
|
+
export interface FleetCutinReport<T> {
|
|
547
|
+
cutin: FleetCutin;
|
|
548
|
+
rate: number | null;
|
|
549
|
+
formation: Formation;
|
|
550
|
+
attacks: FleetCutinAttackReport<T>[];
|
|
529
551
|
}
|
|
530
552
|
|
|
531
|
-
export interface
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
rank2: number;
|
|
536
|
-
rank1: number;
|
|
537
|
-
total: number;
|
|
553
|
+
export interface FleetCutinAttackReport<T> extends AttackReport<T> {
|
|
554
|
+
index: number;
|
|
555
|
+
ship_id: number;
|
|
556
|
+
power_mod: number;
|
|
538
557
|
}
|
|
539
558
|
|
|
540
559
|
export interface FormationCombatModifiersDef {
|
|
@@ -610,16 +629,29 @@ export interface BattleDefinitions {
|
|
|
610
629
|
historical_bonuses: HistoricalBonusDef[];
|
|
611
630
|
}
|
|
612
631
|
|
|
613
|
-
export interface
|
|
614
|
-
id
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
632
|
+
export interface ShipMeta {
|
|
633
|
+
id: string;
|
|
634
|
+
ship_id: number;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
export interface FleetMeta {
|
|
638
|
+
id: string;
|
|
639
|
+
len: number;
|
|
640
|
+
ships: [string, ShipMeta | null][];
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export interface CompMeta {
|
|
644
|
+
fleets: Record<FleetType, FleetMeta>;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
export type NodeId = string;
|
|
648
|
+
|
|
649
|
+
export interface NodeState {
|
|
650
|
+
map?: number;
|
|
651
|
+
node?: NodeId;
|
|
652
|
+
phase?: number;
|
|
653
|
+
debuff?: boolean;
|
|
654
|
+
disable_historical_mod?: boolean;
|
|
623
655
|
}
|
|
624
656
|
|
|
625
657
|
export interface SlotSizeVecState {
|
|
@@ -654,9 +686,13 @@ export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
|
654
686
|
|
|
655
687
|
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
656
688
|
|
|
657
|
-
export
|
|
658
|
-
|
|
659
|
-
|
|
689
|
+
export interface MasterBattleDefinitions {
|
|
690
|
+
formation: NestedFormationDef[];
|
|
691
|
+
anti_air_cutin: AntiAirCutinDef[];
|
|
692
|
+
day_cutin: DayCutinDef[];
|
|
693
|
+
night_cutin: NightCutinDef[];
|
|
694
|
+
historical_bonuses?: HistoricalBonusDef[];
|
|
695
|
+
}
|
|
660
696
|
|
|
661
697
|
export interface HitRate {
|
|
662
698
|
normal: number;
|
|
@@ -686,15 +722,18 @@ export interface DamageReport {
|
|
|
686
722
|
damage_state_density: Histogram<DamageState, number>;
|
|
687
723
|
}
|
|
688
724
|
|
|
689
|
-
export interface
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
725
|
+
export interface ContactAnalysis {
|
|
726
|
+
single: DayContactChance[] | null;
|
|
727
|
+
combined: DayContactChance[] | null;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
export interface DayContactChance {
|
|
731
|
+
air_state: AirState;
|
|
732
|
+
trigger_rate: number;
|
|
733
|
+
rank3: number;
|
|
734
|
+
rank2: number;
|
|
735
|
+
rank1: number;
|
|
736
|
+
total: number;
|
|
698
737
|
}
|
|
699
738
|
|
|
700
739
|
export interface AttackAnalysis {
|
|
@@ -727,6 +766,18 @@ export interface AntiAirReport {
|
|
|
727
766
|
anti_air_propellant_barrage_chance: number | null;
|
|
728
767
|
}
|
|
729
768
|
|
|
769
|
+
export interface FleetState {
|
|
770
|
+
id?: string;
|
|
771
|
+
len?: number;
|
|
772
|
+
s1?: ShipState;
|
|
773
|
+
s2?: ShipState;
|
|
774
|
+
s3?: ShipState;
|
|
775
|
+
s4?: ShipState;
|
|
776
|
+
s5?: ShipState;
|
|
777
|
+
s6?: ShipState;
|
|
778
|
+
s7?: ShipState;
|
|
779
|
+
}
|
|
780
|
+
|
|
730
781
|
export interface GearState {
|
|
731
782
|
id?: string;
|
|
732
783
|
gear_id: number;
|
|
@@ -780,19 +831,21 @@ export type ShipType =
|
|
|
780
831
|
| "CT"
|
|
781
832
|
| "AO";
|
|
782
833
|
|
|
783
|
-
export type
|
|
834
|
+
export type SlotSizeVec = (number | null)[];
|
|
784
835
|
|
|
785
|
-
export
|
|
786
|
-
attacker_formation?: Formation;
|
|
787
|
-
target_formation?: Formation;
|
|
788
|
-
engagement: Engagement;
|
|
789
|
-
}
|
|
836
|
+
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
790
837
|
|
|
791
|
-
export
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
838
|
+
export type CompiledEvaler = string;
|
|
839
|
+
|
|
840
|
+
export interface AttackReport<T> {
|
|
841
|
+
style: T;
|
|
842
|
+
proc_rate: number | null;
|
|
843
|
+
attack_power: AttackPower | null;
|
|
844
|
+
attack_power_params: AttackPowerParams | null;
|
|
845
|
+
hits: number;
|
|
846
|
+
hit_rate: HitRate | null;
|
|
847
|
+
hit_rate_params: HitRateParams | null;
|
|
848
|
+
damage: DamageReport | null;
|
|
796
849
|
}
|
|
797
850
|
|
|
798
851
|
export interface ActionReport<T> {
|
|
@@ -803,58 +856,10 @@ export interface ActionReport<T> {
|
|
|
803
856
|
|
|
804
857
|
export type AirWaveType = "Jet" | "LandBase" | "Carrier";
|
|
805
858
|
|
|
806
|
-
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
807
|
-
|
|
808
|
-
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
809
|
-
id?: string;
|
|
810
|
-
mode?: AirSquadronMode;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
export type AswAttackType = "DepthCharge" | "Aerial";
|
|
814
|
-
|
|
815
|
-
export type ShellingType = "Normal" | "Aerial";
|
|
816
|
-
|
|
817
|
-
export type NightAttackType = "Normal" | "Swordfish" | "Aerial";
|
|
818
|
-
|
|
819
|
-
export type SupportShellingType = ShellingType;
|
|
820
|
-
|
|
821
|
-
export type AttackType =
|
|
822
|
-
| { t: "Asw"; c: AswAttackType }
|
|
823
|
-
| { t: "Shelling"; c: ShellingType }
|
|
824
|
-
| { t: "Night"; c: NightAttackType }
|
|
825
|
-
| { t: "Torpedo" }
|
|
826
|
-
| { t: "SupportShelling"; c: SupportShellingType };
|
|
827
|
-
|
|
828
|
-
export type DayPhaseAttackType =
|
|
829
|
-
| { t: "Shelling"; c: ShellingType }
|
|
830
|
-
| { t: "Asw"; c: AswAttackType };
|
|
831
|
-
|
|
832
|
-
export type NightPhaseAttackType =
|
|
833
|
-
| { t: "Night"; c: NightAttackType }
|
|
834
|
-
| { t: "Asw"; c: AswAttackType };
|
|
835
|
-
|
|
836
|
-
export type TorpedoAttackType = null;
|
|
837
|
-
|
|
838
|
-
export type Role = "Main" | "Escort";
|
|
839
|
-
|
|
840
859
|
export type Side = "Player" | "Enemy";
|
|
841
860
|
|
|
842
861
|
export type Align = "Left" | "Right";
|
|
843
862
|
|
|
844
|
-
export type CompiledEvaler = string;
|
|
845
|
-
|
|
846
|
-
export interface SimulatorResult {
|
|
847
|
-
items: SimulatorResultItem[];
|
|
848
|
-
sunk_vec: [number, number, number][];
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
export interface SimulatorResultItem {
|
|
852
|
-
id: string;
|
|
853
|
-
fleet_type: FleetType;
|
|
854
|
-
index: number;
|
|
855
|
-
damage_state_map: Record<DamageState, number>;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
863
|
export interface MasterData extends MasterBattleDefinitions {
|
|
859
864
|
created_at: number;
|
|
860
865
|
gears: MasterGear[];
|
|
@@ -876,48 +881,38 @@ export interface MasterAttrRule<T> {
|
|
|
876
881
|
expr: CompiledEvaler;
|
|
877
882
|
}
|
|
878
883
|
|
|
879
|
-
export interface
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
884
|
+
export interface MasterIBonuses {
|
|
885
|
+
shelling_power: MasterIBonusRule[];
|
|
886
|
+
shelling_accuracy: MasterIBonusRule[];
|
|
887
|
+
shelling_aerial_power: MasterIBonusRule[];
|
|
888
|
+
torpedo_power: MasterIBonusRule[];
|
|
889
|
+
torpedo_accuracy: MasterIBonusRule[];
|
|
890
|
+
torpedo_evasion: MasterIBonusRule[];
|
|
891
|
+
asw_power: MasterIBonusRule[];
|
|
892
|
+
asw_accuracy: MasterIBonusRule[];
|
|
893
|
+
night_power: MasterIBonusRule[];
|
|
894
|
+
night_aerial_power: MasterIBonusRule[];
|
|
895
|
+
night_accuracy: MasterIBonusRule[];
|
|
896
|
+
defense_power: MasterIBonusRule[];
|
|
897
|
+
contact_selection: MasterIBonusRule[];
|
|
898
|
+
fighter_power: MasterIBonusRule[];
|
|
899
|
+
ship_anti_air: MasterIBonusRule[];
|
|
900
|
+
fleet_anti_air: MasterIBonusRule[];
|
|
901
|
+
elos: MasterIBonusRule[];
|
|
896
902
|
}
|
|
897
903
|
|
|
898
|
-
export interface
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
normal: NightCutinActionReport;
|
|
902
|
-
chuuha: NightCutinActionReport;
|
|
904
|
+
export interface MasterIBonusRule {
|
|
905
|
+
expr: CompiledEvaler;
|
|
906
|
+
formula: CompiledEvaler;
|
|
903
907
|
}
|
|
904
908
|
|
|
905
|
-
export interface
|
|
906
|
-
|
|
907
|
-
|
|
909
|
+
export interface ShipPosition {
|
|
910
|
+
org_type?: OrgType;
|
|
911
|
+
fleet_type?: FleetType;
|
|
912
|
+
fleet_len?: number;
|
|
913
|
+
index?: number;
|
|
908
914
|
}
|
|
909
915
|
|
|
910
|
-
export type AirState =
|
|
911
|
-
| "AirSupremacy"
|
|
912
|
-
| "AirSuperiority"
|
|
913
|
-
| "AirParity"
|
|
914
|
-
| "AirDenial"
|
|
915
|
-
| "AirIncapability";
|
|
916
|
-
|
|
917
|
-
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
918
|
-
|
|
919
|
-
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
920
|
-
|
|
921
916
|
export type ShipAttr =
|
|
922
917
|
| "Unknown"
|
|
923
918
|
| "NightCarrier"
|
|
@@ -943,59 +938,42 @@ export interface ShipConditions extends ShipPosition {
|
|
|
943
938
|
amagiri_index?: number | null;
|
|
944
939
|
}
|
|
945
940
|
|
|
946
|
-
export type
|
|
941
|
+
export type GearTypeIdArray = [number, number, number, number, number];
|
|
947
942
|
|
|
948
|
-
export interface
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
shelling_aerial_power: MasterIBonusRule[];
|
|
952
|
-
torpedo_power: MasterIBonusRule[];
|
|
953
|
-
torpedo_accuracy: MasterIBonusRule[];
|
|
954
|
-
torpedo_evasion: MasterIBonusRule[];
|
|
955
|
-
asw_power: MasterIBonusRule[];
|
|
956
|
-
asw_accuracy: MasterIBonusRule[];
|
|
957
|
-
night_power: MasterIBonusRule[];
|
|
958
|
-
night_aerial_power: MasterIBonusRule[];
|
|
959
|
-
night_accuracy: MasterIBonusRule[];
|
|
960
|
-
defense_power: MasterIBonusRule[];
|
|
961
|
-
contact_selection: MasterIBonusRule[];
|
|
962
|
-
fighter_power: MasterIBonusRule[];
|
|
963
|
-
ship_anti_air: MasterIBonusRule[];
|
|
964
|
-
fleet_anti_air: MasterIBonusRule[];
|
|
965
|
-
elos: MasterIBonusRule[];
|
|
943
|
+
export interface SimulatorResult {
|
|
944
|
+
items: SimulatorResultItem[];
|
|
945
|
+
sunk_vec: [number, number, number][];
|
|
966
946
|
}
|
|
967
947
|
|
|
968
|
-
export interface
|
|
969
|
-
|
|
970
|
-
|
|
948
|
+
export interface SimulatorResultItem {
|
|
949
|
+
id: string;
|
|
950
|
+
fleet_type: FleetType;
|
|
951
|
+
index: number;
|
|
952
|
+
damage_state_map: Record<DamageState, number>;
|
|
971
953
|
}
|
|
972
954
|
|
|
973
|
-
export interface
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
fleet_anti_air_resist: number;
|
|
979
|
-
left_night_fleet_conditions: NightFleetConditions;
|
|
980
|
-
right_night_fleet_conditions: NightFleetConditions;
|
|
955
|
+
export interface ShipAnalyzerConfig {
|
|
956
|
+
air_state?: AirState;
|
|
957
|
+
engagement?: Engagement;
|
|
958
|
+
left?: AttackAnalyzerShipConfig;
|
|
959
|
+
right?: AttackAnalyzerShipConfig;
|
|
981
960
|
}
|
|
982
961
|
|
|
983
|
-
export
|
|
984
|
-
night_cutin: CompNightCutinAnalysis;
|
|
985
|
-
fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
986
|
-
}
|
|
962
|
+
export type AirSquadronMode = "Sortie" | "AirDefense";
|
|
987
963
|
|
|
988
|
-
export interface
|
|
989
|
-
|
|
990
|
-
|
|
964
|
+
export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
965
|
+
id?: string;
|
|
966
|
+
mode?: AirSquadronMode;
|
|
991
967
|
}
|
|
992
968
|
|
|
993
|
-
export
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
969
|
+
export type AirState =
|
|
970
|
+
| "AirSupremacy"
|
|
971
|
+
| "AirSuperiority"
|
|
972
|
+
| "AirParity"
|
|
973
|
+
| "AirDenial"
|
|
974
|
+
| "AirIncapability";
|
|
975
|
+
|
|
976
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
999
977
|
|
|
1000
978
|
export interface AttackPowerModifier {
|
|
1001
979
|
a?: number;
|
|
@@ -1020,16 +998,38 @@ export interface CustomPowerModifiers {
|
|
|
1020
998
|
historical_mod?: AttackPowerModifier;
|
|
1021
999
|
}
|
|
1022
1000
|
|
|
1001
|
+
export type AswAttackType = "DepthCharge" | "Aerial";
|
|
1002
|
+
|
|
1003
|
+
export type ShellingType = "Normal" | "Aerial";
|
|
1004
|
+
|
|
1005
|
+
export type NightAttackType = "Normal" | "Swordfish" | "Aerial";
|
|
1006
|
+
|
|
1007
|
+
export type SupportShellingType = ShellingType;
|
|
1008
|
+
|
|
1009
|
+
export type AttackType =
|
|
1010
|
+
| { t: "Asw"; c: AswAttackType }
|
|
1011
|
+
| { t: "Shelling"; c: ShellingType }
|
|
1012
|
+
| { t: "Night"; c: NightAttackType }
|
|
1013
|
+
| { t: "Torpedo" }
|
|
1014
|
+
| { t: "SupportShelling"; c: SupportShellingType };
|
|
1015
|
+
|
|
1016
|
+
export type DayPhaseAttackType =
|
|
1017
|
+
| { t: "Shelling"; c: ShellingType }
|
|
1018
|
+
| { t: "Asw"; c: AswAttackType };
|
|
1019
|
+
|
|
1020
|
+
export type NightPhaseAttackType =
|
|
1021
|
+
| { t: "Night"; c: NightAttackType }
|
|
1022
|
+
| { t: "Asw"; c: AswAttackType };
|
|
1023
|
+
|
|
1024
|
+
export type TorpedoAttackType = null;
|
|
1025
|
+
|
|
1023
1026
|
export type ContactRank = "Rank1" | "Rank2" | "Rank3";
|
|
1024
1027
|
|
|
1028
|
+
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
1029
|
+
|
|
1025
1030
|
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
1026
1031
|
|
|
1027
|
-
export
|
|
1028
|
-
org_type?: OrgType;
|
|
1029
|
-
fleet_type?: FleetType;
|
|
1030
|
-
fleet_len?: number;
|
|
1031
|
-
index?: number;
|
|
1032
|
-
}
|
|
1032
|
+
export type Role = "Main" | "Escort";
|
|
1033
1033
|
|
|
1034
1034
|
/**
|
|
1035
1035
|
*/
|
|
@@ -1088,7 +1088,7 @@ export class Analyzer {
|
|
|
1088
1088
|
config: ShipAnalyzerConfig,
|
|
1089
1089
|
left: Ship,
|
|
1090
1090
|
right: Ship,
|
|
1091
|
-
attacker_is_left: boolean
|
|
1091
|
+
attacker_is_left: boolean,
|
|
1092
1092
|
): AttackAnalysis;
|
|
1093
1093
|
/**
|
|
1094
1094
|
* @param {NodeAttackAnalyzerConfig} config
|
|
@@ -1103,7 +1103,7 @@ export class Analyzer {
|
|
|
1103
1103
|
left_comp: Comp,
|
|
1104
1104
|
left_ship: Ship,
|
|
1105
1105
|
right_comp: Comp,
|
|
1106
|
-
right_ship: Ship
|
|
1106
|
+
right_ship: Ship,
|
|
1107
1107
|
): NodeAttackAnalysis;
|
|
1108
1108
|
/**
|
|
1109
1109
|
* @param {Comp} comp
|
|
@@ -1122,7 +1122,7 @@ export class Analyzer {
|
|
|
1122
1122
|
player_comp: Comp,
|
|
1123
1123
|
enemy_comp: Comp,
|
|
1124
1124
|
config: NodeAttackAnalyzerConfig,
|
|
1125
|
-
times: number
|
|
1125
|
+
times: number,
|
|
1126
1126
|
): SimulatorResult;
|
|
1127
1127
|
}
|
|
1128
1128
|
/**
|
|
@@ -1202,7 +1202,7 @@ export class Comp {
|
|
|
1202
1202
|
*/
|
|
1203
1203
|
fighter_power(
|
|
1204
1204
|
escort_participates: boolean,
|
|
1205
|
-
air_type: AirWaveType
|
|
1205
|
+
air_type: AirWaveType,
|
|
1206
1206
|
): number | undefined;
|
|
1207
1207
|
/**
|
|
1208
1208
|
* マップ索敵
|
|
@@ -1341,7 +1341,7 @@ export class Fleet {
|
|
|
1341
1341
|
get_remaining_fuel(
|
|
1342
1342
|
id: string,
|
|
1343
1343
|
rate: number,
|
|
1344
|
-
ceil: boolean
|
|
1344
|
+
ceil: boolean,
|
|
1345
1345
|
): number | undefined;
|
|
1346
1346
|
/**
|
|
1347
1347
|
* @param {string} id
|
|
@@ -1352,7 +1352,7 @@ export class Fleet {
|
|
|
1352
1352
|
get_remaining_ammo(
|
|
1353
1353
|
id: string,
|
|
1354
1354
|
rate: number,
|
|
1355
|
-
ceil: boolean
|
|
1355
|
+
ceil: boolean,
|
|
1356
1356
|
): number | undefined;
|
|
1357
1357
|
/**
|
|
1358
1358
|
* @returns {number}
|
|
@@ -1733,7 +1733,7 @@ export class Org {
|
|
|
1733
1733
|
create_move_ship_payload(
|
|
1734
1734
|
id: string,
|
|
1735
1735
|
x: number,
|
|
1736
|
-
y: number
|
|
1736
|
+
y: number,
|
|
1737
1737
|
): MoveShipPayload | undefined;
|
|
1738
1738
|
/**
|
|
1739
1739
|
* @param {FleetKey} key
|
|
@@ -1962,7 +1962,7 @@ export class Ship {
|
|
|
1962
1962
|
evasion_term(
|
|
1963
1963
|
formation_mod: number,
|
|
1964
1964
|
postcap_additive: number,
|
|
1965
|
-
postcap_multiplicative: number
|
|
1965
|
+
postcap_multiplicative: number,
|
|
1966
1966
|
): number | undefined;
|
|
1967
1967
|
/**
|
|
1968
1968
|
* @param {number} armor_penetration
|