forked from danielyxie/bitburner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NetscriptDefinitions.d.ts
7650 lines (7207 loc) · 240 KB
/
NetscriptDefinitions.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/** @public */
export type ValuesFrom<T> = T[keyof T];
/** @public */
export interface HP {
current: number;
max: number;
}
/** @public */
export interface Skills {
hacking: number;
strength: number;
defense: number;
dexterity: number;
agility: number;
charisma: number;
intelligence: number;
}
/** @public */
export interface PossibleInfiltrationLocation {
city: string;
name: string;
}
/**
* Coding contract data will differ depending on coding contract.
* @public
*/
type CodingContractData = any;
/** @public */
type PortData = string | number;
/** @public */
type ScriptArg = string | number | boolean;
/** @public */
type FilenameOrPID = number | string;
/** @public */
interface Player {
hp: HP;
skills: Skills;
exp: Skills;
mults: Multipliers;
numPeopleKilled: number;
money: number;
city: string;
location: string;
bitNodeN: number;
totalPlaytime: number;
playtimeSinceLastAug: number;
playtimeSinceLastBitnode: number;
jobs: Record<string, string>;
factions: string[];
tor: boolean;
hasCorporation: boolean;
inBladeburner: boolean;
entropy: number;
}
/** @public */
interface MoneySource {
bladeburner: number;
casino: number;
class: number;
codingcontract: number;
corporation: number;
crime: number;
gang: number;
hacking: number;
hacknet: number;
hacknet_expenses: number;
hospitalization: number;
infiltration: number;
sleeves: number;
stock: number;
total: number;
work: number;
servers: number;
other: number;
augmentations: number;
}
/** @public */
interface MoneySources {
sinceInstall: MoneySource;
sinceStart: MoneySource;
}
/** @public */
export interface Multipliers {
/** Multiplier to hacking skill */
hacking?: number;
/** Multiplier to strength skill */
strength?: number;
/** Multiplier to defense skill */
defense?: number;
/** Multiplier to dexterity skill */
dexterity?: number;
/** Multiplier to agility skill */
agility?: number;
/** Multiplier to charisma skill */
charisma?: number;
/** Multiplier to hacking experience gain rate */
hacking_exp?: number;
/** Multiplier to strength experience gain rate */
strength_exp?: number;
/** Multiplier to defense experience gain rate */
defense_exp?: number;
/** Multiplier to dexterity experience gain rate */
dexterity_exp?: number;
/** Multiplier to agility experience gain rate */
agility_exp?: number;
/** Multiplier to charisma experience gain rate */
charisma_exp?: number;
/** Multiplier to chance of successfully performing a hack */
hacking_chance?: number;
/** Multiplier to hacking speed */
hacking_speed?: number;
/** Multiplier to amount of money the player gains from hacking */
hacking_money?: number;
/** Multiplier to amount of money injected into servers using grow */
hacking_grow?: number;
/** Multiplier to amount of reputation gained when working */
company_rep?: number;
/** Multiplier to amount of reputation gained when working */
faction_rep?: number;
/** Multiplier to amount of money gained from crimes */
crime_money?: number;
/** Multiplier to crime success rate */
crime_success?: number;
/** Multiplier to amount of money gained from working */
work_money?: number;
/** Multiplier to amount of money produced by Hacknet Nodes */
hacknet_node_money?: number;
/** Multiplier to cost of purchasing a Hacknet Node */
hacknet_node_purchase_cost?: number;
/** Multiplier to cost of ram for a Hacknet Node */
hacknet_node_ram_cost?: number;
/** Multiplier to cost of core for a Hacknet Node */
hacknet_node_core_cost?: number;
/** Multiplier to cost of leveling up a Hacknet Node */
hacknet_node_level_cost?: number;
/** Multiplier to Bladeburner max stamina */
bladeburner_max_stamina?: number;
/** Multiplier to Bladeburner stamina gain rate */
bladeburner_stamina_gain?: number;
/** Multiplier to effectiveness in Bladeburner Field Analysis */
bladeburner_analysis?: number;
/** Multiplier to success chance in Bladeburner contracts/operations */
bladeburner_success_chance?: number;
}
/** @public */
export interface RunningScript {
/** Arguments the script was called with */
args: (string | number | boolean)[];
/** Filename of the script */
filename: string;
/**
* Script logs as an array. The newest log entries are at the bottom.
* Timestamps, if enabled, are placed inside `[brackets]` at the start of each line.
**/
logs: string[];
/** Total amount of hacking experience earned from this script when offline */
offlineExpGained: number;
/** Total amount of money made by this script when offline */
offlineMoneyMade: number;
/** Number of seconds that the script has been running offline */
offlineRunningTime: number;
/** Total amount of hacking experience earned from this script when online */
onlineExpGained: number;
/** Total amount of money made by this script when online */
onlineMoneyMade: number;
/** Number of seconds that this script has been running online */
onlineRunningTime: number;
/** Process ID. Must be an integer */
pid: number;
/** How much RAM this script uses for ONE thread */
ramUsage: number;
/** Hostname of the server on which this script runs */
server: string;
/** Number of threads that this script runs with */
threads: number;
}
/** @public */
export interface RecentScript extends RunningScript {
/** Timestamp of when the script was killed */
timeOfDeath: Date;
}
/**
* Data representing the internal values of a crime.
* @public
*/
export interface CrimeStats {
/** Number representing the difficulty of the crime. Used for success chance calculations */
difficulty: number;
/** Amount of karma lost for successfully committing this crime */
karma: number;
/** How many people die as a result of this crime */
kills: number;
/** How much money is given */
money: number;
/** Name of crime */
name: string;
/** Milliseconds it takes to attempt the crime */
time: number;
/** Description of the crime activity */
type: string;
/** hacking level impact on success change of the crime */
hacking_success_weight: number;
/** strength level impact on success change of the crime */
strength_success_weight: number;
/** defense level impact on success change of the crime */
defense_success_weight: number;
/** dexterity level impact on success change of the crime */
dexterity_success_weight: number;
/** agility level impact on success change of the crime */
agility_success_weight: number;
/** charisma level impact on success change of the crime */
charisma_success_weight: number;
/** hacking exp gained from crime */
hacking_exp: number;
/** strength exp gained from crime */
strength_exp: number;
/** defense exp gained from crime */
defense_exp: number;
/** dexterity exp gained from crime */
dexterity_exp: number;
/** agility exp gained from crime */
agility_exp: number;
/** charisma exp gained from crime */
charisma_exp: number;
/** intelligence exp gained from crime */
intelligence_exp: number;
}
/**
* Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.
* @public
*/
export interface BasicHGWOptions {
/** Number of threads to use for this function.
* Must be less than or equal to the number of threads the script is running with. */
threads?: number;
/** Set to true this action will affect the stock market. */
stock?: boolean;
}
/**
* Options to affect the behavior of {@link CodingContract} attempt.
* @public
*/
export interface CodingAttemptOptions {
/** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */
returnReward: boolean;
}
/**
* Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}
* @public
*/
export interface AugmentPair {
/** augmentation name */
name: string;
/** augmentation cost */
cost: number;
}
/** @public */
export enum PositionTypes {
Long = "L",
Short = "S",
}
/** @public */
export enum OrderTypes {
LimitBuy = "Limit Buy Order",
LimitSell = "Limit Sell Order",
StopBuy = "Stop Buy Order",
StopSell = "Stop Sell Order",
}
/**
* Value in map of {@link StockOrder}
* @public
*/
export interface StockOrderObject {
/** Number of shares */
shares: number;
/** Price per share */
price: number;
/** Order type */
type: OrderTypes;
/** Order position */
position: PositionTypes;
}
/**
* Return value of {@link TIX.getOrders | getOrders}
*
* Keys are stock symbols, properties are arrays of {@link StockOrderObject}
* @public
*/
export interface StockOrder {
[key: string]: StockOrderObject[];
}
/**
* A single process on a server.
* @public
*/
export interface ProcessInfo {
/** Script name. */
filename: string;
/** Number of threads script is running with */
threads: number;
/** Script's arguments */
args: (string | number | boolean)[];
/** Process ID */
pid: number;
}
/**
* Hack related multipliers.
* @public
*/
export interface HackingMultipliers {
/** Player's hacking chance multiplier. */
chance: number;
/** Player's hacking speed multiplier. */
speed: number;
/** Player's hacking money stolen multiplier. */
money: number;
/** Player's hacking growth multiplier */
growth: number;
}
/**
* Hacknet related multipliers.
* @public
*/
export interface HacknetMultipliers {
/** Player's hacknet production multiplier */
production: number;
/** Player's hacknet purchase cost multiplier */
purchaseCost: number;
/** Player's hacknet ram cost multiplier */
ramCost: number;
/** Player's hacknet core cost multiplier */
coreCost: number;
/** Player's hacknet level cost multiplier */
levelCost: number;
}
/**
* Hacknet node related constants
* @public
*/
export interface HacknetNodeConstants {
/** Amount of money gained per level */
MoneyGainPerLevel: number;
/** Base cost for a new node */
BaseCost: number;
/** Base cost per level */
LevelBaseCost: number;
/** Base cost to increase RAM */
RamBaseCost: number;
/** Base cost to increase cores */
CoreBaseCost: number;
/** Multiplier to purchase new node */
PurchaseNextMult: number;
/** Multiplier to increase node level */
UpgradeLevelMult: number;
/** Multiplier to increase RAM */
UpgradeRamMult: number;
/** Multiplier to increase cores */
UpgradeCoreMult: number;
/** Max node level */
MaxLevel: number;
/** Max amount of RAM in GB */
MaxRam: number;
/** Max number of cores */
MaxCores: number;
}
/**
* Hacknet server related constants
* @public
*/
export interface HacknetServerConstants {
/** Number of hashes calculated per level */
HashesPerLevel: number;
/** Base cost for a new server */
BaseCost: number;
/** Base cost to increase RAM */
RamBaseCost: number;
/** Base cost to increase cores */
CoreBaseCost: number;
/** Base cost to upgrade cache */
CacheBaseCost: number;
/** Multiplier to purchase a new server */
PurchaseMult: number;
/** Multiplier to increase server level */
UpgradeLevelMult: number;
/** Multiplier to increase RAM */
UpgradeRamMult: number;
/** Multiplier to increase cores */
UpgradeCoreMult: number;
/** Multiplier to upgrade cache */
UpgradeCacheMult: number;
/** Max number of servers */
MaxServers: number;
/** Max level for a server */
MaxLevel: number;
/** Max amount of RAM in GB */
MaxRam: number;
/** Max number of cores */
MaxCores: number;
/** Max cache size */
MaxCache: number;
}
/**
* A single server.
* @public
*/
export interface Server {
/**
* How many CPU cores this server has. Maximum of 8.
* Affects magnitude of grow and weaken.
*/
cpuCores: number;
/** Flag indicating whether the FTP port is open */
ftpPortOpen: boolean;
/** Flag indicating whether player has admin/root access to this server */
hasAdminRights: boolean;
/** Hostname. Must be unique */
hostname: string;
/** Flag indicating whether HTTP Port is open */
httpPortOpen: boolean;
/** IP Address. Must be unique */
ip: string;
/** Flag indicating whether player is currently connected to this server */
isConnectedTo: boolean;
/** RAM (GB) available on this server */
maxRam: number;
/**
* Name of company/faction/etc. that this server belongs to.
* Optional, not applicable to all Servers
*/
organizationName: string;
/** RAM (GB) used. i.e. unavailable RAM */
ramUsed: number;
/** Flag indicating whether SMTP Port is open */
smtpPortOpen: boolean;
/** Flag indicating whether SQL Port is open */
sqlPortOpen: boolean;
/** Flag indicating whether the SSH Port is open */
sshPortOpen: boolean;
/** Flag indicating whether this is a purchased server */
purchasedByPlayer: boolean;
/** Flag indicating whether this server has a backdoor installed by a player */
backdoorInstalled: boolean;
/**
* Initial server security level
* (i.e. security level when the server was created)
*/
baseDifficulty: number;
/** Server Security Level */
hackDifficulty: number;
/** Minimum server security level that this server can be weakened to */
minDifficulty: number;
/** How much money currently resides on the server and can be hacked */
moneyAvailable: number;
/** Maximum amount of money that this server can hold */
moneyMax: number;
/** Number of open ports required in order to gain admin/root access */
numOpenPortsRequired: number;
/** How many ports are currently opened on the server */
openPortCount: number;
/** Hacking level required to hack this server */
requiredHackingSkill: number;
/**
* Parameter that affects how effectively this server's money can
* be increased using the grow() Netscript function
*/
serverGrowth: number;
}
/**
* All multipliers affecting the difficulty of the current challenge.
* @public
*/
export interface BitNodeMultipliers {
/** Influences how quickly the player's agility level (not exp) scales */
AgilityLevelMultiplier: number;
/** Influences the base cost to purchase an augmentation. */
AugmentationMoneyCost: number;
/** Influences the base rep the player must have with a faction to purchase an augmentation. */
AugmentationRepCost: number;
/** Influences how quickly the player can gain rank within Bladeburner. */
BladeburnerRank: number;
/** Influences the cost of skill levels from Bladeburner. */
BladeburnerSkillCost: number;
/** Influences how quickly the player's charisma level (not exp) scales */
CharismaLevelMultiplier: number;
/** Influences the experience gained for each ability when a player completes a class. */
ClassGymExpGain: number;
/** Influences the amount of money gained from completing Coding Contracts */
CodingContractMoney: number;
/** Influences the experience gained for each ability when the player completes working their job. */
CompanyWorkExpGain: number;
/** Influences how much money the player earns when completing working their job. */
CompanyWorkMoney: number;
/** Influences the money gain from dividends of corporations created by the player. */
CorporationSoftcap: number;
/** Influences the valuation of corporations created by the player. */
CorporationValuation: number;
/** Influences the base experience gained for each ability when the player commits a crime. */
CrimeExpGain: number;
/** Influences the base money gained when the player commits a crime. */
CrimeMoney: number;
/** Influences how many Augmentations you need in order to get invited to the Daedalus faction */
DaedalusAugsRequirement: number;
/** Influences how quickly the player's defense level (not exp) scales */
DefenseLevelMultiplier: number;
/** Influences how quickly the player's dexterity level (not exp) scales */
DexterityLevelMultiplier: number;
/** Influences how much rep the player gains in each faction simply by being a member. */
FactionPassiveRepGain: number;
/** Influences the experience gained for each ability when the player completes work for a Faction. */
FactionWorkExpGain: number;
/** Influences how much rep the player gains when performing work for a faction. */
FactionWorkRepGain: number;
/** Influences how much it costs to unlock the stock market's 4S Market Data API */
FourSigmaMarketDataApiCost: number;
/** Influences how much it costs to unlock the stock market's 4S Market Data (NOT API) */
FourSigmaMarketDataCost: number;
/** Influences the respect gain and money gain of your gang. */
GangSoftcap: number;
/** Influences the experienced gained when hacking a server. */
HackExpGain: number;
/** Influences how quickly the player's hacking level (not experience) scales */
HackingLevelMultiplier: number;
/** Influences how much money is produced by Hacknet Nodes
* and the hash rate of Hacknet Servers (unlocked in BitNode-9) */
HacknetNodeMoney: number;
/** Influences how much money it costs to upgrade your home computer's RAM */
HomeComputerRamCost: number;
/** Influences how much money is gained when the player infiltrates a company. */
InfiltrationMoney: number;
/** Influences how much rep the player can gain from factions when selling stolen documents and secrets */
InfiltrationRep: number;
/** Influences how much money can be stolen from a server when the player
* performs a hack against it through the Terminal. */
ManualHackMoney: number;
/** Influence how much it costs to purchase a server */
PurchasedServerCost: number;
/** Influences the maximum number of purchased servers you can have */
PurchasedServerLimit: number;
/** Influences the maximum allowed RAM for a purchased server */
PurchasedServerMaxRam: number;
/** Influences cost of any purchased server at or above 128GB */
PurchasedServerSoftcap: number;
/** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */
RepToDonateToFaction: number;
/** Influences how much the money on a server can be reduced when a script performs a hack against it. */
ScriptHackMoney: number;
/** Influences how much of the money stolen by a scripted hack will be added to the player's money. */
ScriptHackMoneyGain: number;
/** Influences the growth percentage per cycle against a server. */
ServerGrowthRate: number;
/** Influences the maximum money that a server can grow to. */
ServerMaxMoney: number;
/** Influences the initial money that a server starts with. */
ServerStartingMoney: number;
/** Influences the initial security level (hackDifficulty) of a server. */
ServerStartingSecurity: number;
/** Influences the weaken amount per invocation against a server. */
ServerWeakenRate: number;
/** Influences how quickly the player's strength level (not exp) scales */
StrengthLevelMultiplier: number;
/** Influences the power of the gift */
StaneksGiftPowerMultiplier: number;
/** Influences the size of the gift */
StaneksGiftExtraSize: number;
/** Influences the hacking skill required to backdoor the world daemon. */
WorldDaemonDifficulty: number;
}
/**
* Object representing all the values related to a hacknet node.
* @public
*/
export interface NodeStats {
/** Node's name */
name: string;
/** Node's level */
level: number;
/** Node's RAM (GB) */
ram: number;
/** Node's used RAM (GB) */
ramUsed?: number;
/** Node's number of cores */
cores: number;
/** Cache level. Only applicable for Hacknet Servers */
cache?: number;
/** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */
hashCapacity?: number;
/** Node's production per second */
production: number;
/** Number of seconds since Node has been purchased */
timeOnline: number;
/** Total number of money Node has produced */
totalProduction: number;
}
/** @public */
export interface CharacterMult {
/** Agility stat */
agility: number;
/** Agility exp */
agilityExp: number;
/** Charisma stat */
charisma: number;
/** Charisma exp */
charismaExp: number;
/** Company reputation */
companyRep: number;
/** Money earned from crimes */
crimeMoney: number;
/** Crime success chance */
crimeSuccess: number;
/** Defense stat */
defense: number;
/** Defense exp */
defenseExp: number;
/** Dexterity stat */
dexterity: number;
/** Dexterity exp */
dexterityExp: number;
/** Faction reputation */
factionRep: number;
/** Hacking stat */
hacking: number;
/** Hacking exp */
hackingExp: number;
/** Strength stat */
strength: number;
/** Strength exp */
strengthExp: number;
/** Money earned from jobs */
workMoney: number;
}
/** @public */
export interface SleeveWorkGains {
/** Hacking exp gained from work */
workHackExpGain: number;
/** Strength exp gained from work */
workStrExpGain: number;
/** Defense exp gained from work, */
workDefExpGain: number;
/** Dexterity exp gained from work */
workDexExpGain: number;
/** Agility exp gained from work */
workAgiExpGain: number;
/** Charisma exp gained from work */
workChaExpGain: number;
/** Money gained from work */
workMoneyGain: number;
}
/** @public */
export interface SourceFileLvl {
/** The number of the source file */
n: number;
/** The level of the source file */
lvl: number;
}
/**
* Bladeburner current action.
* @public
*/
export interface BladeburnerCurAction {
/** Type of Action */
type: string;
/** Name of Action */
name: string;
}
/**
* Gang general info.
* @public
*/
export interface GangGenInfo {
/** Name of faction that the gang belongs to ("Slum Snakes", etc.) */
faction: string;
/** Indicating whether or not it's a hacking gang */
isHacking: boolean;
/** Money earned per game cycle */
moneyGainRate: number;
/** Gang's power for territory warfare */
power: number;
/** Gang's respect */
respect: number;
/** Respect earned per game cycle */
respectGainRate: number;
/** Amount of territory held */
territory: number;
/** Clash chance */
territoryClashChance: number;
/** Gang's wanted level */
wantedLevel: number;
/** Wanted level gained/lost per game cycle (negative for losses) */
wantedLevelGainRate: number;
/** Indicating if territory warfare is enabled */
territoryWarfareEngaged: boolean;
/** Number indicating the current wanted penalty */
wantedPenalty: number;
}
/** @public */
export interface GangOtherInfoObject {
/** Gang power */
power: number;
/** Gang territory, in decimal form */
territory: number;
}
/** @public */
export interface GangOtherInfo {
[key: string]: GangOtherInfoObject;
}
/**
* Object representing data representing a gang member task.
* @public
*/
export interface GangTaskStats {
/** Task name */
name: string;
/** Task Description */
desc: string;
/** Is a task of a hacking gang */
isHacking: boolean;
/** Is a task of a combat gang */
isCombat: boolean;
/** Base respect earned */
baseRespect: number;
/** Base wanted earned */
baseWanted: number;
/** Base money earned */
baseMoney: number;
/** Hacking skill impact on task scaling */
hackWeight: number;
/** Strength skill impact on task scaling */
strWeight: number;
/** Defense skill impact on task scaling */
defWeight: number;
/** Dexterity skill impact on task scaling */
dexWeight: number;
/** Agility skill impact on task scaling */
agiWeight: number;
/** Charisma skill impact on task scaling */
chaWeight: number;
/** Number representing the difficulty of the task */
difficulty: number;
/** Territory impact on task scaling */
territory: GangTerritory;
}
/**
* Object representing data representing a gang member equipment.
* @public
*/
export interface EquipmentStats {
/** Strength multiplier */
str?: number;
/** Defense multiplier */
def?: number;
/** Dexterity multiplier */
dex?: number;
/** Agility multiplier */
agi?: number;
/** Charisma multiplier */
cha?: number;
/** Hacking multiplier */
hack?: number;
}
/** @public */
export interface GangTerritory {
/** Money gain impact on task scaling */
money: number;
/** Respect gain impact on task scaling */
respect: number;
/** Wanted gain impact on task scaling */
wanted: number;
}
/** @public */
export interface GangMemberInfo {
/** Name of the gang member */
name: string;
/** Currently assigned task */
task: string;
earnedRespect: number;
/** Hack skill level */
hack: number;
/** Strength skill level */
str: number;
/** Defense skill level */
def: number;
/** Dexterity skill level */
dex: number;
/** Agility skill level */
agi: number;
/** Charisma skill level */
cha: number;
/** Current hack experience */
hack_exp: number;
/** Current strength experience */
str_exp: number;
/** Current defense experience */
def_exp: number;
/** Current dexterity experience */
dex_exp: number;
/** Current agility experience */
agi_exp: number;
/** Current charisma experience */
cha_exp: number;
/** Hack multiplier from equipment */
hack_mult: number;
/** Strength multiplier from equipment */
str_mult: number;
/** Defense multiplier from equipment */
def_mult: number;
/** Dexterity multiplier from equipment */
dex_mult: number;
/** Agility multiplier from equipment */
agi_mult: number;
/** Charisma multiplier from equipment */
cha_mult: number;
/** Hack multiplier from ascensions */
hack_asc_mult: number;
/** Strength multiplier from ascensions */
str_asc_mult: number;
/** Defense multiplier from ascensions */
def_asc_mult: number;
/** Dexterity multiplier from ascensions */
dex_asc_mult: number;
/** Agility multiplier from ascensions */
agi_asc_mult: number;
/** Charisma multiplier from ascensions */
cha_asc_mult: number;
/** Total earned hack experience */
hack_asc_points: number;
/** Total earned strength experience */
str_asc_points: number;
/** Total earned defense experience */
def_asc_points: number;
/** Total earned dexterity experience */
dex_asc_points: number;
/** Total earned agility experience */
agi_asc_points: number;
/** Total earned charisma experience */
cha_asc_points: number;
upgrades: string[];
augmentations: string[];
respectGain: number;
wantedLevelGain: number;
moneyGain: number;
}
/** @public */
export interface GangMemberAscension {
/** Amount of respect lost from ascending */
respect: number;
/** Hacking multiplier gained from ascending */
hack: number;
/** Strength multiplier gained from ascending */
str: number;
/** Defense multiplier gained from ascending */
def: number;
/** Dexterity multiplier gained from ascending */
dex: number;
/** Agility multiplier gained from ascending */
agi: number;
/** Charisma multiplier gained from ascending */
cha: number;
}
/**
* Object representing a sleeve stats.
* @public
*/
export interface SleeveSkills {
/** Current shock of the sleeve [0-100] */
shock: number;
/** Current sync of the sleeve [0-100] */
sync: number;
/** Current memory of the sleeve [1-100] */
memory: number;
/** Current hacking skill of the sleeve */
hacking: number;
/** Current strength of the sleeve */
strength: number;
/** Current defense of the sleeve */
defense: number;
/** Current dexterity of the sleeve */
dexterity: number;
/** Current agility of the sleeve */
agility: number;
/** Current charisma of the sleeve */
charisma: number;
}
/**
* Object representing sleeve information.
* @public
*/
export interface SleeveInformation {
/** Location of the sleeve */
city: string;
/** hp of the sleeve */
hp: HP;
/** Jobs available to the sleeve */
jobs: string[];
/** Job titles available to the sleeve */
jobTitle: string[];
/** Does this sleeve have access to the tor router */
tor: boolean;
/** Sleeve multipliers */
mult: CharacterMult;
}
/**
* Object representing a sleeve current task.
* @public
*/
export type SleeveTask = any;
/**
* Object representing a port. A port is a serialized queue.
* @public
*/
export interface NetscriptPort {
/**
* Write data to a port.
* @remarks
* RAM cost: 0 GB
*
* @returns The data popped off the queue if it was full.
*/
write(value: string | number): PortData | null;
/**
* Attempt to write data to the port.
* @remarks
* RAM cost: 0 GB
*
* @returns True if the data was added to the port, false if the port was full