diff --git a/index.html b/index.html index fd161dc78..426989337 100644 --- a/index.html +++ b/index.html @@ -732,7 +732,9 @@ successful. Your chance at successfully committing a crime is determined by your stats.

Shoplift + Rob a store Mug someone + Commit Larceny Deal Drugs Traffick Illegal Arms Homicide diff --git a/src/Company.js b/src/Company.js index d927a5a38..86ff4a955 100644 --- a/src/Company.js +++ b/src/Company.js @@ -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); } } diff --git a/src/Constants.js b/src/Constants.js index 54a613047..905965160 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -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
", LatestUpdate: + "v0.26.4
" + + "-All of the 'low-level servers' in early game that have a required hacking level now have 8GB of RAM " + + "instead of 4GB
" + + "-Increased the amount of experience given at university
" + + "-Slightly increased the production of Hacknet Nodes and made them cheaper to upgrade
" + + "-Infiltration now gives slightly more EXP and faction reputation
" + + "-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)
" + + "-Crimes give more exp and more money
" + + "-Max money available on a server decreased from 50x the server's starting money to 25x
" + + "-Significantly increased wages for all jobs

" + "v0.26.3
" + "-Added support for large numbers using Decimal.js. Right now it only applies for the player's money
" + "-Purchasing servers with the Netscript function purchaseServer() is no longer 2x as expensive as doing manually, " + "it now costs the same
" + - "-Early game servers have more starting money
" + + "-Early game servers have more starting money

" + "v0.26.2
" + "-Major rebalancing and randomization of the amount of money that servers start with
" + "-Significantly lowered hacking exp gain from hacking servers. The exp gain for higher-level servers was lowered more than " + diff --git a/src/Crimes.js b/src/Crimes.js index 469a30148..78a4faf7e 100644 --- a/src/Crimes.js +++ b/src/Crimes.js @@ -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 + diff --git a/src/HelpText.js b/src/HelpText.js index 9ccc8b506..4b2658141 100644 --- a/src/HelpText.js +++ b/src/HelpText.js @@ -1,181 +1,186 @@ /* HelpText.js */ -TerminalHelpText = - "Type 'help name' to learn more about the command 'name'

" + - 'alias [-g] [name="value"] Create or display Terminal aliases
' + - "analyze Get information about the current machine
" + - "cat [message] Display a .msg file
" + - "check [script] [args...] Print a script's logs to Terminal
" + +TerminalHelpText = + "Type 'help name' to learn more about the command 'name'

" + + 'alias [-g] [name="value"] Create or display Terminal aliases
' + + "analyze Get information about the current machine
" + + "cat [message] Display a .msg file
" + + "check [script] [args...] Print a script's logs to Terminal
" + "clear Clear all text on the terminal
" + "cls See 'clear' command
" + - "connect [ip/hostname] Connects to a remote server
" + - "free Check the machine's memory (RAM) usage
" + + "connect [ip/hostname] Connects to a remote server
" + + "free Check the machine's memory (RAM) usage
" + "hack Hack the current machine
" + - "help [command] Display this help text, or the help text for a command
" + - "home Connect to home computer
" + - "hostname Displays the hostname of the machine
" + + "help [command] Display this help text, or the help text for a command
" + + "home Connect to home computer
" + + "hostname Displays the hostname of the machine
" + "ifconfig Displays the IP address of the machine
" + "kill [script] [args...] Stops the specified script on the current server
" + - "killall Stops all running scripts on the current machine
" + + "killall Stops all running scripts on the current machine
" + "ls Displays all programs and scripts on the machine
" + - "mem [script] [-t] [n] Displays the amount of RAM required to run the script
" + - "nano [script] Script editor - Open up and edit a script
" + - "ps Display all scripts that are currently running
" + - "rm [file] Delete a file from the server
" + - "run [name] [-t] [n] [args...] Execute a program or script
" + + "mem [script] [-t] [n] Displays the amount of RAM required to run the script
" + + "nano [script] Script editor - Open up and edit a script
" + + "ps Display all scripts that are currently running
" + + "rm [file] Delete a file from the server
" + + "run [name] [-t] [n] [args...] Execute a program or script
" + "scan Prints all immediately-available network connections
" + - "scan-analyze [d] Prints info for all servers up to d nodes away
" + - "scp [script] [server] Copies a script to a destination server
" + - "sudov Shows whether you have root access on this computer
" + + "scan-analyze [d] Prints info for all servers up to d nodes away
" + + "scp [script] [server] Copies a script to a destination server
" + + "sudov Shows whether you have root access on this computer
" + "tail [script] [args...] Displays dynamic logs for the specified script
" + - "theme [preset] | bg txt hlgt Change the color scheme of the UI
" + - "top Displays all running scripts and their RAM usage
" + + "theme [preset] | bg txt hlgt Change the color scheme of the UI
" + + "top Displays all running scripts and their RAM usage
" + 'unalias "[alias name]" Deletes the specified alias
'; - + HelpTexts = { - alias: 'alias [-g] [name="value"]
' + - "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:

