From dbdb089887428dbcb1d9e85eece778d79208cc8b Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Sun, 23 Apr 2017 20:43:41 -0500 Subject: [PATCH] Playtesting - Rebalancing, bugfixes, improved UI --- css/menupages.css | 37 +++++++++++++++++++-------- css/styles.css | 1 + index.html | 19 ++++++++------ src/Augmentations.js | 2 +- src/Company.js | 48 ++++++++++++++++++------------------ src/CompanyJobApplication.js | 12 ++++----- src/Constants.js | 3 +++ src/CreateProgram.js | 8 +++--- src/Location.js | 14 +++++------ src/Player.js | 6 ++--- src/Server.js | 6 ++--- src/engine.js | 17 +++++++++++-- 12 files changed, 105 insertions(+), 68 deletions(-) diff --git a/css/menupages.css b/css/menupages.css index c603a3cca..2ad8e9c20 100644 --- a/css/menupages.css +++ b/css/menupages.css @@ -24,6 +24,7 @@ padding-left: 10px; height: 100%; margin-left: 10%; + width: 75%; color: #66ff33; } @@ -31,17 +32,25 @@ float: left; } + #script-editor-filename { float: left; resize: none; color: #66ff33; width: 100%; + margin: 4px; + padding: 4px; - border: none; - outline: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + border: 2px solid white; + -webkit-box-shadow: + inset 0 0 8px rgba(0,0,0,0.1), + 0 0 16px rgba(0,0,0,0.1); + -moz-box-shadow: + inset 0 0 8px rgba(0,0,0,0.1), + 0 0 16px rgba(0,0,0,0.1); + box-shadow: + inset 0 0 8px rgba(0,0,0,0.1), + 0 0 16px rgba(0,0,0,0.1); } #script-editor-status { @@ -51,13 +60,21 @@ #script-editor-text { color: #66ff33; - width: 90%; + width: 100%; height: 100%; + margin: 4px; + padding: 4px; - outline: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + border: 2px solid white; + -webkit-box-shadow: + inset 0 0 8px rgba(0,0,0,0.1), + 0 0 16px rgba(0,0,0,0.1); + -moz-box-shadow: + inset 0 0 8px rgba(0,0,0,0.1), + 0 0 16px rgba(0,0,0,0.1); + box-shadow: + inset 0 0 8px rgba(0,0,0,0.1), + 0 0 16px rgba(0,0,0,0.1); } /* Active scripts */ diff --git a/css/styles.css b/css/styles.css index 2ef8cfaee..b30d7b145 100644 --- a/css/styles.css +++ b/css/styles.css @@ -29,6 +29,7 @@ li { list-style-type: none; } + /* Main menu */ .mainmenu { list-style-type: none; diff --git a/index.html b/index.html index f93591e8c..e9201234c 100644 --- a/index.html +++ b/index.html @@ -120,12 +120,15 @@
+

Script name:

+ +



