fleethub-core 1.8.12 → 1.9.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 +416 -431
- package/node/fleethub_core.js +61 -69
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +4 -4
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +416 -431
- package/pkg/fleethub_core_bg.js +61 -69
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +4 -4
package/node/fleethub_core.d.ts
CHANGED
|
@@ -8,62 +8,165 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
|
8
8
|
/**
|
|
9
9
|
*/
|
|
10
10
|
export function set_panic_hook(): void;
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
export type GearCategory =
|
|
12
|
+
| "Fighter"
|
|
13
|
+
| "Bomber"
|
|
14
|
+
| "Recon"
|
|
15
|
+
| "MainGun"
|
|
16
|
+
| "Secondary"
|
|
17
|
+
| "Torpedo"
|
|
18
|
+
| "AntiSub"
|
|
19
|
+
| "Radar"
|
|
20
|
+
| "Landing"
|
|
21
|
+
| "Ration"
|
|
22
|
+
| "LandBased"
|
|
23
|
+
| "Misc";
|
|
17
24
|
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
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";
|
|
21
86
|
|
|
22
|
-
export
|
|
23
|
-
id: string;
|
|
24
|
-
len: number;
|
|
25
|
-
ships: [string, ShipMeta | null][];
|
|
26
|
-
}
|
|
87
|
+
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
27
88
|
|
|
28
|
-
export interface
|
|
29
|
-
|
|
30
|
-
|
|
89
|
+
export interface BattleDefinitions {
|
|
90
|
+
formation: Record<Formation, NestedFormationDef>;
|
|
91
|
+
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
92
|
+
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
93
|
+
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
31
94
|
}
|
|
32
95
|
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
|
|
96
|
+
export interface NightCutinDef {
|
|
97
|
+
tag: NightCutin;
|
|
98
|
+
hits: number;
|
|
99
|
+
type_factor: number | null;
|
|
100
|
+
power_mod: number | null;
|
|
101
|
+
accuracy_mod: number | null;
|
|
102
|
+
}
|
|
36
103
|
|
|
37
|
-
export
|
|
38
|
-
|
|
39
|
-
|
|
104
|
+
export interface DayCutinDef {
|
|
105
|
+
tag: DayCutin;
|
|
106
|
+
hits: number;
|
|
107
|
+
type_factor: number | null;
|
|
108
|
+
power_mod: number | null;
|
|
109
|
+
accuracy_mod: number | null;
|
|
110
|
+
}
|
|
40
111
|
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
112
|
+
export interface AntiAirCutinDef {
|
|
113
|
+
id: number;
|
|
114
|
+
type_factor: number | null;
|
|
115
|
+
multiplier: number | null;
|
|
116
|
+
guaranteed: number | null;
|
|
117
|
+
sequential: boolean | null;
|
|
118
|
+
}
|
|
44
119
|
|
|
45
|
-
export type
|
|
46
|
-
|
|
|
47
|
-
| {
|
|
48
|
-
| { t: "Night"; c: NightAttackType }
|
|
49
|
-
| { t: "Torpedo" }
|
|
50
|
-
| { t: "SupportShelling"; c: SupportShellingType };
|
|
120
|
+
export type NestedFormationDef =
|
|
121
|
+
| FormationDef
|
|
122
|
+
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
51
123
|
|
|
52
|
-
export
|
|
124
|
+
export interface FormationDef {
|
|
125
|
+
tag: Formation;
|
|
126
|
+
protection_rate: number | null;
|
|
127
|
+
fleet_anti_air_mod: number;
|
|
128
|
+
shelling: FormationCombatModifiersDef;
|
|
129
|
+
torpedo: FormationCombatModifiersDef;
|
|
130
|
+
asw: FormationCombatModifiersDef;
|
|
131
|
+
night: FormationCombatModifiersDef;
|
|
132
|
+
support_shelling: FormationCombatModifiersDef;
|
|
133
|
+
}
|
|
53
134
|
|
|
54
|
-
export
|
|
135
|
+
export interface FormationCombatModifiersDef {
|
|
136
|
+
power_mod?: number;
|
|
137
|
+
accuracy_mod?: number;
|
|
138
|
+
evasion_mod?: number;
|
|
139
|
+
}
|
|
55
140
|
|
|
56
|
-
export type
|
|
141
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
57
142
|
|
|
58
|
-
export type
|
|
143
|
+
export type AirState =
|
|
144
|
+
| "AirSupremacy"
|
|
145
|
+
| "AirSuperiority"
|
|
146
|
+
| "AirParity"
|
|
147
|
+
| "AirDenial"
|
|
148
|
+
| "AirIncapability";
|
|
59
149
|
|
|
60
|
-
export
|
|
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;
|
|
158
|
+
}
|
|
61
159
|
|
|
62
|
-
export interface
|
|
63
|
-
|
|
160
|
+
export interface NationalityDef {
|
|
161
|
+
id: number;
|
|
162
|
+
ctypes: number[];
|
|
64
163
|
}
|
|
65
164
|
|
|
66
|
-
export
|
|
165
|
+
export interface MasterAttrRule<T> {
|
|
166
|
+
tag: T;
|
|
167
|
+
name: string;
|
|
168
|
+
expr: CompiledEvaler;
|
|
169
|
+
}
|
|
67
170
|
|
|
68
171
|
export interface OrgState {
|
|
69
172
|
id?: string;
|
|
@@ -146,69 +249,8 @@ export interface GearState {
|
|
|
146
249
|
stars?: number;
|
|
147
250
|
}
|
|
148
251
|
|
|
149
|
-
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
150
|
-
|
|
151
252
|
export type SlotSizeVec = (number | null)[];
|
|
152
253
|
|
|
153
|
-
export interface NightFleetConditions {
|
|
154
|
-
night_contact_rank?: ContactRank | null;
|
|
155
|
-
starshell_index?: number | null;
|
|
156
|
-
searchlight_index?: number | null;
|
|
157
|
-
activates_large_searchlight?: boolean;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export interface NightConditions {
|
|
161
|
-
player?: NightFleetConditions;
|
|
162
|
-
enemy?: NightFleetConditions;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export interface BattleConditions {
|
|
166
|
-
org_type: OrgType;
|
|
167
|
-
role: Role;
|
|
168
|
-
ship_index: number;
|
|
169
|
-
fleet_len: number;
|
|
170
|
-
formation: Formation;
|
|
171
|
-
fleet_los_mod: number | null;
|
|
172
|
-
night_conditions: NightFleetConditions;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export interface MasterGear {
|
|
176
|
-
gear_id: number;
|
|
177
|
-
name: string;
|
|
178
|
-
types: GearTypeIdArray;
|
|
179
|
-
special_type?: number;
|
|
180
|
-
max_hp?: number;
|
|
181
|
-
firepower?: number;
|
|
182
|
-
armor?: number;
|
|
183
|
-
torpedo?: number;
|
|
184
|
-
anti_air?: number;
|
|
185
|
-
speed?: number;
|
|
186
|
-
bombing?: number;
|
|
187
|
-
asw?: number;
|
|
188
|
-
los?: number;
|
|
189
|
-
luck?: number;
|
|
190
|
-
accuracy?: number;
|
|
191
|
-
evasion?: number;
|
|
192
|
-
range?: number;
|
|
193
|
-
radius?: number;
|
|
194
|
-
cost?: number;
|
|
195
|
-
improvable?: boolean;
|
|
196
|
-
ship_anti_air_resist?: number;
|
|
197
|
-
fleet_anti_air_resist?: number;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export interface ActionReport<T> {
|
|
201
|
-
data: Record<string, AttackReport<T>>;
|
|
202
|
-
damage_state_density: Histogram<DamageState, number> | null;
|
|
203
|
-
is_active: boolean;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export type GearTypeIdArray = [number, number, number, number, number];
|
|
207
|
-
|
|
208
|
-
export type Align = "Left" | "Right";
|
|
209
|
-
|
|
210
|
-
export type Side = "Player" | "Enemy";
|
|
211
|
-
|
|
212
254
|
export type ShipType =
|
|
213
255
|
| "Unknown"
|
|
214
256
|
| "DE"
|
|
@@ -244,55 +286,37 @@ export type ShipCategory =
|
|
|
244
286
|
| "Submarine"
|
|
245
287
|
| "AuxiliaryShip";
|
|
246
288
|
|
|
247
|
-
export
|
|
289
|
+
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
290
|
+
formation?: Formation;
|
|
291
|
+
}
|
|
248
292
|
|
|
249
|
-
export interface
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
torpedo_accuracy: MasterIBonusRule[];
|
|
255
|
-
torpedo_evasion: MasterIBonusRule[];
|
|
256
|
-
asw_power: MasterIBonusRule[];
|
|
257
|
-
asw_accuracy: MasterIBonusRule[];
|
|
258
|
-
night_power: MasterIBonusRule[];
|
|
259
|
-
night_aerial_power: MasterIBonusRule[];
|
|
260
|
-
night_accuracy: MasterIBonusRule[];
|
|
261
|
-
defense_power: MasterIBonusRule[];
|
|
262
|
-
contact_selection: MasterIBonusRule[];
|
|
263
|
-
fighter_power: MasterIBonusRule[];
|
|
264
|
-
ship_anti_air: MasterIBonusRule[];
|
|
265
|
-
fleet_anti_air: MasterIBonusRule[];
|
|
266
|
-
elos: MasterIBonusRule[];
|
|
293
|
+
export interface NodeAttackAnalyzerConfig {
|
|
294
|
+
air_state?: AirState;
|
|
295
|
+
engagement?: Engagement;
|
|
296
|
+
left?: NodeAttackAnalyzerShipConfig;
|
|
297
|
+
right?: NodeAttackAnalyzerShipConfig;
|
|
267
298
|
}
|
|
268
299
|
|
|
269
|
-
export interface
|
|
270
|
-
|
|
271
|
-
|
|
300
|
+
export interface NodeAttackAnalysis {
|
|
301
|
+
left: AttackAnalysis;
|
|
302
|
+
right: AttackAnalysis;
|
|
303
|
+
shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
304
|
+
night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
272
305
|
}
|
|
273
306
|
|
|
274
|
-
export interface
|
|
275
|
-
|
|
276
|
-
|
|
307
|
+
export interface ActionReport<T> {
|
|
308
|
+
data: Record<string, AttackReport<T>>;
|
|
309
|
+
damage_state_density: Histogram<DamageState, number> | null;
|
|
310
|
+
is_active: boolean;
|
|
277
311
|
}
|
|
278
312
|
|
|
279
|
-
export
|
|
280
|
-
cutin: FleetCutin;
|
|
281
|
-
rate: number | null;
|
|
282
|
-
formation: Formation;
|
|
283
|
-
attacks: FleetCutinAttackReport<T>[];
|
|
284
|
-
}
|
|
313
|
+
export type GearTypeIdArray = [number, number, number, number, number];
|
|
285
314
|
|
|
286
|
-
export
|
|
287
|
-
index: number;
|
|
288
|
-
ship_id: number;
|
|
289
|
-
power_mod: number;
|
|
290
|
-
}
|
|
315
|
+
export type Align = "Left" | "Right";
|
|
291
316
|
|
|
292
|
-
export
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
317
|
+
export type Side = "Player" | "Enemy";
|
|
318
|
+
|
|
319
|
+
export type Role = "Main" | "Escort";
|
|
296
320
|
|
|
297
321
|
export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
|
|
298
322
|
|
|
@@ -337,7 +361,21 @@ export type DayCutin =
|
|
|
337
361
|
| "BBA"
|
|
338
362
|
| "BA";
|
|
339
363
|
|
|
340
|
-
export
|
|
364
|
+
export interface AttackReport<T> {
|
|
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
|
+
}
|
|
374
|
+
|
|
375
|
+
export interface MoveShipPayload {
|
|
376
|
+
current: [string, string, ShipKey];
|
|
377
|
+
target: [string | null, string, ShipKey];
|
|
378
|
+
}
|
|
341
379
|
|
|
342
380
|
export type AirWaveType = "Jet" | "LandBase" | "Carrier";
|
|
343
381
|
|
|
@@ -353,131 +391,39 @@ export interface SimulatorResultItem {
|
|
|
353
391
|
damage_state_map: Record<DamageState, number>;
|
|
354
392
|
}
|
|
355
393
|
|
|
356
|
-
export
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
| "SmallMainGun"
|
|
375
|
-
| "MediumMainGun"
|
|
376
|
-
| "LargeMainGun"
|
|
377
|
-
| "SecondaryGun"
|
|
378
|
-
| "Torpedo"
|
|
379
|
-
| "CbFighter"
|
|
380
|
-
| "CbDiveBomber"
|
|
381
|
-
| "CbTorpedoBomber"
|
|
382
|
-
| "CbRecon"
|
|
383
|
-
| "ReconSeaplane"
|
|
384
|
-
| "SeaplaneBomber"
|
|
385
|
-
| "SmallRadar"
|
|
386
|
-
| "LargeRadar"
|
|
387
|
-
| "Sonar"
|
|
388
|
-
| "DepthCharge"
|
|
389
|
-
| "ExtraArmor"
|
|
390
|
-
| "Engine"
|
|
391
|
-
| "AntiAirShell"
|
|
392
|
-
| "ApShell"
|
|
393
|
-
| "VtFuze"
|
|
394
|
-
| "AntiAirGun"
|
|
395
|
-
| "MidgetSubmarine"
|
|
396
|
-
| "EmergencyRepair"
|
|
397
|
-
| "LandingCraft"
|
|
398
|
-
| "Rotorcraft"
|
|
399
|
-
| "AntiSubPatrolAircraft"
|
|
400
|
-
| "MediumArmor"
|
|
401
|
-
| "LargeArmor"
|
|
402
|
-
| "Searchlight"
|
|
403
|
-
| "SupplyContainer"
|
|
404
|
-
| "ShipRepairFacility"
|
|
405
|
-
| "SubmarineTorpedo"
|
|
406
|
-
| "Starshell"
|
|
407
|
-
| "CommandFacility"
|
|
408
|
-
| "AviationPersonnel"
|
|
409
|
-
| "AntiAirFireDirector"
|
|
410
|
-
| "AntiGroundEquipment"
|
|
411
|
-
| "LargeMainGun2"
|
|
412
|
-
| "ShipPersonnel"
|
|
413
|
-
| "LargeSonar"
|
|
414
|
-
| "LargeFlyingBoat"
|
|
415
|
-
| "LargeSearchlight"
|
|
416
|
-
| "CombatRation"
|
|
417
|
-
| "Supplies"
|
|
418
|
-
| "SeaplaneFighter"
|
|
419
|
-
| "AmphibiousTank"
|
|
420
|
-
| "LbAttacker"
|
|
421
|
-
| "LbFighter"
|
|
422
|
-
| "LbRecon"
|
|
423
|
-
| "TransportationMaterial"
|
|
424
|
-
| "SubmarineEquipment"
|
|
425
|
-
| "LargeLbAircraft"
|
|
426
|
-
| "JetFighter"
|
|
427
|
-
| "JetFighterBomber"
|
|
428
|
-
| "JetTorpedoBomber"
|
|
429
|
-
| "JetRecon"
|
|
430
|
-
| "LargeRadar2"
|
|
431
|
-
| "CbRecon2"
|
|
432
|
-
| "SecondaryGun2";
|
|
433
|
-
|
|
434
|
-
export type DamageState = "Normal" | "Shouha" | "Chuuha" | "Taiha" | "Sunk";
|
|
435
|
-
|
|
436
|
-
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
437
|
-
|
|
438
|
-
export type AirState =
|
|
439
|
-
| "AirSupremacy"
|
|
440
|
-
| "AirSuperiority"
|
|
441
|
-
| "AirParity"
|
|
442
|
-
| "AirDenial"
|
|
443
|
-
| "AirIncapability";
|
|
444
|
-
|
|
445
|
-
export interface MasterData extends MasterBattleDefinitions {
|
|
446
|
-
created_at: number;
|
|
447
|
-
gears: MasterGear[];
|
|
448
|
-
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
449
|
-
ships: MasterShip[];
|
|
450
|
-
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
451
|
-
ibonuses: MasterIBonuses;
|
|
452
|
-
equippable: MasterEquippability;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
export interface NationalityDef {
|
|
456
|
-
id: number;
|
|
457
|
-
ctypes: number[];
|
|
394
|
+
export interface MasterIBonuses {
|
|
395
|
+
shelling_power: MasterIBonusRule[];
|
|
396
|
+
shelling_accuracy: MasterIBonusRule[];
|
|
397
|
+
shelling_aerial_power: MasterIBonusRule[];
|
|
398
|
+
torpedo_power: MasterIBonusRule[];
|
|
399
|
+
torpedo_accuracy: MasterIBonusRule[];
|
|
400
|
+
torpedo_evasion: MasterIBonusRule[];
|
|
401
|
+
asw_power: MasterIBonusRule[];
|
|
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[];
|
|
458
412
|
}
|
|
459
413
|
|
|
460
|
-
export interface
|
|
461
|
-
tag: T;
|
|
462
|
-
name: string;
|
|
414
|
+
export interface MasterIBonusRule {
|
|
463
415
|
expr: CompiledEvaler;
|
|
416
|
+
formula: CompiledEvaler;
|
|
464
417
|
}
|
|
465
418
|
|
|
466
|
-
export
|
|
467
|
-
formation?: Formation;
|
|
468
|
-
}
|
|
419
|
+
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
469
420
|
|
|
470
|
-
export interface
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
left?: NodeAttackAnalyzerShipConfig;
|
|
474
|
-
right?: NodeAttackAnalyzerShipConfig;
|
|
421
|
+
export interface ShipConditions extends ShipPosition {
|
|
422
|
+
formation?: Formation;
|
|
423
|
+
amagiri_index?: number | null;
|
|
475
424
|
}
|
|
476
425
|
|
|
477
|
-
export
|
|
478
|
-
left: AttackAnalysis;
|
|
479
|
-
right: AttackAnalysis;
|
|
480
|
-
}
|
|
426
|
+
export type ContactRank = "Rank1" | "Rank2" | "Rank3";
|
|
481
427
|
|
|
482
428
|
export interface EBonuses {
|
|
483
429
|
firepower: number;
|
|
@@ -519,86 +465,56 @@ export interface GearInput {
|
|
|
519
465
|
|
|
520
466
|
export type GearVecInput = GearInput[];
|
|
521
467
|
|
|
522
|
-
export interface
|
|
523
|
-
|
|
468
|
+
export interface ShipPosition {
|
|
469
|
+
org_type?: OrgType;
|
|
470
|
+
fleet_type?: FleetType;
|
|
471
|
+
fleet_len?: number;
|
|
472
|
+
index?: number;
|
|
524
473
|
}
|
|
525
474
|
|
|
526
|
-
export
|
|
527
|
-
|
|
528
|
-
| "Abyssal"
|
|
529
|
-
| "NightCarrier"
|
|
530
|
-
| "Installation"
|
|
531
|
-
| "RoyalNavy"
|
|
532
|
-
| "Kai2"
|
|
533
|
-
| "TurbineSpeedBonus"
|
|
534
|
-
| "Pillbox"
|
|
535
|
-
| "IsolatedIsland"
|
|
536
|
-
| "HarbourSummerPrincess"
|
|
537
|
-
| "SupplyDepot"
|
|
538
|
-
| "NewSupplyDepot"
|
|
539
|
-
| "PtImp"
|
|
540
|
-
| "BattleshipSummerPrincess"
|
|
541
|
-
| "HeavyCruiserSummerPrincess";
|
|
542
|
-
|
|
543
|
-
export type OrgType =
|
|
544
|
-
| "Single"
|
|
545
|
-
| "CarrierTaskForce"
|
|
546
|
-
| "SurfaceTaskForce"
|
|
547
|
-
| "TransportEscort"
|
|
548
|
-
| "EnemySingle"
|
|
549
|
-
| "EnemyCombined";
|
|
550
|
-
|
|
551
|
-
export interface BattleDefinitions {
|
|
552
|
-
formation: Record<Formation, NestedFormationDef>;
|
|
553
|
-
anti_air_cutin: Record<number, AntiAirCutinDef>;
|
|
554
|
-
day_cutin: Record<DayCutin, DayCutinDef>;
|
|
555
|
-
night_cutin: Record<NightCutin, NightCutinDef>;
|
|
475
|
+
export interface CompMeta {
|
|
476
|
+
fleets: Record<FleetType, FleetMeta>;
|
|
556
477
|
}
|
|
557
478
|
|
|
558
|
-
export interface
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
power_mod: number | null;
|
|
563
|
-
accuracy_mod: number | null;
|
|
479
|
+
export interface FleetMeta {
|
|
480
|
+
id: string;
|
|
481
|
+
len: number;
|
|
482
|
+
ships: [string, ShipMeta | null][];
|
|
564
483
|
}
|
|
565
484
|
|
|
566
|
-
export interface
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
type_factor: number | null;
|
|
570
|
-
power_mod: number | null;
|
|
571
|
-
accuracy_mod: number | null;
|
|
485
|
+
export interface ShipMeta {
|
|
486
|
+
id: string;
|
|
487
|
+
ship_id: number;
|
|
572
488
|
}
|
|
573
489
|
|
|
574
|
-
export
|
|
575
|
-
id: number;
|
|
576
|
-
type_factor: number | null;
|
|
577
|
-
multiplier: number | null;
|
|
578
|
-
guaranteed: number | null;
|
|
579
|
-
sequential: boolean | null;
|
|
580
|
-
}
|
|
490
|
+
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
581
491
|
|
|
582
|
-
export type
|
|
583
|
-
| FormationDef
|
|
584
|
-
| { top_half: FormationDef; bottom_half: FormationDef };
|
|
492
|
+
export type TorpedoAttackType = null;
|
|
585
493
|
|
|
586
|
-
export
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
fleet_anti_air_mod: number;
|
|
590
|
-
shelling: FormationCombatModifiersDef;
|
|
591
|
-
torpedo: FormationCombatModifiersDef;
|
|
592
|
-
asw: FormationCombatModifiersDef;
|
|
593
|
-
night: FormationCombatModifiersDef;
|
|
594
|
-
support_shelling: FormationCombatModifiersDef;
|
|
595
|
-
}
|
|
494
|
+
export type NightPhaseAttackType =
|
|
495
|
+
| { t: "Night"; c: NightAttackType }
|
|
496
|
+
| { t: "Asw"; c: AswAttackType };
|
|
596
497
|
|
|
597
|
-
export
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
498
|
+
export type DayPhaseAttackType =
|
|
499
|
+
| { t: "Shelling"; c: ShellingType }
|
|
500
|
+
| { t: "Asw"; c: AswAttackType };
|
|
501
|
+
|
|
502
|
+
export type AttackType =
|
|
503
|
+
| { t: "Asw"; c: AswAttackType }
|
|
504
|
+
| { t: "Shelling"; c: ShellingType }
|
|
505
|
+
| { t: "Night"; c: NightAttackType }
|
|
506
|
+
| { t: "Torpedo" }
|
|
507
|
+
| { t: "SupportShelling"; c: SupportShellingType };
|
|
508
|
+
|
|
509
|
+
export type SupportShellingType = ShellingType;
|
|
510
|
+
|
|
511
|
+
export type NightAttackType = "Normal" | "Swordfish" | "Carrier";
|
|
512
|
+
|
|
513
|
+
export type ShellingType = "Normal" | "Carrier";
|
|
514
|
+
|
|
515
|
+
export type AswAttackType = "DepthCharge" | "Aircraft";
|
|
516
|
+
|
|
517
|
+
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
602
518
|
|
|
603
519
|
export interface ShipAnalyzerConfig {
|
|
604
520
|
air_state?: AirState;
|
|
@@ -607,6 +523,31 @@ export interface ShipAnalyzerConfig {
|
|
|
607
523
|
right?: AttackAnalyzerShipConfig;
|
|
608
524
|
}
|
|
609
525
|
|
|
526
|
+
export type ShipAttr =
|
|
527
|
+
| "Unknown"
|
|
528
|
+
| "Abyssal"
|
|
529
|
+
| "NightCarrier"
|
|
530
|
+
| "Installation"
|
|
531
|
+
| "RoyalNavy"
|
|
532
|
+
| "Kai2"
|
|
533
|
+
| "TurbineSpeedBonus"
|
|
534
|
+
| "Pillbox"
|
|
535
|
+
| "IsolatedIsland"
|
|
536
|
+
| "HarbourSummerPrincess"
|
|
537
|
+
| "SupplyDepot"
|
|
538
|
+
| "NewSupplyDepot"
|
|
539
|
+
| "PtImp"
|
|
540
|
+
| "BattleshipSummerPrincess"
|
|
541
|
+
| "HeavyCruiserSummerPrincess";
|
|
542
|
+
|
|
543
|
+
export type OrgType =
|
|
544
|
+
| "Single"
|
|
545
|
+
| "CarrierTaskForce"
|
|
546
|
+
| "SurfaceTaskForce"
|
|
547
|
+
| "TransportEscort"
|
|
548
|
+
| "EnemySingle"
|
|
549
|
+
| "EnemyCombined";
|
|
550
|
+
|
|
610
551
|
export type GearAttr =
|
|
611
552
|
| "Unknown"
|
|
612
553
|
| "Abyssal"
|
|
@@ -647,6 +588,29 @@ export interface SupportShellingSimulatorParams {
|
|
|
647
588
|
engagement: Engagement;
|
|
648
589
|
}
|
|
649
590
|
|
|
591
|
+
export interface NightContactChance {
|
|
592
|
+
rank1: number;
|
|
593
|
+
rank2: number;
|
|
594
|
+
rank3: number;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export interface CompNightCutinAnalysis {
|
|
598
|
+
night_contact_chance: NightContactChance;
|
|
599
|
+
ships: ShipNightCutinAnalysis[];
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export interface ShipNightCutinAnalysis {
|
|
603
|
+
ship_id: number;
|
|
604
|
+
index: number;
|
|
605
|
+
normal: NightCutinActionReport;
|
|
606
|
+
chuuha: NightCutinActionReport;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
export interface NightCutinActionReport
|
|
610
|
+
extends ActionReport<NightPhaseAttackStyle> {
|
|
611
|
+
cutin_term: number | null;
|
|
612
|
+
}
|
|
613
|
+
|
|
650
614
|
export interface CompAntiAirAnalysis {
|
|
651
615
|
fleet_adjusted_anti_air: number;
|
|
652
616
|
ships: AntiAirReport[];
|
|
@@ -704,6 +668,28 @@ export interface ShellingStyle {
|
|
|
704
668
|
hits: number;
|
|
705
669
|
}
|
|
706
670
|
|
|
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
|
+
|
|
707
693
|
export interface AttackPower {
|
|
708
694
|
precap: number;
|
|
709
695
|
is_capped: boolean;
|
|
@@ -739,27 +725,17 @@ export interface SpecialEnemyModifiers {
|
|
|
739
725
|
pt_mod: AttackPowerModifier;
|
|
740
726
|
}
|
|
741
727
|
|
|
742
|
-
export interface
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
export interface CompNightCutinAnalysis {
|
|
749
|
-
night_contact_chance: NightContactChance;
|
|
750
|
-
ships: ShipNightCutinAnalysis[];
|
|
728
|
+
export interface FleetCutinReport<T> {
|
|
729
|
+
cutin: FleetCutin;
|
|
730
|
+
rate: number | null;
|
|
731
|
+
formation: Formation;
|
|
732
|
+
attacks: FleetCutinAttackReport<T>[];
|
|
751
733
|
}
|
|
752
734
|
|
|
753
|
-
export interface
|
|
754
|
-
ship_id: number;
|
|
735
|
+
export interface FleetCutinAttackReport<T> extends AttackReport<T> {
|
|
755
736
|
index: number;
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
export interface NightCutinActionReport
|
|
761
|
-
extends ActionReport<NightPhaseAttackStyle> {
|
|
762
|
-
cutin_term: number | null;
|
|
737
|
+
ship_id: number;
|
|
738
|
+
power_mod: number;
|
|
763
739
|
}
|
|
764
740
|
|
|
765
741
|
export interface DamageReport {
|
|
@@ -783,18 +759,6 @@ export interface AttackAnalyzerShipConfig
|
|
|
783
759
|
|
|
784
760
|
export type Histogram<K, V> = Partial<Record<K, V>>;
|
|
785
761
|
|
|
786
|
-
export type SpecialEnemyType =
|
|
787
|
-
| "None"
|
|
788
|
-
| "SoftSkinned"
|
|
789
|
-
| "Pillbox"
|
|
790
|
-
| "IsolatedIsland"
|
|
791
|
-
| "SupplyDepot"
|
|
792
|
-
| "NewSupplyDepot"
|
|
793
|
-
| "HarbourSummerPrincess"
|
|
794
|
-
| "PtImp"
|
|
795
|
-
| "BattleshipSummerPrincess"
|
|
796
|
-
| "HeavyCruiserSummerPrincess";
|
|
797
|
-
|
|
798
762
|
export type Formation = SingleFormation | CombinedFormation;
|
|
799
763
|
|
|
800
764
|
export type CombinedFormation =
|
|
@@ -811,43 +775,6 @@ export type SingleFormation =
|
|
|
811
775
|
| "LineAbreast"
|
|
812
776
|
| "Vanguard";
|
|
813
777
|
|
|
814
|
-
export interface CustomPowerModifiers {
|
|
815
|
-
precap_mod?: AttackPowerModifier;
|
|
816
|
-
postcap_mod?: AttackPowerModifier;
|
|
817
|
-
basic_power_mod?: AttackPowerModifier;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
export interface SpecialEnemyModifiers {
|
|
821
|
-
precap_general_mod: AttackPowerModifier;
|
|
822
|
-
stype_mod: AttackPowerModifier;
|
|
823
|
-
landing_craft_synergy_mod: AttackPowerModifier;
|
|
824
|
-
toku_daihatsu_tank_mod: AttackPowerModifier;
|
|
825
|
-
m4a1dd_mod: AttackPowerModifier;
|
|
826
|
-
honi_mod: AttackPowerModifier;
|
|
827
|
-
postcap_general_mod: AttackPowerModifier;
|
|
828
|
-
pt_mod: AttackPowerModifier;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
export interface AttackPowerModifier {
|
|
832
|
-
a?: number;
|
|
833
|
-
b?: number;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
export interface HitRate {
|
|
837
|
-
normal: number;
|
|
838
|
-
critical: number;
|
|
839
|
-
total: number;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
export interface HitRateParams {
|
|
843
|
-
accuracy_term: number;
|
|
844
|
-
evasion_term: number;
|
|
845
|
-
target_morale_mod: number;
|
|
846
|
-
critical_rate_constant: number;
|
|
847
|
-
critical_percentage_bonus: number;
|
|
848
|
-
hit_percentage_bonus: number;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
778
|
export interface CompDayCutinAnalysis {
|
|
852
779
|
rank3_air_state: AirState;
|
|
853
780
|
rank2_air_state: AirState;
|
|
@@ -868,20 +795,6 @@ export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
|
|
|
868
795
|
observation_term: number | null;
|
|
869
796
|
}
|
|
870
797
|
|
|
871
|
-
export interface ContactAnalysis {
|
|
872
|
-
single: DayContactChance[] | null;
|
|
873
|
-
combined: DayContactChance[] | null;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
export interface DayContactChance {
|
|
877
|
-
air_state: AirState;
|
|
878
|
-
trigger_rate: number;
|
|
879
|
-
rank3: number;
|
|
880
|
-
rank2: number;
|
|
881
|
-
rank1: number;
|
|
882
|
-
total: number;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
798
|
export interface AttackAnalysis {
|
|
886
799
|
attacker_is_player: boolean;
|
|
887
800
|
attacker_ship_id: number;
|
|
@@ -893,6 +806,18 @@ export interface AttackAnalysis {
|
|
|
893
806
|
support_shelling: ActionReport<SupportShellingStyle>;
|
|
894
807
|
}
|
|
895
808
|
|
|
809
|
+
export type SpecialEnemyType =
|
|
810
|
+
| "None"
|
|
811
|
+
| "SoftSkinned"
|
|
812
|
+
| "Pillbox"
|
|
813
|
+
| "IsolatedIsland"
|
|
814
|
+
| "SupplyDepot"
|
|
815
|
+
| "NewSupplyDepot"
|
|
816
|
+
| "HarbourSummerPrincess"
|
|
817
|
+
| "PtImp"
|
|
818
|
+
| "BattleshipSummerPrincess"
|
|
819
|
+
| "HeavyCruiserSummerPrincess";
|
|
820
|
+
|
|
896
821
|
export interface MasterShip {
|
|
897
822
|
ship_id: number;
|
|
898
823
|
name: string;
|
|
@@ -964,6 +889,35 @@ export interface MasterBattleDefinitions {
|
|
|
964
889
|
night_cutin: NightCutinDef[];
|
|
965
890
|
}
|
|
966
891
|
|
|
892
|
+
export interface HitRate {
|
|
893
|
+
normal: number;
|
|
894
|
+
critical: number;
|
|
895
|
+
total: number;
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
export interface HitRateParams {
|
|
899
|
+
accuracy_term: number;
|
|
900
|
+
evasion_term: number;
|
|
901
|
+
target_morale_mod: number;
|
|
902
|
+
critical_rate_constant: number;
|
|
903
|
+
critical_percentage_bonus: number;
|
|
904
|
+
hit_percentage_bonus: number;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
export interface ContactAnalysis {
|
|
908
|
+
single: DayContactChance[] | null;
|
|
909
|
+
combined: DayContactChance[] | null;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
export interface DayContactChance {
|
|
913
|
+
air_state: AirState;
|
|
914
|
+
trigger_rate: number;
|
|
915
|
+
rank3: number;
|
|
916
|
+
rank2: number;
|
|
917
|
+
rank1: number;
|
|
918
|
+
total: number;
|
|
919
|
+
}
|
|
920
|
+
|
|
967
921
|
export interface CompAnalyzerConfig {
|
|
968
922
|
engagement: Engagement;
|
|
969
923
|
formation: Formation;
|
|
@@ -991,15 +945,55 @@ export interface CompAnalysis {
|
|
|
991
945
|
anti_air: CompAntiAirAnalysis;
|
|
992
946
|
}
|
|
993
947
|
|
|
994
|
-
export
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
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;
|
|
1003
997
|
}
|
|
1004
998
|
|
|
1005
999
|
/**
|
|
@@ -1076,19 +1070,6 @@ export class Analyzer {
|
|
|
1076
1070
|
right_comp: Comp,
|
|
1077
1071
|
right_ship: Ship
|
|
1078
1072
|
): 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;
|
|
1092
1073
|
/**
|
|
1093
1074
|
* @param {Comp} comp
|
|
1094
1075
|
* @param {CompAnalyzerConfig} config
|
|
@@ -1866,6 +1847,10 @@ export class Ship {
|
|
|
1866
1847
|
* @returns {boolean}
|
|
1867
1848
|
*/
|
|
1868
1849
|
is_submarine(): boolean;
|
|
1850
|
+
/**
|
|
1851
|
+
* @returns {boolean}
|
|
1852
|
+
*/
|
|
1853
|
+
is_amagiri(): boolean;
|
|
1869
1854
|
/**
|
|
1870
1855
|
* @param {Gear} gear
|
|
1871
1856
|
* @param {string} key
|