" + - 'alias nuke="run NUKE.exe"

' + - "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:

" + - 'alias worm="HTTPWorm.exe"

' + - "and then you tried to run the following terminal command:

" + + alias: 'alias [-g] [name="value"]
' + + "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:

" + + 'alias nuke="run NUKE.exe"

' + + "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:

" + + 'alias worm="HTTPWorm.exe"

' + + "and then you tried to run the following terminal command:

" + "run worm

" + - "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:

" + - 'alias -g worm="HTTPWorm.exe"

' + - "Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command.

" + - "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.

" + + "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:

" + + 'alias -g worm="HTTPWorm.exe"

' + + "Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command.

" + + "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.

" + "The 'unalias' command can be used to remove aliases.

", - cat: "cat [message]
" + - "Display message files, which are files ending with the '.msg' extension. Example:

" + + analyze: "analze
" + + "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]
" + + "Display message files, which are files ending with the '.msg' extension. Example:

" + "cat j1.msg", - check: "check [script name] [args...]
" + - "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:

" + - "run foo.script 1 2 foodnstuff

" + - "Then to run the 'check' command on this script you would have to pass the same arguments in:

" + + check: "check [script name] [args...]
" + + "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:

" + + "run foo.script 1 2 foodnstuff

" + + "Then to run the 'check' command on this script you would have to pass the same arguments in:

" + "check foo.script 1 2 foodnstuff", - clear: "clear
" + - "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
" + - "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]
" + - "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
" + + "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
" + + "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]
" + + "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
" + - "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
" + + free: "free
" + + "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
" + "Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics
", - help: "help [command]
" + - "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:

" + - "help alias
" + + help: "help [command]
" + + "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:

" + + "help alias
" + "help scan-analyze", - home: "home
" + + home: "home
" + "Connect to your home computer. This will work no matter what server you are currently connected to.", - hostname: "hostname
" + + hostname: "hostname
" + "Prints the hostname of the current server", - ifconfig: "ipconfig
" + + ifconfig: "ipconfig
" + "Prints the IP address of the current server", - kill: "kill [script name] [args...]
" + - "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:

" + - "run foo.script 1 sigma-cosmetics

" + - "Then to kill this script the same arguments would have to be used:

" + - "kill foo.script 1 sigma-cosmetics

" + - "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...]
" + + "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:

" + + "run foo.script 1 sigma-cosmetics

" + + "Then to kill this script the same arguments would have to be used:

" + + "kill foo.script 1 sigma-cosmetics

" + + "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
" + - "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
" + + "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
" + - "Prints all files on the current server to the Terminal screen. This includes all scripts, programs, and message files. " + + ls: "ls
" + + "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]
" + - "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:

" + - "mem foo.script
" + - "mem foo.script -t 50
" + - "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]
" + + "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:

" + + "mem foo.script
" + + "mem foo.script -t 50
" + + "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]
" + - "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]
" + + "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
" + + ps: "ps
" + "Prints all scripts that are running on the current server", - rm: "rm [file]
" + - "Removes the specified file from the current server. A file can be a script, a program, or a message file.

