Balancing. Buffed crimes, infiltration, jobs, nerfed hacking

This commit is contained in:
danielyxie 2017-08-01 14:03:45 -05:00
parent 8b6dba561c
commit ddca05f4c5
10 changed files with 345 additions and 271 deletions

@ -732,7 +732,9 @@
successful. Your chance at successfully committing a crime is determined by your stats.
</p>
<a class="a-link-button tooltip" id="location-slums-shoplift"> Shoplift </a>
<a id="location-slums-rob-store" class="a-link-button tooltip"> Rob a store </a>
<a id="location-slums-mug" class="a-link-button tooltip"> Mug someone </a>
<a id="location-slums-larceny" class="a-link-button tooltip"> Commit Larceny </a>
<a id="location-slums-deal-drugs" class="a-link-button tooltip"> Deal Drugs </a>
<a id="location-slums-traffic-arms" class="a-link-button tooltip"> Traffick Illegal Arms </a>
<a id="location-slums-homicide" class="a-link-button tooltip"> Homicide </a>

@ -229,58 +229,58 @@ CompanyPositions = {
//Constructor: CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqCha, reqRep, salary)
//Software
SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 0, 0, 0, 0, 0, 0, 15),
JuniorDev: new CompanyPosition("Junior Software Engineer", 51, 0, 0, 0, 0, 0, 8000, 35),
SeniorDev: new CompanyPosition("Senior Software Engineer", 251, 0, 0, 0, 0, 51, 40000, 70),
LeadDev: new CompanyPosition("Lead Software Developer", 401, 0, 0, 0, 0, 151, 200000, 230),
SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 0, 0, 0, 0, 0, 0, 30),
JuniorDev: new CompanyPosition("Junior Software Engineer", 51, 0, 0, 0, 0, 0, 8000, 72),
SeniorDev: new CompanyPosition("Senior Software Engineer", 251, 0, 0, 0, 0, 51, 40000, 150),
LeadDev: new CompanyPosition("Lead Software Developer", 401, 0, 0, 0, 0, 151, 200000, 450),
//TODO Through darkweb, maybe?
FreelanceDeveloper: new CompanyPosition("Freelance Developer", 0, 0, 0, 0, 0, 0, 0, 0),
SoftwareConsultant: new CompanyPosition("Software Consultant", 51, 0, 0, 0, 0, 0, 0, 25),
SeniorSoftwareConsultant: new CompanyPosition("Senior Software Consultant", 251, 0, 0, 0, 0, 51, 0, 50),
SoftwareConsultant: new CompanyPosition("Software Consultant", 51, 0, 0, 0, 0, 0, 0, 60),
SeniorSoftwareConsultant: new CompanyPosition("Senior Software Consultant", 251, 0, 0, 0, 0, 51, 0, 120),
//IT
ITIntern: new CompanyPosition("IT Intern", 1, 0, 0, 0, 0, 0, 0, 13),
ITAnalyst: new CompanyPosition("IT Analyst", 26, 0, 0, 0, 0, 0, 7000, 28),
ITManager: new CompanyPosition("IT Manager", 151, 0, 0, 0, 0, 51, 35000, 60),
SysAdmin: new CompanyPosition("Systems Administrator", 251, 0, 0, 0, 0, 76, 175000, 180),
SecurityEngineer: new CompanyPosition("Security Engineer", 151, 0, 0, 0, 0, 26, 35000, 60),
NetworkEngineer: new CompanyPosition("Network Engineer", 151, 0, 0, 0, 0, 26, 35000, 60),
NetworkAdministrator: new CompanyPosition("Network Administrator", 251, 0, 0, 0, 0, 76, 175000, 180),
ITIntern: new CompanyPosition("IT Intern", 1, 0, 0, 0, 0, 0, 0, 24),
ITAnalyst: new CompanyPosition("IT Analyst", 26, 0, 0, 0, 0, 0, 7000, 60),
ITManager: new CompanyPosition("IT Manager", 151, 0, 0, 0, 0, 51, 35000, 120),
SysAdmin: new CompanyPosition("Systems Administrator", 251, 0, 0, 0, 0, 76, 175000, 375),
SecurityEngineer: new CompanyPosition("Security Engineer", 151, 0, 0, 0, 0, 26, 35000, 110),
NetworkEngineer: new CompanyPosition("Network Engineer", 151, 0, 0, 0, 0, 26, 35000, 110),
NetworkAdministrator: new CompanyPosition("Network Administrator", 251, 0, 0, 0, 0, 76, 175000, 375),
//Technology management
HeadOfSoftware: new CompanyPosition("Head of Software", 501, 0, 0, 0, 0, 251, 400000, 360),
HeadOfEngineering: new CompanyPosition("Head of Engineering", 501, 0, 0, 0, 0, 251, 800000, 725),
VicePresident: new CompanyPosition("Vice President of Technology", 601, 0, 0, 0, 0, 401, 1600000, 1050),
CTO: new CompanyPosition("Chief Technology Officer", 751, 0, 0, 0, 0, 501, 3200000, 1200),
HeadOfSoftware: new CompanyPosition("Head of Software", 501, 0, 0, 0, 0, 251, 400000, 720),
HeadOfEngineering: new CompanyPosition("Head of Engineering", 501, 0, 0, 0, 0, 251, 800000, 1500),
VicePresident: new CompanyPosition("Vice President of Technology", 601, 0, 0, 0, 0, 401, 1600000, 2100),
CTO: new CompanyPosition("Chief Technology Officer", 751, 0, 0, 0, 0, 501, 3200000, 2400),
//Business
BusinessIntern: new CompanyPosition("Business Intern", 1, 0, 0, 0, 0, 1, 0, 20),
BusinessAnalyst: new CompanyPosition("Business Analyst", 6, 0, 0, 0, 0, 51, 8000, 46),
BusinessManager: new CompanyPosition("Business Manager", 51, 0, 0, 0, 0, 101, 40000, 92),
OperationsManager: new CompanyPosition("Operations Manager", 51, 0, 0, 0, 0, 226, 200000, 300),
CFO: new CompanyPosition("Chief Financial Officer", 76, 0, 0, 0, 0, 501, 800000, 900),
CEO: new CompanyPosition("Chief Executive Officer", 101, 0, 0, 0, 0, 751, 3200000, 1700),
BusinessIntern: new CompanyPosition("Business Intern", 1, 0, 0, 0, 0, 1, 0, 42),
BusinessAnalyst: new CompanyPosition("Business Analyst", 6, 0, 0, 0, 0, 51, 8000, 90),
BusinessManager: new CompanyPosition("Business Manager", 51, 0, 0, 0, 0, 101, 40000, 180),
OperationsManager: new CompanyPosition("Operations Manager", 51, 0, 0, 0, 0, 226, 200000, 600),
CFO: new CompanyPosition("Chief Financial Officer", 76, 0, 0, 0, 0, 501, 800000, 1800),
CEO: new CompanyPosition("Chief Executive Officer", 101, 0, 0, 0, 0, 751, 3200000, 3600),
BusinessConsultant: new CompanyPosition("Business Consultant", 6, 0, 0, 0, 0, 51, 0, 32),
SeniorBusinessConsultant: new CompanyPosition("Senior Business Consultant", 51, 0, 0, 0, 0, 226, 0, 190),
BusinessConsultant: new CompanyPosition("Business Consultant", 6, 0, 0, 0, 0, 51, 0, 80),
SeniorBusinessConsultant: new CompanyPosition("Senior Business Consultant", 51, 0, 0, 0, 0, 226, 0, 480),
//Non-tech/management jobs
PartTimeWaiter: new CompanyPosition("Part-time Waiter", 0, 0, 0, 0, 0, 0, 0, 10),
PartTimeEmployee: new CompanyPosition("Part-time Employee", 0, 0, 0, 0, 0, 0, 0, 10),
PartTimeWaiter: new CompanyPosition("Part-time Waiter", 0, 0, 0, 0, 0, 0, 0, 18),
PartTimeEmployee: new CompanyPosition("Part-time Employee", 0, 0, 0, 0, 0, 0, 0, 18),
Waiter: new CompanyPosition("Waiter", 0, 0, 0, 0, 0, 0, 0, 12),
Employee: new CompanyPosition("Employee", 0, 0, 0, 0, 0, 0, 0, 12),
PoliceOfficer: new CompanyPosition("Police Officer", 11, 101, 101, 101, 101, 51, 8000, 40),
PoliceChief: new CompanyPosition("Police Chief", 101, 301, 301, 301, 301, 151, 36000, 200),
SecurityGuard: new CompanyPosition("Security Guard", 0, 51, 51, 51, 51, 1, 0, 22),
SecurityOfficer: new CompanyPosition("Security Officer", 26, 151, 151, 151, 151, 51, 8000, 85),
SecuritySupervisor: new CompanyPosition("Security Supervisor", 26, 251, 251, 251, 251, 101, 36000, 300),
HeadOfSecurity: new CompanyPosition("Head of Security", 51, 501, 501, 501, 501, 151, 144000, 600),
FieldAgent: new CompanyPosition("Field Agent", 101, 101, 101, 101, 101, 101, 8000, 60),
SecretAgent: new CompanyPosition("Secret Agent", 201, 251, 251, 251, 251, 201, 32000, 225),
SpecialOperative: new CompanyPosition("Special Operative", 251, 501, 501, 501, 501, 251, 162000, 475),
Waiter: new CompanyPosition("Waiter", 0, 0, 0, 0, 0, 0, 0, 20),
Employee: new CompanyPosition("Employee", 0, 0, 0, 0, 0, 0, 0, 20),
PoliceOfficer: new CompanyPosition("Police Officer", 11, 101, 101, 101, 101, 51, 8000, 75),
PoliceChief: new CompanyPosition("Police Chief", 101, 301, 301, 301, 301, 151, 36000, 425),
SecurityGuard: new CompanyPosition("Security Guard", 0, 51, 51, 51, 51, 1, 0, 45),
SecurityOfficer: new CompanyPosition("Security Officer", 26, 151, 151, 151, 151, 51, 8000, 175),
SecuritySupervisor: new CompanyPosition("Security Supervisor", 26, 251, 251, 251, 251, 101, 36000, 600),
HeadOfSecurity: new CompanyPosition("Head of Security", 51, 501, 501, 501, 501, 151, 144000, 1200),
FieldAgent: new CompanyPosition("Field Agent", 101, 101, 101, 101, 101, 101, 8000, 300),
SecretAgent: new CompanyPosition("Secret Agent", 201, 251, 251, 251, 251, 201, 32000, 900),
SpecialOperative: new CompanyPosition("Special Operative", 251, 501, 501, 501, 501, 251, 162000, 1800),
init: function() {
//Argument order: hack, str, def, dex, agi, cha
@ -290,9 +290,9 @@ CompanyPositions = {
CompanyPositions.JuniorDev.setPerformanceParameters(85, 0, 0, 0, 0, 15, 1.1);
CompanyPositions.JuniorDev.setExperienceGains(.1, 0, 0, 0, 0, .05);
CompanyPositions.SeniorDev.setPerformanceParameters(80, 0, 0, 0, 0, 20, 1.3);
CompanyPositions.SeniorDev.setExperienceGains(.3, 0, 0, 0, 0, .08);
CompanyPositions.SeniorDev.setExperienceGains(.4, 0, 0, 0, 0, .08);
CompanyPositions.LeadDev.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.5);
CompanyPositions.LeadDev.setExperienceGains(.5, 0, 0, 0, 0, .1);
CompanyPositions.LeadDev.setExperienceGains(.8, 0, 0, 0, 0, .1);
CompanyPositions.SoftwareConsultant.setPerformanceParameters(80, 0, 0, 0, 0, 20, 1);
CompanyPositions.SoftwareConsultant.setExperienceGains(.08, 0, 0, 0, 0, .03);
@ -351,27 +351,27 @@ CompanyPositions = {
CompanyPositions.PartTimeEmployee.setExperienceGains(0, .0075, .0075, .0075, .0075, .03);
CompanyPositions.Waiter.setPerformanceParameters(0, 10, 0, 10, 10, 70);
CompanyPositions.Waiter.setExperienceGains(0, .01, .01, .01, .01, .05);
CompanyPositions.Waiter.setExperienceGains(0, .02, .02, .02, .02, .05);
CompanyPositions.Employee.setPerformanceParameters(0, 10, 0, 10, 10, 70);
CompanyPositions.Employee.setExperienceGains(0, .01, .01, .01, .01, .04);
CompanyPositions.Employee.setExperienceGains(0, .02, .02, .02, .02, .04);
CompanyPositions.SecurityGuard.setPerformanceParameters(5, 20, 20, 20, 20, 15, 1);
CompanyPositions.SecurityGuard.setExperienceGains(.01, .02, .02, .02, .02, .01);
CompanyPositions.SecurityGuard.setExperienceGains(.01, .04, .04, .04, .04, .02);
CompanyPositions.PoliceOfficer.setPerformanceParameters(5, 20, 20, 20, 20, 15, 1);
CompanyPositions.PoliceOfficer.setExperienceGains(.01, .04, .04, .04, .04, .02);
CompanyPositions.PoliceOfficer.setExperienceGains(.02, .08, .08, .08, .08, .04);
CompanyPositions.PoliceChief.setPerformanceParameters(5, 20, 20, 20, 20, 15, 1.25);
CompanyPositions.PoliceChief.setExperienceGains(.02, .06, .06, .06, .06, .05);
CompanyPositions.PoliceChief.setExperienceGains(.02, .1, .1, .1, .1, .1);
CompanyPositions.SecurityOfficer.setPerformanceParameters(10, 20, 20, 20, 20, 10, 1.1);
CompanyPositions.SecurityOfficer.setExperienceGains(.02, .06, .06, .06, .06, .04);
CompanyPositions.SecurityOfficer.setExperienceGains(.02, .1, .1, .1, .1, .05);
CompanyPositions.SecuritySupervisor.setPerformanceParameters(10, 15, 15, 15, 15, 30, 1.25);
CompanyPositions.SecuritySupervisor.setExperienceGains(.02, .06, .06, .06, .06, .08);
CompanyPositions.SecuritySupervisor.setExperienceGains(.02, .12, .12, .12, .12, .1);
CompanyPositions.HeadOfSecurity.setPerformanceParameters(10, 15, 15, 15, 15, 30, 1.4);
CompanyPositions.HeadOfSecurity.setExperienceGains(.05, .1, .1, .1, .1, .1);
CompanyPositions.HeadOfSecurity.setExperienceGains(.05, .15, .15, .15, .15, .15);
CompanyPositions.FieldAgent.setPerformanceParameters(10, 15, 15, 20, 20, 20, 1);
CompanyPositions.FieldAgent.setExperienceGains(.04, .06, .06, .06, .06, .04);
CompanyPositions.FieldAgent.setExperienceGains(.04, .08, .08, .08, .08, .05);
CompanyPositions.SecretAgent.setPerformanceParameters(15, 15, 15, 20, 20, 15, 1.25);
CompanyPositions.SecretAgent.setExperienceGains(.08, .1, .1, .1, .1, .08);
CompanyPositions.SecretAgent.setExperienceGains(.1, .15, .15, .15, .15, .1);
CompanyPositions.SpecialOperative.setPerformanceParameters(15, 15, 15, 20, 20, 15, 1.5);
CompanyPositions.SpecialOperative.setExperienceGains(.12, .15, .15, .15, .15, .12);
CompanyPositions.SpecialOperative.setExperienceGains(.15, .2, .2, .2, .2, .15);
}
}