- +
@@ -455,17 +458,17 @@ Train Agility - Purchase 1GB Server - $100,000 - Purchase 2GB Server - $250,000 - Purchase 4GB Server - $600,000 - Purchase 8GB Server - $1,500,000 + Purchase 1GB Server - $50,000 + Purchase 2GB Server - $100,000 + Purchase 4GB Server - $250,000 + Purchase 8GB Server - $1,000,000 Purchase 16GB Server - $4,000,000 - Purchase 32GB Server - $9,000,000 + Purchase 32GB Server - $10,000,000 Purchase 64GB Server - $20,000,000 - Purchase 128GB Server - $45,000,000 + Purchase 128GB Server - $50,000,000 Purchase 256GB Server - $100,000,000 Purchase 512GB Server - $250,000,000 - Purchase 1TB Server - $600,000,000 + Purchase 1TB Server - $750,000,000 Purchase TOR Router - $2,000,000 diff --git a/src/Augmentations.js b/src/Augmentations.js index c67a08c0d..52d805fb3 100644 --- a/src/Augmentations.js +++ b/src/Augmentations.js @@ -451,7 +451,7 @@ initAugmentations = function() { //Misc augmentations var Neurotrainer1 = new Augmentation("Neurotrainer I"); - Neurotrainer1.setRequirements(50000, 20000000); + Neurotrainer1.setRequirements(40000, 10000000); Neurotrainer1.setInfo("A decentralized cranial implant that improves the brain's ability to learn. It is\n" + "installed by releasing millions of nanobots into the human brain, each of which\n" + "attaches to a different neural pathway to enhance the brain's ability to retain\n" + diff --git a/src/Company.js b/src/Company.js index d02feb94d..268f9af2c 100644 --- a/src/Company.js +++ b/src/Company.js @@ -203,40 +203,40 @@ CompanyPositions = { //Constructor: CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqCha, reqRep, salary) //Software - SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 1, 1, 1, 1, 1, 0, 1), - JuniorDev: new CompanyPosition("Junior Software Engineer", 50, 1, 1, 1, 1, 1, 9000, 5), - SeniorDev: new CompanyPosition("Senior Software Engineer", 250, 1, 1, 1, 1, 50, 36000, 12), - LeadDev: new CompanyPosition("Lead Software Developer", 400, 1, 1, 1, 1, 100, 72000, 15), + SoftwareIntern: new CompanyPosition("Software Engineering Intern", 1, 0, 0, 0, 0, 0, 0, 1), + JuniorDev: new CompanyPosition("Junior Software Engineer", 50, 0, 0, 0, 0, 25, 9000, 5), + SeniorDev: new CompanyPosition("Senior Software Engineer", 250, 0, 0, 0, 0, 75, 36000, 12), + LeadDev: new CompanyPosition("Lead Software Developer", 400, 0, 0, 0, 0, 150, 72000, 15), //IT - ITIntern: new CompanyPosition("IT Intern", 1, 1, 1, 1, 1, 1, 0, .8), - ITAnalyst: new CompanyPosition("IT Analyst", 25, 1, 1, 1, 1, 1, 9000, 2), - ITManager: new CompanyPosition("IT Manager", 150, 1, 1, 1, 1, 50, 36000, 8), - SysAdmin: new CompanyPosition("Systems Administrator", 250, 1, 1, 1, 1, 75, 72000, 13), - SecurityEngineer: new CompanyPosition("Security Engineer", 150, 1, 1, 1, 1, 25, 36000, 10), - NetworkEngineer: new CompanyPosition("Network Engineer", 150, 1, 1, 1, 1, 25, 36000, 10), - NetworkAdministrator: new CompanyPosition("Network Administrator", 250, 1, 1, 1, 1, 75, 72000, 12), + ITIntern: new CompanyPosition("IT Intern", 1, 0, 0, 0, 0, 1, 0, .8), + ITAnalyst: new CompanyPosition("IT Analyst", 25, 0, 0, 0, 0, 1, 9000, 2), + ITManager: new CompanyPosition("IT Manager", 150, 0, 0, 0, 0, 50, 36000, 8), + SysAdmin: new CompanyPosition("Systems Administrator", 250, 0, 0, 0, 0, 75, 72000, 13), + SecurityEngineer: new CompanyPosition("Security Engineer", 150, 0, 0, 0, 0, 25, 36000, 10), + NetworkEngineer: new CompanyPosition("Network Engineer", 150, 0, 0, 0, 0, 25, 36000, 10), + NetworkAdministrator: new CompanyPosition("Network Administrator", 250, 0, 0, 0, 0, 75, 72000, 12), //Technology management - HeadOfSoftware: new CompanyPosition("Head of Software", 500, 1, 1, 1, 1, 250, 108000, 30), - HeadOfEngineering: new CompanyPosition("Head of Engineering", 500, 1, 1, 1, 1, 250, 10800, 30), - VicePresident: new CompanyPosition("Vice President of Technology", 600, 1, 1, 1, 1, 400, 144000, 40), - CTO: new CompanyPosition("Chief Technology Officer", 750, 1, 1, 1, 1, 500, 216000, 50), + HeadOfSoftware: new CompanyPosition("Head of Software", 500, 0, 0, 0, 0, 250, 108000, 30), + HeadOfEngineering: new CompanyPosition("Head of Engineering", 500, 0, 0, 0, 0, 250, 10800, 30), + VicePresident: new CompanyPosition("Vice President of Technology", 600, 0, 0, 0, 0, 400, 144000, 40), + CTO: new CompanyPosition("Chief Technology Officer", 750, 0, 0, 0, 0, 500, 216000, 50), //Business - BusinessIntern: new CompanyPosition("Business Intern", 1, 1, 1, 1, 1, 1, 0, 1), - BusinessAnalyst: new CompanyPosition("Business Analyst", 5, 1, 1, 1, 1, 50, 9000, 8), - BusinessManager: new CompanyPosition("Business Manager", 50, 1, 1, 1, 1, 100, 36000, 15), - OperationsManager: new CompanyPosition("Operations Manager", 50, 1, 1, 1, 1, 200, 72000, 20), - CFO: new CompanyPosition("Chief Financial Officer", 75, 1, 1, 1, 1, 500, 108000, 50), - CEO: new CompanyPosition("Chief Executive Officer", 100, 1, 1, 1, 1, 750, 216000, 100), + BusinessIntern: new CompanyPosition("Business Intern", 1, 0, 0, 0, 0, 1, 0, 1), + BusinessAnalyst: new CompanyPosition("Business Analyst", 5, 0, 0, 0, 0, 50, 9000, 8), + BusinessManager: new CompanyPosition("Business Manager", 50, 0, 0, 0, 0, 100, 36000, 15), + OperationsManager: new CompanyPosition("Operations Manager", 50, 0, 0, 0, 0, 200, 72000, 20), + CFO: new CompanyPosition("Chief Financial Officer", 75, 0, 0, 0, 0, 500, 108000, 50), + CEO: new CompanyPosition("Chief Executive Officer", 100, 0, 0, 0, 0, 750, 216000, 100), //Non-tech/management jobs - Waiter: new CompanyPosition("Waiter", 1, 1, 1, 1, 1, 1, 0, .5), - Employee: new CompanyPosition("Employee", 1, 1, 1, 1, 1, 1, 0, .5), + Waiter: new CompanyPosition("Waiter", 0, 0, 0, 0, 0, 0, 0, .5), + Employee: new CompanyPosition("Employee", 0, 0, 0, 0, 0, 0, 0, .5), PoliceOfficer: new CompanyPosition("Police Officer", 10, 100, 100, 100, 100, 9000, 4), PoliceChief: new CompanyPosition("Police Chief", 100, 300, 300, 300, 300, 18000, 10), - SecurityGuard: new CompanyPosition("Security Guard", 1, 50, 50, 50, 50, 0, 3), + SecurityGuard: new CompanyPosition("Security Guard", 0, 50, 50, 50, 50, 0, 3), SecurityOfficer: new CompanyPosition("Security Officer", 25, 150, 150, 150, 150, 9000, 6), SecuritySupervisor: new CompanyPosition("Security Supervisor", 25, 250, 250, 250, 250, 36000, 12), HeadOfSecurity: new CompanyPosition("Head of Security", 50, 500, 500, 500, 500, 72000, 20), diff --git a/src/CompanyJobApplication.js b/src/CompanyJobApplication.js index e8d841092..e8e12021a 100644 --- a/src/CompanyJobApplication.js +++ b/src/CompanyJobApplication.js @@ -151,12 +151,12 @@ PlayerObject.prototype.applyForWaiterJob = function() { //Checks if the Player is qualified for a certain position PlayerObject.prototype.isQualified = function(company, position) { var offset = company.jobStatReqOffset; - var reqHacking = position.requiredHacking > 1 ? position.requiredHacking+offset : 1; - var reqStrength = position.requiredStrength > 1 ? position.requiredStrength+offset : 1; - var reqDefense = position.requiredDefense > 1 ? position.requiredDefense+offset : 1; - var reqDexterity = position.requiredDexterity > 1 ? position.requiredDexterity+offset : 1; - var reqAgility = position.requiredDexterity > 1 ? position.requiredDexterity+offset : 1; - var reqCharisma = position.requiredCharisma > 1 ? position.requiredCharisma+offset : 1; + var reqHacking = position.requiredHacking > 0 ? position.requiredHacking+offset : 0; + var reqStrength = position.requiredStrength > 0 ? position.requiredStrength+offset : 0; + var reqDefense = position.requiredDefense > 0 ? position.requiredDefense+offset : 0; + var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity+offset : 0; + var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity+offset : 0; + var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma+offset : 0; if (this.hacking_skill >= reqHacking && this.strength >= reqStrength && diff --git a/src/Constants.js b/src/Constants.js index 2693ef3c8..1190e5744 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -34,6 +34,9 @@ CONSTANTS = { MillisecondsPerHour: 3600000, GameCyclesPerHour: 3600000 / 200, + MillisecondsPerHalfHour: 1800000, + GameCyclesPerHalfHour: 1800000 / 200, + FactionWorkHacking: "Faction Hacking Work", FactionWorkField: "Faction Field Work", FactionWorkSecurity: "Faction Security Work", diff --git a/src/CreateProgram.js b/src/CreateProgram.js index f8fa6295f..22ccd68ed 100644 --- a/src/CreateProgram.js +++ b/src/CreateProgram.js @@ -40,7 +40,7 @@ function displayCreateProgramContent() { Player.hacking_skill >= 50) { bruteSshALink.style.display = "block"; bruteSshALink.addEventListener("click", function() { - Player.startCreateProgramWork(Programs.BruteSSHProgram, CONSTANTS.MillisecondsPerHour); + Player.startCreateProgramWork(Programs.BruteSSHProgram, CONSTANTS.MillisecondsPerHalfHour); }); } @@ -49,7 +49,7 @@ function displayCreateProgramContent() { Player.hacking_skill >= 125) { ftpCrackALink.style.display = "block"; ftpCrackALink.addEventListener("click", function() { - Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsPer4Hours); + Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsPerHour); }); } @@ -58,7 +58,7 @@ function displayCreateProgramContent() { Player.hacking_skill >= 300) { relaySmtpALink.style.display = "block"; relaySmtpAlink.addEventListener("click", function() { - Player.startCreateProgramWork(Programs.RelaySMTPProgram. CONSTANTS.MillisecondsPer8Hours); + Player.startCreateProgramWork(Programs.RelaySMTPProgram. CONSTANTS.MillisecondsPer4Hours); }); } @@ -67,7 +67,7 @@ function displayCreateProgramContent() { Player.hacking_skill >= 500) { httpWormALink.style.display = "block"; httpWormALink.addEventListener("click", function() { - Player.startCreateProgramWork(Programs.HTTPWormProgram, CONSTANTS.MillisecondsPer10Hours); + Player.startCreateProgramWork(Programs.HTTPWormProgram, CONSTANTS.MillisecondsPer8Hours); }); } diff --git a/src/Location.js b/src/Location.js index e54ef8c59..df57941e6 100644 --- a/src/Location.js +++ b/src/Location.js @@ -1186,22 +1186,22 @@ initLocationButtons = function() { }); purchase1gb.addEventListener("click", function() { - purchaseServerBoxCreate(1, 100000); + purchaseServerBoxCreate(1, 50000); return false; }); purchase2gb.addEventListener("click", function() { - purchaseServerBoxCreate(2, 250000); + purchaseServerBoxCreate(2, 100000); return false; }); purchase4gb.addEventListener("click", function() { - purchaseServerBoxCreate(4, 600000); + purchaseServerBoxCreate(4, 250000); return false; }); purchase8gb.addEventListener("click", function() { - purchaseServerBoxCreate(8, 1500000); + purchaseServerBoxCreate(8, 1000000); return false; }); @@ -1211,7 +1211,7 @@ initLocationButtons = function() { }); purchase32gb.addEventListener("click", function() { - purchaseServerBoxCreate(32, 9000000); + purchaseServerBoxCreate(32, 10000000); return false; }); @@ -1221,7 +1221,7 @@ initLocationButtons = function() { }); purchase128gb.addEventListener("click", function() { - purchaseServerBoxCreate(128, 45000000); + purchaseServerBoxCreate(128, 50000000); return false; }); @@ -1236,7 +1236,7 @@ initLocationButtons = function() { }); purchase1tb.addEventListener("click", function() { - purchaseServerBoxCreate(1024, 600000000); + purchaseServerBoxCreate(1024, 750000000); return false; }); diff --git a/src/Player.js b/src/Player.js index 3d4ddea6f..090fe1b2f 100644 --- a/src/Player.js +++ b/src/Player.js @@ -229,8 +229,8 @@ PlayerObject.prototype.hack = function() { } PlayerObject.prototype.analyze = function() { - //TODO Analyze only takes 5 seconds for now..maybe change this in the future? - this.actionTime = 5; + //TODO Analyze only takes 1 seconds for now..maybe change this in the future? + this.actionTime = 1; this.startAction = true; } @@ -421,7 +421,7 @@ PlayerObject.prototype.work = function(numCycles) { " at " + Player.companyName + "

" + "You have been working for " + convertTimeMsToTimeElapsedString(this.timeWorked) + "

" + "You have earned:

" + - "$" + this.workMoneyGained + " (" + (this.workMoneyGainRate * cyclesPerSec).toFixed(2) + " / sec)

" + + "$" + this.workMoneyGained.toFixed(2) + " ($" + (this.workMoneyGainRate * cyclesPerSec).toFixed(2) + " / sec)

" + this.workRepGained.toFixed(3) + " (" + (this.workRepGainRate * cyclesPerSec).toFixed(3) + " / sec) reputation for this company

" + this.workHackExpGained.toFixed(3) + " (" + (this.workHackExpGainRate * cyclesPerSec).toFixed(3) + " / sec) hacking exp

" + this.workStrExpGained.toFixed(3) + " (" + (this.workStrExpGainRate * cyclesPerSec).toFixed(3) + " / sec) strength exp
" + diff --git a/src/Server.js b/src/Server.js index 481729f93..23da6d0f6 100644 --- a/src/Server.js +++ b/src/Server.js @@ -413,19 +413,19 @@ initForeignServers = function() { AddToAllServers(JoesGunsServer); var Zer0NightclubServer = new Server(); - Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 8); + Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 4); Zer0NightclubServer.setHackingParameters(75, 750000, 25, 40); Zer0NightclubServer.setPortProperties(1); 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, 2); NectarNightclubServer.setHackingParameters(20, 400000, 20, 25); NectarNightclubServer.setPortProperties(0); AddToAllServers(NectarNightclubServer); var NeoNightclubServer = new Server(); - NeoNightclubServer.init(createRandomIp(), "neo-net", "Neo Nightclub Network", true, false, false, false, 4); + NeoNightclubServer.init(createRandomIp(), "neo-net", "Neo Nightclub Network", true, false, false, false, 2); NeoNightclubServer.setHackingParameters(50, 500000, 25, 25); NeoNightclubServer.setPortProperties(1); AddToAllServers(NeoNightclubServer); diff --git a/src/engine.js b/src/engine.js index 9a12dfed5..bdf64c200 100644 --- a/src/engine.js +++ b/src/engine.js @@ -868,7 +868,13 @@ var Engine = { processServerGrowth(numCyclesOffline); //Should be done before offline production for scripts loadAllRunningScripts(); //This also takes care of offline production for those scripts if (Player.isWorking) { - Player.work(numCyclesOffline); + if (Player.currentWorkFactionName != "") { + Player.workForFaction(numCyclesOffline); + } else if (Player.createProgramName != "") { + Player.createProgramWork(numCyclesOffline); + } else { + Player.work(numCyclesOffline); + } } } else { //No save found, start new game @@ -889,7 +895,14 @@ var Engine = { if (Player.isWorking) { var cancelButton = document.getElementById("work-in-progress-cancel-button"); cancelButton.addEventListener("click", function() { - Player.finishWork(true); + if (Player.currentWorkFactionName != "") { + var fac = Factions[Player.currentWorkFactionName]; + Player.finishFactionWork(true, fac); + } else if (Player.createProgramName != "") { + Player.finishCreateProgramWork(true, Player.createProgramName); + } else { + Player.finishWork(true); + } }); Engine.loadWorkInProgressContent(); }