fleethub-core 1.10.15 → 1.10.17
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 +318 -319
- package/node/fleethub_core.js +108 -112
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +28 -28
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +318 -319
- package/pkg/fleethub_core.js +3 -1
- package/pkg/fleethub_core_bg.js +114 -113
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +28 -28
package/node/fleethub_core.d.ts
CHANGED
|
@@ -8,81 +8,6 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
|
8
8
|
/**
|
|
9
9
|
*/
|
|
10
10
|
export function set_panic_hook(): void;
|
|
11
|
-
|
|
12
|
-
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
13
|
-
|
|
14
|
-
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
15
|
-
formation?: Formation;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export interface NodeAttackAnalyzerConfig {
|
|
19
|
-
air_state?: AirState;
|
|
20
|
-
engagement?: Engagement;
|
|
21
|
-
node_state?: NodeState;
|
|
22
|
-
left?: NodeAttackAnalyzerShipConfig;
|
|
23
|
-
right?: NodeAttackAnalyzerShipConfig;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface NodeAttackAnalysis {
|
|
27
|
-
left: AttackAnalysis;
|
|
28
|
-
right: AttackAnalysis;
|
|
29
|
-
shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
30
|
-
night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface CompAnalyzerConfig {
|
|
34
|
-
engagement: Engagement;
|
|
35
|
-
formation: Formation;
|
|
36
|
-
anti_air_cutin: number | null;
|
|
37
|
-
ship_anti_air_resist: number;
|
|
38
|
-
fleet_anti_air_resist: number;
|
|
39
|
-
left_night_fleet_conditions: NightFleetConditions;
|
|
40
|
-
right_night_fleet_conditions: NightFleetConditions;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface CompNightAnalysis {
|
|
44
|
-
night_cutin: CompNightCutinAnalysis;
|
|
45
|
-
fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface CompDayAnalysis {
|
|
49
|
-
day_cutin: CompDayCutinAnalysis;
|
|
50
|
-
fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface CompAnalysis {
|
|
54
|
-
day: CompDayAnalysis;
|
|
55
|
-
night: CompNightAnalysis;
|
|
56
|
-
contact: ContactAnalysis;
|
|
57
|
-
anti_air: CompAntiAirAnalysis;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface CompAntiAirAnalysis {
|
|
61
|
-
fleet_adjusted_anti_air: number;
|
|
62
|
-
ships: AntiAirReport[];
|
|
63
|
-
anti_air_cutin_chance: [number, number][];
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface AntiAirReport {
|
|
67
|
-
ship_id: number;
|
|
68
|
-
role: Role;
|
|
69
|
-
index: number;
|
|
70
|
-
adjusted_anti_air: number | null;
|
|
71
|
-
proportional_shotdown_rate: number | null;
|
|
72
|
-
fixed_shotdown_number: number | null;
|
|
73
|
-
guaranteed: number | null;
|
|
74
|
-
anti_air_cutin_chance: [number, number][];
|
|
75
|
-
anti_air_propellant_barrage_chance: number | null;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export type OrgType =
|
|
79
|
-
| "Single"
|
|
80
|
-
| "CarrierTaskForce"
|
|
81
|
-
| "SurfaceTaskForce"
|
|
82
|
-
| "TransportEscort"
|
|
83
|
-
| "EnemySingle"
|
|
84
|
-
| "EnemyCombined";
|
|
85
|
-
|
|
86
11
|
export type GearVecInput = GearInput[];
|
|
87
12
|
|
|
88
13
|
export interface GearInput {
|
|
@@ -123,34 +48,6 @@ export interface EBonuses {
|
|
|
123
48
|
range: number;
|
|
124
49
|
}
|
|
125
50
|
|
|
126
|
-
export interface HitRate {
|
|
127
|
-
normal: number;
|
|
128
|
-
critical: number;
|
|
129
|
-
total: number;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface HitRateParams {
|
|
133
|
-
accuracy_term: number;
|
|
134
|
-
evasion_term: number;
|
|
135
|
-
target_morale_mod: number;
|
|
136
|
-
critical_rate_constant: number;
|
|
137
|
-
critical_percentage_bonus: number;
|
|
138
|
-
hit_percentage_bonus: number;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface DamageReport {
|
|
142
|
-
miss_damage_min: number;
|
|
143
|
-
miss_damage_max: number;
|
|
144
|
-
normal_damage_min: number;
|
|
145
|
-
normal_damage_max: number;
|
|
146
|
-
critical_damage_min: number;
|
|
147
|
-
critical_damage_max: number;
|
|
148
|
-
normal_scratch_rate: number;
|
|
149
|
-
critical_scratch_rate: number;
|
|
150
|
-
damage_density: Histogram<number, number>;
|
|
151
|
-
damage_state_density: Histogram<DamageState, number>;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
51
|
export interface ContactAnalysis {
|
|
155
52
|
single: DayContactChance[] | null;
|
|
156
53
|
combined: DayContactChance[] | null;
|
|
@@ -165,16 +62,6 @@ export interface DayContactChance {
|
|
|
165
62
|
total: number;
|
|
166
63
|
}
|
|
167
64
|
|
|
168
|
-
export type NodeId = string;
|
|
169
|
-
|
|
170
|
-
export interface NodeState {
|
|
171
|
-
map?: number;
|
|
172
|
-
node?: NodeId;
|
|
173
|
-
phase?: number;
|
|
174
|
-
debuff?: boolean;
|
|
175
|
-
disable_historical_mod?: boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
65
|
export interface OrgState {
|
|
179
66
|
id?: string;
|
|
180
67
|
f1?: FleetState;
|
|
@@ -193,6 +80,77 @@ export interface OrgState {
|
|
|
193
80
|
|
|
194
81
|
export type FleetKey = "f1" | "f2" | "f3" | "f4";
|
|
195
82
|
|
|
83
|
+
export interface HitRate {
|
|
84
|
+
normal: number;
|
|
85
|
+
critical: number;
|
|
86
|
+
total: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface HitRateParams {
|
|
90
|
+
accuracy_term: number;
|
|
91
|
+
evasion_term: number;
|
|
92
|
+
target_morale_mod: number;
|
|
93
|
+
critical_rate_constant: number;
|
|
94
|
+
critical_percentage_bonus: number;
|
|
95
|
+
hit_percentage_bonus: number;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface DamageReport {
|
|
99
|
+
miss_damage_min: number;
|
|
100
|
+
miss_damage_max: number;
|
|
101
|
+
normal_damage_min: number;
|
|
102
|
+
normal_damage_max: number;
|
|
103
|
+
critical_damage_min: number;
|
|
104
|
+
critical_damage_max: number;
|
|
105
|
+
normal_scratch_rate: number;
|
|
106
|
+
critical_scratch_rate: number;
|
|
107
|
+
damage_density: Histogram<number, number>;
|
|
108
|
+
damage_state_density: Histogram<DamageState, number>;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface AttackAnalysis {
|
|
112
|
+
attacker_is_player: boolean;
|
|
113
|
+
attacker_ship_id: number;
|
|
114
|
+
target_ship_id: number;
|
|
115
|
+
historical_params: HistoricalParams;
|
|
116
|
+
day: ActionReport<DayPhaseAttackStyle>;
|
|
117
|
+
night: ActionReport<NightPhaseAttackStyle>;
|
|
118
|
+
closing_torpedo: ActionReport<TorpedoAttackStyle>;
|
|
119
|
+
opening_asw: ActionReport<AswAttackStyle>;
|
|
120
|
+
support_shelling: ActionReport<SupportShellingStyle>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type GearAttr =
|
|
124
|
+
| "Unknown"
|
|
125
|
+
| "HighAngleMount"
|
|
126
|
+
| "NightFighter"
|
|
127
|
+
| "NightAttacker"
|
|
128
|
+
| "HeavyBomber"
|
|
129
|
+
| "NightRecon"
|
|
130
|
+
| "MainGun"
|
|
131
|
+
| "Radar"
|
|
132
|
+
| "SurfaceRadar"
|
|
133
|
+
| "AirRadar"
|
|
134
|
+
| "DepthChargeProjector"
|
|
135
|
+
| "SynergisticDepthCharge"
|
|
136
|
+
| "AntiSubMortar"
|
|
137
|
+
| "AntiSubWeapon"
|
|
138
|
+
| "ApDepthCharge"
|
|
139
|
+
| "AntiSubAircraft"
|
|
140
|
+
| "LateModelBowTorpedo"
|
|
141
|
+
| "Seaplane"
|
|
142
|
+
| "CbAircraft"
|
|
143
|
+
| "LbAircraft"
|
|
144
|
+
| "JetAircraft"
|
|
145
|
+
| "Fighter"
|
|
146
|
+
| "Recon"
|
|
147
|
+
| "ObservationSeaplane"
|
|
148
|
+
| "CbFighterBomber"
|
|
149
|
+
| "AntiInstDiveBomber"
|
|
150
|
+
| "CbSwordfish"
|
|
151
|
+
| "SemiNightPlane"
|
|
152
|
+
| "HighAltitudeInterceptor";
|
|
153
|
+
|
|
196
154
|
export type ShipCategory =
|
|
197
155
|
| "Battleship"
|
|
198
156
|
| "AircraftCarrier"
|
|
@@ -230,18 +188,6 @@ export type ShipType =
|
|
|
230
188
|
|
|
231
189
|
export type SlotSizeVec = (number | null)[];
|
|
232
190
|
|
|
233
|
-
export interface AttackAnalysis {
|
|
234
|
-
attacker_is_player: boolean;
|
|
235
|
-
attacker_ship_id: number;
|
|
236
|
-
target_ship_id: number;
|
|
237
|
-
historical_params: HistoricalParams;
|
|
238
|
-
day: ActionReport<DayPhaseAttackStyle>;
|
|
239
|
-
night: ActionReport<NightPhaseAttackStyle>;
|
|
240
|
-
closing_torpedo: ActionReport<TorpedoAttackStyle>;
|
|
241
|
-
opening_asw: ActionReport<AswAttackStyle>;
|
|
242
|
-
support_shelling: ActionReport<SupportShellingStyle>;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
191
|
export type SingleFormation =
|
|
246
192
|
| "LineAhead"
|
|
247
193
|
| "DoubleLine"
|
|
@@ -258,40 +204,14 @@ export type CombinedFormation =
|
|
|
258
204
|
|
|
259
205
|
export type Formation = SingleFormation | CombinedFormation;
|
|
260
206
|
|
|
261
|
-
export type
|
|
262
|
-
| "Unknown"
|
|
263
|
-
| "HighAngleMount"
|
|
264
|
-
| "NightFighter"
|
|
265
|
-
| "NightAttacker"
|
|
266
|
-
| "HeavyBomber"
|
|
267
|
-
| "NightRecon"
|
|
268
|
-
| "MainGun"
|
|
269
|
-
| "Radar"
|
|
270
|
-
| "SurfaceRadar"
|
|
271
|
-
| "AirRadar"
|
|
272
|
-
| "DepthChargeProjector"
|
|
273
|
-
| "SynergisticDepthCharge"
|
|
274
|
-
| "AntiSubMortar"
|
|
275
|
-
| "AntiSubWeapon"
|
|
276
|
-
| "ApDepthCharge"
|
|
277
|
-
| "AntiSubAircraft"
|
|
278
|
-
| "LateModelBowTorpedo"
|
|
279
|
-
| "Seaplane"
|
|
280
|
-
| "CbAircraft"
|
|
281
|
-
| "LbAircraft"
|
|
282
|
-
| "JetAircraft"
|
|
283
|
-
| "Fighter"
|
|
284
|
-
| "Recon"
|
|
285
|
-
| "ObservationSeaplane"
|
|
286
|
-
| "CbFighterBomber"
|
|
287
|
-
| "AntiInstDiveBomber"
|
|
288
|
-
| "CbSwordfish"
|
|
289
|
-
| "SemiNightPlane"
|
|
290
|
-
| "HighAltitudeInterceptor";
|
|
207
|
+
export type NodeId = string;
|
|
291
208
|
|
|
292
|
-
export interface
|
|
293
|
-
|
|
294
|
-
|
|
209
|
+
export interface NodeState {
|
|
210
|
+
map?: number;
|
|
211
|
+
node?: NodeId;
|
|
212
|
+
phase?: number;
|
|
213
|
+
debuff?: boolean;
|
|
214
|
+
disable_historical_mod?: boolean;
|
|
295
215
|
}
|
|
296
216
|
|
|
297
217
|
export interface EquippabilityRule {
|
|
@@ -346,6 +266,27 @@ export interface NightFleetConditions {
|
|
|
346
266
|
activates_large_searchlight?: boolean;
|
|
347
267
|
}
|
|
348
268
|
|
|
269
|
+
export interface GearState {
|
|
270
|
+
id?: string;
|
|
271
|
+
gear_id: number;
|
|
272
|
+
exp?: number;
|
|
273
|
+
stars?: number;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface GearVecState {
|
|
277
|
+
g1?: GearState;
|
|
278
|
+
g2?: GearState;
|
|
279
|
+
g3?: GearState;
|
|
280
|
+
g4?: GearState;
|
|
281
|
+
g5?: GearState;
|
|
282
|
+
gx?: GearState;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export interface MoveShipPayload {
|
|
286
|
+
current: [string, string, ShipKey];
|
|
287
|
+
target: [string | null, string, ShipKey];
|
|
288
|
+
}
|
|
289
|
+
|
|
349
290
|
export type DayCutin =
|
|
350
291
|
| "Zuiun"
|
|
351
292
|
| "AirSea"
|
|
@@ -387,26 +328,8 @@ export type DayCutinLike = DayCutin | FleetCutin;
|
|
|
387
328
|
|
|
388
329
|
export type NightCutinLike = NightCutin | FleetCutin;
|
|
389
330
|
|
|
390
|
-
export interface GearState {
|
|
391
|
-
id?: string;
|
|
392
|
-
gear_id: number;
|
|
393
|
-
exp?: number;
|
|
394
|
-
stars?: number;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export interface GearVecState {
|
|
398
|
-
g1?: GearState;
|
|
399
|
-
g2?: GearState;
|
|
400
|
-
g3?: GearState;
|
|
401
|
-
g4?: GearState;
|
|
402
|
-
g5?: GearState;
|
|
403
|
-
gx?: GearState;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
331
|
export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
|
|
407
332
|
|
|
408
|
-
export type Role = "Main" | "Escort";
|
|
409
|
-
|
|
410
333
|
export interface SlotSizeVecState {
|
|
411
334
|
ss1?: number;
|
|
412
335
|
ss2?: number;
|
|
@@ -461,6 +384,40 @@ export interface SimulatorResultItem {
|
|
|
461
384
|
damage_state_map: Record<DamageState, number>;
|
|
462
385
|
}
|
|
463
386
|
|
|
387
|
+
export interface MasterShip {
|
|
388
|
+
ship_id: number;
|
|
389
|
+
name: string;
|
|
390
|
+
yomi: string;
|
|
391
|
+
stype: number;
|
|
392
|
+
ctype: number;
|
|
393
|
+
nationality?: number;
|
|
394
|
+
sort_id?: number;
|
|
395
|
+
max_hp: StatInterval;
|
|
396
|
+
firepower: StatInterval;
|
|
397
|
+
armor: StatInterval;
|
|
398
|
+
torpedo: StatInterval;
|
|
399
|
+
evasion: StatInterval;
|
|
400
|
+
anti_air: StatInterval;
|
|
401
|
+
asw: StatInterval;
|
|
402
|
+
los: StatInterval;
|
|
403
|
+
luck: StatInterval;
|
|
404
|
+
torpedo_accuracy?: number;
|
|
405
|
+
basic_evasion_term?: number;
|
|
406
|
+
speed: number;
|
|
407
|
+
range?: number;
|
|
408
|
+
fuel?: number;
|
|
409
|
+
ammo?: number;
|
|
410
|
+
next_id?: number;
|
|
411
|
+
next_level?: number;
|
|
412
|
+
slotnum: number;
|
|
413
|
+
slots: SlotSizeVec;
|
|
414
|
+
stock: GearState[];
|
|
415
|
+
speed_group?: SpeedGroup;
|
|
416
|
+
useful?: boolean;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export type StatInterval = [number | null, number | null];
|
|
420
|
+
|
|
464
421
|
export interface ActionReport<T> {
|
|
465
422
|
data: Record<string, AttackReport<T>>;
|
|
466
423
|
damage_state_density: Histogram<DamageState, number> | null;
|
|
@@ -577,44 +534,12 @@ export interface FleetState {
|
|
|
577
534
|
s7?: ShipState;
|
|
578
535
|
}
|
|
579
536
|
|
|
537
|
+
export type Role = "Main" | "Escort";
|
|
538
|
+
|
|
580
539
|
export type Side = "Player" | "Enemy";
|
|
581
540
|
|
|
582
541
|
export type Align = "Left" | "Right";
|
|
583
542
|
|
|
584
|
-
export interface MasterShip {
|
|
585
|
-
ship_id: number;
|
|
586
|
-
name: string;
|
|
587
|
-
yomi: string;
|
|
588
|
-
stype: number;
|
|
589
|
-
ctype: number;
|
|
590
|
-
nationality?: number;
|
|
591
|
-
sort_id?: number;
|
|
592
|
-
max_hp: StatInterval;
|
|
593
|
-
firepower: StatInterval;
|
|
594
|
-
armor: StatInterval;
|
|
595
|
-
torpedo: StatInterval;
|
|
596
|
-
evasion: StatInterval;
|
|
597
|
-
anti_air: StatInterval;
|
|
598
|
-
asw: StatInterval;
|
|
599
|
-
los: StatInterval;
|
|
600
|
-
luck: StatInterval;
|
|
601
|
-
torpedo_accuracy?: number;
|
|
602
|
-
basic_evasion_term?: number;
|
|
603
|
-
speed: number;
|
|
604
|
-
range?: number;
|
|
605
|
-
fuel?: number;
|
|
606
|
-
ammo?: number;
|
|
607
|
-
next_id?: number;
|
|
608
|
-
next_level?: number;
|
|
609
|
-
slotnum: number;
|
|
610
|
-
slots: SlotSizeVec;
|
|
611
|
-
stock: GearState[];
|
|
612
|
-
speed_group?: SpeedGroup;
|
|
613
|
-
useful?: boolean;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
export type StatInterval = [number | null, number | null];
|
|
617
|
-
|
|
618
543
|
export interface AttackPower {
|
|
619
544
|
precap: number;
|
|
620
545
|
is_capped: boolean;
|
|
@@ -670,6 +595,15 @@ export interface AirSquadronState extends GearVecState, SlotSizeVecState {
|
|
|
670
595
|
mode?: AirSquadronMode;
|
|
671
596
|
}
|
|
672
597
|
|
|
598
|
+
export type AirState =
|
|
599
|
+
| "AirSupremacy"
|
|
600
|
+
| "AirSuperiority"
|
|
601
|
+
| "AirParity"
|
|
602
|
+
| "AirDenial"
|
|
603
|
+
| "AirIncapability";
|
|
604
|
+
|
|
605
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
606
|
+
|
|
673
607
|
export interface AttackPowerModifier {
|
|
674
608
|
a?: number;
|
|
675
609
|
b?: number;
|
|
@@ -683,7 +617,7 @@ export interface SpecialEnemyModifiers {
|
|
|
683
617
|
m4a1dd_mod: AttackPowerModifier;
|
|
684
618
|
honi_mod: AttackPowerModifier;
|
|
685
619
|
postcap_general_mod: AttackPowerModifier;
|
|
686
|
-
pt_mod: AttackPowerModifier;
|
|
620
|
+
pt_mod: AttackPowerModifier | null;
|
|
687
621
|
}
|
|
688
622
|
|
|
689
623
|
export interface CustomPowerModifiers {
|
|
@@ -773,12 +707,58 @@ export type GearCategory =
|
|
|
773
707
|
| "LandBased"
|
|
774
708
|
| "Misc";
|
|
775
709
|
|
|
776
|
-
export interface ShipConditions extends ShipPosition {
|
|
777
|
-
formation?: Formation;
|
|
778
|
-
amagiri_index?: number | null;
|
|
710
|
+
export interface ShipConditions extends ShipPosition {
|
|
711
|
+
formation?: Formation;
|
|
712
|
+
amagiri_index?: number | null;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
716
|
+
|
|
717
|
+
export interface MasterData extends MasterBattleDefinitions {
|
|
718
|
+
created_at: number;
|
|
719
|
+
gears: MasterGear[];
|
|
720
|
+
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
721
|
+
ships: MasterShip[];
|
|
722
|
+
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
723
|
+
ibonuses: MasterIBonuses;
|
|
724
|
+
equippability: MasterEquippability;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
export interface NationalityDef {
|
|
728
|
+
id: number;
|
|
729
|
+
ctypes: number[];
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
export interface MasterAttrRule<T> {
|
|
733
|
+
tag: T;
|
|
734
|
+
name: string;
|
|
735
|
+
expr: CompiledEvaler;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
export interface MasterIBonuses {
|
|
739
|
+
shelling_power: MasterIBonusRule[];
|
|
740
|
+
shelling_accuracy: MasterIBonusRule[];
|
|
741
|
+
shelling_aerial_power: MasterIBonusRule[];
|
|
742
|
+
torpedo_power: MasterIBonusRule[];
|
|
743
|
+
torpedo_accuracy: MasterIBonusRule[];
|
|
744
|
+
torpedo_evasion: MasterIBonusRule[];
|
|
745
|
+
asw_power: MasterIBonusRule[];
|
|
746
|
+
asw_accuracy: MasterIBonusRule[];
|
|
747
|
+
night_power: MasterIBonusRule[];
|
|
748
|
+
night_aerial_power: MasterIBonusRule[];
|
|
749
|
+
night_accuracy: MasterIBonusRule[];
|
|
750
|
+
defense_power: MasterIBonusRule[];
|
|
751
|
+
contact_selection: MasterIBonusRule[];
|
|
752
|
+
fighter_power: MasterIBonusRule[];
|
|
753
|
+
ship_anti_air: MasterIBonusRule[];
|
|
754
|
+
fleet_anti_air: MasterIBonusRule[];
|
|
755
|
+
elos: MasterIBonusRule[];
|
|
779
756
|
}
|
|
780
757
|
|
|
781
|
-
export
|
|
758
|
+
export interface MasterIBonusRule {
|
|
759
|
+
expr: CompiledEvaler;
|
|
760
|
+
formula: CompiledEvaler;
|
|
761
|
+
}
|
|
782
762
|
|
|
783
763
|
export interface MasterGear {
|
|
784
764
|
gear_id: number;
|
|
@@ -824,14 +804,48 @@ export interface AttackReport<T> {
|
|
|
824
804
|
damage: DamageReport | null;
|
|
825
805
|
}
|
|
826
806
|
|
|
827
|
-
export
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
|
831
|
-
|
|
832
|
-
| "AirIncapability";
|
|
807
|
+
export interface AttackAnalyzerShipConfig
|
|
808
|
+
extends ShipConditions,
|
|
809
|
+
NightFleetConditions {
|
|
810
|
+
fleet_los_mod?: number | null;
|
|
811
|
+
}
|
|
833
812
|
|
|
834
|
-
export
|
|
813
|
+
export interface ShellingStyle {
|
|
814
|
+
tag: "ShellingStyle";
|
|
815
|
+
attack_type: ShellingType;
|
|
816
|
+
cutin: DayCutinLike | null;
|
|
817
|
+
power_mod: number;
|
|
818
|
+
accuracy_mod: number;
|
|
819
|
+
hits: number;
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
export interface NightAttackStyle {
|
|
823
|
+
tag: "NightAttackStyle";
|
|
824
|
+
attack_type: NightAttackType;
|
|
825
|
+
cutin: NightCutinLike | null;
|
|
826
|
+
power_mod: number;
|
|
827
|
+
accuracy_mod: number;
|
|
828
|
+
hits: number;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
export interface AswAttackStyle {
|
|
832
|
+
tag: "AswAttackStyle";
|
|
833
|
+
attack_type: AswAttackType;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export interface TorpedoAttackStyle {
|
|
837
|
+
tag: "TorpedoAttackStyle";
|
|
838
|
+
attack_type: TorpedoAttackType;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export type DayPhaseAttackStyle = ShellingStyle | AswAttackStyle;
|
|
842
|
+
|
|
843
|
+
export type NightPhaseAttackStyle = NightAttackStyle | AswAttackStyle;
|
|
844
|
+
|
|
845
|
+
export interface SupportShellingStyle {
|
|
846
|
+
tag: "SupportShellingStyle";
|
|
847
|
+
attack_type: SupportShellingType;
|
|
848
|
+
}
|
|
835
849
|
|
|
836
850
|
export interface ShipMeta {
|
|
837
851
|
id: string;
|
|
@@ -882,54 +896,6 @@ export type SpecialEnemyType =
|
|
|
882
896
|
| "AnchorageWaterDemonVacationMode"
|
|
883
897
|
| "DockPrincess";
|
|
884
898
|
|
|
885
|
-
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
886
|
-
|
|
887
|
-
export interface MasterData extends MasterBattleDefinitions {
|
|
888
|
-
created_at: number;
|
|
889
|
-
gears: MasterGear[];
|
|
890
|
-
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
891
|
-
ships: MasterShip[];
|
|
892
|
-
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
893
|
-
ibonuses: MasterIBonuses;
|
|
894
|
-
equippability: MasterEquippability;
|
|
895
|
-
}
|
|
896
|
-
|
|
897
|
-
export interface NationalityDef {
|
|
898
|
-
id: number;
|
|
899
|
-
ctypes: number[];
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
export interface MasterAttrRule<T> {
|
|
903
|
-
tag: T;
|
|
904
|
-
name: string;
|
|
905
|
-
expr: CompiledEvaler;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
export interface MasterIBonuses {
|
|
909
|
-
shelling_power: MasterIBonusRule[];
|
|
910
|
-
shelling_accuracy: MasterIBonusRule[];
|
|
911
|
-
shelling_aerial_power: MasterIBonusRule[];
|
|
912
|
-
torpedo_power: MasterIBonusRule[];
|
|
913
|
-
torpedo_accuracy: MasterIBonusRule[];
|
|
914
|
-
torpedo_evasion: MasterIBonusRule[];
|
|
915
|
-
asw_power: MasterIBonusRule[];
|
|
916
|
-
asw_accuracy: MasterIBonusRule[];
|
|
917
|
-
night_power: MasterIBonusRule[];
|
|
918
|
-
night_aerial_power: MasterIBonusRule[];
|
|
919
|
-
night_accuracy: MasterIBonusRule[];
|
|
920
|
-
defense_power: MasterIBonusRule[];
|
|
921
|
-
contact_selection: MasterIBonusRule[];
|
|
922
|
-
fighter_power: MasterIBonusRule[];
|
|
923
|
-
ship_anti_air: MasterIBonusRule[];
|
|
924
|
-
fleet_anti_air: MasterIBonusRule[];
|
|
925
|
-
elos: MasterIBonusRule[];
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
export interface MasterIBonusRule {
|
|
929
|
-
expr: CompiledEvaler;
|
|
930
|
-
formula: CompiledEvaler;
|
|
931
|
-
}
|
|
932
|
-
|
|
933
899
|
export interface MasterBattleDefinitions {
|
|
934
900
|
formation: NestedFormationDef[];
|
|
935
901
|
anti_air_cutin: AntiAirCutinDef[];
|
|
@@ -971,47 +937,31 @@ export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
|
|
|
971
937
|
observation_term: number | null;
|
|
972
938
|
}
|
|
973
939
|
|
|
974
|
-
export interface
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
attack_type: ShellingType;
|
|
983
|
-
cutin: DayCutinLike | null;
|
|
984
|
-
power_mod: number;
|
|
985
|
-
accuracy_mod: number;
|
|
986
|
-
hits: number;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
export interface NightAttackStyle {
|
|
990
|
-
tag: "NightAttackStyle";
|
|
991
|
-
attack_type: NightAttackType;
|
|
992
|
-
cutin: NightCutinLike | null;
|
|
993
|
-
power_mod: number;
|
|
994
|
-
accuracy_mod: number;
|
|
995
|
-
hits: number;
|
|
940
|
+
export interface CompAnalyzerConfig {
|
|
941
|
+
engagement: Engagement;
|
|
942
|
+
formation: Formation;
|
|
943
|
+
anti_air_cutin: number | null;
|
|
944
|
+
ship_anti_air_resist: number;
|
|
945
|
+
fleet_anti_air_resist: number;
|
|
946
|
+
left_night_fleet_conditions: NightFleetConditions;
|
|
947
|
+
right_night_fleet_conditions: NightFleetConditions;
|
|
996
948
|
}
|
|
997
949
|
|
|
998
|
-
export interface
|
|
999
|
-
|
|
1000
|
-
|
|
950
|
+
export interface CompNightAnalysis {
|
|
951
|
+
night_cutin: CompNightCutinAnalysis;
|
|
952
|
+
fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
1001
953
|
}
|
|
1002
954
|
|
|
1003
|
-
export interface
|
|
1004
|
-
|
|
1005
|
-
|
|
955
|
+
export interface CompDayAnalysis {
|
|
956
|
+
day_cutin: CompDayCutinAnalysis;
|
|
957
|
+
fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
1006
958
|
}
|
|
1007
959
|
|
|
1008
|
-
export
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
tag: "SupportShellingStyle";
|
|
1014
|
-
attack_type: SupportShellingType;
|
|
960
|
+
export interface CompAnalysis {
|
|
961
|
+
day: CompDayAnalysis;
|
|
962
|
+
night: CompNightAnalysis;
|
|
963
|
+
contact: ContactAnalysis;
|
|
964
|
+
anti_air: CompAntiAirAnalysis;
|
|
1015
965
|
}
|
|
1016
966
|
|
|
1017
967
|
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
@@ -1025,6 +975,55 @@ export interface ShipPosition {
|
|
|
1025
975
|
index?: number;
|
|
1026
976
|
}
|
|
1027
977
|
|
|
978
|
+
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
979
|
+
|
|
980
|
+
export type GearTypeIdArray = [number, number, number, number, number];
|
|
981
|
+
|
|
982
|
+
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
983
|
+
formation?: Formation;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
export interface NodeAttackAnalyzerConfig {
|
|
987
|
+
air_state?: AirState;
|
|
988
|
+
engagement?: Engagement;
|
|
989
|
+
node_state?: NodeState;
|
|
990
|
+
left?: NodeAttackAnalyzerShipConfig;
|
|
991
|
+
right?: NodeAttackAnalyzerShipConfig;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
export interface NodeAttackAnalysis {
|
|
995
|
+
left: AttackAnalysis;
|
|
996
|
+
right: AttackAnalysis;
|
|
997
|
+
shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
998
|
+
night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
export interface CompAntiAirAnalysis {
|
|
1002
|
+
fleet_adjusted_anti_air: number;
|
|
1003
|
+
ships: AntiAirReport[];
|
|
1004
|
+
anti_air_cutin_chance: [number, number][];
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
export interface AntiAirReport {
|
|
1008
|
+
ship_id: number;
|
|
1009
|
+
role: Role;
|
|
1010
|
+
index: number;
|
|
1011
|
+
adjusted_anti_air: number | null;
|
|
1012
|
+
proportional_shotdown_rate: number | null;
|
|
1013
|
+
fixed_shotdown_number: number | null;
|
|
1014
|
+
guaranteed: number | null;
|
|
1015
|
+
anti_air_cutin_chance: [number, number][];
|
|
1016
|
+
anti_air_propellant_barrage_chance: number | null;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
export type OrgType =
|
|
1020
|
+
| "Single"
|
|
1021
|
+
| "CarrierTaskForce"
|
|
1022
|
+
| "SurfaceTaskForce"
|
|
1023
|
+
| "TransportEscort"
|
|
1024
|
+
| "EnemySingle"
|
|
1025
|
+
| "EnemyCombined";
|
|
1026
|
+
|
|
1028
1027
|
/**
|
|
1029
1028
|
*/
|
|
1030
1029
|
export class AirSquadron {
|
|
@@ -1760,6 +1759,20 @@ export class Org {
|
|
|
1760
1759
|
*/
|
|
1761
1760
|
export class Ship {
|
|
1762
1761
|
free(): void;
|
|
1762
|
+
/**
|
|
1763
|
+
* @returns {number | undefined}
|
|
1764
|
+
*/
|
|
1765
|
+
state_day_gunfit_accuracy(): number | undefined;
|
|
1766
|
+
/**
|
|
1767
|
+
* @returns {number | undefined}
|
|
1768
|
+
*/
|
|
1769
|
+
state_night_gunfit_accuracy(): number | undefined;
|
|
1770
|
+
/**
|
|
1771
|
+
* フィット砲補正
|
|
1772
|
+
* @param {boolean} is_night
|
|
1773
|
+
* @returns {number}
|
|
1774
|
+
*/
|
|
1775
|
+
gunfit_accuracy(is_night: boolean): number;
|
|
1763
1776
|
/**
|
|
1764
1777
|
* @returns {Ship}
|
|
1765
1778
|
*/
|
|
@@ -1977,20 +1990,6 @@ export class Ship {
|
|
|
1977
1990
|
* @returns {number | undefined}
|
|
1978
1991
|
*/
|
|
1979
1992
|
ohko_power(): number | undefined;
|
|
1980
|
-
/**
|
|
1981
|
-
* @returns {number | undefined}
|
|
1982
|
-
*/
|
|
1983
|
-
state_day_gunfit_accuracy(): number | undefined;
|
|
1984
|
-
/**
|
|
1985
|
-
* @returns {number | undefined}
|
|
1986
|
-
*/
|
|
1987
|
-
state_night_gunfit_accuracy(): number | undefined;
|
|
1988
|
-
/**
|
|
1989
|
-
* フィット砲補正
|
|
1990
|
-
* @param {boolean} is_night
|
|
1991
|
-
* @returns {number}
|
|
1992
|
-
*/
|
|
1993
|
-
gunfit_accuracy(is_night: boolean): number;
|
|
1994
1993
|
/**
|
|
1995
1994
|
*/
|
|
1996
1995
|
readonly accuracy: number;
|