fleethub-core 1.9.1 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/fleethub_core.d.ts +432 -409
- package/node/fleethub_core.js +97 -68
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +57 -55
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +432 -409
- package/pkg/fleethub_core_bg.js +97 -68
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +57 -55
package/pkg/fleethub_core.d.ts
CHANGED
|
@@ -8,164 +8,82 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
|
8
8
|
/**
|
|
9
9
|
*/
|
|
10
10
|
export function set_panic_hook(): void;
|
|
11
|
-
export type
|
|
12
|
-
| "Fighter"
|
|
13
|
-
| "Bomber"
|
|
14
|
-
| "Recon"
|
|
15
|
-
| "MainGun"
|
|
16
|
-
| "Secondary"
|
|
17
|
-
| "Torpedo"
|
|
18
|
-
| "AntiSub"
|
|
19
|
-
| "Radar"
|
|
20
|
-
| "Landing"
|
|
21
|
-
| "Ration"
|
|
22
|
-
| "LandBased"
|
|
23
|
-
| "Misc";
|
|
24
|
-
|
|
25
|
-
export type GearType =
|
|
26
|
-
| "Unknown"
|
|
27
|
-
| "SmallMainGun"
|
|
28
|
-
| "MediumMainGun"
|
|
29
|
-
| "LargeMainGun"
|
|
30
|
-
| "SecondaryGun"
|
|
31
|
-
| "Torpedo"
|
|
32
|
-
| "CbFighter"
|
|
33
|
-
| "CbDiveBomber"
|
|
34
|
-
| "CbTorpedoBomber"
|
|
35
|
-
| "CbRecon"
|
|
36
|
-
| "ReconSeaplane"
|
|
37
|
-
| "SeaplaneBomber"
|
|
38
|
-
| "SmallRadar"
|
|
39
|
-
| "LargeRadar"
|
|
40
|
-
| "Sonar"
|
|
41
|
-
| "DepthCharge"
|
|
42
|
-
| "ExtraArmor"
|
|
43
|
-
| "Engine"
|
|
44
|
-
| "AntiAirShell"
|
|
45
|
-
| "ApShell"
|
|
46
|
-
| "VtFuze"
|
|
47
|
-
| "AntiAirGun"
|
|
48
|
-
| "MidgetSubmarine"
|
|
49
|
-
| "EmergencyRepair"
|
|
50
|
-
| "LandingCraft"
|
|
51
|
-
| "Rotorcraft"
|
|
52
|
-
| "AntiSubPatrolAircraft"
|
|
53
|
-
| "MediumArmor"
|
|
54
|
-
| "LargeArmor"
|
|
55
|
-
| "Searchlight"
|
|
56
|
-
| "SupplyContainer"
|
|
57
|
-
| "ShipRepairFacility"
|
|
58
|
-
| "SubmarineTorpedo"
|
|
59
|
-
| "Starshell"
|
|
60
|
-
| "CommandFacility"
|
|
61
|
-
| "AviationPersonnel"
|
|
62
|
-
| "AntiAirFireDirector"
|
|
63
|
-
| "AntiGroundEquipment"
|
|
64
|
-
| "LargeMainGun2"
|
|
65
|
-
| "ShipPersonnel"
|
|
66
|
-
| "LargeSonar"
|
|
67
|
-
| "LargeFlyingBoat"
|
|
68
|
-
| "LargeSearchlight"
|
|
69
|
-
| "CombatRation"
|
|
70
|
-
| "Supplies"
|
|
71
|
-
| "SeaplaneFighter"
|
|
72
|
-
| "AmphibiousTank"
|
|
73
|
-
| "LbAttacker"
|
|
74
|
-
| "LbFighter"
|
|
75
|
-
| "LbRecon"
|
|
76
|
-
| "TransportationMaterial"
|
|
77
|
-
| "SubmarineEquipment"
|
|
78
|
-
| "LargeLbAircraft"
|
|
79
|
-
| "JetFighter"
|
|
80
|
-
| "JetFighterBomber"
|
|
81
|
-
| "JetTorpedoBomber"
|
|
82
|
-
| "JetRecon"
|
|
83
|
-
| "LargeRadar2"
|
|
84
|
-
| "CbRecon2"
|
|
85
|
-
| "SecondaryGun2";
|
|
86
|
-
|
|
87
|
-
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
11
|
+
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
88
12
|
|
|
89
|
-
export
|
|
90
|
-
formation: Record<Formation, NestedFormationDef>;
|
|
91
|
-
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
92
|
-
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
93
|
-
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
94
|
-
}
|
|
13
|
+
export type SlotSizeVec = (number | null)[];
|
|
95
14
|
|
|
96
|
-
export interface
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
accuracy_mod: number | null;
|
|
15
|
+
export interface NightFleetConditions {
|
|
16
|
+
night_contact_rank?: ContactRank | null;
|
|
17
|
+
starshell_index?: number | null;
|
|
18
|
+
searchlight_index?: number | null;
|
|
19
|
+
activates_large_searchlight?: boolean;
|
|
102
20
|
}
|
|
103
21
|
|
|
104
|
-
export interface
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
type_factor: number | null;
|
|
108
|
-
power_mod: number | null;
|
|
109
|
-
accuracy_mod: number | null;
|
|
22
|
+
export interface NightConditions {
|
|
23
|
+
player?: NightFleetConditions;
|
|
24
|
+
enemy?: NightFleetConditions;
|
|
110
25
|
}
|
|
111
26
|
|
|
112
|
-
export interface
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
27
|
+
export interface BattleConditions {
|
|
28
|
+
org_type: OrgType;
|
|
29
|
+
role: Role;
|
|
30
|
+
ship_index: number;
|
|
31
|
+
fleet_len: number;
|
|
32
|
+
formation: Formation;
|
|
33
|
+
fleet_los_mod: number | null;
|
|
34
|
+
night_conditions: NightFleetConditions;
|
|
118
35
|
}
|
|
119
36
|
|
|
120
|
-
export
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
37
|
+
export interface MasterGear {
|
|
38
|
+
gear_id: number;
|
|
39
|
+
name: string;
|
|
40
|
+
types: GearTypeIdArray;
|
|
41
|
+
special_type?: number;
|
|
42
|
+
max_hp?: number;
|
|
43
|
+
firepower?: number;
|
|
44
|
+
armor?: number;
|
|
45
|
+
torpedo?: number;
|
|
46
|
+
anti_air?: number;
|
|
47
|
+
speed?: number;
|
|
48
|
+
bombing?: number;
|
|
49
|
+
asw?: number;
|
|
50
|
+
los?: number;
|
|
51
|
+
luck?: number;
|
|
52
|
+
accuracy?: number;
|
|
53
|
+
evasion?: number;
|
|
54
|
+
range?: number;
|
|
55
|
+
radius?: number;
|
|
56
|
+
cost?: number;
|
|
57
|
+
improvable?: boolean;
|
|
58
|
+
ship_anti_air_resist?: number;
|
|
59
|
+
fleet_anti_air_resist?: number;
|
|
133
60
|
}
|
|
134
61
|
|
|
135
|
-
export interface
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
62
|
+
export interface CompAnalyzerConfig {
|
|
63
|
+
engagement: Engagement;
|
|
64
|
+
formation: Formation;
|
|
65
|
+
anti_air_cutin: number | null;
|
|
66
|
+
ship_anti_air_resist: number;
|
|
67
|
+
fleet_anti_air_resist: number;
|
|
68
|
+
left_night_fleet_conditions: NightFleetConditions;
|
|
69
|
+
right_night_fleet_conditions: NightFleetConditions;
|
|
139
70
|
}
|
|
140
71
|
|
|
141
|
-
export
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
| "AirSupremacy"
|
|
145
|
-
| "AirSuperiority"
|
|
146
|
-
| "AirParity"
|
|
147
|
-
| "AirDenial"
|
|
148
|
-
| "AirIncapability";
|
|
149
|
-
|
|
150
|
-
export interface MasterData extends MasterBattleDefinitions {
|
|
151
|
-
created_at: number;
|
|
152
|
-
gears: MasterGear[];
|
|
153
|
-
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
154
|
-
ships: MasterShip[];
|
|
155
|
-
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
156
|
-
ibonuses: MasterIBonuses;
|
|
157
|
-
equippable: MasterEquippability;
|
|
72
|
+
export interface CompNightAnalysis {
|
|
73
|
+
night_cutin: CompNightCutinAnalysis;
|
|
74
|
+
fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
158
75
|
}
|
|
159
76
|
|
|
160
|
-
export interface
|
|
161
|
-
|
|
162
|
-
|
|
77
|
+
export interface CompDayAnalysis {
|
|
78
|
+
day_cutin: CompDayCutinAnalysis;
|
|
79
|
+
fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
163
80
|
}
|
|
164
81
|
|
|
165
|
-
export interface
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
82
|
+
export interface CompAnalysis {
|
|
83
|
+
day: CompDayAnalysis;
|
|
84
|
+
night: CompNightAnalysis;
|
|
85
|
+
contact: ContactAnalysis;
|
|
86
|
+
anti_air: CompAntiAirAnalysis;
|
|
169
87
|
}
|
|
170
88
|
|
|
171
89
|
export interface OrgState {
|
|
@@ -249,8 +167,6 @@ export interface GearState {
|
|
|
249
167
|
stars?: number;
|
|
250
168
|
}
|
|
251
169
|
|
|
252
|
-
export type SlotSizeVec = (number | null)[];
|
|
253
|
-
|
|
254
170
|
export type ShipType =
|
|
255
171
|
| "Unknown"
|
|
256
172
|
| "DE"
|
|
@@ -293,6 +209,7 @@ export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
|
293
209
|
export interface NodeAttackAnalyzerConfig {
|
|
294
210
|
air_state?: AirState;
|
|
295
211
|
engagement?: Engagement;
|
|
212
|
+
node_state?: NodeState;
|
|
296
213
|
left?: NodeAttackAnalyzerShipConfig;
|
|
297
214
|
right?: NodeAttackAnalyzerShipConfig;
|
|
298
215
|
}
|
|
@@ -316,6 +233,47 @@ export type Align = "Left" | "Right";
|
|
|
316
233
|
|
|
317
234
|
export type Side = "Player" | "Enemy";
|
|
318
235
|
|
|
236
|
+
export interface MasterIBonuses {
|
|
237
|
+
shelling_power: MasterIBonusRule[];
|
|
238
|
+
shelling_accuracy: MasterIBonusRule[];
|
|
239
|
+
shelling_aerial_power: MasterIBonusRule[];
|
|
240
|
+
torpedo_power: MasterIBonusRule[];
|
|
241
|
+
torpedo_accuracy: MasterIBonusRule[];
|
|
242
|
+
torpedo_evasion: MasterIBonusRule[];
|
|
243
|
+
asw_power: MasterIBonusRule[];
|
|
244
|
+
asw_accuracy: MasterIBonusRule[];
|
|
245
|
+
night_power: MasterIBonusRule[];
|
|
246
|
+
night_aerial_power: MasterIBonusRule[];
|
|
247
|
+
night_accuracy: MasterIBonusRule[];
|
|
248
|
+
defense_power: MasterIBonusRule[];
|
|
249
|
+
contact_selection: MasterIBonusRule[];
|
|
250
|
+
fighter_power: MasterIBonusRule[];
|
|
251
|
+
ship_anti_air: MasterIBonusRule[];
|
|
252
|
+
fleet_anti_air: MasterIBonusRule[];
|
|
253
|
+
elos: MasterIBonusRule[];
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export interface MasterIBonusRule {
|
|
257
|
+
expr: CompiledEvaler;
|
|
258
|
+
formula: CompiledEvaler;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface AttackReport<T> {
|
|
262
|
+
style: T;
|
|
263
|
+
proc_rate: number | null;
|
|
264
|
+
attack_power: AttackPower | null;
|
|
265
|
+
attack_power_params: AttackPowerParams | null;
|
|
266
|
+
hits: number;
|
|
267
|
+
hit_rate: HitRate | null;
|
|
268
|
+
hit_rate_params: HitRateParams | null;
|
|
269
|
+
damage: DamageReport | null;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface MoveShipPayload {
|
|
273
|
+
current: [string, string, ShipKey];
|
|
274
|
+
target: [string | null, string, ShipKey];
|
|
275
|
+
}
|
|
276
|
+
|
|
319
277
|
export type Role = "Main" | "Escort";
|
|
320
278
|
|
|
321
279
|
export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
|
|
@@ -361,23 +319,74 @@ export type DayCutin =
|
|
|
361
319
|
| "BBA"
|
|
362
320
|
| "BA";
|
|
363
321
|
|
|
364
|
-
export
|
|
365
|
-
style: T;
|
|
366
|
-
proc_rate: number | null;
|
|
367
|
-
attack_power: AttackPower | null;
|
|
368
|
-
attack_power_params: AttackPowerParams | null;
|
|
369
|
-
hits: number;
|
|
370
|
-
hit_rate: HitRate | null;
|
|
371
|
-
hit_rate_params: HitRateParams | null;
|
|
372
|
-
damage: DamageReport | null;
|
|
373
|
-
}
|
|
322
|
+
export type AirWaveType = "Jet" | "LandBase" | "Carrier";
|
|
374
323
|
|
|
375
|
-
export
|
|
376
|
-
|
|
377
|
-
|
|
324
|
+
export type ContactRank = "Rank1" | "Rank2" | "Rank3";
|
|
325
|
+
|
|
326
|
+
export interface BattleDefinitions {
|
|
327
|
+
formation: Record<Formation, NestedFormationDef>;
|
|
328
|
+
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
329
|
+
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
330
|
+
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
331
|
+
historical_bonuses: HistoricalBonusDef[];
|
|
378
332
|
}
|
|
379
333
|
|
|
380
|
-
export
|
|
334
|
+
export interface NightCutinDef {
|
|
335
|
+
tag: NightCutin;
|
|
336
|
+
hits: number;
|
|
337
|
+
type_factor: number | null;
|
|
338
|
+
power_mod: number | null;
|
|
339
|
+
accuracy_mod: number | null;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface HistoricalBonusDef {
|
|
343
|
+
map?: number;
|
|
344
|
+
node?: CompiledEvaler;
|
|
345
|
+
phase?: number;
|
|
346
|
+
debuff?: boolean;
|
|
347
|
+
ship?: CompiledEvaler;
|
|
348
|
+
enemy?: CompiledEvaler;
|
|
349
|
+
power_mod?: number;
|
|
350
|
+
accuracy_mod?: number;
|
|
351
|
+
evasion_mod?: number;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export interface DayCutinDef {
|
|
355
|
+
tag: DayCutin;
|
|
356
|
+
hits: number;
|
|
357
|
+
type_factor: number | null;
|
|
358
|
+
power_mod: number | null;
|
|
359
|
+
accuracy_mod: number | null;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
export interface AntiAirCutinDef {
|
|
363
|
+
id: number;
|
|
364
|
+
type_factor: number | null;
|
|
365
|
+
multiplier: number | null;
|
|
366
|
+
guaranteed: number | null;
|
|
367
|
+
sequential: boolean | null;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export type NestedFormationDef =
|
|
371
|
+
| FormationDef
|
|
372
|
+
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
373
|
+
|
|
374
|
+
export interface FormationDef {
|
|
375
|
+
tag: Formation;
|
|
376
|
+
protection_rate: number | null;
|
|
377
|
+
fleet_anti_air_mod: number;
|
|
378
|
+
shelling: FormationCombatModifiersDef;
|
|
379
|
+
torpedo: FormationCombatModifiersDef;
|
|
380
|
+
asw: FormationCombatModifiersDef;
|
|
381
|
+
night: FormationCombatModifiersDef;
|
|
382
|
+
support_shelling: FormationCombatModifiersDef;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export interface FormationCombatModifiersDef {
|
|
386
|
+
power_mod?: number;
|
|
387
|
+
accuracy_mod?: number;
|
|
388
|
+
evasion_mod?: number;
|
|
389
|
+
}
|
|
381
390
|
|
|
382
391
|
export interface SimulatorResult {
|
|
383
392
|
items: SimulatorResultItem[];
|
|
@@ -391,29 +400,29 @@ export interface SimulatorResultItem {
|
|
|
391
400
|
damage_state_map: Record<DamageState, number>;
|
|
392
401
|
}
|
|
393
402
|
|
|
394
|
-
export interface
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
asw_accuracy: MasterIBonusRule[];
|
|
403
|
-
night_power: MasterIBonusRule[];
|
|
404
|
-
night_aerial_power: MasterIBonusRule[];
|
|
405
|
-
night_accuracy: MasterIBonusRule[];
|
|
406
|
-
defense_power: MasterIBonusRule[];
|
|
407
|
-
contact_selection: MasterIBonusRule[];
|
|
408
|
-
fighter_power: MasterIBonusRule[];
|
|
409
|
-
ship_anti_air: MasterIBonusRule[];
|
|
410
|
-
fleet_anti_air: MasterIBonusRule[];
|
|
411
|
-
elos: MasterIBonusRule[];
|
|
403
|
+
export interface AttackPower {
|
|
404
|
+
precap: number;
|
|
405
|
+
is_capped: boolean;
|
|
406
|
+
capped: number;
|
|
407
|
+
normal: number;
|
|
408
|
+
critical: number;
|
|
409
|
+
armor_penetration: number;
|
|
410
|
+
remaining_ammo_mod: number;
|
|
412
411
|
}
|
|
413
412
|
|
|
414
|
-
export interface
|
|
415
|
-
|
|
416
|
-
|
|
413
|
+
export interface AttackPowerParams {
|
|
414
|
+
basic: number;
|
|
415
|
+
cap: number;
|
|
416
|
+
precap_mod: AttackPowerModifier;
|
|
417
|
+
postcap_mod: AttackPowerModifier;
|
|
418
|
+
ap_shell_mod: number | null;
|
|
419
|
+
aerial_power: number | null;
|
|
420
|
+
proficiency_critical_mod: number;
|
|
421
|
+
armor_penetration: number;
|
|
422
|
+
remaining_ammo_mod: number;
|
|
423
|
+
special_enemy_mods: SpecialEnemyModifiers;
|
|
424
|
+
historical_mod: number;
|
|
425
|
+
custom_mods: CustomPowerModifiers;
|
|
417
426
|
}
|
|
418
427
|
|
|
419
428
|
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
@@ -423,53 +432,103 @@ export interface ShipConditions extends ShipPosition {
|
|
|
423
432
|
amagiri_index?: number | null;
|
|
424
433
|
}
|
|
425
434
|
|
|
426
|
-
export type
|
|
435
|
+
export type GearCategory =
|
|
436
|
+
| "Fighter"
|
|
437
|
+
| "Bomber"
|
|
438
|
+
| "Recon"
|
|
439
|
+
| "MainGun"
|
|
440
|
+
| "Secondary"
|
|
441
|
+
| "Torpedo"
|
|
442
|
+
| "AntiSub"
|
|
443
|
+
| "Radar"
|
|
444
|
+
| "Landing"
|
|
445
|
+
| "Ration"
|
|
446
|
+
| "LandBased"
|
|
447
|
+
| "Misc";
|
|
427
448
|
|
|
428
|
-
export
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
449
|
+
export type GearType =
|
|
450
|
+
| "Unknown"
|
|
451
|
+
| "SmallMainGun"
|
|
452
|
+
| "MediumMainGun"
|
|
453
|
+
| "LargeMainGun"
|
|
454
|
+
| "SecondaryGun"
|
|
455
|
+
| "Torpedo"
|
|
456
|
+
| "CbFighter"
|
|
457
|
+
| "CbDiveBomber"
|
|
458
|
+
| "CbTorpedoBomber"
|
|
459
|
+
| "CbRecon"
|
|
460
|
+
| "ReconSeaplane"
|
|
461
|
+
| "SeaplaneBomber"
|
|
462
|
+
| "SmallRadar"
|
|
463
|
+
| "LargeRadar"
|
|
464
|
+
| "Sonar"
|
|
465
|
+
| "DepthCharge"
|
|
466
|
+
| "ExtraArmor"
|
|
467
|
+
| "Engine"
|
|
468
|
+
| "AntiAirShell"
|
|
469
|
+
| "ApShell"
|
|
470
|
+
| "VtFuze"
|
|
471
|
+
| "AntiAirGun"
|
|
472
|
+
| "MidgetSubmarine"
|
|
473
|
+
| "EmergencyRepair"
|
|
474
|
+
| "LandingCraft"
|
|
475
|
+
| "Rotorcraft"
|
|
476
|
+
| "AntiSubPatrolAircraft"
|
|
477
|
+
| "MediumArmor"
|
|
478
|
+
| "LargeArmor"
|
|
479
|
+
| "Searchlight"
|
|
480
|
+
| "SupplyContainer"
|
|
481
|
+
| "ShipRepairFacility"
|
|
482
|
+
| "SubmarineTorpedo"
|
|
483
|
+
| "Starshell"
|
|
484
|
+
| "CommandFacility"
|
|
485
|
+
| "AviationPersonnel"
|
|
486
|
+
| "AntiAirFireDirector"
|
|
487
|
+
| "AntiGroundEquipment"
|
|
488
|
+
| "LargeMainGun2"
|
|
489
|
+
| "ShipPersonnel"
|
|
490
|
+
| "LargeSonar"
|
|
491
|
+
| "LargeFlyingBoat"
|
|
492
|
+
| "LargeSearchlight"
|
|
493
|
+
| "CombatRation"
|
|
494
|
+
| "Supplies"
|
|
495
|
+
| "SeaplaneFighter"
|
|
496
|
+
| "AmphibiousTank"
|
|
497
|
+
| "LbAttacker"
|
|
498
|
+
| "LbFighter"
|
|
499
|
+
| "LbRecon"
|
|
500
|
+
| "TransportationMaterial"
|
|
501
|
+
| "SubmarineEquipment"
|
|
502
|
+
| "LargeLbAircraft"
|
|
503
|
+
| "JetFighter"
|
|
504
|
+
| "JetFighterBomber"
|
|
505
|
+
| "JetTorpedoBomber"
|
|
506
|
+
| "JetRecon"
|
|
507
|
+
| "LargeRadar2"
|
|
508
|
+
| "CbRecon2"
|
|
509
|
+
| "SecondaryGun2";
|
|
440
510
|
|
|
441
|
-
export
|
|
442
|
-
ship_id: number;
|
|
443
|
-
ctype: number;
|
|
444
|
-
stype: number;
|
|
445
|
-
yomi: string;
|
|
446
|
-
}
|
|
511
|
+
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
447
512
|
|
|
448
|
-
export interface
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
asw: number;
|
|
457
|
-
los: number;
|
|
458
|
-
bombing: number;
|
|
459
|
-
accuracy: number;
|
|
460
|
-
range: number;
|
|
461
|
-
radius: number;
|
|
462
|
-
stars: number;
|
|
463
|
-
ace: number;
|
|
513
|
+
export interface MasterData extends MasterBattleDefinitions {
|
|
514
|
+
created_at: number;
|
|
515
|
+
gears: MasterGear[];
|
|
516
|
+
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
517
|
+
ships: MasterShip[];
|
|
518
|
+
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
519
|
+
ibonuses: MasterIBonuses;
|
|
520
|
+
equippability: MasterEquippability;
|
|
464
521
|
}
|
|
465
522
|
|
|
466
|
-
export
|
|
523
|
+
export interface NationalityDef {
|
|
524
|
+
id: number;
|
|
525
|
+
ctypes: number[];
|
|
526
|
+
}
|
|
467
527
|
|
|
468
|
-
export interface
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
index?: number;
|
|
528
|
+
export interface MasterAttrRule<T> {
|
|
529
|
+
tag: T;
|
|
530
|
+
name: string;
|
|
531
|
+
expr: CompiledEvaler;
|
|
473
532
|
}
|
|
474
533
|
|
|
475
534
|
export interface CompMeta {
|
|
@@ -487,8 +546,6 @@ export interface ShipMeta {
|
|
|
487
546
|
ship_id: number;
|
|
488
547
|
}
|
|
489
548
|
|
|
490
|
-
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
491
|
-
|
|
492
549
|
export type TorpedoAttackType = null;
|
|
493
550
|
|
|
494
551
|
export type NightPhaseAttackType =
|
|
@@ -514,15 +571,90 @@ export type ShellingType = "Normal" | "Carrier";
|
|
|
514
571
|
|
|
515
572
|
export type AswAttackType = "DepthCharge" | "Aircraft";
|
|
516
573
|
|
|
574
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
575
|
+
|
|
576
|
+
export type AirState =
|
|
577
|
+
| "AirSupremacy"
|
|
578
|
+
| "AirSuperiority"
|
|
579
|
+
| "AirParity"
|
|
580
|
+
| "AirDenial"
|
|
581
|
+
| "AirIncapability";
|
|
582
|
+
|
|
517
583
|
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
518
584
|
|
|
519
|
-
export interface
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
585
|
+
export interface ShipPosition {
|
|
586
|
+
org_type?: OrgType;
|
|
587
|
+
fleet_type?: FleetType;
|
|
588
|
+
fleet_len?: number;
|
|
589
|
+
index?: number;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
593
|
+
|
|
594
|
+
export interface CustomPowerModifiers {
|
|
595
|
+
precap_mod?: AttackPowerModifier;
|
|
596
|
+
postcap_mod?: AttackPowerModifier;
|
|
597
|
+
basic_power_mod?: AttackPowerModifier;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export interface SpecialEnemyModifiers {
|
|
601
|
+
precap_general_mod: AttackPowerModifier;
|
|
602
|
+
stype_mod: AttackPowerModifier;
|
|
603
|
+
landing_craft_synergy_mod: AttackPowerModifier;
|
|
604
|
+
toku_daihatsu_tank_mod: AttackPowerModifier;
|
|
605
|
+
m4a1dd_mod: AttackPowerModifier;
|
|
606
|
+
honi_mod: AttackPowerModifier;
|
|
607
|
+
postcap_general_mod: AttackPowerModifier;
|
|
608
|
+
pt_mod: AttackPowerModifier;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export interface AttackPowerModifier {
|
|
612
|
+
a?: number;
|
|
613
|
+
b?: number;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export type CompiledEvaler = string;
|
|
617
|
+
|
|
618
|
+
export interface EBonuses {
|
|
619
|
+
firepower: number;
|
|
620
|
+
torpedo: number;
|
|
621
|
+
anti_air: number;
|
|
622
|
+
armor: number;
|
|
623
|
+
evasion: number;
|
|
624
|
+
asw: number;
|
|
625
|
+
los: number;
|
|
626
|
+
bombing: number;
|
|
627
|
+
accuracy: number;
|
|
628
|
+
range: number;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
export interface ShipInput {
|
|
632
|
+
ship_id: number;
|
|
633
|
+
ctype: number;
|
|
634
|
+
stype: number;
|
|
635
|
+
yomi: string;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export interface GearInput {
|
|
639
|
+
gear_id: number;
|
|
640
|
+
types: GearTypeIdArray;
|
|
641
|
+
firepower: number;
|
|
642
|
+
torpedo: number;
|
|
643
|
+
anti_air: number;
|
|
644
|
+
armor: number;
|
|
645
|
+
evasion: number;
|
|
646
|
+
asw: number;
|
|
647
|
+
los: number;
|
|
648
|
+
bombing: number;
|
|
649
|
+
accuracy: number;
|
|
650
|
+
range: number;
|
|
651
|
+
radius: number;
|
|
652
|
+
stars: number;
|
|
653
|
+
ace: number;
|
|
524
654
|
}
|
|
525
655
|
|
|
656
|
+
export type GearVecInput = GearInput[];
|
|
657
|
+
|
|
526
658
|
export type ShipAttr =
|
|
527
659
|
| "Unknown"
|
|
528
660
|
| "Abyssal"
|
|
@@ -548,38 +680,6 @@ export type OrgType =
|
|
|
548
680
|
| "EnemySingle"
|
|
549
681
|
| "EnemyCombined";
|
|
550
682
|
|
|
551
|
-
export type GearAttr =
|
|
552
|
-
| "Unknown"
|
|
553
|
-
| "Abyssal"
|
|
554
|
-
| "HighAngleMount"
|
|
555
|
-
| "NightFighter"
|
|
556
|
-
| "NightAttacker"
|
|
557
|
-
| "HeavyBomber"
|
|
558
|
-
| "NightRecon"
|
|
559
|
-
| "MainGun"
|
|
560
|
-
| "Radar"
|
|
561
|
-
| "SurfaceRadar"
|
|
562
|
-
| "AirRadar"
|
|
563
|
-
| "DepthChargeProjector"
|
|
564
|
-
| "SynergisticDepthCharge"
|
|
565
|
-
| "AntiSubMortar"
|
|
566
|
-
| "AntiSubWeapon"
|
|
567
|
-
| "ApDepthCharge"
|
|
568
|
-
| "AntiSubAircraft"
|
|
569
|
-
| "LateModelBowTorpedo"
|
|
570
|
-
| "Seaplane"
|
|
571
|
-
| "CbAircraft"
|
|
572
|
-
| "LbAircraft"
|
|
573
|
-
| "JetAircraft"
|
|
574
|
-
| "Fighter"
|
|
575
|
-
| "Recon"
|
|
576
|
-
| "ObservationSeaplane"
|
|
577
|
-
| "CbFighterBomber"
|
|
578
|
-
| "AntiInstDiveBomber"
|
|
579
|
-
| "CbSwordfish"
|
|
580
|
-
| "SemiNightPlane"
|
|
581
|
-
| "HighAltitudeInterceptor";
|
|
582
|
-
|
|
583
683
|
export type FleetKey = "f1" | "f2" | "f3" | "f4";
|
|
584
684
|
|
|
585
685
|
export interface SupportShellingSimulatorParams {
|
|
@@ -588,6 +688,21 @@ export interface SupportShellingSimulatorParams {
|
|
|
588
688
|
engagement: Engagement;
|
|
589
689
|
}
|
|
590
690
|
|
|
691
|
+
export interface MasterBattleDefinitions {
|
|
692
|
+
formation: NestedFormationDef[];
|
|
693
|
+
anti_air_cutin: AntiAirCutinDef[];
|
|
694
|
+
day_cutin: DayCutinDef[];
|
|
695
|
+
night_cutin: NightCutinDef[];
|
|
696
|
+
historical_bonuses?: HistoricalBonusDef[];
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
export interface ShipAnalyzerConfig {
|
|
700
|
+
air_state?: AirState;
|
|
701
|
+
engagement?: Engagement;
|
|
702
|
+
left?: AttackAnalyzerShipConfig;
|
|
703
|
+
right?: AttackAnalyzerShipConfig;
|
|
704
|
+
}
|
|
705
|
+
|
|
591
706
|
export interface NightContactChance {
|
|
592
707
|
rank1: number;
|
|
593
708
|
rank2: number;
|
|
@@ -611,6 +726,12 @@ export interface NightCutinActionReport
|
|
|
611
726
|
cutin_term: number | null;
|
|
612
727
|
}
|
|
613
728
|
|
|
729
|
+
export interface AttackAnalyzerShipConfig
|
|
730
|
+
extends ShipConditions,
|
|
731
|
+
NightFleetConditions {
|
|
732
|
+
fleet_los_mod?: number | null;
|
|
733
|
+
}
|
|
734
|
+
|
|
614
735
|
export interface CompAntiAirAnalysis {
|
|
615
736
|
fleet_adjusted_anti_air: number;
|
|
616
737
|
ships: AntiAirReport[];
|
|
@@ -629,6 +750,38 @@ export interface AntiAirReport {
|
|
|
629
750
|
anti_air_propellant_barrage_chance: number | null;
|
|
630
751
|
}
|
|
631
752
|
|
|
753
|
+
export type GearAttr =
|
|
754
|
+
| "Unknown"
|
|
755
|
+
| "Abyssal"
|
|
756
|
+
| "HighAngleMount"
|
|
757
|
+
| "NightFighter"
|
|
758
|
+
| "NightAttacker"
|
|
759
|
+
| "HeavyBomber"
|
|
760
|
+
| "NightRecon"
|
|
761
|
+
| "MainGun"
|
|
762
|
+
| "Radar"
|
|
763
|
+
| "SurfaceRadar"
|
|
764
|
+
| "AirRadar"
|
|
765
|
+
| "DepthChargeProjector"
|
|
766
|
+
| "SynergisticDepthCharge"
|
|
767
|
+
| "AntiSubMortar"
|
|
768
|
+
| "AntiSubWeapon"
|
|
769
|
+
| "ApDepthCharge"
|
|
770
|
+
| "AntiSubAircraft"
|
|
771
|
+
| "LateModelBowTorpedo"
|
|
772
|
+
| "Seaplane"
|
|
773
|
+
| "CbAircraft"
|
|
774
|
+
| "LbAircraft"
|
|
775
|
+
| "JetAircraft"
|
|
776
|
+
| "Fighter"
|
|
777
|
+
| "Recon"
|
|
778
|
+
| "ObservationSeaplane"
|
|
779
|
+
| "CbFighterBomber"
|
|
780
|
+
| "AntiInstDiveBomber"
|
|
781
|
+
| "CbSwordfish"
|
|
782
|
+
| "SemiNightPlane"
|
|
783
|
+
| "HighAltitudeInterceptor";
|
|
784
|
+
|
|
632
785
|
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
633
786
|
|
|
634
787
|
export interface SupportShellingStyle {
|
|
@@ -668,63 +821,6 @@ export interface ShellingStyle {
|
|
|
668
821
|
hits: number;
|
|
669
822
|
}
|
|
670
823
|
|
|
671
|
-
export interface CustomPowerModifiers {
|
|
672
|
-
precap_mod?: AttackPowerModifier;
|
|
673
|
-
postcap_mod?: AttackPowerModifier;
|
|
674
|
-
basic_power_mod?: AttackPowerModifier;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
export interface SpecialEnemyModifiers {
|
|
678
|
-
precap_general_mod: AttackPowerModifier;
|
|
679
|
-
stype_mod: AttackPowerModifier;
|
|
680
|
-
landing_craft_synergy_mod: AttackPowerModifier;
|
|
681
|
-
toku_daihatsu_tank_mod: AttackPowerModifier;
|
|
682
|
-
m4a1dd_mod: AttackPowerModifier;
|
|
683
|
-
honi_mod: AttackPowerModifier;
|
|
684
|
-
postcap_general_mod: AttackPowerModifier;
|
|
685
|
-
pt_mod: AttackPowerModifier;
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
export interface AttackPowerModifier {
|
|
689
|
-
a?: number;
|
|
690
|
-
b?: number;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
export interface AttackPower {
|
|
694
|
-
precap: number;
|
|
695
|
-
is_capped: boolean;
|
|
696
|
-
capped: number;
|
|
697
|
-
normal: number;
|
|
698
|
-
critical: number;
|
|
699
|
-
armor_penetration: number;
|
|
700
|
-
remaining_ammo_mod: number;
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
export interface AttackPowerParams {
|
|
704
|
-
basic: number;
|
|
705
|
-
cap: number;
|
|
706
|
-
precap_mod: AttackPowerModifier;
|
|
707
|
-
postcap_mod: AttackPowerModifier;
|
|
708
|
-
ap_shell_mod: number | null;
|
|
709
|
-
aerial_power: number | null;
|
|
710
|
-
proficiency_critical_mod: number;
|
|
711
|
-
armor_penetration: number;
|
|
712
|
-
remaining_ammo_mod: number;
|
|
713
|
-
special_enemy_mods: SpecialEnemyModifiers;
|
|
714
|
-
custom_mods: CustomPowerModifiers;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
export interface SpecialEnemyModifiers {
|
|
718
|
-
precap_general_mod: AttackPowerModifier;
|
|
719
|
-
stype_mod: AttackPowerModifier;
|
|
720
|
-
landing_craft_synergy_mod: AttackPowerModifier;
|
|
721
|
-
toku_daihatsu_tank_mod: AttackPowerModifier;
|
|
722
|
-
m4a1dd_mod: AttackPowerModifier;
|
|
723
|
-
honi_mod: AttackPowerModifier;
|
|
724
|
-
postcap_general_mod: AttackPowerModifier;
|
|
725
|
-
pt_mod: AttackPowerModifier;
|
|
726
|
-
}
|
|
727
|
-
|
|
728
824
|
export interface FleetCutinReport<T> {
|
|
729
825
|
cutin: FleetCutin;
|
|
730
826
|
rate: number | null;
|
|
@@ -751,14 +847,6 @@ export interface DamageReport {
|
|
|
751
847
|
damage_state_density: Histogram<DamageState, number>;
|
|
752
848
|
}
|
|
753
849
|
|
|
754
|
-
export interface AttackAnalyzerShipConfig
|
|
755
|
-
extends ShipConditions,
|
|
756
|
-
NightFleetConditions {
|
|
757
|
-
fleet_los_mod?: number | null;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
export type Histogram<K, V> = Partial<Record<K, V>>;
|
|
761
|
-
|
|
762
850
|
export type Formation = SingleFormation | CombinedFormation;
|
|
763
851
|
|
|
764
852
|
export type CombinedFormation =
|
|
@@ -806,6 +894,8 @@ export interface AttackAnalysis {
|
|
|
806
894
|
support_shelling: ActionReport<SupportShellingStyle>;
|
|
807
895
|
}
|
|
808
896
|
|
|
897
|
+
export type Histogram<K, V> = Partial<Record<K, V>>;
|
|
898
|
+
|
|
809
899
|
export type SpecialEnemyType =
|
|
810
900
|
| "None"
|
|
811
901
|
| "SoftSkinned"
|
|
@@ -818,6 +908,15 @@ export type SpecialEnemyType =
|
|
|
818
908
|
| "BattleshipSummerPrincess"
|
|
819
909
|
| "HeavyCruiserSummerPrincess";
|
|
820
910
|
|
|
911
|
+
export interface NodeState {
|
|
912
|
+
map?: number;
|
|
913
|
+
node?: NodeId;
|
|
914
|
+
phase?: number;
|
|
915
|
+
debuff?: boolean;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
export type NodeId = string;
|
|
919
|
+
|
|
821
920
|
export interface MasterShip {
|
|
822
921
|
ship_id: number;
|
|
823
922
|
name: string;
|
|
@@ -882,13 +981,6 @@ export interface EquipStype {
|
|
|
882
981
|
equip_type: number[];
|
|
883
982
|
}
|
|
884
983
|
|
|
885
|
-
export interface MasterBattleDefinitions {
|
|
886
|
-
formation: NestedFormationDef[];
|
|
887
|
-
anti_air_cutin: AntiAirCutinDef[];
|
|
888
|
-
day_cutin: DayCutinDef[];
|
|
889
|
-
night_cutin: NightCutinDef[];
|
|
890
|
-
}
|
|
891
|
-
|
|
892
984
|
export interface HitRate {
|
|
893
985
|
normal: number;
|
|
894
986
|
critical: number;
|
|
@@ -918,84 +1010,6 @@ export interface DayContactChance {
|
|
|
918
1010
|
total: number;
|
|
919
1011
|
}
|
|
920
1012
|
|
|
921
|
-
export interface CompAnalyzerConfig {
|
|
922
|
-
engagement: Engagement;
|
|
923
|
-
formation: Formation;
|
|
924
|
-
anti_air_cutin: number | null;
|
|
925
|
-
ship_anti_air_resist: number;
|
|
926
|
-
fleet_anti_air_resist: number;
|
|
927
|
-
left_night_fleet_conditions: NightFleetConditions;
|
|
928
|
-
right_night_fleet_conditions: NightFleetConditions;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export interface CompNightAnalysis {
|
|
932
|
-
night_cutin: CompNightCutinAnalysis;
|
|
933
|
-
fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
export interface CompDayAnalysis {
|
|
937
|
-
day_cutin: CompDayCutinAnalysis;
|
|
938
|
-
fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
export interface CompAnalysis {
|
|
942
|
-
day: CompDayAnalysis;
|
|
943
|
-
night: CompNightAnalysis;
|
|
944
|
-
contact: ContactAnalysis;
|
|
945
|
-
anti_air: CompAntiAirAnalysis;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
export type CompiledEvaler = string;
|
|
949
|
-
|
|
950
|
-
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
951
|
-
|
|
952
|
-
export interface NightFleetConditions {
|
|
953
|
-
night_contact_rank?: ContactRank | null;
|
|
954
|
-
starshell_index?: number | null;
|
|
955
|
-
searchlight_index?: number | null;
|
|
956
|
-
activates_large_searchlight?: boolean;
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
export interface NightConditions {
|
|
960
|
-
player?: NightFleetConditions;
|
|
961
|
-
enemy?: NightFleetConditions;
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
export interface BattleConditions {
|
|
965
|
-
org_type: OrgType;
|
|
966
|
-
role: Role;
|
|
967
|
-
ship_index: number;
|
|
968
|
-
fleet_len: number;
|
|
969
|
-
formation: Formation;
|
|
970
|
-
fleet_los_mod: number | null;
|
|
971
|
-
night_conditions: NightFleetConditions;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
export interface MasterGear {
|
|
975
|
-
gear_id: number;
|
|
976
|
-
name: string;
|
|
977
|
-
types: GearTypeIdArray;
|
|
978
|
-
special_type?: number;
|
|
979
|
-
max_hp?: number;
|
|
980
|
-
firepower?: number;
|
|
981
|
-
armor?: number;
|
|
982
|
-
torpedo?: number;
|
|
983
|
-
anti_air?: number;
|
|
984
|
-
speed?: number;
|
|
985
|
-
bombing?: number;
|
|
986
|
-
asw?: number;
|
|
987
|
-
los?: number;
|
|
988
|
-
luck?: number;
|
|
989
|
-
accuracy?: number;
|
|
990
|
-
evasion?: number;
|
|
991
|
-
range?: number;
|
|
992
|
-
radius?: number;
|
|
993
|
-
cost?: number;
|
|
994
|
-
improvable?: boolean;
|
|
995
|
-
ship_anti_air_resist?: number;
|
|
996
|
-
fleet_anti_air_resist?: number;
|
|
997
|
-
}
|
|
998
|
-
|
|
999
1013
|
/**
|
|
1000
1014
|
*/
|
|
1001
1015
|
export class AirSquadron {
|
|
@@ -1110,6 +1124,15 @@ export class Comp {
|
|
|
1110
1124
|
* @returns {boolean}
|
|
1111
1125
|
*/
|
|
1112
1126
|
is_enemy(): boolean;
|
|
1127
|
+
/**
|
|
1128
|
+
* @param {string} id
|
|
1129
|
+
* @returns {boolean}
|
|
1130
|
+
*/
|
|
1131
|
+
has_ship_eid(id: string): boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* @returns {string | undefined}
|
|
1134
|
+
*/
|
|
1135
|
+
first_ship_id(): string | undefined;
|
|
1113
1136
|
/**
|
|
1114
1137
|
* @returns {boolean}
|
|
1115
1138
|
*/
|