@ -1,5 +1,5 @@
CONSTANTS = {
Version: "0.26.3",
Version: "0.26.4",
//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
@ -11,7 +11,7 @@ CONSTANTS = {
/* Base costs */
BaseCostFor1GBOfRamHome: 30000,
BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM
BaseCostFor1GBOfRamServer: 50000, //1 GB of RAM
BaseCostFor1GBOfRamHacknetNode: 30000,
BaseCostForHacknetNode: 1000,
@ -20,9 +20,9 @@ CONSTANTS = {
/* Hacknet Node constants */
HacknetNodeMoneyGainPerLevel: 1.6,
HacknetNodePurchaseNextMult: 1.85, //Multiplier when purchasing an additional hacknet node
HacknetNodeUpgradeLevelMult: 1.05, //Multiplier for cost when upgrading level
HacknetNodeUpgradeRamMult: 1.29, //Multiplier for cost when upgrading RAM
HacknetNodeUpgradeCoreMult: 1.49, //Multiplier for cost when buying another core
HacknetNodeUpgradeLevelMult: 1.04, //Multiplier for cost when upgrading level
HacknetNodeUpgradeRamMult: 1.28, //Multiplier for cost when upgrading RAM
HacknetNodeUpgradeCoreMult: 1.48, //Multiplier for cost when buying another core
HacknetNodeMaxLevel: 200,
HacknetNodeMaxRam: 64,
@ -36,11 +36,6 @@ CONSTANTS = {
//NeuroFlux Governor cost multiplier as you level up
NeuroFluxGovernorLevelMult: 1.14,
/* Script related things */
//Time (ms) it takes to run one operation in Netscript.
CodeInstructionRunTime: 100,
//RAM Costs for different commands
ScriptWhileRamCost: 0.2,
ScriptForRamCost: 0.2,
@ -79,7 +74,7 @@ CONSTANTS = {
MultithreadingRAMCost: 1,
//Server constants
ServerBaseGrowthRate: 1.025, //Unadjusted Growth rate
ServerBaseGrowthRate: 1.03, //Unadjusted Growth rate
ServerMaxGrowthRate: 1.0035, //Maximum possible growth rate (max rate accounting for server security)
ServerFortifyAmount: 0.002, //Amount by which server's security increases when its hacked/grown
ServerWeakenAmount: 0.05, //Amount by which server's security decreases when weakened
@ -91,9 +86,6 @@ CONSTANTS = {
AugmentationRepMultiplier: 2.5, //Used for balancing rep cost without having to readjust every value
MultipleAugMultiplier: 1.9,
MaxLogCapacity: 50, //Maximum number of log entries for a script
MaxPortCapacity: 50, //Maximum amount of data in a Netscript port
//How much a TOR router costs
TorRouterCost: 200000,
@ -158,15 +150,17 @@ CONSTANTS = {
ClassGymDexterity: "training your dexterity at a gym",
ClassGymAgility: "training your agility at a gym",
ClassDataStructuresBaseCost: 30,
ClassNetworksBaseCost: 60,
ClassAlgorithmsBaseCost: 240,
ClassManagementBaseCost: 120,
ClassLeadershipBaseCost: 240,
ClassDataStructuresBaseCost: 40,
ClassNetworksBaseCost: 80,
ClassAlgorithmsBaseCost: 320,
ClassManagementBaseCost: 160,
ClassLeadershipBaseCost: 320,
ClassGymBaseCost: 120,
CrimeShoplift: "shoplift",
CrimeRobStore: "rob a store",
CrimeMug: "mug someone",
CrimeLarceny: "commit larceny",
CrimeDrugs: "deal drugs",
CrimeTraffickArms: "traffick illegal arms",
CrimeHomicide: "commit homicide",
@ -678,11 +672,21 @@ CONSTANTS = {
"World Stock Exchange account and TIX API Access<br>",
LatestUpdate:
"v0.26.4<br>" +
"-All of the 'low-level servers' in early game that have a required hacking level now have 8GB of RAM " +
"instead of 4GB<br>" +
"-Increased the amount of experience given at university<br>" +
"-Slightly increased the production of Hacknet Nodes and made them cheaper to upgrade<br>" +
"-Infiltration now gives slightly more EXP and faction reputation<br>" +
"-Added two new crimes. These crimes are viable to attempt early on in the game and are relatively passive (each take 60+ seconds to complete)<br>" +
"-Crimes give more exp and more money<br>" +
"-Max money available on a server decreased from 50x the server's starting money to 25x<br>" +
"-Significantly increased wages for all jobs<br><br>" +
"v0.26.3<br>" +
"-Added support for large numbers using Decimal.js. Right now it only applies for the player's money<br>" +
"-Purchasing servers with the Netscript function purchaseServer() is no longer 2x as expensive as doing manually, " +
"it now costs the same<br>" +
"-Early game servers have more starting money<br>" +
"-Early game servers have more starting money<br><br>" +
"v0.26.2<br>" +
"-Major rebalancing and randomization of the amount of money that servers start with<br>" +
"-Significantly lowered hacking exp gain from hacking servers. The exp gain for higher-level servers was lowered more than " +

@ -1,47 +1,57 @@
/* Crimes.js */
function commitShopliftCrime() {
Player.crimeType = CONSTANTS.CrimeShoplift;
Player.startCrime(0, 0, 0, 1.5, 1.5, 0, 10000, 2000); //$5000/s, .375 exp/s
Player.startCrime(0, 0, 0, 2, 2, 0, 15000, 2000); //$7500/s, 1 exp/s
}
function commitRobStoreCrime() {
Player.crimeType = CONSTANTS.CrimeRobStore;
Player.startCrime(30, 0, 0, 45, 45, 0, 400000, 60000); //$6666,6/2, 0.5exp/s, 0.75exp/s
}
function commitMugCrime() {
Player.crimeType = CONSTANTS.CrimeMug;
Player.startCrime(0, 1.5, 1.5, 1.5, 1.5, 0, 32000, 4000); //$8000/s, .375 exp/s
Player.startCrime(0, 3, 3, 3, 3, 0, 36000, 4000); //$9000/s, .66 exp/s
}
function commitLarcenyCrime() {
Player.crimeType = CONSTANTS.CrimeLarceny;
Player.startCrime(45, 0, 0, 60, 60, 0, 800000, 90000) // $8888.88/s, .5 exp/s, .66 exp/s
}
function commitDealDrugsCrime() {
Player.crimeType = CONSTANTS.CrimeDrugs;
Player.startCrime(0, 0, 0, 4, 4, 8, 100000, 10000); //$10000/s, .4 exp/s
Player.startCrime(0, 0, 0, 5, 5, 10, 120000, 10000); //$12000/s, .5 exp/s, 1 exp/s
}
function commitTraffickArmsCrime() {
Player.crimeType = CONSTANTS.CrimeTraffickArms;
Player.startCrime(0, 10, 10, 10, 10, 15, 480000, 40000); //$12000/s, .25 combat exp/s, .375 cha exp/s
Player.startCrime(0, 20, 20, 20, 20, 40, 600000, 40000); //$15000/s, .5 combat exp/s, 1 cha exp/s
}
function commitHomicideCrime() {
Player.crimeType = CONSTANTS.CrimeHomicide;
Player.startCrime(0, 2, 2, 2, 2, 0, 30000, 3000); //$10000/s, 0.66 combat exp/s
Player.startCrime(0, 2, 2, 2, 2, 0, 45000, 3000); //$15000/s, 0.66 combat exp/s
}
function commitGrandTheftAutoCrime() {
Player.crimeType = CONSTANTS.CrimeGrandTheftAuto;
Player.startCrime(0, 10, 10, 10, 40, 20, 1200000, 80000); //$15000/s, .125 exp/s, .5 exp/s, .25 exp/s
Player.startCrime(0, 20, 20, 20, 80, 40, 1600000, 80000); //$20000/s, .25 exp/s, 1 exp/s, .5 exp/s
}
function commitKidnapCrime() {
Player.crimeType = CONSTANTS.CrimeKidnap;
Player.startCrime(0, 30, 30, 30, 30, 30, 2400000, 120000); //$20000/s. .25 exp/s
Player.startCrime(0, 80, 80, 80, 80, 80, 3600000, 120000); //$30000/s. .66 exp/s
}
function commitAssassinationCrime() {
Player.crimeType = CONSTANTS.CrimeAssassination;
Player.startCrime(0, 75, 75, 75, 75, 0, 7500000, 300000); //$25000/s, .25 exp/s
Player.startCrime(0, 300, 300, 300, 300, 0, 12000000, 300000); //$40000/s, 1 exp/s
}
function commitHeistCrime() {
Player.crimeType = CONSTANTS.CrimeHeist;
Player.startCrime(120, 120, 120, 120, 120, 120, 75000000, 600000); //$125000/s, .2exp/s
Player.startCrime(450, 450, 450, 450, 450, 450, 120000000, 600000); //$200000/s, .75exp/s
}
function determineCrimeSuccess(crime, moneyGained) {
@ -50,9 +60,15 @@ function determineCrimeSuccess(crime, moneyGained) {
case CONSTANTS.CrimeShoplift:
chance = determineCrimeChanceShoplift();
break;
case CONSTANTS.CrimeRobStore:
chance = determineCrimeChanceRobStore();
break;
case CONSTANTS.CrimeMug:
chance = determineCrimeChanceMug();
break;
case CONSTANTS.CrimeLarceny:
chance = determineCrimeChanceLarceny();
break;
case CONSTANTS.CrimeDrugs:
chance = determineCrimeChanceDealDrugs();
break;
@ -75,6 +91,7 @@ function determineCrimeSuccess(crime, moneyGained) {
chance = determineCrimeChanceHeist();
break;
default:
console.log(crime);
dialogBoxCreate("ERR: Unrecognized crime type. This is probably a bug please contact the developer");
return;
}
@ -96,8 +113,16 @@ function determineCrimeChanceShoplift() {
return Math.min(chance, 1);
}
function determineCrimeChanceRobStore() {
var chance = ((0.5 * Player.hacking_skill / CONSTANTS.MaxSkillLevel +
2 * Player.dexterity / CONSTANTS.MaxSkillLevel +
1 * Player.agility / CONSTANTS.MaxSkillLevel)) * 5;
chance *= Player.crime_success_mult;
return Math.min(chance, 1);
}
function determineCrimeChanceMug() {
var chance = ((1.5 *Player.strength / CONSTANTS.MaxSkillLevel +
var chance = ((1.5 * Player.strength / CONSTANTS.MaxSkillLevel +
0.5 * Player.defense / CONSTANTS.MaxSkillLevel +
1.5 * Player.dexterity / CONSTANTS.MaxSkillLevel +
0.5 * Player.agility / CONSTANTS.MaxSkillLevel)) * 5;
@ -105,6 +130,14 @@ function determineCrimeChanceMug() {
return Math.min(chance, 1);
}
function determineCrimeChanceLarceny() {
var chance = ((0.5 * Player.hacking_skill / CONSTANTS.MaxSkillLevel +
Player.dexterity / CONSTANTS.MaxSkillLevel +
Player.agility / CONSTANTS.MaxSkillLevel)) * 3;
chance *= Player.crime_success_mult;
return Math.min(chance, 1);
}
function determineCrimeChanceDealDrugs() {
var chance = ((3*Player.charisma / CONSTANTS.MaxSkillLevel +
2*Player.dexterity / CONSTANTS.MaxSkillLevel +

@ -1,181 +1,186 @@
/* HelpText.js */
TerminalHelpText =
"Type 'help name' to learn more about the command 'name'<br><br>" +
'alias [-g] [name="value"] Create or display Terminal aliases<br>' +
"analyze Get information about the current machine <br>" +
"cat [message] Display a .msg file<br>" +
"check [script] [args...] Print a script's logs to Terminal<br>" +
TerminalHelpText =
"Type 'help name' to learn more about the command 'name'<br><br>" +
'alias [-g] [name="value"] Create or display Terminal aliases<br>' +
"analyze Get information about the current machine <br>" +
"cat [message] Display a .msg file<br>" +
"check [script] [args...] Print a script's logs to Terminal<br>" +
"clear Clear all text on the terminal <br>" +
"cls See 'clear' command <br>" +
"connect [ip/hostname] Connects to a remote server<br>" +
"free Check the machine's memory (RAM) usage<br>" +
"connect [ip/hostname] Connects to a remote server<br>" +
"free Check the machine's memory (RAM) usage<br>" +
"hack Hack the current machine<br>" +
"help [command] Display this help text, or the help text for a command<br>" +
"home Connect to home computer<br>" +
"hostname Displays the hostname of the machine<br>" +
"help [command] Display this help text, or the help text for a command<br>" +
"home Connect to home computer<br>" +
"hostname Displays the hostname of the machine<br>" +
"ifconfig Displays the IP address of the machine<br>" +
"kill [script] [args...] Stops the specified script on the current server <br>" +
"killall Stops all running scripts on the current machine<br>" +
"killall Stops all running scripts on the current machine<br>" +
"ls Displays all programs and scripts on the machine<br>" +
"mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>" +
"nano [script] Script editor - Open up and edit a script<br>" +
"ps Display all scripts that are currently running<br>" +
"rm [file] Delete a file from the server<br>" +
"run [name] [-t] [n] [args...] Execute a program or script<br>" +
"mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>" +
"nano [script] Script editor - Open up and edit a script<br>" +
"ps Display all scripts that are currently running<br>" +
"rm [file] Delete a file from the server<br>" +
"run [name] [-t] [n] [args...] Execute a program or script<br>" +
"scan Prints all immediately-available network connections<br>" +
"scan-analyze [d] Prints info for all servers up to <i>d</i> nodes away<br>" +
"scp [script] [server] Copies a script to a destination server<br>" +
"sudov Shows whether you have root access on this computer<br>" +
"scan-analyze [d] Prints info for all servers up to <i>d</i> nodes away<br>" +
"scp [script] [server] Copies a script to a destination server<br>" +
"sudov Shows whether you have root access on this computer<br>" +
"tail [script] [args...] Displays dynamic logs for the specified script<br>" +
"theme [preset] | bg txt hlgt Change the color scheme of the UI<br>" +
"top Displays all running scripts and their RAM usage<br>" +
"theme [preset] | bg txt hlgt Change the color scheme of the UI<br>" +
"top Displays all running scripts and their RAM usage<br>" +
'unalias "[alias name]" Deletes the specified alias<br>';
HelpTexts = {
alias: 'alias [-g] [name="value"] <br>' +
"Create or display aliases. An alias enables a replacement of a word with another string. " +
"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME " +
"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, " +
"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>" +
'alias nuke="run NUKE.exe"<br><br>' +
"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. " +
"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For " +
"example, if the following alias was set: <br><br>" +
'alias worm="HTTPWorm.exe"<br><br>' +
"and then you tried to run the following terminal command: <br><br>" +
alias: 'alias [-g] [name="value"] <br>' +
"Create or display aliases. An alias enables a replacement of a word with another string. " +
"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME " +
"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, " +
"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>" +
'alias nuke="run NUKE.exe"<br><br>' +
"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. " +
"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For " +
"example, if the following alias was set: <br><br>" +
'alias worm="HTTPWorm.exe"<br><br>' +
"and then you tried to run the following terminal command: <br><br>" +
"run worm<br><br>" +
"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted " +
"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>" +
'alias -g worm="HTTPWorm.exe"<br><br>' +
"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>" +
"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form " +
"'alias NAME=VALUE' on the Terminal. <br><br>" +
"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted " +
"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>" +
'alias -g worm="HTTPWorm.exe"<br><br>' +
"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>" +
"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form " +
"'alias NAME=VALUE' on the Terminal. <br><br>" +
"The 'unalias' command can be used to remove aliases.<br><br>",
cat: "cat [message]<br>" +
"Display message files, which are files ending with the '.msg' extension. Example:<br><br>" +
analyze: "analze<br>" +
"Prints details and statistics about the current server. The information that is printed includes basic " +
"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also " +
"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is " +
"available on the server, etc.",
cat: "cat [message]<br>" +
"Display message files, which are files ending with the '.msg' extension. Example:<br><br>" +
"cat j1.msg",
check: "check [script name] [args...]<br>" +
"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by " +
"a space. Remember that a running script is uniquely " +
"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>" +
"run foo.script 1 2 foodnstuff<br><br>" +
"Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>" +
check: "check [script name] [args...]<br>" +
"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by " +
"a space. Remember that a running script is uniquely " +
"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>" +
"run foo.script 1 2 foodnstuff<br><br>" +
"Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>" +
"check foo.script 1 2 foodnstuff",
clear: "clear<br>" +
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up " +
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",
cls: "cls<br>" +
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up " +
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",
connect: "connect [hostname/ip]<br>" +
"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument " +
"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To " +
clear: "clear<br>" +
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up " +
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",
cls: "cls<br>" +
"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up " +
"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",
connect: "connect [hostname/ip]<br>" +
"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument " +
"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To " +
"see which servers can be connected to, use the 'scan' command.",
free: "free<br>" +
"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as " +
"how much of it is being used.",
hack: "hack<br>" +
free: "free<br>" +
"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as " +
"how much of it is being used.",
hack: "hack<br>" +
"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics<br>",
help: "help [command]<br>" +
"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief " +
"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print " +
"more detailed information about the Terminal command. Examples: <br><br>" +
"help alias<br>" +
help: "help [command]<br>" +
"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief " +
"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print " +
"more detailed information about the Terminal command. Examples: <br><br>" +
"help alias<br>" +
"help scan-analyze",
home: "home<br>" +
home: "home<br>" +
"Connect to your home computer. This will work no matter what server you are currently connected to.",
hostname: "hostname<br>" +
hostname: "hostname<br>" +
"Prints the hostname of the current server",
ifconfig: "ipconfig<br>" +
ifconfig: "ipconfig<br>" +
"Prints the IP address of the current server",
kill: "kill [script name] [args...]<br>" +
"Kill the script specified by the script name and arguments. Each argument must be separated by " +
"a space. Remember that a running script is uniquely identified by " +
"both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:<br><br>" +
"run foo.script 1 sigma-cosmetics<br><br>" +
"Then to kill this script the same arguments would have to be used:<br><br>" +
"kill foo.script 1 sigma-cosmetics<br><br>" +
"Note that after issuing the 'kill' command for a script, it may take a while for the script to actually stop running. " +
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. " +
kill: "kill [script name] [args...]<br>" +
"Kill the script specified by the script name and arguments. Each argument must be separated by " +
"a space. Remember that a running script is uniquely identified by " +
"both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:<br><br>" +
"run foo.script 1 sigma-cosmetics<br><br>" +
"Then to kill this script the same arguments would have to be used:<br><br>" +
"kill foo.script 1 sigma-cosmetics<br><br>" +
"Note that after issuing the 'kill' command for a script, it may take a while for the script to actually stop running. " +
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. " +
"The script will not be stopped/killed until after that time has elapsed.",
killall: "killall<br>" +
"Kills all scripts on the current server. " +
"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. " +
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. " +
killall: "killall<br>" +
"Kills all scripts on the current server. " +
"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. " +
"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. " +
"The script will not be stopped/killed until after that time has elapsed.",
ls: "ls<br>" +
"Prints all files on the current server to the Terminal screen. This includes all scripts, programs, and message files. " +
ls: "ls<br>" +
"Prints all files on the current server to the Terminal screen. This includes all scripts, programs, and message files. " +
"The files will be displayed in alphabetical order.",
mem: "mem [script name] [-t] [num threads]<br>" +
"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print " +
"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then " +
"an argument for the number of threads must be passed in afterwards. Examples:<br><br>" +
"mem foo.script<br>" +
"mem foo.script -t 50<br>" +
"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example " +
mem: "mem [script name] [-t] [num threads]<br>" +
"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print " +
"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then " +
"an argument for the number of threads must be passed in afterwards. Examples:<br><br>" +
"mem foo.script<br>" +
"mem foo.script -t 50<br>" +
"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example " +
"above will print the amount of RAM needed to run 'foo.script' with 50 threads.",
nano: "nano [script name]<br>" +
"Opens up the specified script in the Script Editor. If the script does not already exist, then a new, empty script " +
nano: "nano [script name]<br>" +
"Opens up the specified script in the Script Editor. If the script does not already exist, then a new, empty script " +
"will be created",
ps: "ps<br>" +
ps: "ps<br>" +
"Prints all scripts that are running on the current server",
rm: "rm [file]<br>" +
"Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>" +
rm: "rm [file]<br>" +
"Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>" +
"WARNING: This is permanent and cannot be undone",
run: "run [file name] [-t] [num threads] [args...]<br>" +
"Execute a program or a script.<br><br>" +
"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used " +
"to indicate that the script should be run with the specified number of threads. If the flag is omitted, " +
"then the script will be run with a single thread by default. " +
run: "run [file name] [-t] [num threads] [args...]<br>" +
"Execute a program or a script.<br><br>" +
"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used " +
"to indicate that the script should be run with the specified number of threads. If the flag is omitted, " +
"then the script will be run with a single thread by default. " +
"If the '-t' flag is used, then it MUST come immediately " +
"after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>" +
"[args...] represents a variable number of arguments that will be passed into the script. See the documentation " +
"after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>" +
"[args...] represents a variable number of arguments that will be passed into the script. See the documentation " +
"about script arguments. Each specified argument must be separated by a space. <br><br>",
scan: "scan<br>" +
"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect " +
scan: "scan<br>" +
"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect " +
"to using the 'connect' Terminal command.",
"scan-analyze": "scan-analyze [depth]<br>" +
"Prints detailed information about all servers up to [depth] nodes away on the network. Calling " +
"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal " +
"command. This command also shows the relative paths to reach each server.<br><br>" +
"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have " +
"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to " +
"5 and 10, respectively.<br><br>" +
"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, " +
"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM " +
"scan-analyze": "scan-analyze [depth]<br>" +
"Prints detailed information about all servers up to [depth] nodes away on the network. Calling " +
"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal " +
"command. This command also shows the relative paths to reach each server.<br><br>" +
"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have " +
"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to " +
"5 and 10, respectively.<br><br>" +
"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, " +
"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM " +
"it has",
scp: "scp [script name] [target server]<br>" +
"Copies the specified script from the current server to the target server. " +
scp: "scp [script name] [target server]<br>" +
"Copies the specified script from the current server to the target server. " +
"The second argument passed in must be the hostname or IP of the target server.",
sudov: "sudov<br>" +
sudov: "sudov<br>" +
"Prints whether or not you have root access to the current machine",
tail: "tail [script name] [args...]<br>" +
"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated " +
"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used " +
"to run it. So, if a script was ran with the following arguments: <br><br>" +
"run foo.script 10 50000<br><br>" +
"Then in order to check its logs with 'tail' the same arguments must be used: <br><br>" +
tail: "tail [script name] [args...]<br>" +
"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated " +
"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used " +
"to run it. So, if a script was ran with the following arguments: <br><br>" +
"run foo.script 10 50000<br><br>" +
"Then in order to check its logs with 'tail' the same arguments must be used: <br><br>" +
"tail foo.script 10 50000",
theme: "theme [preset] | [#background #text #highlight]<br>" +
"Change the color of the game's user interface<br><br>" +
"This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. " +
"However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values " +
"for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and " +
"must be either 3 or 6 digits. Example:<br><br>" +
"theme #ffffff #385 #235012<br><br>" +
"A color picker such as " +
"<a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> " +
"can be used to get your desired hex color values<br><br>" +
"This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. " +
"However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values " +
"for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and " +
"must be either 3 or 6 digits. Example:<br><br>" +
"theme #ffffff #385 #235012<br><br>" +
"A color picker such as " +
"<a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> " +
"can be used to get your desired hex color values<br><br>" +
"Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",
top: "top<br>" +
"Prints a list of all scripts running on the current server as well as their thread count and how much " +
"Prints a list of all scripts running on the current server as well as their thread count and how much " +
"RAM they are using in total.",
unalias: 'unalias "[alias name]"<br>' +
"Deletes the specified alias. Note that the double quotation marks are required. <br><br>" +
"As an example, if an alias was declared using:<br><br>" +
'alias r="run"<br><br>' +
"Then it could be removed using:<br><br>" +
'unalias "r"<br><br>' +
unalias: 'unalias "[alias name]"<br>' +
"Deletes the specified alias. Note that the double quotation marks are required. <br><br>" +
"As an example, if an alias was declared using:<br><br>" +
'alias r="run"<br><br>' +
"Then it could be removed using:<br><br>" +
'unalias "r"<br><br>' +
"It is not necessary to differentiate between global and non-global aliases when using 'unalias'",
}
}

@ -397,7 +397,7 @@ function endInfiltrationLevel(inst) {
//Check if you gained any secrets
if (inst.clearanceLevel % 5 == 0) {
var baseSecretValue = inst.baseValue * inst.clearanceLevel / 2;
var secretValue = baseSecretValue * Player.faction_rep_mult * 1.2;
var secretValue = baseSecretValue * Player.faction_rep_mult * 1.25;
var secretMoneyValue = baseSecretValue * CONSTANTS.InfiltrationMoneyValue;
inst.secretsStolen.push(baseSecretValue);
dialogBoxCreate("You found and stole a set of classified documents from the company. " +
@ -574,10 +574,10 @@ function updateInfiltrationButtons(inst, scenario) {
//Success: 5%, Failure 10%, -Karma
function attemptInfiltrationKill(inst) {
var chance = getInfiltrationKillChance(inst);
inst.gainStrengthExp(inst.securityLevel / 750) * Player.strength_exp_mult;
inst.gainDefenseExp(inst.securityLevel / 750) * Player.defense_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 750) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 750) * Player.agility_exp_mult;
inst.gainStrengthExp(inst.securityLevel / 500) * Player.strength_exp_mult;
inst.gainDefenseExp(inst.securityLevel / 500) * Player.defense_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 500) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 500) * Player.agility_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.05;
return [true, 1.05];
@ -600,10 +600,10 @@ function getInfiltrationKillChance(inst) {
//Success: 3%, Failure: 10%
function attemptInfiltrationKnockout(inst) {
var chance = getInfiltrationKnockoutChance(inst);
inst.gainStrengthExp(inst.securityLevel / 750) * Player.strength_exp_mult;
inst.gainDefenseExp(inst.securityLevel / 750) * Player.defense_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 750) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 750) * Player.agility_exp_mult;
inst.gainStrengthExp(inst.securityLevel / 500) * Player.strength_exp_mult;
inst.gainDefenseExp(inst.securityLevel / 500) * Player.defense_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 500) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 500) * Player.agility_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.03;
return [true, 1.03];
@ -625,9 +625,9 @@ function getInfiltrationKnockoutChance(inst) {
//Success: 0%, Failure: 10%
function attemptInfiltrationStealthKnockout(inst) {
var chance = getInfiltrationStealthKnockoutChance(inst);
inst.gainStrengthExp(inst.securityLevel / 750) * Player.strength_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 500) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 500) * Player.agility_exp_mult;
inst.gainStrengthExp(inst.securityLevel / 500) * Player.strength_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 300) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 300) * Player.agility_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@ -648,9 +648,9 @@ function getInfiltrationStealthKnockoutChance(inst) {
//Success: 0%, Failure: 5%, -Karma
function attemptInfiltrationAssassinate(inst) {
var chance = getInfiltrationAssassinateChance(inst);
inst.gainStrengthExp(inst.securityLevel / 750) * Player.strength_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 500) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 500) * Player.agility_exp_mult;
inst.gainStrengthExp(inst.securityLevel / 500) * Player.strength_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 300) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 300) * Player.agility_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@ -671,10 +671,10 @@ function getInfiltrationAssassinateChance(inst) {
//Success: 5%, Failure: 10%
function attemptInfiltrationDestroySecurity(inst) {
var chance = getInfiltrationDestroySecurityChance(inst);
inst.gainStrengthExp(inst.securityLevel / 750) * Player.strength_exp_mult;
inst.gainDefenseExp(inst.securityLevel / 750) * Player.defense_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 750) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 750) * Player.agility_exp_mult;
inst.gainStrengthExp(inst.securityLevel / 500) * Player.strength_exp_mult;
inst.gainDefenseExp(inst.securityLevel / 500) * Player.defense_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 500) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 500) * Player.agility_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.05;
return [true, 1.05];
@ -698,7 +698,7 @@ function getInfiltrationDestroySecurityChance(inst) {
//Success: 1%, Failure: 5%
function attemptInfiltrationHack(inst) {
var chance = getInfiltrationHackChance(inst);
inst.gainHackingExp(inst.securityLevel / 250) * Player.hacking_exp_mult;
inst.gainHackingExp(inst.securityLevel / 200) * Player.hacking_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.03;
return [true, 1.03];
@ -719,7 +719,7 @@ function getInfiltrationHackChance(inst) {
//Success: 0%, Failure: 8%
function attemptInfiltrationSneak(inst) {
var chance = getInfiltrationSneakChance(inst);
inst.gainAgilityExp(inst.securityLevel / 250) * Player.agility_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 200) * Player.agility_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@ -739,7 +739,7 @@ function getInfiltrationSneakChance(inst) {
//Success: 1%, Failure: 3%
function attemptInfiltrationPickLockedDoor(inst) {
var chance = getInfiltrationPickLockedDoorChance(inst);
inst.gainDexterityExp(inst.securityLevel / 250) * Player.dexterity_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 200) * Player.dexterity_exp_mult;
if (Math.random() <= chance) {
inst.securityLevel *= 1.01;
return [true, 1.01];
@ -759,7 +759,7 @@ function getInfiltrationPickLockedDoorChance(inst) {
//Success: 0%, Failure: 15%,
function attemptInfiltrationBribe(inst) {
var chance = getInfiltrationBribeChance(inst);
inst.gainCharismaExp(inst.securityLevel / 250) * Player.charisma_exp_mult;
inst.gainCharismaExp(inst.securityLevel / 200) * Player.charisma_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {
@ -778,8 +778,8 @@ function getInfiltrationBribeChance(inst) {
//Failure: 5%
function attemptInfiltrationEscape(inst) {
var chance = getInfiltrationEscapeChance(inst);
inst.gainAgilityExp(inst.securityLevel / 500) * Player.agility_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 500) * Player.dexterity_exp_mult;
inst.gainAgilityExp(inst.securityLevel / 400) * Player.agility_exp_mult;
inst.gainDexterityExp(inst.securityLevel / 400) * Player.dexterity_exp_mult;
if (Math.random() <= chance) {
return [true, 1];
} else {

@ -159,7 +159,9 @@ displayLocationContent = function() {
var slumsDescText = document.getElementById("location-slums-description");
var slumsShoplift = document.getElementById("location-slums-shoplift");
var slumsRobStore = document.getElementById("location-slums-rob-store");
var slumsMug = document.getElementById("location-slums-mug");
var slumsLarceny = document.getElementById("location-slums-larceny");
var slumsDealDrugs = document.getElementById("location-slums-deal-drugs");
var slumsTrafficArms = document.getElementById("location-slums-traffic-arms");
var slumsHomicide = document.getElementById("location-slums-homicide");
@ -260,7 +262,9 @@ displayLocationContent = function() {
slumsDescText.style.display = "none";
slumsShoplift.style.display = "none";
slumsRobStore.style.display = "none";
slumsMug.style.display = "none";
slumsLarceny.style.display = "none";
slumsDealDrugs.style.display = "none";
slumsTrafficArms.style.display = "none";
slumsHomicide.style.display = "none";
@ -976,7 +980,9 @@ displayLocationContent = function() {
case Locations.IshimaSlums:
case Locations.VolhavenSlums:
var shopliftChance = determineCrimeChanceShoplift();
var robStoreChance = determineCrimeChanceRobStore();
var mugChance = determineCrimeChanceMug();
var larcenyChance = determineCrimeChanceLarceny();
var drugsChance = determineCrimeChanceDealDrugs();
var armsChance = determineCrimeChanceTraffickArms();
var homicideChance = determineCrimeChanceHomicide();
@ -989,9 +995,15 @@ displayLocationContent = function() {
slumsShoplift.style.display = "block";
slumsShoplift.innerHTML = "Shoplift (" + (shopliftChance*100).toFixed(3) + "% chance of success)";
slumsShoplift.innerHTML += '<span class="tooltiptext"> Attempt to shoplift from a low-end retailer </span>';
slumsRobStore.style.display = "block";
slumsRobStore.innerHTML = "Rob store(" + (robStoreChance*100).toFixed(3) + "% chance of success)";
slumsRobStore.innerHTML += '<span class="tooltiptext">Attempt to commit armed robbery on a high-end store </span>';
slumsMug.style.display = "block";
slumsMug.innerHTML = "Mug someone (" + (mugChance*100).toFixed(3) + "% chance of success)";
slumsMug.innerHTML += '<span class="tooltiptext"> Attempt to mug a random person on the street </span>';
slumsLarceny.style.display = "block";
slumsLarceny.innerHTML = "Larceny (" + (larcenyChance*100).toFixed(3) + "% chance of success)";
slumsLarceny.innerHTML +="<span class='tooltiptext'> Attempt to rob property from someone's house </span>";
slumsDealDrugs.style.display = "block";
slumsDealDrugs.innerHTML = "Deal Drugs (" + (drugsChance*100).toFixed(3) + "% chance of success)";
slumsDealDrugs.innerHTML += '<span class="tooltiptext"> Attempt to deal drugs </span>';
@ -1540,7 +1552,9 @@ initLocationButtons = function() {
var travelToVolhaven = document.getElementById("location-travel-to-volhaven");
var slumsShoplift = document.getElementById("location-slums-shoplift");
var slumsRobStore = document.getElementById("location-slums-rob-store");
var slumsMug = document.getElementById("location-slums-mug");
var slumsLarceny = document.getElementById("location-slums-larceny");
var slumsDealDrugs = document.getElementById("location-slums-deal-drugs");
var slumsTrafficArms = document.getElementById("location-slums-traffic-arms");
var slumsHomicide = document.getElementById("location-slums-homicide");
@ -1711,11 +1725,21 @@ initLocationButtons = function() {
return false;
});
slumsRobStore.addEventListener("click", function() {
commitRobStoreCrime();
return false;
});
slumsMug.addEventListener("click", function() {
commitMugCrime();
return false;
});
slumsLarceny.addEventListener("click", function() {
commitLarcenyCrime();
return false;
});
slumsDealDrugs.addEventListener("click", function() {
commitDealDrugsCrime();
return false;

@ -181,8 +181,8 @@ function NetscriptFunctions(workerScript) {
}
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
workerScript.scriptRef.log("Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call nuke(). Invalid IP or hostname passed in: " + ip);
}
if (!Player.hasProgram(Programs.NukeProgram)) {
throw makeRuntimeRejectMsg(workerScript, "You do not have the NUKE.exe virus!");
@ -204,8 +204,8 @@ function NetscriptFunctions(workerScript) {
}
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
workerScript.scriptRef.log("Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call brutessh(). Invalid IP or hostname passed in: " + ip);
}
if (!Player.hasProgram(Programs.BruteSSHProgram)) {
throw makeRuntimeRejectMsg(workerScript, "You do not have the BruteSSH.exe program!");
@ -225,8 +225,8 @@ function NetscriptFunctions(workerScript) {
}
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
workerScript.scriptRef.log("Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call ftpcrack(). Invalid IP or hostname passed in: " + ip);
}
if (!Player.hasProgram(Programs.FTPCrackProgram)) {
throw makeRuntimeRejectMsg(workerScript, "You do not have the FTPCrack.exe program!");
@ -246,8 +246,8 @@ function NetscriptFunctions(workerScript) {
}
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
workerScript.scriptRef.log("Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call relaysmtp(). Invalid IP or hostname passed in: " + ip);
}
if (!Player.hasProgram(Programs.RelaySMTPProgram)) {
throw makeRuntimeRejectMsg(workerScript, "You do not have the relaySMTP.exe program!");
@ -267,8 +267,8 @@ function NetscriptFunctions(workerScript) {
}
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
workerScript.scriptRef.log("Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call httpworm(). Invalid IP or hostname passed in: " + ip);
}
if (!Player.hasProgram(Programs.HTTPWormProgram)) {
throw makeRuntimeRejectMsg(workerScript, "You do not have the HTTPWorm.exe program!");
@ -288,8 +288,8 @@ function NetscriptFunctions(workerScript) {
}
var server = getServer(ip);
if (server == null) {
workerScript.scriptRef.log("Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call " + programName + ". Invalid IP or hostname passed in: " + ip);
workerScript.scriptRef.log("Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
throw makeRuntimeRejectMsg(workerScript, "Cannot call sqlinject(). Invalid IP or hostname passed in: " + ip);
}
if (!Player.hasProgram(Programs.SQLInjectProgram)) {
throw makeRuntimeRejectMsg(workerScript, "You do not have the SQLInject.exe program!");

@ -939,12 +939,12 @@ PlayerObject.prototype.startClass = function(costMult, expMult, className) {
var gameCPS = 1000 / Engine._idleSpeed;
//Base exp gains per second
var baseStudyComputerScienceExp = 0.25;
var baseDataStructuresExp = 0.5;
var baseNetworksExp = 1;
var baseAlgorithmsExp = 2;
var baseManagementExp = 1;
var baseLeadershipExp = 2;
var baseStudyComputerScienceExp = 0.5;
var baseDataStructuresExp = 1;
var baseNetworksExp = 2;
var baseAlgorithmsExp = 4;
var baseManagementExp = 2;
var baseLeadershipExp = 4;
var baseGymExp = 1;
//Find cost and exp gain per game cycle
@ -1135,11 +1135,16 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
case CONSTANTS.CrimeShoplift:
this.karma -= 0.1;
++this.numTimesShoplifted;
break;
case CONSTANTS.CrimeRobStore:
break;
case CONSTANTS.CrimeMug:
this.karma -= 0.25;
++this.numPeopleMugged;
break;
case CONSTANTS.CrimeLarceny:
break;
case CONSTANTS.CrimeDrugs:
++this.numTimesDealtDrugs;
this.karma -= 0.5;
@ -1169,6 +1174,7 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
this.karma -= 15;
break;
default:
console.log(this.crimeType);
dialogBoxCreate("ERR: Unrecognized crime type. This is probably a bug please contact the developer");
return;
}

@ -84,7 +84,7 @@ Server.prototype.setHackingParameters = function(requiredHackingSkill, moneyAvai
} else {
this.moneyAvailable = moneyAvailable;
}
this.moneyMax = 50 * moneyAvailable;
this.moneyMax = 25 * moneyAvailable;
this.hackDifficulty = hackDifficulty;
this.baseDifficulty = hackDifficulty;
this.minDifficulty = Math.max(1, Math.round(hackDifficulty / 3));
@ -421,19 +421,19 @@ initForeignServers = function() {
//"Low level" targets
var FoodNStuffServer = new Server();
FoodNStuffServer.init(createRandomIp(), "foodnstuff", "Food N Stuff Supermarket", true, false, false, false, 4);
FoodNStuffServer.init(createRandomIp(), "foodnstuff", "Food N Stuff Supermarket", true, false, false, false, 8);
FoodNStuffServer.setHackingParameters(1, 2000000, 10, 5);
FoodNStuffServer.setPortProperties(0);
AddToAllServers(FoodNStuffServer);
var SigmaCosmeticsServer = new Server();
SigmaCosmeticsServer.init(createRandomIp(), "sigma-cosmetics", "Sigma Cosmetics", true, false, false, false, 4);
SigmaCosmeticsServer.init(createRandomIp(), "sigma-cosmetics", "Sigma Cosmetics", true, false, false, false, 8);
SigmaCosmeticsServer.setHackingParameters(5, 2300000, 10, 10);
SigmaCosmeticsServer.setPortProperties(0);
AddToAllServers(SigmaCosmeticsServer);
var JoesGunsServer = new Server();
JoesGunsServer.init(createRandomIp(), "joesguns", "Joe's Guns", true, false, false, false, 4);
JoesGunsServer.init(createRandomIp(), "joesguns", "Joe's Guns", true, false, false, false, 8);
JoesGunsServer.setHackingParameters(10, 2500000, 15, 20);
JoesGunsServer.setPortProperties(0);
AddToAllServers(JoesGunsServer);
@ -445,7 +445,7 @@ initForeignServers = function() {
AddToAllServers(Zer0NightclubServer);
var NectarNightclubServer = new Server();
NectarNightclubServer.init(createRandomIp(), "nectar-net", "Nectar Nightclub Network", true, false, false, false, 4);
NectarNightclubServer.init(createRandomIp(), "nectar-net", "Nectar Nightclub Network", true, false, false, false, 8);
NectarNightclubServer.setHackingParameters(20, 2750000, 20, 25);
NectarNightclubServer.setPortProperties(0);
AddToAllServers(NectarNightclubServer);
@ -463,13 +463,13 @@ initForeignServers = function() {
AddToAllServers(SilverHelixServer);
var HongFangTeaHouseServer = new Server();
HongFangTeaHouseServer.init(createRandomIp(), "hong-fang-tea", "HongFang Teahouse", true, false, false, false, 4);
HongFangTeaHouseServer.init(createRandomIp(), "hong-fang-tea", "HongFang Teahouse", true, false, false, false, 8);
HongFangTeaHouseServer.setHackingParameters(30, 3000000, 15, 20);
HongFangTeaHouseServer.setPortProperties(0);
AddToAllServers(HongFangTeaHouseServer);
var HaraKiriSushiBarServer = new Server();
HaraKiriSushiBarServer.init(createRandomIp(), "harakiri-sushi", "HaraKiri Sushi Bar Network", true, false, false, false, 4);
HaraKiriSushiBarServer.init(createRandomIp(), "harakiri-sushi", "HaraKiri Sushi Bar Network", true, false, false, false, 8);
HaraKiriSushiBarServer.setHackingParameters(40, 4000000, 15, 40);
HaraKiriSushiBarServer.setPortProperties(0);
AddToAllServers(HaraKiriSushiBarServer);