" + + rm: "rm [file]
" + + "Removes the specified file from the current server. A file can be a script, a program, or a message file.

" + "WARNING: This is permanent and cannot be undone", - run: "run [file name] [-t] [num threads] [args...]
" + - "Execute a program or a script.

" + - "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...]
" + + "Execute a program or a script.

" + + "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.

" + - "[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.

" + + "[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.

", - scan: "scan
" + - "Prints all immediately-available network connection. This will print a list of all servers that you can currently connect " + + scan: "scan
" + + "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]
" + - "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.

" + - "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.

" + - "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]
" + + "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.

" + + "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.

" + + "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]
" + - "Copies the specified script from the current server to the target server. " + + scp: "scp [script name] [target server]
" + + "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
" + + sudov: "sudov
" + "Prints whether or not you have root access to the current machine", - tail: "tail [script name] [args...]
" + - "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:

" + - "run foo.script 10 50000

" + - "Then in order to check its logs with 'tail' the same arguments must be used:

" + + tail: "tail [script name] [args...]
" + + "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:

" + + "run foo.script 10 50000

" + + "Then in order to check its logs with 'tail' the same arguments must be used:

" + "tail foo.script 10 50000", theme: "theme [preset] | [#background #text #highlight]
" + "Change the color of the game's user interface

" + - "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:

" + - "theme #ffffff #385 #235012

" + - "A color picker such as " + - "Google's " + - "can be used to get your desired hex color values

" + + "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:

" + + "theme #ffffff #385 #235012

" + + "A color picker such as " + + "Google's " + + "can be used to get your desired hex color values

" + "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
" + - "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]"
' + - "Deletes the specified alias. Note that the double quotation marks are required.

" + - "As an example, if an alias was declared using:

" + - 'alias r="run"

' + - "Then it could be removed using:

" + - 'unalias "r"

' + + unalias: 'unalias "[alias name]"
' + + "Deletes the specified alias. Note that the double quotation marks are required.

" + + "As an example, if an alias was declared using:

" + + 'alias r="run"

' + + "Then it could be removed using:

" + + 'unalias "r"

' + "It is not necessary to differentiate between global and non-global aliases when using 'unalias'", - -} \ No newline at end of file + +} diff --git a/src/Infiltration.js b/src/Infiltration.js index 058a145de..ee463e167 100644 --- a/src/Infiltration.js +++ b/src/Infiltration.js @@ -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 { diff --git a/src/Location.js b/src/Location.js index c936e29e9..38cf97873 100644 --- a/src/Location.js +++ b/src/Location.js @@ -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 += ' Attempt to shoplift from a low-end retailer '; + slumsRobStore.style.display = "block"; + slumsRobStore.innerHTML = "Rob store(" + (robStoreChance*100).toFixed(3) + "% chance of success)"; + slumsRobStore.innerHTML += 'Attempt to commit armed robbery on a high-end store '; slumsMug.style.display = "block"; slumsMug.innerHTML = "Mug someone (" + (mugChance*100).toFixed(3) + "% chance of success)"; slumsMug.innerHTML += ' Attempt to mug a random person on the street '; + slumsLarceny.style.display = "block"; + slumsLarceny.innerHTML = "Larceny (" + (larcenyChance*100).toFixed(3) + "% chance of success)"; + slumsLarceny.innerHTML +=" Attempt to rob property from someone's house "; slumsDealDrugs.style.display = "block"; slumsDealDrugs.innerHTML = "Deal Drugs (" + (drugsChance*100).toFixed(3) + "% chance of success)"; slumsDealDrugs.innerHTML += ' Attempt to deal drugs '; @@ -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; diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index ed7bbecd0..ee2ebf60d 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -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!"); diff --git a/src/Player.js b/src/Player.js index f7613cba4..6a9e63236 100644 --- a/src/Player.js +++ b/src/Player.js @@ -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; } diff --git a/src/Server.js b/src/Server.js index f3598ad12..b91be3a8e 100644 --- a/src/Server.js +++ b/src/Server.js @@ -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);