diff --git a/dist/bundle.js b/dist/bundle.js index 89d28425e..3c8ef555d 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -74,6 +74,7 @@ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Company_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__CompanyManagement_js__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__CreateProgram_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Crimes_js__ = __webpack_require__(32); @@ -800,7 +801,7 @@ PlayerObject.prototype.finishWork = function(cancelled, sing=false) { PlayerObject.prototype.startWork = function() { this.resetWorkStatus(); this.isWorking = true; - this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCompany; + this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCompany; this.workHackExpGainRate = this.getWorkHackExpGain(); this.workStrExpGainRate = this.getWorkStrExpGain(); @@ -811,7 +812,7 @@ PlayerObject.prototype.startWork = function() { this.workRepGainRate = this.getWorkRepGain(); this.workMoneyGainRate = this.getWorkMoneyGain(); - this.timeNeededToCompleteWork = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours; + this.timeNeededToCompleteWork = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer8Hours; //Remove all old event listeners from Cancel button var newCancelButton = Object(__WEBPACK_IMPORTED_MODULE_17__utils_HelperFunctions_js__["b" /* clearEventListeners */])("work-in-progress-cancel-button"); @@ -842,8 +843,8 @@ PlayerObject.prototype.work = function(numCycles) { this.timeWorked += __WEBPACK_IMPORTED_MODULE_7__engine_js__["Engine"]._idleSpeed * numCycles; //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money - if (this.timeWorked >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours) { - var maxCycles = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].GameCyclesPer8Hours; + if (this.timeWorked >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer8Hours) { + var maxCycles = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].GameCyclesPer8Hours; this.workHackExpGained = this.workHackExpGainRate * maxCycles; this.workStrExpGained = this.workStrExpGainRate * maxCycles; this.workDefExpGained = this.workDefExpGainRate * maxCycles; @@ -877,7 +878,7 @@ PlayerObject.prototype.work = function(numCycles) { PlayerObject.prototype.startWorkPartTime = function() { this.resetWorkStatus(); this.isWorking = true; - this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCompanyPartTime; + this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCompanyPartTime; this.workHackExpGainRate = this.getWorkHackExpGain(); this.workStrExpGainRate = this.getWorkStrExpGain(); @@ -888,7 +889,7 @@ PlayerObject.prototype.startWorkPartTime = function() { this.workRepGainRate = this.getWorkRepGain(); this.workMoneyGainRate = this.getWorkMoneyGain(); - this.timeNeededToCompleteWork = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours; + this.timeNeededToCompleteWork = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer8Hours; var newCancelButton = Object(__WEBPACK_IMPORTED_MODULE_17__utils_HelperFunctions_js__["b" /* clearEventListeners */])("work-in-progress-cancel-button"); newCancelButton.innerHTML = "Stop Working"; @@ -918,8 +919,8 @@ PlayerObject.prototype.workPartTime = function(numCycles) { this.timeWorked += __WEBPACK_IMPORTED_MODULE_7__engine_js__["Engine"]._idleSpeed * numCycles; //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money - if (this.timeWorked >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours) { - var maxCycles = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].GameCyclesPer8Hours; + if (this.timeWorked >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer8Hours) { + var maxCycles = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].GameCyclesPer8Hours; this.workHackExpGained = this.workHackExpGainRate * maxCycles; this.workStrExpGained = this.workStrExpGainRate * maxCycles; this.workDefExpGained = this.workDefExpGainRate * maxCycles; @@ -1043,10 +1044,10 @@ PlayerObject.prototype.startFactionWork = function(faction) { this.workRepGainRate *= __WEBPACK_IMPORTED_MODULE_1__BitNode_js__["a" /* BitNodeMultipliers */].FactionWorkRepGain; this.isWorking = true; - this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeFaction; + this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeFaction; this.currentWorkFactionName = faction.name; - this.timeNeededToCompleteWork = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer20Hours; + this.timeNeededToCompleteWork = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer20Hours; var cancelButton = Object(__WEBPACK_IMPORTED_MODULE_17__utils_HelperFunctions_js__["b" /* clearEventListeners */])("work-in-progress-cancel-button"); cancelButton.innerHTML = "Stop Faction Work"; @@ -1063,9 +1064,9 @@ PlayerObject.prototype.startFactionHackWork = function(faction) { this.resetWorkStatus(); this.workHackExpGainRate = .15 * this.hacking_exp_mult * __WEBPACK_IMPORTED_MODULE_1__BitNode_js__["a" /* BitNodeMultipliers */].FactionWorkExpGain; - this.workRepGainRate = this.workRepGainRate = (this.hacking_skill + this.intelligence) / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel * this.faction_rep_mult; + this.workRepGainRate = this.workRepGainRate = (this.hacking_skill + this.intelligence) / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel * this.faction_rep_mult; - this.factionWorkType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].FactionWorkHacking; + this.factionWorkType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].FactionWorkHacking; this.currentWorkFactionDescription = "carrying out hacking contracts"; this.startFactionWork(faction); @@ -1082,7 +1083,7 @@ PlayerObject.prototype.startFactionFieldWork = function(faction) { this.workChaExpGainRate = .1 * this.charisma_exp_mult * __WEBPACK_IMPORTED_MODULE_1__BitNode_js__["a" /* BitNodeMultipliers */].FactionWorkExpGain; this.workRepGainRate = this.getFactionFieldWorkRepGain(); - this.factionWorkType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].FactionWorkField; + this.factionWorkType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].FactionWorkField; this.currentWorkFactionDescription = "carrying out field missions" this.startFactionWork(faction); @@ -1099,7 +1100,7 @@ PlayerObject.prototype.startFactionSecurityWork = function(faction) { this.workChaExpGainRate = 0.00 * this.charisma_exp_mult * __WEBPACK_IMPORTED_MODULE_1__BitNode_js__["a" /* BitNodeMultipliers */].FactionWorkExpGain; this.workRepGainRate = this.getFactionSecurityWorkRepGain(); - this.factionWorkType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].FactionWorkSecurity; + this.factionWorkType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].FactionWorkSecurity; this.currentWorkFactionDescription = "performing security detail" this.startFactionWork(faction); @@ -1110,13 +1111,13 @@ PlayerObject.prototype.workForFaction = function(numCycles) { //Constantly update the rep gain rate switch (this.factionWorkType) { - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].FactionWorkHacking: - this.workRepGainRate = (this.hacking_skill + this.intelligence) / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel * this.faction_rep_mult; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].FactionWorkHacking: + this.workRepGainRate = (this.hacking_skill + this.intelligence) / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel * this.faction_rep_mult; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].FactionWorkField: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].FactionWorkField: this.workRepGainRate = this.getFactionFieldWorkRepGain(); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].FactionWorkSecurity: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].FactionWorkSecurity: this.workRepGainRate = this.getFactionSecurityWorkRepGain(); break; default: @@ -1143,9 +1144,9 @@ PlayerObject.prototype.workForFaction = function(numCycles) { this.timeWorked += __WEBPACK_IMPORTED_MODULE_7__engine_js__["Engine"]._idleSpeed * numCycles; //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours - if (this.timeWorked >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer20Hours) { - var maxCycles = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].GameCyclesPer20Hours; - this.timeWorked = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MillisecondsPer20Hours; + if (this.timeWorked >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer20Hours) { + var maxCycles = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].GameCyclesPer20Hours; + this.timeWorked = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MillisecondsPer20Hours; this.workHackExpGained = this.workHackExpGainRate * maxCycles; this.workStrExpGained = this.workStrExpGainRate * maxCycles; this.workDefExpGained = this.workDefExpGainRate * maxCycles; @@ -1236,7 +1237,7 @@ PlayerObject.prototype.getWorkRepGain = function() { this.agility, this.charisma); //Intelligence provides a flat bonus to job performance - jobPerformance += (this.intelligence / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel); + jobPerformance += (this.intelligence / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel); //Update reputation gain rate to account for company favor var favorMult = 1 + (company.favor / 100); @@ -1245,22 +1246,22 @@ PlayerObject.prototype.getWorkRepGain = function() { } PlayerObject.prototype.getFactionSecurityWorkRepGain = function() { - var t = 0.9 * (this.hacking_skill / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.strength / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.defense / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.dexterity / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.agility / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel) / 4.5; + var t = 0.9 * (this.hacking_skill / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.strength / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.defense / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.dexterity / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.agility / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel) / 4.5; return t * this.faction_rep_mult; } PlayerObject.prototype.getFactionFieldWorkRepGain = function() { - var t = 0.9 * (this.hacking_skill / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.strength / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.defense / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.dexterity / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.agility / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.charisma / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel + - this.intelligence / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel) / 5.5; + var t = 0.9 * (this.hacking_skill / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.strength / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.defense / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.dexterity / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.agility / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.charisma / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel + + this.intelligence / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].MaxSkillLevel) / 5.5; return t * this.faction_rep_mult; } @@ -1268,7 +1269,7 @@ PlayerObject.prototype.getFactionFieldWorkRepGain = function() { PlayerObject.prototype.startCreateProgramWork = function(programName, time, reqLevel) { this.resetWorkStatus(); this.isWorking = true; - this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCreateProgram; + this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCreateProgram; //Time needed to complete work affected by hacking skill (linearly based on //ratio of (your skill - required level) to MAX skill) @@ -1340,7 +1341,7 @@ PlayerObject.prototype.finishCreateProgramWork = function(cancelled, sing=false) } if (!cancelled) { - this.gainIntelligenceExp(this.createProgramReqLvl / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceProgramBaseExpGain); + this.gainIntelligenceExp(this.createProgramReqLvl / __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceProgramBaseExpGain); } var mainMenu = document.getElementById("mainmenu-container"); @@ -1355,7 +1356,7 @@ PlayerObject.prototype.finishCreateProgramWork = function(cancelled, sing=false) PlayerObject.prototype.startClass = function(costMult, expMult, className) { this.resetWorkStatus(); this.isWorking = true; - this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeStudyClass; + this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeStudyClass; this.className = className; @@ -1374,43 +1375,43 @@ PlayerObject.prototype.startClass = function(costMult, expMult, className) { var cost = 0; var hackExp = 0, strExp = 0, defExp = 0, dexExp = 0, agiExp = 0, chaExp = 0; switch (className) { - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassStudyComputerScience: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassStudyComputerScience: hackExp = baseStudyComputerScienceExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassDataStructures: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassDataStructuresBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassDataStructures: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassDataStructuresBaseCost * costMult / gameCPS; hackExp = baseDataStructuresExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassNetworks: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassNetworksBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassNetworks: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassNetworksBaseCost * costMult / gameCPS; hackExp = baseNetworksExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassAlgorithms: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassAlgorithmsBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassAlgorithms: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassAlgorithmsBaseCost * costMult / gameCPS; hackExp = baseAlgorithmsExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassManagement: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassManagementBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassManagement: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassManagementBaseCost * costMult / gameCPS; chaExp = baseManagementExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassLeadership: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassLeadershipBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassLeadership: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassLeadershipBaseCost * costMult / gameCPS; chaExp = baseLeadershipExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymStrength: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymStrength: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymBaseCost * costMult / gameCPS; strExp = baseGymExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymDefense: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymDefense: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymBaseCost * costMult / gameCPS; defExp = baseGymExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymDexterity: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymDexterity: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymBaseCost * costMult / gameCPS; dexExp = baseGymExp * expMult / gameCPS; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymAgility: - cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymBaseCost * costMult / gameCPS; + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymAgility: + cost = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymBaseCost * costMult / gameCPS; agiExp = baseGymExp * expMult / gameCPS; break; default: @@ -1427,10 +1428,10 @@ PlayerObject.prototype.startClass = function(costMult, expMult, className) { this.workChaExpGainRate = chaExp * this.charisma_exp_mult * __WEBPACK_IMPORTED_MODULE_1__BitNode_js__["a" /* BitNodeMultipliers */].ClassGymExpGain;; var cancelButton = Object(__WEBPACK_IMPORTED_MODULE_17__utils_HelperFunctions_js__["b" /* clearEventListeners */])("work-in-progress-cancel-button"); - if (className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymStrength || - className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymDefense || - className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymDexterity || - className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].ClassGymAgility) { + if (className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymStrength || + className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymDefense || + className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymDexterity || + className == __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].ClassGymAgility) { cancelButton.innerHTML = "Stop training at gym"; } else { cancelButton.innerHTML = "Stop taking course"; @@ -1478,7 +1479,7 @@ PlayerObject.prototype.takeClass = function(numCycles) { //through a Singularity Netscript function PlayerObject.prototype.finishClass = function(sing=false) { this.gainWorkExp(); - this.gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000)); + this.gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000)); if (this.workMoneyGained > 0) { throw new Error("ERR: Somehow gained money while taking class"); @@ -1519,7 +1520,7 @@ PlayerObject.prototype.finishClass = function(sing=false) { PlayerObject.prototype.startCrime = function(hackExp, strExp, defExp, dexExp, agiExp, chaExp, money, time, singParams=null) { this.resetWorkStatus(); this.isWorking = true; - this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCrime; + this.workType = __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCrime; if (singParams && singParams.workerscript) { this.committingCrimeThruSingFn = true; @@ -1572,50 +1573,50 @@ PlayerObject.prototype.finishCrime = function(cancelled) { if (Object(__WEBPACK_IMPORTED_MODULE_6__Crimes_js__["y" /* determineCrimeSuccess */])(this.crimeType, this.workMoneyGained)) { //Handle Karma and crime statistics switch(this.crimeType) { - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeShoplift: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeShoplift: this.karma -= 0.1; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeRobStore: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeRobStore: this.karma -= 0.5; - this.gainIntelligenceExp(0.25 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(0.25 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeMug: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeMug: this.karma -= 0.25; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeLarceny: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeLarceny: this.karma -= 1.5; - this.gainIntelligenceExp(0.5 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(0.5 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeDrugs: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeDrugs: this.karma -= 0.5; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeBondForgery: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeBondForgery: this.karma -= 0.1; - this.gainIntelligenceExp(2 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(2 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeTraffickArms: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeTraffickArms: this.karma -= 1; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeHomicide: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeHomicide: ++this.numPeopleKilled; this.karma -= 3; break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeGrandTheftAuto: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeGrandTheftAuto: this.karma -= 5; - this.gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeKidnap: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeKidnap: this.karma -= 6; - this.gainIntelligenceExp(2 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(2 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeAssassination: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeAssassination: ++this.numPeopleKilled; this.karma -= 10; - this.gainIntelligenceExp(5 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(5 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CrimeHeist: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CrimeHeist: this.karma -= 15; - this.gainIntelligenceExp(10 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeBaseExpGain); + this.gainIntelligenceExp(10 * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].IntelligenceCrimeBaseExpGain); break; default: console.log(this.crimeType); @@ -1695,22 +1696,22 @@ PlayerObject.prototype.singularityStopWork = function() { if (!this.isWorking) {return "";} var res; //Earnings text for work switch (this.workType) { - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeStudyClass: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeStudyClass: res = this.finishClass(true); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCompany: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCompany: res = this.finishWork(true, true); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCompanyPartTime: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCompanyPartTime: res = this.finishWorkPartTime(true); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeFaction: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeFaction: res = this.finishFactionWork(true, true); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCreateProgram: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCreateProgram: res = this.finishCreateProgramWork(true, true); break; - case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].WorkTypeCrime: + case __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].WorkTypeCrime: res = this.finishCrime(true); break; default: @@ -1735,8 +1736,8 @@ PlayerObject.prototype.takeDamage = function(amt) { PlayerObject.prototype.hospitalize = function() { Object(__WEBPACK_IMPORTED_MODULE_16__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You were in critical condition! You were taken to the hospital where " + "luckily they were able to save your life. You were charged $" + - Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.max_hp * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].HospitalCostPerHp, 2)); - this.loseMoney(this.max_hp * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].HospitalCostPerHp); + Object(__WEBPACK_IMPORTED_MODULE_21__utils_StringHelperFunctions_js__["c" /* formatNumber */])(this.max_hp * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].HospitalCostPerHp, 2)); + this.loseMoney(this.max_hp * __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].HospitalCostPerHp); this.hp = this.max_hp; } @@ -2132,14 +2133,14 @@ PlayerObject.prototype.checkForFactionInvitations = function() { //ECorp var ecorpFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["ECorp"]; if (!ecorpFac.isBanned && !ecorpFac.isMember && !ecorpFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].AevumECorp && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].AevumECorp && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(ecorpFac); } //MegaCorp var megacorpFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["MegaCorp"]; if (!megacorpFac.isBanned && !megacorpFac.isMember && !megacorpFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].Sector12MegaCorp && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].Sector12MegaCorp && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(megacorpFac); } @@ -2147,42 +2148,42 @@ PlayerObject.prototype.checkForFactionInvitations = function() { var bachmanandassociatesFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["Bachman & Associates"]; if (!bachmanandassociatesFac.isBanned && !bachmanandassociatesFac.isMember && !bachmanandassociatesFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].AevumBachmanAndAssociates && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].AevumBachmanAndAssociates && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(bachmanandassociatesFac); } //Blade Industries var bladeindustriesFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["Blade Industries"]; if (!bladeindustriesFac.isBanned && !bladeindustriesFac.isMember && !bladeindustriesFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].Sector12BladeIndustries && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].Sector12BladeIndustries && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(bladeindustriesFac); } //NWO var nwoFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["NWO"]; if (!nwoFac.isBanned && !nwoFac.isMember && !nwoFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].VolhavenNWO && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].VolhavenNWO && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(nwoFac); } //Clarke Incorporated var clarkeincorporatedFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["Clarke Incorporated"]; if (!clarkeincorporatedFac.isBanned && !clarkeincorporatedFac.isMember && !clarkeincorporatedFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].AevumClarkeIncorporated && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].AevumClarkeIncorporated && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(clarkeincorporatedFac); } //OmniTek Incorporated var omnitekincorporatedFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["OmniTek Incorporated"]; if (!omnitekincorporatedFac.isBanned && !omnitekincorporatedFac.isMember && !omnitekincorporatedFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].VolhavenOmniTekIncorporated && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].VolhavenOmniTekIncorporated && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(omnitekincorporatedFac); } //Four Sigma var foursigmaFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["Four Sigma"]; if (!foursigmaFac.isBanned && !foursigmaFac.isMember && !foursigmaFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].Sector12FourSigma && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].Sector12FourSigma && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(foursigmaFac); } @@ -2190,7 +2191,7 @@ PlayerObject.prototype.checkForFactionInvitations = function() { var kuaigonginternationalFac = __WEBPACK_IMPORTED_MODULE_8__Faction_js__["b" /* Factions */]["KuaiGong International"]; if (!kuaigonginternationalFac.isBanned && !kuaigonginternationalFac.isMember && !kuaigonginternationalFac.alreadyInvited && - this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].ChongqingKuaiGongInternational && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["a" /* CONSTANTS */].CorpFactionRepRequirement) { + this.companyName == __WEBPACK_IMPORTED_MODULE_10__Location_js__["a" /* Locations */].ChongqingKuaiGongInternational && companyRep >= __WEBPACK_IMPORTED_MODULE_3__Constants_js__["CONSTANTS"].CorpFactionRepRequirement) { invitedFactions.push(kuaigonginternationalFac); } @@ -2723,1155 +2724,10 @@ function powerOfTwo(n) { /***/ }), /* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ (function(module, __webpack_exports__) { "use strict"; -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CONSTANTS; }); -let CONSTANTS = { - Version: "0.34.2", - - //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 - //the player will have this level assuming no multipliers. Multipliers can cause skills to go above this. - MaxSkillLevel: 975, - - //How much reputation is needed to join a megacorporation's faction - CorpFactionRepRequirement: 250000, - - /* Base costs */ - BaseCostFor1GBOfRamHome: 32000, - BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM - BaseCostFor1GBOfRamHacknetNode: 30000, - - BaseCostForHacknetNode: 1000, - BaseCostForHacknetNodeCore: 500000, - - /* Hacknet Node constants */ - HacknetNodeMoneyGainPerLevel: 1.6, - HacknetNodePurchaseNextMult: 1.85, //Multiplier when purchasing an additional hacknet node - 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, - HacknetNodeMaxCores: 16, - - /* Faction and Company favor */ - FactionReputationToFavorBase: 500, - FactionReputationToFavorMult: 1.02, - CompanyReputationToFavorBase: 500, - CompanyReputationToFavorMult: 1.02, - - /* Augmentation */ - //NeuroFlux Governor cost multiplier as you level up - NeuroFluxGovernorLevelMult: 1.14, - - //RAM Costs for different commands - ScriptWhileRamCost: 0.2, - ScriptForRamCost: 0.2, - ScriptIfRamCost: 0.15, - ScriptHackRamCost: 0.1, - ScriptGrowRamCost: 0.15, - ScriptWeakenRamCost: 0.15, - ScriptScanRamCost: 0.2, - ScriptPortProgramRamCost: 0.05, - ScriptRunRamCost: 1.0, - ScriptExecRamCost: 1.3, - ScriptScpRamCost: 0.6, - ScriptKillRamCost: 0.5, //Kill and killall - ScriptHasRootAccessRamCost: 0.05, - ScriptGetHostnameRamCost: 0.05, //getHostname() and getIp() - ScriptGetHackingLevelRamCost: 0.05, //getHackingLevel() - ScriptGetMultipliersRamCost: 4.0, //getHackingMultipliers() and getBitNodeMultipliers() - ScriptGetServerRamCost: 0.1, - ScriptFileExistsRamCost: 0.1, - ScriptIsRunningRamCost: 0.1, - ScriptPurchaseHacknetRamCost: 1.5, - ScriptHacknetNodesRamCost: 1.0, //Base cost for accessing hacknet nodes array - ScriptHNUpgLevelRamCost: 0.4, - ScriptHNUpgRamRamCost: 0.6, - ScriptHNUpgCoreRamCost: 0.8, - ScriptGetStockRamCost: 2.0, - ScriptBuySellStockRamCost: 2.5, - ScriptPurchaseServerRamCost: 2.25, - ScriptRoundRamCost: 0.05, - ScriptReadWriteRamCost: 1.0, - ScriptArbScriptRamCost: 1.0, //Functions that apply to all scripts regardless of args - ScriptGetScriptRamCost: 0.1, - ScriptGetHackTimeRamCost: 0.05, - - ScriptSingularityFn1RamCost: 1, - ScriptSingularityFn2RamCost: 2, - ScriptSingularityFn3RamCost: 3, - - MultithreadingRAMCost: 1, - - //Server constants - 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 - - PurchasedServerLimit: 25, - - //Augmentation Constants - AugmentationCostMultiplier: 5, //Used for balancing costs without having to readjust every Augmentation cost - AugmentationRepMultiplier: 2.5, //Used for balancing rep cost without having to readjust every value - MultipleAugMultiplier: 1.9, - - //How much a TOR router costs - TorRouterCost: 200000, - - //Infiltration constants - InfiltrationBribeBaseAmount: 100000, //Amount per clearance level - InfiltrationMoneyValue: 2500, //Convert "secret" value to money - InfiltrationRepValue: 1.4, //Convert "secret" value to faction reputation - - //Stock market constants - WSEAccountCost: 200e6, - TIXAPICost: 5e9, - StockMarketCommission: 100e3, - - //Hospital/Health - HospitalCostPerHp: 100e3, - - //Intelligence-related constants - IntelligenceCrimeWeight: 0.05, //Weight for how much int affects crime success rates - IntelligenceInfiltrationWeight: 0.1, //Weight for how much int affects infiltration success rates - IntelligenceCrimeBaseExpGain: 0.001, - IntelligenceProgramBaseExpGain: 500, //Program required hack level divided by this to determine int exp gain - IntelligenceTerminalHackBaseExpGain: 200, //Hacking exp divided by this to determine int exp gain - IntelligenceSingFnBaseExpGain: 0.002, - IntelligenceClassBaseExpGain: 0.000001, - IntelligenceHackingMissionBaseExpGain: 0.03, //Hacking Mission difficulty multiplied by this to get exp gain - - //Hacking Missions - HackingMissionRepToDiffConversion: 10000, //Faction rep is divided by this to get mission difficulty - HackingMissionRepToRewardConversion: 7, //Faction rep divided byt his to get mission rep reward - HackingMissionSpamTimeIncrease: 25000, //How much time limit increase is gained when conquering a Spam Node (ms) - HackingMissionTransferAttackIncrease: 1.05, //Multiplier by which the attack for all Core Nodes is increased when conquering a Transfer Node - HackingMissionMiscDefenseIncrease: 1.05, //The amount by which every misc node's defense is multiplied when one is conquered - HackingMissionDifficultyToHacking: 135, //Difficulty is multiplied by this to determine enemy's "hacking" level (to determine effects of scan/attack, etc) - HackingMissionHowToPlay: "Hacking missions are a minigame that, if won, will reward you with faction reputation.

" + - "In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes " + - "are colored blue, while the enemy's are red. There are also other nodes on the map colored gray " + - "that initially belong to neither you nor the enemy. The goal of the game is " + - "to capture all of the enemy's Database nodes within the time limit. " + - "If you fail to do this, you will lose.

" + - "Each Node has three stats: Attack, Defense, and HP. There are five different actions that " + - "a Node can take:

" + - "Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's " + - "hacking level, and the enemy's defense.

" + - "Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the " + - "enemy's defense.

" + - "Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's " + - "defense.

" + - "Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.

" + - "Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.

" + - "Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the " + - "Attack/Defense of the individual Node that is performing the action.

" + - "To capture a Node, you must lower its HP down to 0.

" + - "There are six different types of Nodes:

" + - "CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action

" + - "Firewall - Nodes with high defense. These Nodes can 'Fortify'

" + - "Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within " + - "the time limit. These Nodes cannot perform any actions

" + - "Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete " + - "the mission. These Nodes cannot perform any actions

" + - "Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. " + - "These Nodes are capable of performing every action except the 'Attack' action

" + - "Shield - Nodes with high defense. These Nodes can 'Fortify'

" + - "To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking " + - "a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes " + - "that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, " + - "select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard " + - "shortcut.

" + - "For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target " + - "another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target " + - "any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes " + - "can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents " + - "the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, " + - "or press 'd'.

" + - "Other Notes:

" + - "-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that " + - "are not actively being targeted will increase by a fixed percentage.

" + - "-Whenever a Node is conquered, its stats are significantly reduced

" + - "-Miscellaneous Nodes slowly raise their defense over time

" + - "-Nodes slowly regenerate health over time.", - - - //Gang constants - GangRespectToReputationRatio: 2, //Respect is divided by this to get rep gain - MaximumGangMembers: 20, - GangRecruitCostMultiplier: 2, - GangTerritoryUpdateTimer: 150, - - MillisecondsPer20Hours: 72000000, - GameCyclesPer20Hours: 72000000 / 200, - - MillisecondsPer10Hours: 36000000, - GameCyclesPer10Hours: 36000000 / 200, - - MillisecondsPer8Hours: 28800000, - GameCyclesPer8Hours: 28800000 / 200, - - MillisecondsPer4Hours: 14400000, - GameCyclesPer4Hours: 14400000 / 200, - - MillisecondsPer2Hours: 7200000, - GameCyclesPer2Hours: 7200000 / 200, - - MillisecondsPerHour: 3600000, - GameCyclesPerHour: 3600000 / 200, - - MillisecondsPerHalfHour: 1800000, - GameCyclesPerHalfHour: 1800000 / 200, - - MillisecondsPerQuarterHour: 900000, - GameCyclesPerQuarterHour: 900000 / 200, - - MillisecondsPerFiveMinutes: 300000, - GameCyclesPerFiveMinutes: 300000 / 200, - - FactionWorkHacking: "Faction Hacking Work", - FactionWorkField: "Faction Field Work", - FactionWorkSecurity: "Faction Security Work", - - WorkTypeCompany: "Working for Company", - WorkTypeCompanyPartTime: "Working for Company part-time", - WorkTypeFaction: "Working for Faction", - WorkTypeCreateProgram: "Working on Create a Program", - WorkTypeStudyClass: "Studying or Taking a class at university", - WorkTypeCrime: "Committing a crime", - - ClassStudyComputerScience: "studying Computer Science", - ClassDataStructures: "taking a Data Structures course", - ClassNetworks: "taking a Networks course", - ClassAlgorithms: "taking an Algorithms course", - ClassManagement: "taking a Management course", - ClassLeadership: "taking a Leadership course", - ClassGymStrength: "training your strength at a gym", - ClassGymDefense: "training your defense at a gym", - ClassGymDexterity: "training your dexterity at a gym", - ClassGymAgility: "training your agility at a gym", - - ClassDataStructuresBaseCost: 40, - ClassNetworksBaseCost: 80, - ClassAlgorithmsBaseCost: 320, - ClassManagementBaseCost: 160, - ClassLeadershipBaseCost: 320, - ClassGymBaseCost: 120, - - CrimeSingFnDivider: 2, //Factor by which exp/profit is reduced when commiting crime through Sing Fn - CrimeShoplift: "shoplift", - CrimeRobStore: "rob a store", - CrimeMug: "mug someone", - CrimeLarceny: "commit larceny", - CrimeDrugs: "deal drugs", - CrimeBondForgery: "forge corporate bonds", - CrimeTraffickArms: "traffick illegal arms", - CrimeHomicide: "commit homicide", - CrimeGrandTheftAuto: "commit grand theft auto", - CrimeKidnap: "kidnap someone for ransom", - CrimeAssassination: "assassinate a high-profile target", - CrimeHeist: "pull off the ultimate heist", - - /* Tutorial related things */ - TutorialNetworkingText: "Servers are a central part of the game. You start with a single personal server (your home computer) " + - "and you can purchase additional servers as you progress through the game. Connecting to other servers " + - "and hacking them can be a major source of income and experience. Servers can also be used to run " + - "scripts which can automatically hack servers for you.

" + - "In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers " + - "that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' " + - "command to connect to one of the available machines.

" + - "The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the " + - "server you are currently connected to.", - - TutorialHackingText: "In the year 2077, currency has become digital and decentralized. People and corporations " + - "store their money on servers. By hacking these servers, you can steal their money and gain " + - "experience.

" + - "

Gaining root access


" + - "The key to hacking a server is to gain root access to that server. This can be done using " + - "the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home " + - "computer. The NUKE virus attacks the target server's open ports using buffer overflow " + - "exploits. When successful, you are granted root administrative access to the machine.

" + - "Typically, in order for the NUKE virus to succeed, the target server needs to have at least " + - "one of its ports opened. Some servers have no security and will not need any ports opened. Some " + - "will have very high security and will need many ports opened. In order to open ports on another " + - "server, you will need to run programs that attack the server to open specific ports. These programs " + - "can be coded once your hacking skill gets high enough, or they can be purchased if you can find " + - "a seller.

" + - "In order to determine how many ports need to be opened to successfully NUKE a server, connect to " + - "that server and run the 'analyze' command. This will also show you which ports have already been " + - "opened.

" + - "Once you have enough ports opened and have ran the NUKE virus to gain root access, the server " + - "can then be hacked by simply calling the 'hack' command through terminal, or by using a script.

" + - "

Hacking mechanics


" + - "When you execute the hack command, either manually through the terminal or automatically through " + - "a script, you attempt to hack the server. This action takes time. The more advanced a server's " + - "security is, the more time it will take. Your hacking skill level also affects the hacking time, " + - "with a higher hacking skill leading to shorter hacking times. Also, running the hack command " + - "manually through terminal is faster than hacking from a script.

" + - "Your attempt to hack a server will not always succeed. The chance you have to successfully hack a " + - "server is also determined by the server's security and your hacking skill level. Even if your " + - "hacking attempt is unsuccessful, you will still gain experience points.

" + - "When you successfully hack a server. You steal a certain percentage of that server's total money. This " + - "percentage is determined by the server's security and your hacking skill level. The amount of money " + - "on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will " + - "encounter diminishing returns in your hacking (since you are only hacking a certain percentage). You can " + - "increase the amount of money on a server using a script and the grow() function in Netscript.

" + - "

Server Security


" + - "Each server has a security level, typically between 1 and 100. A higher number means the server has stronger security. " + - "It is possible for a server to have a security level of 100 or higher, in which case hacking that server " + - "will become impossible (0% chance to hack).

" + - "As mentioned above, a server's security level is an important factor " + - "to consider when hacking. You can check a server's security level using the 'analyze' command, although this " + - "only gives an estimate (with 5% uncertainty). You can also check a server's security in a script, using the " + - "getServerSecurityLevel(server) function in Netscript. See the Netscript documentation for more details. " + - "This function will give you an exact value for a server's security.

" + - "Whenever a server is hacked manually or through a script, its security level increases by a small amount. Calling " + - "the grow() command in a script will also increase security level of the target server. These actions will " + - "make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a " + - "server's security level in a script using the weaken(server) function in Netscript. See the Netscript " + - "documentation for more details.

" + - "A server has a minimum security level that is equal to one third of its starting security, rounded to the " + - "nearest integer. To be more precise:

" + - "server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))

" + - "This means that a server's security will not fall below this value if you are trying to weaken it.", - - TutorialScriptsText: "Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. " + - "Documentation about the Netscript language can be found in the 'Netscript Programming Language' " + - "section of this 'Tutorial' page.

" + - "It is highly recommended that you have a basic background in programming to start writing scripts. " + - "You by no means need to be an expert. All you need is some familiarity with basic programming " + - "constructs like for/while loops, if statements, " + - "functions, variables, etc. The Netscript programming language most resembles the Javascript language. " + - "Therefore, a good beginner's programming tutorial to read might be " + - "this one. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the " + - "syntax will vary a little bit.

" + - "Running a script requires RAM. The more complex a script is, the more RAM " + - "it requires to run. Scripts can be run on any server you have root access to.

" + - "Here are some Terminal commands that are useful when working with scripts:

" + - "check [script] [args...]
Prints the logs of the script specified by the name and arguments to Terminal. Arguments should be separated " + - "by a space. Note that scripts are uniquely " + - "identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'check' it you must " + - "also add the 'foodnstuff' argument to the check command as so:
check foo.script foodnstuff

" + - "free
Shows the current server's RAM usage and availability

" + - "kill [script] [args...]
Stops a script that is running with the specified script name and arguments. " + - "Arguments should be separated by a space. Note that " + - "scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the " + - "argument 1 and 2, then just typing 'kill foo.script' will not work. You have to use 'kill foo.script 1 2'.

" + - "mem [script] [-t] [n]
Check how much RAM a script requires to run with n threads

" + - "nano [script]
Create/Edit a script. The name of the script must end with the '.script' extension

" + - "ps
Displays all scripts that are actively running on the current server

" + - "rm [script]
Delete a script

" + - "run [script] [-t] [n] [args...]
Run a script with n threads and the specified arguments. Each argument should be separated by a space. " + - "Both the arguments and thread specification are optional. If neither are specified, then the script will be run single-threaded with no arguments.
" + - "Examples:
run foo.script
The command above will run 'foo.script' single-threaded with no arguments." + - "
run foo.script -t 10
The command above will run 'foo.script' with 10 threads and no arguments." + - "
run foo.script foodnstuff sigma-cosmetics 10
The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]" + - "
run foo.script -t 50 foodnstuff
The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]

" + - "tail [script] [args...]
Displays the logs of the script specified by the name and arguments. Note that scripts are uniquely " + - "identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'tail' it you must " + - "also add the 'foodnstuff' argument to the tail command as so:
tail foo.script foodnstuff

" + - "top
Displays all active scripts and their RAM usage

" + - "

Multithreading scripts


" + - "Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that " + - "every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. " + - "For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would " + - "yield $50,000.

" + - "When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script " + - "with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. " + - "In the terminal, you can run the " + - "'mem [scriptname] -t n' command to see how much RAM a script requires with n threads.

" + - "Every method for running a script has an option for making it multihreaded. To run a script with " + - "n threads from a Terminal:
" + - "run [scriptname] -t n

" + - "Using Netscript commands:
" + - "run('scriptname.script', n);
" + - "exec('scriptname.script, 'targetServer', n);

" + - "

Notes about how scripts work offline


" + - " The scripts that you write and execute are interpreted in Javascript. For this " + - "reason, it is not possible for these scripts to run while offline (when the game is closed). " + - "It is important to note that for this reason, conditionals such as if/else statements and certain " + - "commands such as purchaseHacknetNode() or nuke() will not work while the game is offline.

" + - "However, Scripts WILL continue to generate money and hacking exp for you while the game is offline. This " + - "offline production is based off of the scripts' production while the game is online.

" + - "grow() and weaken() are two Netscript commands that will also be applied when the game is offline, although at a slower rate " + - "compared to if the game was open. This is done by having each script keep track of the " + - "rate at which the grow() and weaken() commands are called when the game is online. These calculated rates are used to determine how many times " + - "these function calls would be made while the game is offline.

" + - "Also, note that because of the way the Netscript interpreter is implemented, " + - "whenever you reload or re-open the game all of the scripts that you are running will " + - "start running from the BEGINNING of the code. The game does not keep track of where exactly " + - "the execution of a script is when it saves/loads.


", - TutorialNetscriptText: "Netscript is a programming language implemented for this game. The language has " + - "your basic programming constructs and several built-in commands that are used to hack.

" + - "

Official Wiki and Documentation


" + - "Check out Bitburner's wiki for the official Netscript documentation" + - ". The wiki documentation will contain more details and " + - "code examples than this documentation page. Also, it can be opened up in another tab/window for convenience!

" + - "

Variables and data types


" + - "The following data types are supported by Netscript:
" + - "numeric - Integers and floats (eg. 6, 10.4999)
" + - "string - Encapsulated by single or double quotes (eg. 'this is a string')
" + - "boolean - true or false

" + - "Strings are fully functional Javascript strings, " + - "which means that all of the member functions of Javascript strings such as toLowerCase() and includes() are also " + - "available in Netscript!

" + - "To create a variable, use the assign (=) operator. The language is not strongly typed. Examples:
" + - "i = 5;
" + - "s = 'this game is awesome!';

" + - "In the first example above, we are creating the variable i and assigning it a value of 5. In the second, " + - "we are creating the variable s and assigning it the value of a string. Note that all expressions must be " + - "ended with a semicolon.

" + - "

Operators


" + - "The following operators are supported by Netscript:
" + - " +
" + - " -
" + - " *
" + - " /
" + - " %
" + - " &&
" + - " ||
" + - " <
" + - " >
" + - " <=
" + - " >=
" + - " ==
" + - " !=
" + - " ++ (Note: This ONLY pre-increments. Post-increment does not work)
" + - " -- (Note: This ONLY pre-decrements. Post-decrement does not work)
" + - " - (Negation operator)
" + - " !

" + - "

Arrays


" + - "Netscript arrays have the same properties and functions as javascript arrays. For information see javascripts array documentation.

"+ - "

Script Arguments


" + - "Arguments passed into a script can be accessed using a special array called 'args'. The arguments can be accessed like a normal array using the [] " + - "operator. (args[0], args[1], args[2]...)

" + - "For example, let's say we want to make a generic script 'generic-run.script' and we plan to pass two arguments into that script. The first argument will be the name of " + - "another script, and the second argument will be a number. This generic script will run the script specified in the first argument " + - "with the amount of threads specified in the second element. The code would look like:

" + - "run(args[0], args[1]);

" + - "It is also possible to get the number of arguments that was passed into a script using:

" + - "args.length

" + - "Note that none of the other functions that typically work with arrays, such as remove(), insert(), clear(), etc., will work on the " + - "args array.

" + - "

Javascript Modules


" + - "Netscript supports the following Javascript Modules:

" + - "Math
Date (static functions only)

" + - "

Functions


" + - "You can NOT define you own functions in Netscript (yet), but there are several built in functions that " + - "you may use:

" + - "hack(hostname/ip)
Core function that is used to try and hack servers to steal money and gain hacking experience. The argument passed in must be a string with " + - "either the IP or hostname of the server you want to hack. The runtime for this command depends on your hacking level and the target server's security level. " + - " A script can hack a server from anywhere. It does not need to be running on the same server to hack that server. " + - "For example, you can create a script that hacks the 'foodnstuff' server and run that script on any server in the game. A successful hack() on " + - "a server will raise that server's security level by 0.002. Returns true if the hack is successful and " + - "false otherwise.
" + - "Examples: hack('foodnstuff'); or hack('148.192.0.12');

" + - "sleep(n, log=true)
Suspends the script for n milliseconds. The second argument is an optional boolean that indicates " + - "whether or not the function should log the sleep action. If this argument is true, then calling this function will write " + - "'Sleeping for N milliseconds' to the script's logs. If it's false, then this function will not log anything. " + - "If this argument is not specified then it will be true by default.
Example: sleep(5000);

" + - "grow(hostname/ip)
Use your hacking skills to increase the amount of money available on a server. The argument passed in " + - "must be a string with either the IP or hostname of the target server. The runtime for this command depends on your hacking level and the target server's security level. " + - "When grow() completes, the money available on a target server will be increased by a certain, fixed percentage. This percentage " + - "is determined by the server's growth rate and varies between servers. Generally, higher-level servers have higher growth rates.

" + - "Like hack(), grow() can be called on any server, regardless of where the script is running. " + - "The grow() command requires root access to the target server, but there is no required hacking level to run the command. " + - "It also raises the security level of the target server by 0.004. " + - "Returns the number by which the money on the server was multiplied for the growth. " + - "Works offline at a slower rate.
Example: grow('foodnstuff');

" + - "weaken(hostname/ip)
Use your hacking skills to attack a server's security, lowering the server's security level. The argument passed " + - "in must be a string with either the IP or hostname of the target server. The runtime for this command depends on your " + - "hacking level and the target server's security level. This function lowers the security level of the target server by " + - "0.05.

Like hack() and grow(), weaken() can be called on " + - "any server, regardless of where the script is running. This command requires root access to the target server, but " + - "there is no required hacking level to run the command. Returns " + - "0.1. Works offline at a slower rate
Example: weaken('foodnstuff');

" + - "print(x)
Prints a value or a variable to the scripts logs (which can be viewed with the 'tail [script]' terminal command ).

" + - "tprint(x)
Prints a value or a variable to the Terminal

" + - "clearLog()
Clears the script's logs.

" + - "scan(hostname/ip, [hostnames=true])
Returns an array containing the hostnames or IPs of all servers that are one node away from the specified server. " + - "The argument must be a string containing the IP or hostname of the target server. The second argument is a boolean that specifies whether " + - "the hostnames or IPs of the scanned servers should be output. If it is true then hostnames will be returned, and if false then IP addresses will. " + - "This second argument is optional and, if ommitted, the function will output " + - "the hostnames of the scanned servers. The hostnames/IPs in the returned array are strings.

" + - "nuke(hostname/ip)
Run NUKE.exe on the target server. NUKE.exe must exist on your home computer.
Example: nuke('foodnstuff');

" + - "brutessh(hostname/ip)
Run BruteSSH.exe on the target server. BruteSSH.exe must exist on your home computer.
Example: brutessh('foodnstuff');

" + - "ftpcrack(hostname/ip)
Run FTPCrack.exe on the target server. FTPCrack.exe must exist on your home computer.
Example: ftpcrack('foodnstuff');

" + - "relaysmtp(hostname/ip)
Run relaySMTP.exe on the target server. relaySMTP.exe must exist on your home computer.
Example: relaysmtp('foodnstuff');

" + - "httpworm(hostname/ip)
Run HTTPWorm.exe on the target server. HTTPWorm.exe must exist on your home computer.
Example: httpworm('foodnstuff');

" + - "sqlinject(hostname/ip)
Run SQLInject.exe on the target server. SQLInject.exe must exist on your home computer.
Example: sqlinject('foodnstuff');

" + - "run(script, [numThreads], [args...])
Run a script as a separate process. The first argument that is passed in is the name of the script as a string. This function can only " + - "be used to run scripts located on the current server (the server running the script that calls this function). The second argument " + - "is optional, and it specifies how many threads to run the script with. This argument must be a number greater than 0. If it is omitted, then the script will be run single-threaded. Any additional arguments will specify " + - "arguments to pass into the new script that is being run. If arguments are specified for the new script, then the second argument numThreads argument must be filled in with a value.

" + - "Returns true if the script is successfully started, and false otherwise. Requires a significant amount " + - "of RAM to run this command.

" + - "The simplest way to use the run command is to call it with just the script name. The following example will run 'foo.script' single-threaded with no arguments:

" + - "run('foo.script');

" + - "The following example will run 'foo.script' but with 5 threads instead of single-threaded:

" + - "run('foo.script', 5);

" + - "The following example will run 'foo.script' single-threaded, and will pass the string 'foodnstuff' into the script as an argument:

" + - "run('foo.script', 1, 'foodnstuff');

" + - "exec(script, hostname/ip, [numThreads], [args...])
Run a script as a separate process on another server. The first argument is the name of the script as a string. The " + - "second argument is a string with the hostname or IP of the 'target server' on which to run the script. The specified script must exist on the target server. " + - "The third argument is optional, and it specifies how many threads to run the script with. If it is omitted, then the script will be run single-threaded. " + - "This argument must be a number that is greater than 0. Any additional arguments will specify arguments to pass into the new script that is being run. If " + - "arguments are specified for the new script, then the third argument numThreads must be filled in with a value.

Returns " + - "true if the script is successfully started, and false otherwise.

" + - "The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run 'generic-hack.script' " + - "on the 'foodnstuff' server:

" + - "exec('generic-hack.script', 'foodnstuff');

" + - "The following example will try to run the script 'generic-hack.script' on the 'joesguns' server with 10 threads:

" + - "exec('generic-hack.script', 'joesguns', 10);

" + - "The following example will try to run the script 'foo.script' on the 'foodnstuff' server with 5 threads. It will also pass the number 1 and the string 'test' in as arguments " + - "to the script.

" + - "exec('foo.script', 'foodnstuff', 5, 1, 'test');

" + - "kill(script, hostname/ip, [args...])
Kills the script on the target server specified by the script's name and arguments. Remember that " + - "scripts are uniquely identified by both their name and arguments. For example, if 'foo.script' is run with the argument 1, then this is not the " + - "same as 'foo.script' run with the argument 2, even though they have the same code.

" + - "The first argument must be a string with the name of the script. The name is case-sensitive. " + - "The second argument must be a string with the hostname or IP of the target server. Any additional arguments to the function will specify the arguments passed " + - "into the script that should be killed.

The function will try to kill the specified script on the target server. " + - "If the script is found on the specified server and is running, then it will be killed and this function " + - "will return true. Otherwise, this function will return false.

" + - "Examples:
" + - "If you are trying to kill a script named 'foo.script' on the 'foodnstuff' server that was ran with no arguments, use this:

" + - "kill('foo.script', 'foodnstuff');

" + - "If you are trying to kill a script named 'foo.script' on the current server that was ran with no arguments, use this:

" + - "kill('foo.script', getHostname());

" + - "If you are trying to kill a script named 'foo.script' on the current server that was ran with the arguments 1 and 'foodnstuff', use this:

" + - "kill('foo.script', getHostname(), 1, 'foodnstuff');

" + - "killall(hostname/ip)
Kills all running scripts on the specified server. This function takes a single argument which " + - "must be a string containing the hostname or IP of the target server. This function will always return true.

" + - "exit()
Terminates the script immediately

" + - "scp(script, [source], destination)
Copies a script or literature (.lit) file to another server. The first argument is a string with " + - "the filename of the script or literature file " + - "to be copied, or an array of filenames to be copied. The next two arguments are strings containing the hostname/IPs of the source and target server. " + - "The source refers to the server from which the script/literature file will be copied, while the destination " + - "refers to the server to which it will be copied. The source server argument is optional, and if ommitted the source " + - "will be the current server (the server on which the script is running). Returns true if the script/literature file is " + - "successfully copied over and false otherwise. If the first argument passed in is an array, then the function " + - "will return if at least one of the files in the array is successfully copied over.

" + - "Example: scp('hack-template.script', 'foodnstuff'); //Copies hack-template.script from the current server to foodnstuff
" + - "Example: scp('foo.lit', 'helios', 'home'); //Copies foo.lit from the helios server to the home computer

" + - "ls(hostname/ip)
Returns an array containing the names of all files on the specified server. The argument must be a " + - "string with the hostname or IP of the target server.

" + - "hasRootAccess(hostname/ip)
Returns a boolean (true or false) indicating whether or not the Player has root access to a server. " + - "The argument passed in must be a string with either the hostname or IP of the target server.
" + - "Example:
if (hasRootAccess('foodnstuff') == false) {
    nuke('foodnstuff');
}

" + - "getIp()
Returns a string with the IP Address of the server that the script is running on

" + - "getHostname()
Returns a string with the hostname of the server that the script is running on

" + - "getHackingLevel()
Returns the Player's current hacking level.

" + - "getHackingMultipliers()
Returns an object containing the Player's hacking related multipliers. " + - "These multipliers are returned in integer forms, not percentages (e.g. 1.5 instead of 150%). " + - "The object has the following structure:

" + - "{
" + - "chance: Player's hacking chance multiplier
" + - "speed: Player's hacking speed multiplier
" + - "money: Player's hacking money stolen multiplier
" + - "growth: Player's hacking growth multiplier
" + - "}

Example:

" + - "mults = getHackingMultipliers();
" + - "print(mults.chance);
" + - "print(mults.growth);

" + - "getBitNodeMultipliers()
Returns an object containing the current BitNode multipliers. " + - "This function requires Source-File 5 in order to run. The multipliers are returned in integer forms, not percentages " + - "(e.g. 1.5 instead of 150%). The multipliers represent the difference between the current BitNode and the " + - "original BitNode (BitNode-1). For example, if the 'CrimeMoney' multiplier has a value of 0.1 then that means " + - "that committing crimes in the current BitNode will only give 10% of the money you would have received in " + - "BitNode-1. The object has the following structure (subject to change in the future):

" + - "{
" + - "ServerMaxMoney: 1,
" + - "ServerStartingMoney: 1,
" + - "ServerGrowthRate: 1,
" + - "ServerWeakenRate: 1,
" + - "ServerStartingSecurity: 1,
" + - "ManualHackMoney: 1,
" + - "ScriptHackMoney: 1,
" + - "CompanyWorkMoney: 1,
" + - "CrimeMoney: 1,
" + - "HacknetNodeMoney: 1,
" + - "CompanyWorkExpGain: 1,
" + - "ClassGymExpGain: 1,
" + - "FactionWorkExpGain: 1,
" + - "HackExpGain: 1,
" + - "CrimeExpGain: 1,
" + - "FactionWorkRepGain: 1,
" + - "FactionPassiveRepGain: 1,
" + - "AugmentationRepCost: 1,
" + - "AugmentationMoneyCost: 1,
" + - "}

Example:

" + - "mults = getBitNodeMultipliers();
" + - "print(mults.ServerMaxMoney);
" + - "print(mults.HackExpGain);

" + - "getServerMoneyAvailable(hostname/ip)
Returns the amount of money available on a server. The argument passed in must be a string with either the " + - "hostname or IP of the target server.
Example: getServerMoneyAvailable('foodnstuff');

" + - "getServerMaxMoney(hostname/ip)
Returns the maximum amount of money that can be available on a server. The argument passed in must be a string with " + - "the hostname or IP of the target server.
Example: getServerMaxMoney('foodnstuff');

" + - "getServerGrowth(hostname/ip)
Returns the server's intrinsic 'growth parameter'. This growth parameter is a number " + - "between 1 and 100 that represents how quickly the server's money grows. This parameter affects the percentage by which this server's " + - "money is increased when using the grow() function. A higher growth parameter will result in a higher percentage from grow().

" + - "The argument passed in must be a string with the hostname or IP of the target server.

" + - "getServerSecurityLevel(hostname/ip)
Returns the security level of a server. The argument passed in must be a string with either the " + - "hostname or IP of the target server. A server's security is denoted by a number, typically between 1 and 100.

" + - "getServerBaseSecurityLevel(hostname/ip)
Returns the base security level of a server. This is the security level that the server starts out with. " + - "This is different than getServerSecurityLevel() because getServerSecurityLevel() returns the current security level of a server, which can constantly change " + - "due to hack(), grow(), and weaken() calls on that server. The base security level will stay the same until you reset by installing an Augmentation.

" + - "The argument passed in must be a string with either the hostname or IP of the target server. A server's base security is denoted by a number, typically between 1 and 100. " + - "

" + - "getServerMinSecurityLevel(hostname/ip)Returns the minimum security level of a server. The argument passed in must be a string with " + - "either the hostname or IP of the target server.

" + - "getServerRequiredHackingLevel(hostname/ip)
Returns the required hacking level of a server. The argument passed in must be a string with either the " + - "hostname or IP or the target server.

" + - "getServerNumPortsRequired(hostname/ip)
Returns the number of open ports required to successfully run NUKE.exe on a server. The argument " + - "passed in must be a string with either the hostname or IP of the target server.

" + - "getServerRam(hostname/ip)
Returns an array with two elements that gives information about the target server's RAM. The first " + - "element in the array is the amount of RAM that the server has (in GB). The second element in the array is the amount of RAM that " + - "is currently being used on the server.

" + - "serverExists(hostname/ip)
Returns a boolean denoting whether or not the specified server exists. The argument " + - "must be a string with the hostname or IP of the target server.

" + - "fileExists(filename, [hostname/ip])
Returns a boolean (true or false) indicating whether the specified file exists on a server. " + - "The first argument must be a string with the filename. A file can either be a script, program, literature file, or a text file. The filename for a script is case-sensitive, but " + - "for the other files it is not. For example, fileExists('brutessh.exe') will work fine, even though the actual program is named BruteSSH.exe.

" + - "The second argument is a string with the hostname or IP of the server on which to search for the program. This second argument is optional. " + - "If it is omitted, then the function will search through the current server (the server running the script that calls this function) for the file.
" + - "Example: fileExists('foo.script', 'foodnstuff');
" + - "Example: fileExists('ftpcrack.exe');

" + - "The first example above will return true if the script named 'foo.script' exists on the 'foodnstuff' server, and false otherwise. The second example above will " + - "return true if the current server (the server on which this function runs) contains the FTPCrack.exe program, and false otherwise.

" + - "isRunning(filename, hostname/ip, [args...])
Returns a boolean (true or false) indicating whether the specified script is running on a server. " + - "Remember that a script is uniquely identified by both its name and its arguments.

" + - "The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is a string with the " + - "hostname or IP of the target server. Any additional arguments passed to the function will specify the arguments passed into the target script. " + - "The function will check whether the script is running on that target server.
" + - "Example: isRunning('foo.script', 'foodnstuff');
" + - "Example: isRunning('foo.script', getHostname());
" + - "Example: isRunning('foo.script', 'joesguns', 1, 5, 'test');

" + - "The first example above will return true if there is a script named 'foo.script' with no arguments running on the 'foodnstuff' server, and false otherwise. The second " + - "example above will return true if there is a script named 'foo.script' with no arguments running on the current server, and false otherwise. " + - "The third example above will return true if there is a script named 'foo.script' with the arguments 1, 5, and 'test' running on the 'joesguns' server, and " + - "false otherwise.

" + - "getNextHacknetNodeCost()
Returns the cost of purchasing a new Hacknet Node

" + - "purchaseHacknetNode()
Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number " + - "at the end of the Hacknet Node's name (e.g The Hacknet Node named 'hacknet-node-4' will have an index of 4). If the player cannot afford to purchase " + - "a new Hacknet Node then the function will return false. Does NOT work offline

" + - "purchaseServer(hostname, ram)
Purchases a server with the specified hostname and amount of RAM. The first argument can be any data type, " + - "but it will be converted to a string using Javascript's String function. Anything that resolves to an empty string will cause the function to fail. " + - "The second argument specified the amount of RAM (in GB) for the server. This argument must resolve to a numeric and it must be a power of 2 " + - "(2, 4, 8, etc...).

" + - "This function returns the hostname of the newly purchased server as a string. If the function fails to purchase a server, then it will return " + - "an empty string. The function will fail if the arguments passed in are invalid or if the player does not have enough money to purchase the specified server.

" + - "deleteServer(hostname)
Deletes one of the servers you've purchased with the specified hostname. The function will fail if " + - "there are any scripts running on the specified server. Returns true if successful and false otherwise

" + - "getPurchasedServers([hostname=true])
Returns an array with either the hostname or IPs of all of the servers you " + - "have purchased. It takes an optional parameter specifying whether the hostname or IP addresses will be returned. If this " + - "parameter is not specified, it is true by default and hostnames will be returned

" + - "round(n)
Rounds the number n to the nearest integer. If the argument passed in is not a number, then the function will return 0.

" + - "write(port/fn, data='', mode='a')
This function can be used to either write data to a port or to a text file (.txt).

" + - "If the first argument is a number between 1 and 10, then it specifies a port and this function will write data to a port. If the second " + - "argument is not specified then it will write an empty string to the port. The third argument, mode, is not used when writing data to a port.

" + - "If the first argument is a string, then it specifies the name of a text file (.txt) and this function will write data to a text file. " + - "The second argument defines the data to be written to the text file. If it is not specified then it is an empty string by default. " + - "This third argument, mode, defines how the data will be written to the text file. If mode is set to 'w', then the data is written in 'write' " + - "mode which means that it will overwrite the existing data on the file, or it will create a new file if it does not already exist. Otherwise, " + - "the data will be written in 'append' mode which means that the data will be added at the end of the existing file, or it will create a new file if it " + - "does not already exist. If mode isn't specified then it will be 'a' for 'append' mode by default.

" + - "read(port/fn)
This function is used to read data from a port or from a text file (.txt).

" + - "This function takes a single argument. If this argument is a number between 1 and 10, then it specifies a port and it will read data from " + - "a port. A port is a serialized queue. This function will remove the first element from the queue and return it. If the queue is empty, " + - "then the string 'NULL PORT DATA' will be returned.

" + - "If the first argument is a string, then it specifies the name of a text file and this function will return the data in the " + - "specified text file. If the text file does not exist, an empty string will be returned

" + - "clear(port/fn)
This function is used to clear a Netscript Port or a text file.

" + - "It takes a single argument. If this argument is a number between 1 and 10, then it specifies a port and will clear it (deleting all data from it). " + - "If the argument is a string, then it specifies the name of a text file (.txt) and will clear the text file so that it is empty.

" + - "rm(fn)
This function is used to remove a file. It takes a string with the filename as the argument. Returns " + - "true if it successfully deletes the given file, and false otherwise. This function works for every file type except message files (.msg).

" + - "scriptRunning(scriptname, hostname/ip)
Returns a boolean indicating whether any instance of the specified script is running " + - "on a server, regardless of its arguments. This is different than the isRunning() function because it does not " + - "try to identify a specific instance of a running script by its arguments.

" + - "The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is " + - "a string with the hostname or IP of the target server. Both arguments are required.

" + - "scriptKill(scriptname, hostname/ip)
Kills all scripts with the specified filename that are running on the server specified by the " + - "hostname/ip, regardless of arguments. Returns true if one or more scripts were successfully killed, and false if there were none.

" + - "The first argument must be a string with the name of the script. The script name is case sensitive. The second argument is " + - "a string with the hostname or IP of the target server. Both arguments are required.

" + - "getScriptRam(scriptname, hostname/ip)
Returns the amount of RAM required to run the specified script on the " + - "target server. The first argument must be a string with the name of the script. The script name is case sensitive. " + - "The second argument is a string with the hostname or IP of the server where that script is. Both arguments are required.

" + - "getHackTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the hack() Netscript function " + - "on the server specified by the hostname/ip. The argument must be a string with the hostname/ip of the target server.

" + - "getGrowTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the grow() Netscript function " + - "on the server specified by the hostname/ip. The argument must be a string with the hostname/ip of the target server.

" + - "getWeakenTime(hostname/ip)
Returns the amount of time in seconds it takes to execute the weaken() Netscript function " + - "on the server specified by the hostname/ip. The argument must be a string with the hostname/ip of the target server.

" + - "getScriptIncome([scriptname], [hostname/ip], [args...])
" + - "Returns the amount of income the specified script generates while online (when the game is open, does not apply for " + - "offline income). This function can also be called with no arguments. If called with no arguments, then this function " + - "will return an array of two values. The first value is the total income ($/sec) of all of your active scripts (currently running). " + - "The second value is the total income ($/sec) from scripts since you last installed Augmentations (or destroyed a BitNode).

" + - "Remember that a script is uniquely identified by both its name and its arguments. So for example if you ran a script " + - "with the arguments 'foodnstuff' and '5' then in order to use this function to get that script's income you must " + - "specify those arguments in this function call.

" + - "The first argument, if specified, must be a string with the name of the script (including the .script extension). " + - "The second argument must be a string with the hostname/IP of the target server. If the first argument is specified " + - "then the second argument must be specified as well. Any additional arguments passed to the function will specify " + - "the arguments passed into the target script.

" + - "getScriptExpGain([scriptname], [hostname/ip], [args...])
" + - "Returns the amount of hacking experience the specified script generates while online (when the game is open, does not apply for " + - "offline experience gains). This function can also return the total experience gain rate of all of your active scripts by running the function " + - "with no arguments.

" + - "Remember that a script is uniquely identified by both its name and its arguments. So for example if you ran a script " + - "with the arguments 'foodnstuff' and '5' then in order to use this function to get that script's income you must " + - "specify those arguments in this function call.

" + - "The first argument, if specified, must be a string with the name of the script (including the .script extension). " + - "The second argument must be a string with the hostname/IP of the target server. If the first argument is specified " + - "then the second argument must be specified as well. Any additional arguments passed to the function will specify " + - "the arguments passed into the target script.

" + - "getTimeSinceLastAug()
" + - "Returns the amount of time in milliseconds that have passed since you last installed Augmentations (or destroyed a BitNode).

" + - "sprintf()/vsprintf()
" + - "See this link for details

" + - "prompt(message)
" + - "Prompts the player with a dialog box with two options: 'Yes' and 'No'. This function will returns true if " + - "the player clicks 'Yes' and false if the player click's 'No'. The script's execution is halted until the " + - "player selects 'Yes' or 'No'. The function takes a single string as an argument which specifies the text " + - "that appears on the dialog box.

" + - "

Hacknet Nodes API


" + - "Netscript provides the following API for accessing and upgrading your Hacknet Nodes through scripts. This API does NOT work offline.

" + - "hacknetnodes
A special variable. This is an array that maps to the Player's Hacknet Nodes. The Hacknet Nodes are accessed through " + - "indexes. These indexes correspond to the number at the end of the name of the Hacknet Node. For example, the first Hacknet Node you purchase " + - "will have the same 'hacknet-node-0' and can be accessed with hacknetnodes[0]. The fourth Hacknet Node you purchase will have the name " + - "'hacknet-node-3' and can be accessed with hacknetnodes[3].

" + - "hacknetnodes.length
Returns the number of Hacknet Nodes that the player owns

" + - "hacknetnodes[i].level
Returns the level of the corresponding Hacknet Node

" + - "hacknetnodes[i].ram
Returns the amount of RAM on the corresponding Hacknet Node

" + - "hacknetnodes[i].cores
Returns the number of cores on the corresponding Hacknet Node

" + - "hacknetnodes[i].totalMoneyGenerated
Returns the total amount of money that the corresponding Hacknet Node has earned

" + - "hacknetnodes[i].onlineTimeSeconds
Returns the total amount of time that the corresponding Hacknet Node has existed

" + - "hacknetnodes[i].moneyGainRatePerSecond
Returns the income ($ / sec) that the corresponding Hacknet Node earns

" + - "hacknetnodes[i].upgradeLevel(n)
Tries to upgrade the level of the corresponding Hacknet Node n times. The argument n must be a " + - "positive integer. Returns true if the Hacknet Node's level is successfully upgraded n times or up to the max level (200), and false otherwise.

" + - "hacknetnodes[i].upgradeRam()
Tries to upgrade the amount of RAM on the corresponding Hacknet Node. Returns true if the " + - "RAM is successfully upgraded, and false otherwise.

" + - "hacknetnodes[i].upgradeCore()
Attempts to purchase an additional core for the corresponding Hacknet Node. Returns true if the " + - "additional core is successfully purchase, and false otherwise.

" + - "Example: The following is an example of one way a script can be used to automate the purchasing and upgrading of Hacknet Nodes. " + - "This script purchases new Hacknet Nodes until the player has four. Then, it iteratively upgrades each of those four Hacknet Nodes " + - "to a level of at least 75, RAM to at least 8GB, and number of cores to at least 2.

" + - "while(hacknetnodes.length < 4) {
" + - "    purchaseHacknetNode();
" + - "}
" + - "for (i = 0; i < 4; i = i++) {
" + - "    while (hacknetnodes[i].level <= 75) {
" + - "        hacknetnodes[i].upgradeLevel(5);
" + - "        sleep(10000);
" + - "    }
" + - "}
" + - "for (i = 0; i < 4; i = i++) {
" + - "    while (hacknetnodes[i].ram < 8) {
" + - "        hacknetnodes[i].upgradeRam();
" + - "        sleep(10000);
" + - "    }
" + - "}
" + - "for (i = 0; i < 4; i = i++) {
" + - "    while (hacknetnodes[i].cores < 2) {
" + - "        hacknetnodes[i].upgradeCore();
" + - "        sleep(10000);
" + - "    }
" + - "}

" + - "

Trade Information eXchange (TIX) API


" + - "getStockPrice(sym)
Returns the price of a stock. The argument passed in must be the stock's symbol (NOT THE COMPANY NAME!). The symbol " + - "is a sequence of two to four capital letters. The symbol argument must be a string.

" + - "Example: getStockPrice('FSIG');

" + - "getStockPosition(sym)
Returns an array of two elements that represents the player's position in a stock. The first element " + - "in the array is the number of shares the player owns of the specified stock. The second element in the array is the average price of the player's " + - "shares. Both elements are numbers. The argument passed in must be the stock's symbol, which is a sequence of two to four capital letters.

" + - "Example:

pos = getStockPosition('ECP');
shares = pos[0];
avgPx = pos[1];

"+ - "buyStock(sym, shares)
Attempts to purchase shares of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument " + - "must be the number of shares to purchase.

" + - "If the player does not have enough money to purchase specified number of shares, then no shares will be purchased (it will not purchase the most you can afford). " + - "Remember that every transaction on the stock exchange costs a certain commission fee.

" + - "If this function successfully purchases the shares, it will return the stock price at which each share was purchased. Otherwise, it will return 0.

" + - "sellStock(sym, shares)
Attempts to sell shares of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument " + - "must be the number of shares to sell.

" + - "If the specified number of shares in the function exceeds the amount that the player actually owns, then this function will sell all owned shares. " + - "Remember that every transaction on the stock exchange costs a certain commission fee.

" + - "The net profit made from selling stocks with this function is reflected in the script's statistics. This net profit is calculated as:

" + - "shares * (sell price - average price of purchased shares)

" + - "If the sale is successful, this function will return the stock price at which each share was sold. Otherwise, it will return 0.

" + - "shortStock(sym, shares)
" + - "Attempts to purchase a short position of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument " + - "must be the number of shares to purchase.

" + - "In order to use this function the player must be in BitNode-8 or must have Level 2 of Source-File 8.

" + - "If the player does not have enough money to purchase the specified number of shares, then no shares will be purchased. Remember that every " + - "every transaction on the stock exchange costs a certain commission fee.

" + - "If the purchase is successful, this function will return the stock price at which each share was purchased. Otherwise, it will return 0.

" + - "sellShort(sym, shares)
" + - "Attempts to sell a short position of a stock using a Market Order. The first argument must be a string with the stock's symbol. The second argument must be the " + - "number of shares to sell.

" + - "In order to use this function the player must be in BitNode-8 or must have Level 2 of Source-File 8.

" + - "If the specified number of shares exceeds the amount that the player actually owns, then this function will sell all owned shares. " + - "Remember that every transaction on the stock exchange costs a certain commission fee.

" + - "If the sale was successful, this function will return the stock price at which each sale was sold. Otherwise, it will return 0.

" + - "placeOrder(sym, shares, price, type, pos)
" + - "Places an order on the stock market. This function only works for Limit and Stop Orders. Use the buyStock/sellStock/shortStock/sellShort functions " + - "to place Market Orders. In order to use this function the player must be in BitNode-8 or must have Level 3 of Source-File 8.

" + - "The 'sym' argument must be a string with the symbol of the stock. The 'shares' and 'price' arguments " + - "specify the number of shares and the execution price for the order. They must be numeric.

" + - "The 'type' argument is a string that specifies the type of order. It must specify either 'limit' or 'stop', and must " + - "also specify 'buy' or 'sell'. This argument is NOT case-sensitive. Here are four examples that will work:

" + - "limitbuy, limitsell, stopbuy, stopsell

" + - "The last argument, 'pos', is a string that specifies whether the order is a 'Long' or 'Short' position. The values 'L' and " + - "'S' can also be used. This argument is NOT case-sensitive.

" + - "Returns true if the order is successfully placed, and false otherwise.

" + - "cancelOrder(sym, shares, price, type, pos)
" + - "Cancels an oustanding order on the stock market. In order to use this function the player must be in BitNode-8 or must have " + - "Level 3 of Source-File 8. This function uses the same arguments as placeOrder()

" + - "

While loops


" + - "A while loop is a control flow statement that repeatedly executes code as long as a condition is met.

" + - "while ([cond]) {
    [code]
}


" + - "As long as [cond] remains true, the code block [code] will continuously execute. Example:

" + - "i = 0;
while (i < 10) {
    hack('foodnstuff');
    i = i + 1;
}


" + - "This code above repeats the 'hack('foodnstuff')' command 10 times before it stops and exits.

" + - "while(true) {
     hack('foodnstuff');
}


" + - "This while loop above is an infinite loop (continuously runs until the script is manually stopped) that repeatedly runs the 'hack('foodnstuff')' command. " + - "Note that a semicolon is needed at closing bracket of the while loop, UNLESS it is at the end of the code

" + - "

For loops


" + - "A for loop is another control flow statement that allows code to be repeated by iterations. The structure is:

" + - "for ([init]; [cond]; [post]) {
    code
}


" + - "The [init] expression evaluates before the for loop begins. The for loop will continue to execute " + - "as long as [cond] is met. The [post] expression will evaluate at the end of every iteration " + - "of the for loop. The following example shows code that will run the 'hack('foodnstuff');' command 10 times " + - " using a for loop:

" + - "for (i = 0; i < 10; i = i++) {
    hack('foodnstuff');
}


" + - "

If statements


" + - "If/Else if/Else statements are conditional statements used to perform different actions based on different conditions:

" + - "if (condition1) {
    code1
} else if (condition2) {
    code2
} else {
" + - "    code3
}


" + - "In the code above, first condition1 will be checked. If this condition is true, then code1 will execute and the " + - "rest of the if/else if/else statement will be skipped. If condition1 is NOT true, then the code will then go on to check " + - "condition2. If condition2 is true, then code2 will be executed, and the rest of the if/else if/else statement " + - "will be skipped. If none of the conditions are true, then the code within the else block (code3) will be executed. " + - "Note that a conditional statement can have any number of 'else if' statements.

" + - "Example:

" + - "if(getServerMoneyAvailable('foodnstuff') > 200000) {
    hack('foodnstuff');
" + - "} else {
    grow('foodnstuff');
}

" + - "The code above will use the getServerMoneyAvailable() function to check how much money there is on the 'foodnstuff' server. " + - "If there is more than $200,000, then it will try to hack that server. If there is $200,000 or less on the server, " + - "then the code will call grow('foodnstuff') instead and add more money to the server.

", - TutorialSingularityFunctionsText: "

Singularity Functions


" + - "The Singularity Functions are a special set of Netscript functions that are unlocked in BitNode-4. " + - "These functions allow you to control many additional aspects of the game through scripts, such as " + - "working for factions/companies, purchasing/installing Augmentations, and creating programs.

" + - "If you are in BitNode-4, then you will automatically have access to all of these functions. " + - "You can use the Singularity Functions in other BitNodes if and only if you have the Source-File " + - "for BitNode-4 (aka Source-File 4). Each level of Source-File 4 will open up additional Singularity " + - "Functions that you can use in other BitNodes. If your Source-File 4 is upgraded all the way to level 3, " + - "then you will be able to access all of the Singularity Functions.

" + - "Note that Singularity Functions require a lot of RAM outside of BitNode-4 (their RAM costs are multiplied by " + - "10 if you are not in BitNode-4).

" + - "universityCourse(universityName, courseName)
" + - "If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.

" + - "This function will automatically set you to start taking a course at a university. If you are already " + - "in the middle of some 'working' action (such as working at a company, for a faction, or on a program), " + - "then running this function will automatically cancel that action and give you your earnings.

" + - "The first argument must be a string with the name of the university. The names are NOT case-sensitive. " + - "Note that you must be in the correct city for whatever university you specify. The three universities are:

" + - "Summit University
Rothman University
ZB Institute of Technology

" + - "The second argument must be a string with the name of the course you are taking. These names are NOT case-sensitive. " + - "The available courses are:

" + - "Study Computer Science
Data Structures
Networks
Algorithms
Management
Leadership

" + - "The cost and experience gains for all of these universities and classes are the same as if you were to manually " + - "visit and take these classes.

" + - "This function will return true if you successfully start taking the course, and false otherwise.

" + - "gymWorkout(gymName, stat)
" + - "If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.

" + - "This function will automatically set you to start working out at a gym to train a particular stat. If you are " + - "already in the middle of some 'working' action (such as working at a company, for a faction, or on a program), then " + - "running this function will automatically cancel that action and give you your earnings.

" + - "The first argument must be a string with the name of the gym. The names are NOT case-sensitive. Note that you must " + - "be in the correct city for whatever gym you specify. The available gyms are:

" + - "Crush Fitness Gym
Snap Fitness Gym
Iron Gym
Powerhouse Gym
Millenium Fitness Gym

" + - "The second argument must be a string with the stat you want to work out. These are NOT case-sensitive. " + - "The valid stats are:

strength OR str
defense OR def
dexterity OR dex
agility OR agi

" + - "The cost and experience gains for all of these gyms are the same as if you were to manually visit these gyms and train " + - "This function will return true if you successfully start working out at the gym, and false otherwise.

" + - "travelToCity(cityname)
" + - "If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.

" + - "This function allows the player to travel to any city. The cost for using this function is the same as the cost for traveling through the Travel Agency.

" + - "The argument passed into this must be a string with the name of the city to travel to. Note that this argument IS CASE SENSITIVE. The valid cities are:

" + - "Aevum
Chongqing
Sector-12
New Tokyo
Ishima
Volhaven

" + - "This function will return true if you successfully travel to the specified city and false otherwise.

" + - "purchaseTor()
" + - "If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.

" + - "This function allows you to automatically purchase a TOR router. The cost for purchasing a TOR router using this " + - "function is the same as if you were to manually purchase one.

" + - "This function will return true if it successfully purchase a TOR router and false otherwise.

" + - "purchaseProgram(programName)
" + - "If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to use this function.

" + - "This function allows you to automatically purchase programs. You MUST have a TOR router in order to use this function.

" + - "The argument passed in must be a string with the name of the program (including the '.exe' extension). This argument is " + - "NOT case-sensitive.

Example: " + - "purchaseProgram('brutessh.exe');

" + - "The cost of purchasing programs using this function is the same as if you were purchasing them through the Dark Web (using " + - "the buy Terminal command).

" + - "This function will return true if the specified program is purchased, and false otherwise.

" + - "getStats()
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this " + - "function.

Returns an object with the Player's stats. The object has the following properties:

" + - "Player.hacking
Player.strength
Player.defense
Player.dexterity
Player.agility
Player.charisma
Player.intelligence

" + - "Example:

" + - "res = getStats();
print('My charisma level is: ' + res.charisma);

" + - "isBusy()
If you are not in BitNode-4, then you must have Level 1 of Source-File 4 in order to run this " + - "function.

Returns a boolean indicating whether or not the player is currently performing an 'action'. " + - "These actions include working for a company/faction, studying at a univeristy, working out at a gym, " + - "creating a program, or committing a crime.

" + - "upgradeHomeRam()
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function will upgrade amount of RAM on the player's home computer. The cost is the same as if you were to do it manually.

" + - "This function will return true if the player's home computer RAM is successfully upgraded, and false otherwise.

" + - "getUpgradeHomeRamCost()
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "Returns the cost of upgrading the player's home computer RAM.

" + - "workForCompany()
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function will automatically set you to start working at the company at which you are employed. If you are already " + - "in the middle of some 'working' action (such as working for a faction, training at a gym, or creating a program), then " + - "running this function will automatically cancel that action and give you your earnings.

" + - "This function will return true if the player starts working, and false otherwise.

" + - "applyToCompany(companyName, field)
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function will automatically try to apply to the specified company for a position in the specified field. This " + - "function can also be used to apply for promotions by specifying the company and field you are already employed at.

" + - "The first argument must be a string with the name of the company. This argument IS CASE-SENSITIVE. The second argument must " + - "be a string representing the 'field' to which you want to apply. This second argument is NOT case-sensitive. Valid values for " + - "the second argument are:

" + - "software
software consultant
it
security engineer
network engineer
business
business consultant
" + - "security
agent
employee
part-time employee
waiter
part-time waiter

" + - "This function will return true if you successfully get a job/promotion, and false otherwise. Note " + - "that if you are trying to use this function to apply for a promotion and you don't get one, it will return false.

" + - "getCompanyRep(companyName)
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function will return the amount of reputation you have at the specified company. If the company passed in as " + - "an argument is invalid, -1 will be returned.

" + - "The argument passed in must be a string with the name of the company. This argument IS CASE-SENSITIVE.

" + - "checkFactionInvitations()
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "Returns an array with the name of all Factions you currently have oustanding invitations from.

" + - "joinFaction(name)
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function will automatically accept an invitation from a faction and join it.

" + - "The argument must be a string with the name of the faction. This name IS CASE-SENSITIVE.

" + - "workForFaction(factionName, workType)
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function will automatically set you to start working for the specified Faction. Obviously, you " + - "must be a member of the Faction or else this function will fail. If you are already in the middle of " + - "some 'working' action (such as working for a company, training at a gym, or creating a program), then running " + - "this function will automatically cancel that action and give you your earnings.

" + - "The first argument must be a string with the name of the faction. This argument IS CASE-SENSITIVE. The second argument " + - "must be a string with the type of work you want to perform for the faction. The valid values for this argument are:

" + - "
hacking/hacking contracts/hackingcontracts
field/fieldwork/field work
security/securitywork/security work

" + - "This function will return true if you successfully start working for the specified faction, and false otherwise.

" + - "getFactionRep(factionName)
" + - "If you are not in BitNode-4, then you must have Level 2 of Source-File 4 in order to use this function.

" + - "This function returns the amount of reputation you have for the specified Faction. The argument must be a " + - "string with the name of the Faction. The argument IS CASE-SENSITIVE.

" + - "createProgram(programName)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "This function will automatically set you to start working on creating the specified program. If you are already in " + - "the middle of some 'working' action (such as working for a company, training at a gym, or taking a course), then " + - "running this function will automatically cancel that action and give you your earnings.

" + - "The argument passed in must be a string designating the name of the program. This argument is NOT case-sensitive.

" + - "Example:

createProgram('relaysmtp.exe');

" + - "Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are:

" + - "BruteSSH.exe: 50
FTPCrack.exe: 100
relaySMTP.exe: 250
HTTPWorm.exe: 500
SQLInject.exe: 750
" + - "DeepscanV1.exe: 75
DeepscanV2.exe: 400
ServerProfiler.exe: 75
AutoLink.exe: 25

" + - "This function returns true if you successfully start working on the specified program, and false otherwise.

" + - "commitCrime(crime)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "This function is used to automatically attempt to commit crimes. If you are already in the middle of some 'working' " + - "action (such as working for a company or training at a gym), then running this function will automatically cancel " + - "that action and give you your earnings.

" + - "The function takes a string that specifies what crime to attempt. This argument is not case-sensitive and is fairly " + - "lenient in terms of what inputs it accepts. Here is a list of valid inputs for all of the crimes:

" + - "shoplift, rob store, mug, larceny, deal drugs, bond forgery, traffick arms, homicide, grand theft auto, " + - "kidnap, assassinate, heist

" + - "Crimes committed using this function will have all of their earnings halved (this applies for both money and experience!)

" + - "This function returns the number of seconds it takes to attempt the specified crime (e.g It takes 60 seconds to attempt " + - "the 'Rob Store' crime, so running commitCrime('rob store') will return 60). Warning: I do not recommend using the time " + - "returned from this function to try and schedule your crime attempts. Instead, I would use the isBusy() Singularity function " + - "to check whether you have finished attempting a crime. This is because although the game sets a certain crime to be X amount of seconds, " + - "there is no guarantee that your browser will follow that time limit.

" + - "getCrimeChance(crime)
If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to " + - "use this function.

" + - "This function returns your chance of success at commiting the specified crime. The chance is returned as a decimal " + - "(i.e. 60% would be returned as 0.6). The argument for this function is a string. It is not case-sensitive and is fairly " + - "lenient in terms of what inputs it accepts. Check the documentation for the commitCrime() Singularity Function to see " + - "examples of valid inputs.

" + - "getOwnedAugmentations(purchased=false)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "This function returns an array of the names of all Augmentations you own as strings. It takes a single optional " + - "boolean argument that specifies whether the returned array should include Augmentations you have purchased " + - "but not yet installed. If it is true, then the returned array will include these Augmentations. By default, " + - "this argument is false.

" + - "getAugmentationsFromFaction(facName)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "Returns an array containing the names (as strings) of all Augmentations that are available from the specified faction. " + - "The argument must be a string with the faction's name. This argument is case-sensitive.

" + - "getAugmentationCost(augName)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "This function returns an array with two elements that gives the cost for the specified Augmentation" + - ". The first element in the returned array is the reputation requirement of the Augmentation, and the second element " + - "is the money cost.

" + - "The argument passed in must be a string with the name of the Augmentation. This argument IS CASE-SENSITIVE. " + - "If an invalid Augmentation name is passed in, this function will return the array [-1, -1].

" + - "purchaseAugmentation(factionName, augName)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "This function will try to purchase the specified Augmentation through the given Faction.

" + - "The two arguments must be strings specifying the name of the Faction and Augmentation, respectively. These arguments are both CASE-SENSITIVE.

" + - "This function will return true if the Augmentation is successfully purchased, and false otherwise.

" + - "installAugmentations(cbScript)
" + - "If you are not in BitNode-4, then you must have Level 3 of Source-File 4 in order to use this function.

" + - "This function will automatically install your Augmentations, resetting the game as usual.

" + - "It will return true if successful, and false otherwise.

" + - "This function takes a single optional parameter that specifies a callback script. This is " + - "a script that will automatically be run after Augmentations are installed (after the reset). " + - "This script will be run with no arguments and 1 thread. It must be located on your home computer. This argument, if used, " + - "must be a string with the name of the script.", - - TutorialTravelingText:"There are six major cities in the world that you are able to travel to:

" + - " Aevum
" + - " Chongqing
" + - " Sector-12
" + - " New Tokyo
" + - " Ishima
" + - " Volhaven

" + - "To travel between cities, visit your current city's travel agency through the 'World' page. " + - "From the travel agency you can travel to any other city. Doing so costs money.

" + - "Each city has its own set of companies and unique locations. Also, certain content is only available to you " + - "if you are in certain cities, so get exploring!", - TutorialCompaniesText: "Hacking is not the only way to gain money and experience! Located around the world are many " + - "different companies which you can work for. By working for a company you can earn money, " + - "train your various labor skills, and unlock powerful passive perks.

" + - "To apply for a job, visit the company you want to work for through the 'World' menu. The company " + - "page will have options that let you apply to positions in the company. There might be several different " + - "positions you can apply for, ranging from software engineer to business analyst to security officer.

" + - "When you apply for a job, you will get the offer if your stats are high enough. Your first position at " + - "a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on " + - "the company page that allows you to work for the company. Click this button to start working.

" + - "Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, " + - "and reputation. The rate at which you money and experience depends on the company and your position. " + - "The amount of reputation you gain for your company is based on your job performance, which is affected by " + - "your stats. Different positions value different stats. When you are working, you are unable to perform any " + - "other actions such as using your terminal or visiting other locations (However, note that any scripts you have " + - "running on servers will continue to run as you work!). It is possible to cancel your work shift before the " + - "8 hours is up. However, if you have a full-time job, then cancelling a shift early will result in you gaining " + - "only half of the reputation " + - "that you had earned up to that point. There are also part-time/consultant jobs available where you will not " + - " be penalized if you cancel a work shift early. However, these positions pay less than full-time positions.

" + - "As you continue to work at a company, you will gain more and more reputation at that company. When your stats " + - "and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like " + - "you applied for the job originally. Higher positions at a company provide better salaries and stat gains.

" + - "

Infiltrating Companies


" + - "Many companies have facilities that you can attempt to infiltrate. By infiltrating, you can steal classified company secrets " + - "and then sell these for money or for faction reputation. To try and infiltrate a company, visit a company through the " + - "'World' menu. There will be an option that says 'Infiltrate Company'.

" + - "When infiltrating a company, you must progress through clearance levels in the facility. Every clearance level " + - "has some form of security that you must get past. There are several forms of security, ranging from high-tech security systems to " + - "armed guards. For each form of security, there are a variety of options that you can choose to try and bypass the security. Examples " + - "include hacking the security, engaging in combat, assassination, or sneaking past the security. The chance to succeed for each option " + - "is determined in part by your stats. So, for example, trying to hack the security system relies on your hacking skill, whereas trying to " + - "sneak past the security relies on your agility level.

" + - "The facility has a 'security level' that affects your chance of success when trying to get past a clearance level. " + - "Every time you advance to the next clearance level, the facility's security level will increase by a fixed amount. Furthermore " + - "the options you choose and whether you succeed or fail will affect the security level as well. For example, " + - "if you try to kill a security guard and fail, the security level will increase by a lot. If you choose to sneak past " + - "security and succeed, the security level will not increase at all.

" + - "Every 5 clearance levels, you will steal classified company secrets that can be sold for money or faction reputation. However, " + - "in order to sell these secrets you must successfully escape the facility using the 'Escape' option. Furthermore, companies have " + - "a max clearance level. If you reach the max clearance level you will automatically escape the facility with all of your " + - "stolen secrets.

", - TutorialFactionsText: "Throughout the game you may receive invitations from factions. There are many different factions, and each faction " + - "has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial " + - "to progressing in the game and unlocking endgame content.

" + - "It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction " + - "may prevent you from joining other rival factions.

" + - "The 'Factions' link on the menu brings up a list of all factions that you have joined. " + - "You can select a Faction on this list to go to that Faction page. This page displays general " + - "information about the Faction and also lets you perform work for the faction. " + - "Working for a Faction is similar to working for a company except that you don't get paid a salary. " + - "You will only earn reputation in your Faction and train your stats. Also, cancelling work early " + - "when working for a Faction does NOT result in reduced experience/reputation earnings.

" + - "Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will " + - "upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.", - TutorialAugmentationsText: "Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves " + - "beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to " + - "genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties.

" + - "Because of how powerful these Augmentations are, the technology behind them is kept private and secret by the " + - "corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is " + - "through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase " + - "its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, " + - "and they are fairly expensive.

" + - "When you purchase an Augmentation, the price of purchasing another Augmentation increases by 90%. This multiplier stacks for " + - "each Augmentation you purchase. You will not gain the benefits of your purchased Augmentations until you install them. You can " + - "choose to install Augmentations through the 'Augmentations' menu tab. Once you install your purchased Augmentations, " + - "their costs are reset back to the original price.

" + - "Unfortunately, installing Augmentations has side effects. You will lose most of the progress you've made, including your " + - "skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to " + - "help you progress.

" + - "To summarize, here is a list of everything you will LOSE when you install an Augmentation:

" + - "Stats/Skills
" + - "Money
" + - "Scripts on all servers EXCEPT your home computer
" + - "Purchased servers
" + - "Hacknet Nodes
" + - "Company/faction reputation
" + - "Jobs and Faction memberships
" + - "Programs
" + - "Stocks
" + - "TOR router

" + - "Here is everything you will KEEP when you install an Augmentation:

" + - "Every Augmentation you have installed
" + - "Scripts on your home computer
" + - "RAM and CPU Core Upgrades on your home computer
" + - "World Stock Exchange account and TIX API Access
", - - LatestUpdate: - "v0.34.2
" + - "-Corporation Management Changes:
" + - "---Added advertising mechanics
" + - "---Added Industry-specific purchases
" + - "---Re-designed employee management UI
" + - "---Rebalancing: Made many upgrades/purchases cheaper. Receive more money from investors in early stage. Company valuation is higher after going public
" + - "---Multiple bug fixes
" + - "-Added rm() Netscript function
" + - "-Updated the way script RAM usage is calculated. Now, a function only increases RAM usage the " + - "first time it is called. i.e. even if you call hack() multiple times in a script, it only counts " + - "against RAM usage once. The same change applies for while/for loops and if conditionals.
" + - "-The RAM cost of the following were increased:
" + - "---If statements: increased by 0.05GB
" + - "---run() and exec(): increased by 0.2GB
" + - "---scp(): increased by 0.1GB
" + - "---purchaseServer(): increased by 0.25GB
" + - "-Note: You may need to re-save all of your scripts in order to re-calculate their RAM usages. Otherwise, " + - "it should automatically be re-calculated when you reset/prestige
" + - "-The cost to upgrade your home computer's RAM has been increased (both the base cost and the exponential upgrade multiplier)
" + - "-The cost of purchasing a server was increased by 10% (it is now $55k per RAM)
" + - "-Bug fix: (Hopefully) removed an exploit where you could avoid RAM usage for Netscript function calls " + - "by assigning functions to a variable (foo = hack(); foo('helios');)
" + - "-Bug fix: (Hopefully) removed an exploit where you could run arbitrary Javascript code using the constructor() " + - "method
" + - "-Thanks to Github user mateon1 and Reddit users havoc_mayhem and spaceglace for notifying me of the above exploits
" + - "-The fileExists() Netscript function now works on text files (.txt). Thanks to Github user devoidfury for this
" -} - - - +throw new Error("Module parse failed: C:\\Users\\danie\\Desktop\\netburner\\src\\Constants.js Unexpected token (1140:4)\nYou may need an appropriate loader to handle this file type.\n| \"-Minor balance changes to Corporation. Upgrades are generally cheaper and/or have more powerful effects. \" +\r\n| \"You will receive more funding while your are a private company. \"\r\n| \"-Accessing the hacknetnodes array in Netscript now costs 4.0GB of RAM (only counts against RAM usage once)
\"\r\n| \r\n| }\r"); /***/ }), /* 4 */ @@ -4053,6 +2909,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Company_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__CompanyManagement_js__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__CreateProgram_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Faction_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__Location_js__ = __webpack_require__(12); @@ -4933,15 +3790,15 @@ let Engine = { //Working if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].isWorking) { - if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeFaction) { + if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeFaction) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workForFaction(numCycles); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCreateProgram) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCreateProgram) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].createProgramWork(numCycles); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeStudyClass) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeStudyClass) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].takeClass(numCycles); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCrime) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCrime) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].commitCrime(numCycles); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCompanyPartTime) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCompanyPartTime) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workPartTime(numCycles); } else { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].work(numCycles); @@ -5271,15 +4128,15 @@ let Engine = { var offlineProductionFromScripts = Object(__WEBPACK_IMPORTED_MODULE_27__Script_js__["e" /* loadAllRunningScripts */])(); //This also takes care of offline production for those scripts if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].isWorking) { console.log("work() called in load() for " + numCyclesOffline * Engine._idleSpeed + " milliseconds"); - if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeFaction) { + if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeFaction) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workForFaction(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCreateProgram) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCreateProgram) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].createProgramWork(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeStudyClass) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeStudyClass) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].takeClass(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCrime) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCrime) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].commitCrime(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCompanyPartTime) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCompanyPartTime) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workPartTime(numCyclesOffline); } else { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].work(numCyclesOffline); @@ -5473,47 +4330,47 @@ let Engine = { //Tutorial buttons Engine.Clickables.tutorialNetworkingButton = document.getElementById("tutorial-networking-link"); Engine.Clickables.tutorialNetworkingButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialNetworkingText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialNetworkingText); }); Engine.Clickables.tutorialHackingButton = document.getElementById("tutorial-hacking-link"); Engine.Clickables.tutorialHackingButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialHackingText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialHackingText); }); Engine.Clickables.tutorialScriptsButton = document.getElementById("tutorial-scripts-link"); Engine.Clickables.tutorialScriptsButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialScriptsText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialScriptsText); }); Engine.Clickables.tutorialNetscriptButton = document.getElementById("tutorial-netscript-link"); Engine.Clickables.tutorialNetscriptButton.addEventListener("click", function() { if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].bitNodeN === 4 || __WEBPACK_IMPORTED_MODULE_21__NetscriptFunctions_js__["d" /* hasSingularitySF */]) { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialNetscriptText + __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialSingularityFunctionsText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialNetscriptText + __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialSingularityFunctionsText); } else { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialNetscriptText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialNetscriptText); } }); Engine.Clickables.tutorialTravelingButton = document.getElementById("tutorial-traveling-link"); Engine.Clickables.tutorialTravelingButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialTravelingText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialTravelingText); }); Engine.Clickables.tutorialCompaniesButton = document.getElementById("tutorial-jobs-link"); Engine.Clickables.tutorialCompaniesButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialCompaniesText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialCompaniesText); }); Engine.Clickables.tutorialFactionsButton = document.getElementById("tutorial-factions-link"); Engine.Clickables.tutorialFactionsButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialFactionsText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialFactionsText); }); Engine.Clickables.tutorialAugmentationsButton = document.getElementById("tutorial-augmentations-link"); Engine.Clickables.tutorialAugmentationsButton.addEventListener("click", function() { - Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].TutorialAugmentationsText); + Engine.displayTutorialPage(__WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].TutorialAugmentationsText); }); Engine.Clickables.tutorialBackButton = document.getElementById("tutorial-back-button"); @@ -5747,16 +4604,16 @@ let Engine = { if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].isWorking) { var cancelButton = document.getElementById("work-in-progress-cancel-button"); cancelButton.addEventListener("click", function() { - if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeFaction) { + if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeFaction) { var fac = __WEBPACK_IMPORTED_MODULE_13__Faction_js__["b" /* Factions */][__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].currentWorkFactionName]; __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].finishFactionWork(true); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCreateProgram) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCreateProgram) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].finishCreateProgramWork(true); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeStudyClass) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeStudyClass) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].finishClass(); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCrime) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCrime) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].finishCrime(true); - } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["a" /* CONSTANTS */].WorkTypeCompanyPartTime) { + } else if (__WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_11__Constants_js__["CONSTANTS"].WorkTypeCompanyPartTime) { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].finishWorkPartTime(); } else { __WEBPACK_IMPORTED_MODULE_23__Player_js__["a" /* Player */].finishWork(true); @@ -5864,6 +4721,7 @@ window.onload = function() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return prestigeHomeComputer; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CreateProgram_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Script_js__ = __webpack_require__(18); @@ -6530,9 +5388,9 @@ function processSingleServerGrowth(server, numCycles) { var numServerGrowthCycles = Math.max(Math.floor(numCycles / 450), 0); //Get adjusted growth rate, which accounts for server security - var growthRate = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].ServerBaseGrowthRate; + var growthRate = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].ServerBaseGrowthRate; var adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty; - if (adjGrowthRate > __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].ServerMaxGrowthRate) {adjGrowthRate = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].ServerMaxGrowthRate;} + if (adjGrowthRate > __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].ServerMaxGrowthRate) {adjGrowthRate = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].ServerMaxGrowthRate;} //Calculate adjusted server growth rate based on parameters var serverGrowthPercentage = server.serverGrowth / 100; @@ -6556,7 +5414,7 @@ function processSingleServerGrowth(server, numCycles) { } //Growing increases server security twice as much as hacking - server.fortify(2 * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].ServerFortifyAmount * numServerGrowthCycles); + server.fortify(2 * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].ServerFortifyAmount * numServerGrowthCycles); return serverGrowth; } @@ -17322,6 +16180,7 @@ return jQuery; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return prestigeWorkerScripts; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__ActiveScriptsUI_js__ = __webpack_require__(26); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptEnvironment_js__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NetscriptEvaluator_js__ = __webpack_require__(37); @@ -17519,7 +16378,7 @@ function addWorkerScript(runningScriptObj, server) { runningScriptObj.threads = 1; } var ramUsage = runningScriptObj.scriptRef.ramUsage * threads - * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].MultithreadingRAMCost, threads-1); + * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].MultithreadingRAMCost, threads-1); var ramAvailable = server.maxRam - server.ramUsed; if (ramUsage > ramAvailable) { Object(__WEBPACK_IMPORTED_MODULE_8__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Not enough RAM to run script " + runningScriptObj.filename + " with args " + @@ -17573,6 +16432,7 @@ function updateOnlineScriptTimes(numCycles = 1) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Augmentations_js__ = __webpack_require__(21); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__FactionInfo_js__ = __webpack_require__(51); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Location_js__ = __webpack_require__(12); @@ -17667,8 +16527,8 @@ Faction.prototype.getFavorGain = function() { if (this.favor == null || this.favor == undefined) {this.favor = 0;} if (this.rolloverRep == null || this.rolloverRep == undefined) {this.rolloverRep = 0;} var favorGain = 0, rep = this.playerReputation + this.rolloverRep; - var reqdRep = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].FactionReputationToFavorBase * - Math.pow(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].FactionReputationToFavorMult, this.favor); + var reqdRep = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].FactionReputationToFavorBase * + Math.pow(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].FactionReputationToFavorMult, this.favor); while(rep > 0) { if (rep >= reqdRep) { ++favorGain; @@ -17676,7 +16536,7 @@ Faction.prototype.getFavorGain = function() { } else { break; } - reqdRep *= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].FactionReputationToFavorMult; + reqdRep *= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].FactionReputationToFavorMult; } return [favorGain, rep]; } @@ -18557,17 +17417,17 @@ function purchaseAugmentation(aug, fac, sing=false) { if (aug.name == __WEBPACK_IMPORTED_MODULE_0__Augmentations_js__["b" /* AugmentationNames */].NeuroFluxGovernor) { var nextLevel = getNextNeurofluxLevel(); --nextLevel; - var mult = Math.pow(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].NeuroFluxGovernorLevelMult, nextLevel); + var mult = Math.pow(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].NeuroFluxGovernorLevelMult, nextLevel); aug.setRequirements(500 * mult, 750000 * mult); for (var i = 0; i < __WEBPACK_IMPORTED_MODULE_7__Player_js__["a" /* Player */].queuedAugmentations.length-1; ++i) { - aug.baseCost *= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MultipleAugMultiplier; + aug.baseCost *= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].MultipleAugMultiplier; } } for (var name in __WEBPACK_IMPORTED_MODULE_0__Augmentations_js__["c" /* Augmentations */]) { if (__WEBPACK_IMPORTED_MODULE_0__Augmentations_js__["c" /* Augmentations */].hasOwnProperty(name)) { - __WEBPACK_IMPORTED_MODULE_0__Augmentations_js__["c" /* Augmentations */][name].baseCost *= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].MultipleAugMultiplier; + __WEBPACK_IMPORTED_MODULE_0__Augmentations_js__["c" /* Augmentations */][name].baseCost *= __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].MultipleAugMultiplier; } } @@ -18642,6 +17502,7 @@ function processPassiveFactionRepGain(numCycles) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Company_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__CompanyManagement_js__ = __webpack_require__(31); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Crimes_js__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Infiltration_js__ = __webpack_require__(52); @@ -18916,17 +17777,17 @@ function displayLocationContent() { purchaseHomeRam.style.display = "none"; purchaseHomeCores.style.display = "none"; - purchase2gb.innerHTML = "Purchase 2GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(2*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase4gb.innerHTML = "Purchase 4GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(4*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase8gb.innerHTML = "Purchase 8GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(8*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase16gb.innerHTML = "Purchase 16GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(16*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase32gb.innerHTML = "Purchase 32GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(32*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase64gb.innerHTML = "Purchase 64GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(64*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase128gb.innerHTML = "Purchase 128GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(128*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase256gb.innerHTML = "Purchase 256GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(256*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase512gb.innerHTML = "Purchase 512GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(512*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchase1tb.innerHTML = "Purchase 1TB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(1024*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer, 2); - purchaseTor.innerHTML = "Purchase TOR Router - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost, 2); + purchase2gb.innerHTML = "Purchase 2GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(2*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase4gb.innerHTML = "Purchase 4GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(4*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase8gb.innerHTML = "Purchase 8GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(8*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase16gb.innerHTML = "Purchase 16GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(16*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase32gb.innerHTML = "Purchase 32GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(32*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase64gb.innerHTML = "Purchase 64GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(64*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase128gb.innerHTML = "Purchase 128GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(128*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase256gb.innerHTML = "Purchase 256GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(256*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase512gb.innerHTML = "Purchase 512GB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(512*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchase1tb.innerHTML = "Purchase 1TB Server - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(1024*__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer, 2); + purchaseTor.innerHTML = "Purchase TOR Router - $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].TorRouterCost, 2); travelAgencyText.style.display = "none"; travelToAevum.style.display = "none"; @@ -19024,7 +17885,7 @@ function displayLocationContent() { //Calculate hospital Cost if (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp < 0) {__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp = 0;} - var hospitalTreatmentCost = (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].max_hp - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp) * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].HospitalCostPerHp; + var hospitalTreatmentCost = (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].max_hp - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp) * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].HospitalCostPerHp; //Set tooltip for job requirements setJobRequirementTooltip(loc, __WEBPACK_IMPORTED_MODULE_0__Company_js__["d" /* CompanyPositions */].SoftwareIntern, softwareJob); @@ -20346,52 +19207,52 @@ function initLocationButtons() { }); purchase2gb.addEventListener("click", function() { - purchaseServerBoxCreate(2, 2 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(2, 2 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase4gb.addEventListener("click", function() { - purchaseServerBoxCreate(4, 4 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(4, 4 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase8gb.addEventListener("click", function() { - purchaseServerBoxCreate(8, 8 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(8, 8 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase16gb.addEventListener("click", function() { - purchaseServerBoxCreate(16, 16 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(16, 16 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase32gb.addEventListener("click", function() { - purchaseServerBoxCreate(32, 32 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(32, 32 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase64gb.addEventListener("click", function() { - purchaseServerBoxCreate(64, 64 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(64, 64 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase128gb.addEventListener("click", function() { - purchaseServerBoxCreate(128, 128 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(128, 128 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase256gb.addEventListener("click", function() { - purchaseServerBoxCreate(256, 256 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(256, 256 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase512gb.addEventListener("click", function() { - purchaseServerBoxCreate(512, 512 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(512, 512 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); purchase1tb.addEventListener("click", function() { - purchaseServerBoxCreate(1024, 1024 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer); + purchaseServerBoxCreate(1024, 1024 * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer); return false; }); @@ -20408,7 +19269,7 @@ function initLocationButtons() { //Calculate cost //Have cost increase by some percentage each time RAM has been upgraded - var cost = currentRam * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamHome; + var cost = currentRam * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamHome; var mult = Math.pow(1.58, numUpgrades); cost = cost * mult; @@ -20590,7 +19451,7 @@ function initLocationButtons() { hospitalTreatment.addEventListener("click", function() { if (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp < 0) {__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp = 0;} - var price = (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].max_hp - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp) * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].HospitalCostPerHp; + var price = (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].max_hp - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].hp) * __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].HospitalCostPerHp; __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].loseMoney(price); Object(__WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You were healed to full health! The hospital billed " + "you for $" + Object(__WEBPACK_IMPORTED_MODULE_14__utils_StringHelperFunctions_js__["c" /* formatNumber */])(price, 2).toString()); @@ -20620,11 +19481,11 @@ function travelToCity(destCityName, cost) { } function purchaseTorRouter() { - if (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].money.lt(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost)) { + if (__WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].money.lt(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].TorRouterCost)) { Object(__WEBPACK_IMPORTED_MODULE_10__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You cannot afford to purchase the Tor router"); return; } - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].TorRouterCost); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].TorRouterCost); var darkweb = new __WEBPACK_IMPORTED_MODULE_7__Server_js__["d" /* Server */](Object(__WEBPACK_IMPORTED_MODULE_12__utils_IPAddress_js__["a" /* createRandomIp */])(), "darkweb", "", false, false, false, 1); Object(__WEBPACK_IMPORTED_MODULE_7__Server_js__["a" /* AddToAllServers */])(darkweb); @@ -20652,11 +19513,11 @@ function displayUniversityLocationContent(costMult) { classLeadershipButton.style.display = "block"; //Costs (per second) - var dataStructuresCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassDataStructuresBaseCost * costMult; - var networksCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassNetworksBaseCost * costMult; - var algorithmsCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassAlgorithmsBaseCost * costMult; - var managementCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassManagementBaseCost * costMult; - var leadershipCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassLeadershipBaseCost * costMult; + var dataStructuresCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassDataStructuresBaseCost * costMult; + var networksCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassNetworksBaseCost * costMult; + var algorithmsCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassAlgorithmsBaseCost * costMult; + var managementCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassManagementBaseCost * costMult; + var leadershipCost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassLeadershipBaseCost * costMult; //Update button text to show cost classDataStructuresButton.innerHTML = "Take Data Structures course ($" + dataStructuresCost + " / sec)"; @@ -20669,37 +19530,37 @@ function displayUniversityLocationContent(costMult) { function setUniversityLocationButtons(costMult, expMult) { var newStudyCS = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-study-computer-science"); newStudyCS.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassStudyComputerScience); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassStudyComputerScience); return false; }); var newClassDataStructures = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-data-structures-class"); newClassDataStructures.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassDataStructures); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassDataStructures); return false; }); var newClassNetworks = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-networks-class"); newClassNetworks.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassNetworks); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassNetworks); return false; }); var newClassAlgorithms = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-algorithms-class"); newClassAlgorithms.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassAlgorithms); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassAlgorithms); return false; }); var newClassManagement = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-management-class"); newClassManagement.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassManagement); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassManagement); return false; }); var newClassLeadership = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-leadership-class"); newClassLeadership.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassLeadership); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassLeadership); return false; }); } @@ -20715,7 +19576,7 @@ function displayGymLocationContent(costMult) { gymAgiButton.style.display = "block"; //Costs (per second) - var cost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymBaseCost * costMult; + var cost = __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassGymBaseCost * costMult; //Update button text to show cost gymStrButton.innerHTML = "Train Strength ($" + cost + " / sec)"; @@ -20727,25 +19588,25 @@ function displayGymLocationContent(costMult) { function setGymLocationButtons(costMult, expMult) { var gymStr = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-gym-train-str"); gymStr.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymStrength); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassGymStrength); return false; }); var gymDef = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-gym-train-def"); gymDef.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymDefense); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassGymDefense); return false; }); var gymDex = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-gym-train-dex"); gymDex.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymDexterity); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassGymDexterity); return false; }); var gymAgi = Object(__WEBPACK_IMPORTED_MODULE_11__utils_HelperFunctions_js__["b" /* clearEventListeners */])("location-gym-train-agi"); gymAgi.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].ClassGymAgility); + __WEBPACK_IMPORTED_MODULE_6__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].ClassGymAgility); return false; }); } @@ -20984,6 +19845,7 @@ function initSpecialServerIps() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getNumAvailableCreateProgram; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return initCreateProgramButtons; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_HelperFunctions_js__ = __webpack_require__(2); @@ -21200,47 +20062,47 @@ function initCreateProgramButtons() { createProgramList.appendChild(autolinkALink); nukeALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.NukeProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes, 1); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.NukeProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerFiveMinutes, 1); return false; }); bruteSshALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.BruteSSHProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes * 2, 50); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.BruteSSHProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerFiveMinutes * 2, 50); return false; }); ftpCrackALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.FTPCrackProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 100); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.FTPCrackProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerHalfHour, 100); return false; }); relaySmtpALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.RelaySMTPProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 250); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.RelaySMTPProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPer2Hours, 250); return false; }); httpWormALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.HTTPWormProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPer4Hours, 500); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.HTTPWormProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPer4Hours, 500); return false; }); sqlInjectALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.SQLInjectProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours, 750); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.SQLInjectProgram, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPer8Hours, 750); return false; }); deepscanv1ALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.DeepscanV1, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 75); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.DeepscanV1, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerQuarterHour, 75); return false; }); deepscanv2ALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.DeepscanV2, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 400); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.DeepscanV2, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPer2Hours, 400); return false; }); servProfilerALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.ServerProfiler, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 75); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.ServerProfiler, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerHalfHour, 75); return false; }); autolinkALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.AutoLink, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 25); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.AutoLink, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerQuarterHour, 25); return false; }); bitFlumeALink.addEventListener("click", function() { - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.BitFlume, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes / 5, 5); + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCreateProgramWork(Programs.BitFlume, __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MillisecondsPerFiveMinutes / 5, 5); return false; }); } @@ -21375,6 +20237,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! @preserve /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Script; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AllServersMap; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__InteractiveTutorial_js__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptFunctions_js__ = __webpack_require__(23); @@ -21683,7 +20546,6 @@ function calculateRamUsage(codeCopy) { try { var ast = Object(__WEBPACK_IMPORTED_MODULE_9__utils_acorn_js__["parse"])(codeCopy); } catch(e) { - console.log("returning -1 bc parsing error: " + e.toString()); return -1; } @@ -21704,19 +20566,19 @@ function calculateRamUsage(codeCopy) { break; case "WhileStatement": if (!whileUsed) { - ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptWhileRamCost; + ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].ScriptWhileRamCost; whileUsed = true; } break; case "ForStatement": if (!forUsed) { - ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptForRamCost; + ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].ScriptForRamCost; forUsed = true; } break; case "IfStatement": if (!ifUsed) { - ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ScriptIfRamCost; + ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].ScriptIfRamCost; ifUsed = true; } break; @@ -21726,7 +20588,9 @@ function calculateRamUsage(codeCopy) { if (typeof func === "function") { try { var res = func.apply(null, []); - if (!isNaN(res)) {ramUsage += res;} + if (typeof res === "number") { + ramUsage += res; + } } catch(e) { console.log("ERROR applying function: " + e); } @@ -21745,6 +20609,11 @@ function calculateRamUsage(codeCopy) { } } } + + //Special case: hacknetnodes array + if (codeCopy.includes("hacknetnodes")) { + ramUsage += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].ScriptHacknetNodesRamCost; + } return ramUsage; } @@ -21855,7 +20724,7 @@ function scriptCalculateOfflineProduction(runningScriptObj) { var timesHacked = Math.round(0.5 * runningScriptObj.dataMap[ip][1] / runningScriptObj.onlineRunningTime * timePassed); console.log(runningScriptObj.filename + " hacked " + serv.hostname + " " + timesHacked + " times while offline"); runningScriptObj.log("Hacked " + serv.hostname + " " + timesHacked + " times while offline"); - serv.fortify(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ServerFortifyAmount * timesHacked); + serv.fortify(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].ServerFortifyAmount * timesHacked); } } @@ -21868,7 +20737,7 @@ function scriptCalculateOfflineProduction(runningScriptObj) { var timesWeakened = Math.round(0.5 * runningScriptObj.dataMap[ip][3] / runningScriptObj.onlineRunningTime * timePassed); console.log(runningScriptObj.filename + " called weaken() on " + serv.hostname + " " + timesWeakened + " times while offline"); runningScriptObj.log("Called weaken() on " + serv.hostname + " " + timesWeakened + " times while offline"); - serv.weaken(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].ServerWeakenAmount * timesWeakened); + serv.weaken(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].ServerWeakenAmount * timesWeakened); } } @@ -22025,6 +20894,7 @@ __WEBPACK_IMPORTED_MODULE_11__utils_JSONReviver_js__["c" /* Reviver */].construc /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Terminal; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Alias_js__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__CreateProgram_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__DarkWeb_js__ = __webpack_require__(46); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__engine_js__ = __webpack_require__(5); @@ -22092,7 +20962,7 @@ function updateTerminalScroll() { } function postNetburnerText() { - post("Bitburner v" + __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].Version); + post("Bitburner v" + __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].Version); } //Defines key commands in terminal @@ -22492,9 +21362,9 @@ let Terminal = { server.moneyAvailable -= moneyGained; __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].gainMoney(moneyGained); __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].gainHackingExp(expGainedOnSuccess) - __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].gainIntelligenceExp(expGainedOnSuccess / __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].IntelligenceTerminalHackBaseExpGain); + __WEBPACK_IMPORTED_MODULE_11__Player_js__["a" /* Player */].gainIntelligenceExp(expGainedOnSuccess / __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].IntelligenceTerminalHackBaseExpGain); - server.fortify(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].ServerFortifyAmount); + server.fortify(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].ServerFortifyAmount); post("Hack successful! Gained $" + Object(__WEBPACK_IMPORTED_MODULE_17__utils_StringHelperFunctions_js__["c" /* formatNumber */])(moneyGained, 2) + " and " + Object(__WEBPACK_IMPORTED_MODULE_17__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGainedOnSuccess, 4) + " hacking EXP"); } else { //Failure @@ -22987,7 +21857,7 @@ let Terminal = { for (var i = 0; i < currServ.scripts.length; ++i) { if (scriptName == currServ.scripts[i].filename) { var scriptBaseRamUsage = currServ.scripts[i].ramUsage; - var ramUsage = scriptBaseRamUsage * numThreads * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].MultithreadingRAMCost, numThreads-1); + var ramUsage = scriptBaseRamUsage * numThreads * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].MultithreadingRAMCost, numThreads-1); post("This script requires " + Object(__WEBPACK_IMPORTED_MODULE_17__utils_StringHelperFunctions_js__["c" /* formatNumber */])(ramUsage, 2) + "GB of RAM to run for " + numThreads + " thread(s)"); return; @@ -23757,7 +22627,7 @@ let Terminal = { if (server.scripts[i].filename == scriptName) { //Check for admin rights and that there is enough RAM availble to run var script = server.scripts[i]; - var ramUsage = script.ramUsage * numThreads * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].MultithreadingRAMCost, numThreads-1); + var ramUsage = script.ramUsage * numThreads * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].MultithreadingRAMCost, numThreads-1); var ramAvailable = server.maxRam - server.ramUsed; if (server.hasAdminRights == false) { @@ -23858,6 +22728,7 @@ function isValidIPAddress(ipaddress) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Augmentation; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Faction_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptWorker_js__ = __webpack_require__(10); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Player_js__ = __webpack_require__(0); @@ -23899,8 +22770,8 @@ Augmentation.prototype.setInfo = function(inf) { } Augmentation.prototype.setRequirements = function(rep, cost) { - this.baseRepRequirement = rep * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].AugmentationRepMultiplier * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].AugmentationRepCost; - this.baseCost = cost * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].AugmentationCostMultiplier * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].AugmentationMoneyCost; + this.baseRepRequirement = rep * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].AugmentationRepMultiplier * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].AugmentationRepCost; + this.baseCost = cost * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].AugmentationCostMultiplier * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].AugmentationMoneyCost; } //Takes in an array of faction names and adds this augmentation to all of those factions @@ -24785,13 +23656,13 @@ function initAugmentations() { if (augmentationExists(AugmentationNames.NeuroFluxGovernor)) { var nextLevel = Object(__WEBPACK_IMPORTED_MODULE_2__Faction_js__["e" /* getNextNeurofluxLevel */])(); NeuroFluxGovernor.level = nextLevel - 1; - mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); + mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); NeuroFluxGovernor.setRequirements(500 * mult, 750000 * mult); delete Augmentations[AugmentationNames.NeuroFluxGovernor]; } else { var nextLevel = Object(__WEBPACK_IMPORTED_MODULE_2__Faction_js__["e" /* getNextNeurofluxLevel */])(); NeuroFluxGovernor.level = nextLevel - 1; - mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); + mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].NeuroFluxGovernorLevelMult, NeuroFluxGovernor.level); NeuroFluxGovernor.setRequirements(500 * mult, 750000 * mult); } NeuroFluxGovernor.setInfo("A device that is embedded in the back of the neck. The NeuroFlux Governor " + @@ -25276,7 +24147,7 @@ function initAugmentations() { AddToAugmentations(SNA); //Update costs based on how many have been purchased - var mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].MultipleAugMultiplier, __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].queuedAugmentations.length); + var mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].MultipleAugMultiplier, __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].queuedAugmentations.length); for (var name in Augmentations) { if (Augmentations.hasOwnProperty(name)) { Augmentations[name].baseCost *= mult; @@ -25874,6 +24745,7 @@ function giveAllAugmentations() { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CompanyPosition; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return companyExists; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Location_js__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_JSONReviver_js__ = __webpack_require__(7); @@ -25946,8 +24818,8 @@ Company.prototype.getFavorGain = function() { if (this.favor == null || this.favor == undefined) {this.favor = 0;} if (this.rolloverRep == null || this.rolloverRep == undefined) {this.rolloverRep = 0;} var favorGain = 0, rep = this.playerReputation + this.rolloverRep; - var reqdRep = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CompanyReputationToFavorBase * - Math.pow(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CompanyReputationToFavorMult, this.favor); + var reqdRep = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CompanyReputationToFavorBase * + Math.pow(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CompanyReputationToFavorMult, this.favor); while(rep > 0) { if (rep >= reqdRep) { ++favorGain; @@ -25955,7 +24827,7 @@ Company.prototype.getFavorGain = function() { } else { break; } - reqdRep *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].FactionReputationToFavorMult; + reqdRep *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].FactionReputationToFavorMult; } return [favorGain, rep]; } @@ -26021,12 +24893,12 @@ CompanyPosition.prototype.setExperienceGains = function(hack, str, def, dex, agi //Calculate a player's effectiveness at a certain job. Returns the amount of job reputation //that should be gained every game loop (200 ms) CompanyPosition.prototype.calculateJobPerformance = function(hacking, str, def, dex, agi, cha) { - var hackRatio = this.hackingEffectiveness * hacking / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; - var strRatio = this.strengthEffectiveness * str / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; - var defRatio = this.defenseEffectiveness * def / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; - var dexRatio = this.dexterityEffectiveness * dex / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; - var agiRatio = this.agilityEffectiveness * agi / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; - var chaRatio = this.charismaEffectiveness * cha / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; + var hackRatio = this.hackingEffectiveness * hacking / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; + var strRatio = this.strengthEffectiveness * str / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; + var defRatio = this.defenseEffectiveness * def / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; + var dexRatio = this.dexterityEffectiveness * dex / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; + var agiRatio = this.agilityEffectiveness * agi / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; + var chaRatio = this.charismaEffectiveness * cha / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; var reputationGain = this.positionMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100; if (isNaN(reputationGain)) { @@ -27044,6 +25916,7 @@ function getJobRequirementText(company, pos, tooltiptext=false) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Crimes_js__ = __webpack_require__(32); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Company_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__ = __webpack_require__(15); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__DarkWeb_js__ = __webpack_require__(46); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__engine_js__ = __webpack_require__(5); @@ -27151,7 +26024,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.scan = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptScanRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptScanRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -27180,7 +26053,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.hack = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptHackRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptHackRamCost; } } if (ip === undefined) { @@ -27237,7 +26110,7 @@ function NetscriptFunctions(workerScript) { workerScript.scriptRef.onlineExpGained += expGainedOnSuccess; //console.log("Script successfully hacked " + server.hostname + " for $" + formatNumber(moneyGained, 2) + " and " + formatNumber(expGainedOnSuccess, 4) + " exp"); workerScript.scriptRef.log("Script SUCCESSFULLY hacked " + server.hostname + " for $" + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(moneyGained, 2) + " and " + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGainedOnSuccess, 4) + " exp (t=" + threads + ")"); - server.fortify(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ServerFortifyAmount * threads); + server.fortify(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ServerFortifyAmount * threads); return Promise.resolve(true); } else { //Player only gains 25% exp for failure? TODO Can change this later to balance @@ -27267,7 +26140,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.grow = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGrowRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGrowRamCost; } } var threads = workerScript.scriptRef.threads; @@ -27313,7 +26186,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.weaken = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptWeakenRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptWeakenRamCost; } } var threads = workerScript.scriptRef.threads; @@ -27338,14 +26211,14 @@ function NetscriptFunctions(workerScript) { Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(weakenTime/1000, 3) + " seconds (t=" + threads + ")"); return Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["e" /* netscriptDelay */])(weakenTime, workerScript).then(function() { if (workerScript.env.stopFlag) {return Promise.reject(workerScript);} - server.weaken(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ServerWeakenAmount * threads); + server.weaken(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ServerWeakenAmount * threads); workerScript.scriptRef.recordWeaken(server.ip, threads); var expGain = Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["g" /* scriptCalculateExpGain */])(server) * threads; workerScript.scriptRef.log("Server security level on " + server.hostname + " weakened to " + server.hackDifficulty + ". Gained " + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(expGain, 4) + " hacking exp (t=" + threads + ")"); workerScript.scriptRef.onlineExpGained += expGain; __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainHackingExp(expGain); - return Promise.resolve(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ServerWeakenAmount * threads); + return Promise.resolve(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ServerWeakenAmount * threads); }); }, print : function(args){ @@ -27380,7 +26253,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.nuke = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPortProgramRamCost; } } if (ip === undefined) { @@ -27411,7 +26284,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.brutessh = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPortProgramRamCost; } } if (ip === undefined) { @@ -27441,7 +26314,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.ftpcrack = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPortProgramRamCost; } } if (ip === undefined) { @@ -27470,7 +26343,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.relaysmtp = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPortProgramRamCost; } } if (ip === undefined) { @@ -27499,7 +26372,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.httpworm = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPortProgramRamCost; } } if (ip === undefined) { @@ -27528,7 +26401,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.sqlinject = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPortProgramRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPortProgramRamCost; } } if (ip === undefined) { @@ -27557,7 +26430,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.run = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptRunRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptRunRamCost; } } if (scriptname === undefined) { @@ -27583,7 +26456,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.exec = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptExecRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptExecRamCost; } } if (scriptname === undefined || ip === undefined) { @@ -27608,7 +26481,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.kill = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptKillRamCost; } } @@ -27644,7 +26517,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.killall = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptKillRamCost; } } @@ -27668,7 +26541,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.exit = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptKillRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptKillRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp); @@ -27687,7 +26560,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.scp = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptScpRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptScpRamCost; } } if (arguments.length !== 2 && arguments.length !== 3) { @@ -27803,7 +26676,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.ls = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptScanRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptScanRamCost; } } if (ip === undefined) { @@ -27869,7 +26742,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.hasRootAccess = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptHasRootAccessRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptHasRootAccessRamCost; } } if (ip===undefined){ @@ -27888,7 +26761,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getIp = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHostnameRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHostnameRamCost; } } var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp); @@ -27903,7 +26776,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getHostname = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHostnameRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHostnameRamCost; } } var scriptServer = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp); @@ -27918,7 +26791,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getHackingLevel = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackingLevelRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHackingLevelRamCost; } } __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].updateSkillLevels(); @@ -27931,7 +26804,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getHackingMultipliers = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetMultipliersRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetMultipliersRamCost; } } return { @@ -27947,7 +26820,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getBitNodeMultipliers = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetMultipliersRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetMultipliersRamCost; } } if (!hasAISF) { @@ -27961,7 +26834,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerMoneyAvailable = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -27983,7 +26856,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerSecurityLevel = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28000,7 +26873,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerBaseSecurityLevel = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28017,7 +26890,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerMinSecurityLevel = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28034,7 +26907,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerRequiredHackingLevel = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28051,7 +26924,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerMaxMoney = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28068,7 +26941,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerGrowth = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28085,7 +26958,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerNumPortsRequired = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28102,7 +26975,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getServerRam = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28119,7 +26992,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.serverExists = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetServerRamCost; } } return (Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip) !== null); @@ -28130,7 +27003,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.fileExists = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptFileExistsRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptFileExistsRamCost; } } if (filename === undefined) { @@ -28169,7 +27042,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.isRunning = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptIsRunningRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptIsRunningRamCost; } } if (filename === undefined || ip === undefined) { @@ -28192,7 +27065,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getNextHacknetNodeCost = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptHacknetNodesRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptHacknetNodesRamCost; } } return Object(__WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["b" /* getCostOfNextHacknetNode */])(); @@ -28204,10 +27077,10 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.purchaseHacknetNode = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseHacknetRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPurchaseHacknetRamCost; } } - Object(__WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["d" /* purchaseHacknet */])(); + return Object(__WEBPACK_IMPORTED_MODULE_10__HacknetNode_js__["d" /* purchaseHacknet */])(); }, getStockPrice : function(symbol) { if (workerScript.checkingRam) { @@ -28215,7 +27088,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getStockPrice = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28233,7 +27106,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getStockPosition = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28251,7 +27124,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.buyStock = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptBuySellStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28269,15 +27142,15 @@ function NetscriptFunctions(workerScript) { if (shares === 0) {return 0;} var totalPrice = stock.price * shares; - if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].StockMarketCommission)) { + if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].StockMarketCommission)) { workerScript.scriptRef.log("Not enough money to purchase " + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + symbol + ". Need $" + - Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2).toString()); + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].StockMarketCommission, 2).toString()); return 0; } var origTotal = stock.playerShares * stock.playerAvgPx; - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].StockMarketCommission); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].StockMarketCommission); var newTotal = origTotal + totalPrice; stock.playerShares += shares; stock.playerAvgPx = newTotal / stock.playerShares; @@ -28294,7 +27167,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.sellStock = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptBuySellStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28311,11 +27184,11 @@ function NetscriptFunctions(workerScript) { shares = Math.round(shares); if (shares > stock.playerShares) {shares = stock.playerShares;} if (shares === 0) {return 0;} - var gains = stock.price * shares - __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; + var gains = stock.price * shares - __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].StockMarketCommission; __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainMoney(gains); //Calculate net profit and add to script stats - var netProfit = ((stock.price - stock.playerAvgPx) * shares) - __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; + var netProfit = ((stock.price - stock.playerAvgPx) * shares) - __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].StockMarketCommission; if (isNaN(netProfit)) {netProfit = 0;} workerScript.scriptRef.onlineMoneyMade += netProfit; __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].scriptProdSinceLastAug += netProfit; @@ -28338,7 +27211,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.shortStock = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptBuySellStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28362,7 +27235,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.sellShort = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptBuySellStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28386,7 +27259,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.placeOrder = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptBuySellStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28432,7 +27305,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.cancelOrder = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptBuySellStockRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptBuySellStockRamCost; } } if (!__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hasTixApiAccess) { @@ -28487,7 +27360,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.purchaseServer = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPurchaseServerRamCost; } } var hostnameStr = String(hostname); @@ -28497,8 +27370,8 @@ function NetscriptFunctions(workerScript) { return ""; } - if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].purchasedServers.length >= __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit) { - workerScript.scriptRef.log("Error: You have reached the maximum limit of " + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit + + if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].purchasedServers.length >= __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].PurchasedServerLimit) { + workerScript.scriptRef.log("Error: You have reached the maximum limit of " + __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].PurchasedServerLimit + " servers. You cannot purchase any more."); return ""; } @@ -28509,7 +27382,7 @@ function NetscriptFunctions(workerScript) { return ""; } - var cost = ram * __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamServer; + var cost = ram * __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamServer; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].money.lt(cost)) { workerScript.scriptRef.log("Error: Not enough money to purchase server. Need $" + Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["c" /* formatNumber */])(cost, 2)); return ""; @@ -28531,7 +27404,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.deleteServer = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPurchaseServerRamCost; } } var hostnameStr = String(hostname); @@ -28602,7 +27475,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getPurchasedServers = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptPurchaseServerRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptPurchaseServerRamCost; } } var res = []; @@ -28629,7 +27502,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.write = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptReadWriteRamCost; } } if (!isNaN(port)) { //Write to port @@ -28675,7 +27548,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.read = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptReadWriteRamCost; } } if (!isNaN(port)) { //Read from port @@ -28715,7 +27588,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.clear = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptReadWriteRamCost; } } if (!isNaN(port)) { //Clear port @@ -28749,7 +27622,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.rm = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptReadWriteRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptReadWriteRamCost; } } var s = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(workerScript.serverIp); @@ -28802,7 +27675,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.scriptRunning = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptArbScriptRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptArbScriptRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28823,7 +27696,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.scriptKill = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptArbScriptRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptArbScriptRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28846,7 +27719,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getScriptRam = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetScriptRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28867,7 +27740,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getHackTime = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHackTimeRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28883,7 +27756,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getGrowTime = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHackTimeRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28899,7 +27772,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getWeakenTime = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHackTimeRamCost; } } var server = Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["e" /* getServer */])(ip); @@ -28915,7 +27788,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getScriptIncome = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetScriptRamCost; } } if (arguments.length === 0) { @@ -28949,7 +27822,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getScriptExpGain = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetScriptRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetScriptRamCost; } } if (arguments.length === 0) { @@ -28983,7 +27856,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getTimeSinceLastAug = true; - return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptGetHackTimeRamCost; + return __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptGetHackTimeRamCost; } } return __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].playtimeSinceLastAug; @@ -29018,7 +27891,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.universityCourse = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29075,22 +27948,22 @@ function NetscriptFunctions(workerScript) { var task; switch(className.toLowerCase()) { case "Study Computer Science".toLowerCase(): - task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassStudyComputerScience; + task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassStudyComputerScience; break; case "Data Structures".toLowerCase(): - task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassDataStructures; + task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassDataStructures; break; case "Networks".toLowerCase(): - task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassNetworks; + task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassNetworks; break; case "Algorithms".toLowerCase(): - task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassAlgorithms; + task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassAlgorithms; break; case "Management".toLowerCase(): - task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassManagement; + task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassManagement; break; case "Leadership".toLowerCase(): - task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassLeadership; + task = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassLeadership; break; default: workerScript.scriptRef.log("Invalid class name: " + className + ". universityCourse() failed"); @@ -29107,7 +27980,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.gymWorkout = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29181,19 +28054,19 @@ function NetscriptFunctions(workerScript) { switch(stat.toLowerCase()) { case "strength".toLowerCase(): case "str".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassGymStrength); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassGymStrength); break; case "defense".toLowerCase(): case "def".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassGymDefense); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassGymDefense); break; case "dexterity".toLowerCase(): case "dex".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassGymDexterity); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassGymDexterity); break; case "agility".toLowerCase(): case "agi".toLowerCase(): - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ClassGymAgility); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startClass(costMult, expMult, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ClassGymAgility); break; default: workerScript.scriptRef.log("Invalid stat: " + stat + ". gymWorkout() failed"); @@ -29209,7 +28082,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.travelToCity = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29230,7 +28103,7 @@ function NetscriptFunctions(workerScript) { case __WEBPACK_IMPORTED_MODULE_11__Location_js__["a" /* Locations */].Volhaven: __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].loseMoney(200000); __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].city = cityname; - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].IntelligenceSingFnBaseExpGain); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].IntelligenceSingFnBaseExpGain); workerScript.scriptRef.log("Traveled to " + cityname); return true; default: @@ -29245,7 +28118,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.purchaseTor = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29262,11 +28135,11 @@ function NetscriptFunctions(workerScript) { return false; } - if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].money.lt(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].TorRouterCost)) { + if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].money.lt(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].TorRouterCost)) { workerScript.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].TorRouterCost); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].TorRouterCost); var darkweb = new __WEBPACK_IMPORTED_MODULE_16__Server_js__["d" /* Server */](Object(__WEBPACK_IMPORTED_MODULE_28__utils_IPAddress_js__["a" /* createRandomIp */])(), "darkweb", "", false, false, false, 1); Object(__WEBPACK_IMPORTED_MODULE_16__Server_js__["a" /* AddToAllServers */])(darkweb); @@ -29276,7 +28149,7 @@ function NetscriptFunctions(workerScript) { __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].getHomeComputer().serversOnNetwork.push(darkweb.ip); darkweb.serversOnNetwork.push(__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].getHomeComputer().ip); - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].IntelligenceSingFnBaseExpGain); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].IntelligenceSingFnBaseExpGain); workerScript.scriptRef.log("You have purchased a Tor router!"); return true; }, @@ -29286,7 +28159,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.purchaseProgram = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29400,7 +28273,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getStats = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29428,7 +28301,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.isBusy = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn1RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn1RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29447,7 +28320,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.upgradeHomeRam = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29465,7 +28338,7 @@ function NetscriptFunctions(workerScript) { //Calculate cost //Have cost increase by some percentage each time RAM has been upgraded - var cost = currentRam * __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamHome; + var cost = currentRam * __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamHome; var mult = Math.pow(1.55, numUpgrades); cost = cost * mult; @@ -29479,7 +28352,7 @@ function NetscriptFunctions(workerScript) { __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].loseMoney(cost); - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].IntelligenceSingFnBaseExpGain); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].IntelligenceSingFnBaseExpGain); workerScript.scriptRef.log("Purchased additional RAM for home computer! It now has " + homeComputer.maxRam + "GB of RAM."); return true; }, @@ -29489,7 +28362,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getUpgradeHomeRamCost = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29507,7 +28380,7 @@ function NetscriptFunctions(workerScript) { //Calculate cost //Have cost increase by some percentage each time RAM has been upgraded - var cost = currentRam * __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamHome; + var cost = currentRam * __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamHome; var mult = Math.pow(1.55, numUpgrades); return cost * mult; }, @@ -29517,7 +28390,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.workForCompany = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29558,7 +28431,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.applyToCompany = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29639,7 +28512,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getCompanyRep = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29664,7 +28537,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.checkFactionInvitations = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29684,7 +28557,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.joinFaction = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29715,7 +28588,7 @@ function NetscriptFunctions(workerScript) { __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].factionInvitations.splice(index, 1); var fac = __WEBPACK_IMPORTED_MODULE_9__Faction_js__["b" /* Factions */][name]; Object(__WEBPACK_IMPORTED_MODULE_9__Faction_js__["h" /* joinFaction */])(fac); - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].IntelligenceSingFnBaseExpGain); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].IntelligenceSingFnBaseExpGain); workerScript.scriptRef.log("Joined the " + name + " faction."); return true; }, @@ -29725,7 +28598,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.workForFaction = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29821,7 +28694,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getFactionRep = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn2RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn2RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29846,7 +28719,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.createProgram = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29868,70 +28741,70 @@ function NetscriptFunctions(workerScript) { switch(name.toLowerCase()) { case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].NukeProgram.toLowerCase(): - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].NukeProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes, 1); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].NukeProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPerFiveMinutes, 1); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].BruteSSHProgram.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 50) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create BruteSSH (level 50 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].BruteSSHProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPerFiveMinutes * 2, 50); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].BruteSSHProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPerFiveMinutes * 2, 50); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].FTPCrackProgram.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 100) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create FTPCrack (level 100 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].FTPCrackProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 100); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].FTPCrackProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPerHalfHour, 100); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 250) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create relaySMTP (level 250 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 250); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].RelaySMTPProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPer2Hours, 250); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].HTTPWormProgram.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 500) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create HTTPWorm (level 500 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].HTTPWormProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPer4Hours, 500); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].HTTPWormProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPer4Hours, 500); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].SQLInjectProgram.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 750) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create SQLInject (level 750 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].SQLInjectProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPer8Hours, 750); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].SQLInjectProgram, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPer8Hours, 750); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].DeepscanV1.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 75) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV1 (level 75 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].DeepscanV1, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 75); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].DeepscanV1, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPerQuarterHour, 75); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].DeepscanV2.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 400) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create DeepscanV2 (level 400 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].DeepscanV2, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPer2Hours, 400); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].DeepscanV2, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPer2Hours, 400); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].ServerProfiler.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 75) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create ServerProfiler (level 75 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].ServerProfiler, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPerHalfHour, 75); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].ServerProfiler, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPerHalfHour, 75); break; case __WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].AutoLink.toLowerCase(): if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].hacking_skill < 25) { workerScript.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create AutoLink (level 25 req)"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].AutoLink, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].MillisecondsPerQuarterHour, 25); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].startCreateProgramWork(__WEBPACK_IMPORTED_MODULE_6__CreateProgram_js__["a" /* Programs */].AutoLink, __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].MillisecondsPerQuarterHour, 25); break; default: workerScript.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: " + name); @@ -29946,7 +28819,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.commitCrime = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -29993,40 +28866,40 @@ function NetscriptFunctions(workerScript) { crime = crime.toLowerCase(); if (crime.includes("shoplift")) { workerScript.scriptRef.log("Attempting to shoplift..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["k" /* commitShopliftCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["k" /* commitShopliftCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("rob") && crime.includes("store")) { workerScript.scriptRef.log("Attempting to rob a store..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["j" /* commitRobStoreCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["j" /* commitRobStoreCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("mug")) { workerScript.scriptRef.log("Attempting to mug someone..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["i" /* commitMugCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["i" /* commitMugCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("larceny")) { workerScript.scriptRef.log("Attempting to commit larceny..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["h" /* commitLarcenyCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["h" /* commitLarcenyCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("drugs")) { workerScript.scriptRef.log("Attempting to deal drugs..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["c" /* commitDealDrugsCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["c" /* commitDealDrugsCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("bond") && crime.includes("forge")) { workerScript.scriptRef.log("Attempting to forge corporate bonds..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["b" /* commitBondForgeryCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["b" /* commitBondForgeryCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("traffick") && crime.includes("arms")) { workerScript.scriptRef.log("Attempting to traffick illegal arms..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["l" /* commitTraffickArmsCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["l" /* commitTraffickArmsCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("homicide")) { workerScript.scriptRef.log("Attempting to commit homicide..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["f" /* commitHomicideCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["f" /* commitHomicideCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("grand") && crime.includes("auto")) { workerScript.scriptRef.log("Attempting to commit grand theft auto..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["d" /* commitGrandTheftAutoCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["d" /* commitGrandTheftAutoCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("kidnap")) { workerScript.scriptRef.log("Attempting to kidnap and ransom a high-profile target..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["g" /* commitKidnapCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["g" /* commitKidnapCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else if (crime.includes("assassinate")) { workerScript.scriptRef.log("Attempting to assassinate a high-profile target..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["a" /* commitAssassinationCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}) + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["a" /* commitAssassinationCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}) } else if (crime.includes("heist")) { workerScript.scriptRef.log("Attempting to pull off a heist..."); - return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["e" /* commitHeistCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].CrimeSingFnDivider, {workerscript: workerScript}); + return Object(__WEBPACK_IMPORTED_MODULE_3__Crimes_js__["e" /* commitHeistCrime */])(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].CrimeSingFnDivider, {workerscript: workerScript}); } else { throw Object(__WEBPACK_IMPORTED_MODULE_23__NetscriptEvaluator_js__["d" /* makeRuntimeRejectMsg */])(workerScript, "Invalid crime passed into commitCrime(): " + crime); } @@ -30037,7 +28910,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getCrimeChance = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -30084,7 +28957,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getOwnedAugmentations = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -30112,7 +28985,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getAugmentationsFromFaction = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -30142,7 +29015,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.getAugmentationCost = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -30168,7 +29041,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.purchaseAugmentation = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -30225,7 +29098,7 @@ function NetscriptFunctions(workerScript) { var res = Object(__WEBPACK_IMPORTED_MODULE_9__Faction_js__["k" /* purchaseAugmentation */])(aug, fac, true); workerScript.scriptRef.log(res); if (Object(__WEBPACK_IMPORTED_MODULE_29__utils_StringHelperFunctions_js__["f" /* isString */])(res) && res.startsWith("You purchased")) { - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].IntelligenceSingFnBaseExpGain); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].IntelligenceSingFnBaseExpGain); return true; } else { return false; @@ -30237,7 +29110,7 @@ function NetscriptFunctions(workerScript) { return 0; } else { workerScript.loadedFns.installAugmentations = true; - var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].ScriptSingularityFn3RamCost; + var ramCost = __WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].ScriptSingularityFn3RamCost; if (__WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].bitNodeN !== 4) {ramCost *= 10;} return ramCost; } @@ -30253,7 +29126,7 @@ function NetscriptFunctions(workerScript) { workerScript.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"); return false; } - __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["a" /* CONSTANTS */].IntelligenceSingFnBaseExpGain); + __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].gainIntelligenceExp(__WEBPACK_IMPORTED_MODULE_5__Constants_js__["CONSTANTS"].IntelligenceSingFnBaseExpGain); workerScript.scriptRef.log("Installing Augmentations. This will cause this script to be killed"); Object(__WEBPACK_IMPORTED_MODULE_1__Augmentations_js__["h" /* installAugmentations */])(cbScript); return true; @@ -36286,6 +35159,7 @@ function iTutorialSetText(txt) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return setInMission; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return currMission; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Faction_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Player_js__ = __webpack_require__(0); @@ -36498,9 +35372,9 @@ function HackingMission(rep, fac) { this.jsplumbinstance = null; - this.difficulty = rep / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionRepToDiffConversion + 1; + this.difficulty = rep / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionRepToDiffConversion + 1; console.log("difficulty: " + this.difficulty); - this.reward = 250 + (rep / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionRepToRewardConversion); + this.reward = 250 + (rep / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionRepToRewardConversion); } HackingMission.prototype.init = function() { @@ -36587,7 +35461,7 @@ HackingMission.prototype.createPageDom = function() { inGameGuideBtn.style.display = "inline-block"; inGameGuideBtn.classList.add("hack-mission-header-element"); inGameGuideBtn.addEventListener("click", function() { - Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionHowToPlay); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionHowToPlay); return false; }); @@ -37477,7 +36351,7 @@ HackingMission.prototype.processNode = function(nodeObj, numCycles=1) { //Calculations are per second, so divide everything by 5 var calcStats = false, plyr = nodeObj.plyrCtrl; - var enmyHacking = this.difficulty * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionDifficultyToHacking; + var enmyHacking = this.difficulty * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionDifficultyToHacking; switch(nodeObj.action) { case NodeActions.Attack: if (nodeObj.conn == null) {break;} @@ -37604,7 +36478,7 @@ HackingMission.prototype.processNode = function(nodeObj, numCycles=1) { if (conqueredByPlayer) { swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); //Conquering spam node increases time limit - this.time += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionSpamTimeIncrease; + this.time += __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionSpamTimeIncrease; } else { swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); } @@ -37615,13 +36489,13 @@ HackingMission.prototype.processNode = function(nodeObj, numCycles=1) { if (conqueredByPlayer) { swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); this.playerCores.forEach(function(node) { - node.atk *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionTransferAttackIncrease; + node.atk *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionTransferAttackIncrease; }); this.configurePlayerNodeElement(targetNode.el); } else { swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode); this.enemyCores.forEach(function(node) { - node.atk *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionTransferAttackIncrease; + node.atk *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionTransferAttackIncrease; }); this.configureEnemyNodeElement(targetNode.el); } @@ -37641,7 +36515,7 @@ HackingMission.prototype.processNode = function(nodeObj, numCycles=1) { if (isMiscNode) { //&& conqueredByPlayer) { this.miscNodes.forEach((node)=>{ if (node.targetedCount === 0) { - node.def *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].HackingMissionMiscDefenseIncrease; + node.def *= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].HackingMissionMiscDefenseIncrease; } }); } @@ -37803,7 +36677,7 @@ HackingMission.prototype.finishMission = function(win) { var gain = this.reward * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].faction_rep_mult * favorMult; Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Mission won! You earned " + Object(__WEBPACK_IMPORTED_MODULE_6__utils_StringHelperFunctions_js__["c" /* formatNumber */])(gain, 3) + " reputation with " + this.faction.name); - __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].gainIntelligenceExp(this.difficulty * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].IntelligenceHackingMissionBaseExpGain); + __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].gainIntelligenceExp(this.difficulty * __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].IntelligenceHackingMissionBaseExpGain); this.faction.playerReputation += gain; } else { Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Mission lost/forfeited! You did not gain any faction reputation."); @@ -37854,6 +36728,7 @@ HackingMission.prototype.finishMission = function(win) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return OrderTypes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return PositionTypes; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Location_js__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptFunctions_js__ = __webpack_require__(23); @@ -38290,21 +37165,21 @@ function buyStock(stock, shares) { if (shares == 0) {return false;} var totalPrice = stock.price * shares; - if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission)) { + if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission)) { Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You do not have enough money to purchase this. You need $" + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2).toString() + "."); + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission, 2).toString() + "."); return false; } var origTotal = stock.playerShares * stock.playerAvgPx; - __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission); + __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission); var newTotal = origTotal + totalPrice; stock.playerShares += shares; stock.playerAvgPx = newTotal / stock.playerShares; updateStockPlayerPosition(stock); Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Bought " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share. You also paid $" + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2) + " in commission fees."); + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission, 2) + " in commission fees."); return true; } @@ -38318,7 +37193,7 @@ function sellStock(stock, shares) { shares = Math.round(shares); if (shares > stock.playerShares) {shares = stock.playerShares;} if (shares === 0) {return false;} - var gains = stock.price * shares - __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; + var gains = stock.price * shares - __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission; __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].gainMoney(gains); stock.playerShares -= shares; if (stock.playerShares == 0) { @@ -38347,21 +37222,21 @@ function shortStock(stock, shares, workerScript=null) { if (shares === 0) {return false;} var totalPrice = stock.price * shares; - if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission)) { + if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.lt(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission)) { if (tixApi) { workerScript.scriptRef.log("ERROR: shortStock() failed because you do not have " + "money to purchase this short position. You need " + - __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission).format('($0.000a)')); + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission).format('($0.000a)')); } else { Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You do not have enough money to purchase this short position. You need $" + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2) + "."); + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission, 2) + "."); } return false; } var origTotal = stock.playerShortShares * stock.playerAvgShortPx; - __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission); + __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(totalPrice + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission); var newTotal = origTotal + totalPrice; stock.playerShortShares += shares; stock.playerAvgShortPx = newTotal / stock.playerShortShares; @@ -38369,11 +37244,11 @@ function shortStock(stock, shares, workerScript=null) { if (tixApi) { workerScript.scriptRef.log("Bought a short position of " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at " + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(stock.price).format('($0.000a)') + " per share. Paid " + - __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission).format('($0.000a)') + " in commission fees."); + __WEBPACK_IMPORTED_MODULE_9__utils_numeral_min_js___default()(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission).format('($0.000a)') + " in commission fees."); } else { Object(__WEBPACK_IMPORTED_MODULE_6__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Bought a short position of " + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(shares, 0) + " shares of " + stock.symbol + " at $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(stock.price, 2) + " per share. You also paid $" + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2) + " in commission fees."); + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission, 2) + " in commission fees."); } return true; } @@ -38395,7 +37270,7 @@ function sellShort(stock, shares, workerScript=null) { if (shares === 0) {return false;} var origCost = shares * stock.playerAvgShortPx; - var profit = ((stock.playerAvgShortPx - stock.price) * shares) - __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; + var profit = ((stock.playerAvgShortPx - stock.price) * shares) - __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission; if (isNaN(profit)) {profit = 0;} __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].gainMoney(origCost + profit); if (tixApi) { @@ -38545,15 +37420,15 @@ function setStockMarketContentCreated(b) { var stockMarketContentCreated = false; var stockMarketPortfolioMode = false; -var COMM = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission; +var COMM = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission; function displayStockMarketContent() { if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasWseAccount == null) {__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasWseAccount = false;} if (__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasTixApiAccess == null) {__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasTixApiAccess = false;} //Purchase WSE Account button var wseAccountButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["b" /* clearEventListeners */])("stock-market-buy-account"); - wseAccountButton.innerText = "Buy WSE Account - $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].WSEAccountCost, 2).toString(); - if (!__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasWseAccount && __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.gte(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].WSEAccountCost)) { + wseAccountButton.innerText = "Buy WSE Account - $" + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].WSEAccountCost, 2).toString(); + if (!__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasWseAccount && __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.gte(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].WSEAccountCost)) { wseAccountButton.setAttribute("class", "a-link-button"); } else { wseAccountButton.setAttribute("class", "a-link-button-inactive"); @@ -38562,7 +37437,7 @@ function displayStockMarketContent() { __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasWseAccount = true; initStockMarket(); initSymbolToStockMap(); - __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].WSEAccountCost); + __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].WSEAccountCost); displayStockMarketContent(); return false; }); @@ -38570,15 +37445,15 @@ function displayStockMarketContent() { //Purchase TIX API Access account var tixApiAccessButton = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["b" /* clearEventListeners */])("stock-market-buy-tix-api"); tixApiAccessButton.innerText = "Buy Trade Information eXchange (TIX) API Access - $" + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].TIXAPICost, 2).toString(); - if (!__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasTixApiAccess && __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.gte(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].TIXAPICost)) { + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].TIXAPICost, 2).toString(); + if (!__WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasTixApiAccess && __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].money.gte(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].TIXAPICost)) { tixApiAccessButton.setAttribute("class", "a-link-button"); } else { tixApiAccessButton.setAttribute("class", "a-link-button-inactive"); } tixApiAccessButton.addEventListener("click", function() { __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].hasTixApiAccess = true; - __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].TIXAPICost); + __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].loseMoney(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].TIXAPICost); displayStockMarketContent(); return false; }); @@ -38599,7 +37474,7 @@ function displayStockMarketContent() { console.log("Creating Stock Market UI"); document.getElementById("stock-market-commission").innerHTML = "Commission Fees: Every transaction you make has a $" + - Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].StockMarketCommission, 2) + " commission fee.

" + + Object(__WEBPACK_IMPORTED_MODULE_10__utils_StringHelperFunctions_js__["c" /* formatNumber */])(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].StockMarketCommission, 2) + " commission fee.

" + "WARNING: When you reset after installing Augmentations, the Stock Market is reset. " + "This means all your positions are lost, so make sure to sell your stocks before installing " + "Augmentations!"; @@ -39640,7 +38515,7 @@ Product.prototype.finishProduct = function(employeeProd, industry) { var advMult = 1 + (Math.pow(this.advCost, 0.1) / 100); console.log("advMult: " + advMult); this.mku = 100 / (advMult * this.qlt * (busRatio + mgmtRatio)); - this.dmd = industry.awareness === 0 ? 100 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness))); + this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness))); this.cmp = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, 70); //Calculate the product's required materials @@ -40167,10 +39042,18 @@ Industry.prototype.process = function(marketCycles=1, state, company) { //At the start of a cycle, store and reset revenue/expenses //Then calculate salaries and processs the markets if (state === "START") { + if (this.thisCycleRevenue.isNaN() || this.thisCycleExpenses.isNaN()) { + console.log("ERROR: NaN in Corporation's computed revenue/expenses"); + console.log(this.thisCycleRevenue.toString()); + console.log(this.thisCycleExpenses.toString()); + Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"); + this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0); + this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0); + } this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * SecsPerMarketCycle); this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * SecsPerMarketCycle); - this.thisCycleRevenue = this.thisCycleRevenue.times(0); - this.thisCycleExpenses = this.thisCycleExpenses.times(0); + this.thisCycleRevenue = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0); + this.thisCycleExpenses = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0); //Process offices (and the employees in them) var employeeSalary = 0; @@ -40209,6 +39092,7 @@ Industry.prototype.process = function(marketCycles=1, state, company) { res = this.processProducts(marketCycles, company); this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]); this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]); + } //Process change in demand and competition for this industry's materials @@ -40248,14 +39132,16 @@ Industry.prototype.processProductMarket = function(marketCycles=1) { for (var name in this.products) { if (this.products.hasOwnProperty(name)) { var product = this.products[name]; - var change = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(1, 5) * 0.001; + var change = Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["g" /* getRandomInt */])(1, 4) * 0.0005; if (this.type === Industries.Pharmaceutical || this.type === Industries.Software || this.type === Industries.Robotics) { - change *= 2.5; + change *= 3; } change *= marketCycles; product.dmd -= change; product.cmp += change; + product.cmp = Math.min(product.cmp, 99.99); + product.dmd = Math.max(product.dmd, 0.001); } } } @@ -40349,6 +39235,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { } } } + if (producableFrac <= 0) {producableFrac = 0; prod = 0;} //Make our materials if they are producable if (producableFrac > 0 && prod > 0) { @@ -40367,7 +39254,14 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials["AICores"].qty, this.aiFac) / 10e3); } + } else { + for (var reqMatName in this.reqMats) { + if (this.reqMats.hasOwnProperty(reqMatName)) { + warehouse.materials[reqMatName].prd = 0; + } + } } + //Per second var fooProd = prod * producableFrac / (SecsPerMarketCycle * marketCycles); for (var fooI = 0; fooI < this.prodMats.length; ++fooI) { @@ -40412,7 +39306,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { } var businessFactor = 1 + (office.employeeProd[EmployeePositions.Business] / office.employeeProd["total"]); var maxSell = (mat.qlt + .001) * mat.dmd * (100 - mat.cmp)/100 * markup * businessFactor * - Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) * + Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) * company.getSalesMultiplier() * (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01)); var sellAmt; @@ -40422,7 +39316,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { } else { sellAmt = maxSell; } - sellAmt = (sellAmt * company.getSalesMultiplier() * SecsPerMarketCycle * marketCycles); + sellAmt = (sellAmt * SecsPerMarketCycle * marketCycles); sellAmt = Math.min(mat.qty, sellAmt); if (sellAmt < 0) { console.log("ERROR: sellAmt is negative"); @@ -40541,15 +39435,21 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio switch(this.state) { case "PRODUCTION": - //Calculate the maximum production of this Product based on - //office's productivity, materials, etc. + //Calculate the maximum production of this material based + //on the office's productivity var total = office.employeeProd[EmployeePositions.Operations] + office.employeeProd[EmployeePositions.Engineer] + - office.employeeProd[EmployeePositions.Management]; - var ratio = (office.employeeProd[EmployeePositions.Operations] / total) * + office.employeeProd[EmployeePositions.Management], ratio; + if (total === 0) { + ratio = 0; + } else { + ratio = (office.employeeProd[EmployeePositions.Operations] / total) * (office.employeeProd[EmployeePositions.Engineer] / total) * (office.employeeProd[EmployeePositions.Management] / total); - var maxProd = ratio * Math.pow(total, 0.2), prod; + ratio = Math.max(0.01, ratio); //Minimum ratio value if you have employees + } + var maxProd = ratio * Math.pow(total, 0.2) * + corporation.getProductionMultiplier() * this.prodMult, prod; //Account for whether production is manually limited if (product.prdman[city][0]) { @@ -40557,7 +39457,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } else { prod = maxProd; } - prod *= (this.prodMult * corporation.getProductionMultiplier() * SecsPerMarketCycle * marketCycles); + prod *= (SecsPerMarketCycle * marketCycles); //Calculate net change in warehouse storage making the Products will cost @@ -40587,7 +39487,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } //Make our Products if they are producable - if (producableFrac > 0) { + if (producableFrac > 0 && prod > 0) { for (var reqMatName in product.reqMats) { if (product.reqMats.hasOwnProperty(reqMatName)) { var reqMatQtyNeeded = (product.reqMats[reqMatName] * prod * producableFrac); @@ -40622,9 +39522,9 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } } var businessFactor = 1 + (office.employeeProd[EmployeePositions.Business] / office.employeeProd["total"]); - var maxSell = Math.pow(product.rat, 0.95) * product.dmd * (1-(product.cmp/100)) * + var maxSell = Math.pow(product.rat, 0.95) * product.dmd * (1-(product.cmp/100)) * corporation.getSalesMultiplier() * markup * businessFactor * Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) * - (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01)); + (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01)) ; var sellAmt; if (product.sllman[city][0] && product.sllman[city][1] > 0) { //Sell amount is manually limited @@ -40632,7 +39532,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } else { sellAmt = maxSell; } - sellAmt = sellAmt * corporation.getSalesMultiplier() * SecsPerMarketCycle * marketCycles; + sellAmt = sellAmt * SecsPerMarketCycle * marketCycles; sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty if (sellAmt && product.sCost) { product.data[city][0] -= sellAmt; //data[0] is qty @@ -41592,6 +40492,13 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { } //Completed products + var cmpAndDmdText = ""; + if (company.unlockUpgrades[2] === 1) { + cmpAndDmdText += "
Competition: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.cmp, 3); + } + if (company.unlockUpgrades[3] === 1) { + cmpAndDmdText += "
Demand: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.dmd, 3); + } var totalGain = product.data[city][1] - product.data[city][2]; //Production - sale div.appendChild(Object(__WEBPACK_IMPORTED_MODULE_5__utils_HelperFunctions_js__["e" /* createElement */])("p", { innerHTML: "

" + product.name + ": " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.data[city][0], 3) + //Quantity @@ -41604,7 +40511,8 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { "Durability: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.dur, 3) + "
" + "Reliability: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.rel, 3) + "
" + "Aesthetics: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.aes, 3) + "
" + - "Features: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.fea, 3) + "


" + + "Features: " + Object(__WEBPACK_IMPORTED_MODULE_8__utils_StringHelperFunctions_js__["c" /* formatNumber */])(product.fea, 3) + + cmpAndDmdText + "


" + "

Est. Production Cost: " + __WEBPACK_IMPORTED_MODULE_7__utils_numeral_min_js___default()(product.pCost).format("$0.000a") + "An estimate of how much it costs to produce one unit of this product. " + "If your sell price exceeds this by too much, people won't buy your product. The better your " + @@ -41810,9 +40718,9 @@ var CorporationUnlockUpgrades = { // name, desc] var CorporationUpgrades = { //Smart factories, increases production - "0": [0, 2e9, 1.07, 0.02, + "0": [0, 2e9, 1.07, 0.03, "Smart Factories", "Advanced AI automatically optimizes the operation and productivity " + - "of factories. Each level of this upgrade increases your global production by 2% (additive)."], + "of factories. Each level of this upgrade increases your global production by 3% (additive)."], //Smart warehouses, increases storage size "1": [1, 2e9, 1.07, .1, @@ -41856,7 +40764,7 @@ var CorporationUpgrades = { "of this upgrade globally increases the efficiency of your employees by 10% (additive)."], //Improves sales of materials/products - "8": [8, 1e9, 1.09, 0.01, + "8": [8, 1e9, 1.08, 0.01, "ABC SalesBots", "Always Be Closing. Purchase these robotic salesmen to increase the amount of " + "materials and products you sell. Each level of this upgrade globally increases your sales " + "by 1% (additive)."], @@ -41911,14 +40819,20 @@ Corporation.prototype.process = function(numCycles=1) { //At the start of a new cycle, calculate profits from previous cycle if (state === "START") { - this.revenue = this.revenue.times(0); - this.expenses = this.expenses.times(0); + this.revenue = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0); + this.expenses = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(0); this.divisions.forEach((ind)=>{ this.revenue = this.revenue.plus(ind.lastCycleRevenue); this.expenses = this.expenses.plus(ind.lastCycleExpenses); }); var profit = this.revenue.minus(this.expenses); var cycleProfit = profit.times(marketCycles * SecsPerMarketCycle); + if (this.funds.isNaN()) { + Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])("There was an error calculating your Corporations funds and they got reset to 0. " + + "This is a bug. Please report to game developer.

" + + "(Your funds have been set to $150b for the inconvenience)"); + this.funds = new __WEBPACK_IMPORTED_MODULE_3__utils_decimal_js___default.a(150e9); + } this.funds = this.funds.plus(cycleProfit); this.updateSharePrice(); } @@ -41965,7 +40879,7 @@ Corporation.prototype.getInvestment = function() { case 4: return; } - var funding = val * percShares * 2, + var funding = val * percShares * 4, investShares = Math.floor(TOTALSHARES * percShares), yesBtn = Object(__WEBPACK_IMPORTED_MODULE_9__utils_YesNoBox_js__["d" /* yesNoBoxGetYesButton */])(), noBtn = Object(__WEBPACK_IMPORTED_MODULE_9__utils_YesNoBox_js__["c" /* yesNoBoxGetNoButton */])(); @@ -43413,6 +42327,7 @@ __WEBPACK_IMPORTED_MODULE_6__utils_JSONReviver_js__["c" /* Reviver */].construct /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return determineCrimeChanceAssassination; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return determineCrimeChanceHeist; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_DialogBox_js__ = __webpack_require__(1); @@ -43422,7 +42337,7 @@ __WEBPACK_IMPORTED_MODULE_6__utils_JSONReviver_js__["c" /* Reviver */].construct /* Crimes.js */ function commitShopliftCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeShoplift; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeShoplift; var time = 2000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 0, 0, 2/div, 2/div, 0, 15000/div, time, singParams); //$7500/s, 1 exp/s return time; @@ -43430,7 +42345,7 @@ function commitShopliftCrime(div=1, singParams=null) { function commitRobStoreCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeRobStore; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeRobStore; var time = 60000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(30/div, 0, 0, 45/div, 45/div, 0, 400000/div, time, singParams); //$6666,6/2, 0.5exp/s, 0.75exp/s return time; @@ -43438,7 +42353,7 @@ function commitRobStoreCrime(div=1, singParams=null) { function commitMugCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeMug; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeMug; var time = 4000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 3/div, 3/div, 3/div, 3/div, 0, 36000/div, time, singParams); //$9000/s, .66 exp/s return time; @@ -43446,7 +42361,7 @@ function commitMugCrime(div=1, singParams=null) { function commitLarcenyCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeLarceny; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeLarceny; var time = 90000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(45/div, 0, 0, 60/div, 60/div, 0, 800000/div, time, singParams) // $8888.88/s, .5 exp/s, .66 exp/s return time; @@ -43454,7 +42369,7 @@ function commitLarcenyCrime(div=1, singParams=null) { function commitDealDrugsCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeDrugs; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeDrugs; var time = 10000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 0, 0, 5/div, 5/div, 10/div, 120000/div, time, singParams); //$12000/s, .5 exp/s, 1 exp/s return time; @@ -43462,7 +42377,7 @@ function commitDealDrugsCrime(div=1, singParams=null) { function commitBondForgeryCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeBondForgery; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeBondForgery; var time = 300000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(100/div, 0, 0, 150/div, 0, 15/div, 4500000/div, time, singParams); //$15000/s, 0.33 hack exp/s, .5 dex exp/s, .05 cha exp return time; @@ -43470,7 +42385,7 @@ function commitBondForgeryCrime(div=1, singParams=null) { function commitTraffickArmsCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeTraffickArms; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeTraffickArms; var time = 40000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 20/div, 20/div, 20/div, 20/div, 40/div, 600000/div, time, singParams); //$15000/s, .5 combat exp/s, 1 cha exp/s return time; @@ -43478,7 +42393,7 @@ function commitTraffickArmsCrime(div=1, singParams=null) { function commitHomicideCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeHomicide; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeHomicide; var time = 3000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 2/div, 2/div, 2/div, 2/div, 0, 45000/div, time, singParams); //$15000/s, 0.66 combat exp/s return time; @@ -43486,7 +42401,7 @@ function commitHomicideCrime(div=1, singParams=null) { function commitGrandTheftAutoCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeGrandTheftAuto; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeGrandTheftAuto; var time = 80000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 20/div, 20/div, 20/div, 80/div, 40/div, 1600000/div, time, singParams); //$20000/s, .25 exp/s, 1 exp/s, .5 exp/s return time; @@ -43494,7 +42409,7 @@ function commitGrandTheftAutoCrime(div=1, singParams=null) { function commitKidnapCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeKidnap; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeKidnap; var time = 120000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 80/div, 80/div, 80/div, 80/div, 80/div, 3600000/div, time, singParams); //$30000/s. .66 exp/s return time; @@ -43502,7 +42417,7 @@ function commitKidnapCrime(div=1, singParams=null) { function commitAssassinationCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeAssassination; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeAssassination; var time = 300000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(0, 300/div, 300/div, 300/div, 300/div, 0, 12000000/div, time, singParams); //$40000/s, 1 exp/s return time; @@ -43510,7 +42425,7 @@ function commitAssassinationCrime(div=1, singParams=null) { function commitHeistCrime(div=1, singParams=null) { if (div <= 0) {div = 1;} - __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeHeist; + __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].crimeType = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeHeist; var time = 600000; __WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].startCrime(450/div, 450/div, 450/div, 450/div, 450/div, 450/div, 120000000/div, time, singParams); //$200000/s, .75exp/s return time; @@ -43519,40 +42434,40 @@ function commitHeistCrime(div=1, singParams=null) { function determineCrimeSuccess(crime, moneyGained) { var chance = 0; switch (crime) { - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeShoplift: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeShoplift: chance = determineCrimeChanceShoplift(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeRobStore: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeRobStore: chance = determineCrimeChanceRobStore(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeMug: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeMug: chance = determineCrimeChanceMug(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeLarceny: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeLarceny: chance = determineCrimeChanceLarceny(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeDrugs: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeDrugs: chance = determineCrimeChanceDealDrugs(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeBondForgery: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeBondForgery: chance = determineCrimeChanceBondForgery(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeTraffickArms: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeTraffickArms: chance = determineCrimeChanceTraffickArms(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeHomicide: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeHomicide: chance = determineCrimeChanceHomicide(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeGrandTheftAuto: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeGrandTheftAuto: chance = determineCrimeChanceGrandTheftAuto(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeKidnap: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeKidnap: chance = determineCrimeChanceKidnap(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeAssassination: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeAssassination: chance = determineCrimeChanceAssassination(); break; - case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].CrimeHeist: + case __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].CrimeHeist: chance = determineCrimeChanceHeist(); break; default: @@ -43571,8 +42486,8 @@ function determineCrimeSuccess(crime, moneyGained) { } } -let intWgt = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].IntelligenceCrimeWeight; -let maxLvl = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaxSkillLevel; +let intWgt = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].IntelligenceCrimeWeight; +let maxLvl = __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaxSkillLevel; function determineCrimeChanceShoplift() { var chance = (__WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].dexterity / maxLvl + @@ -44538,6 +43453,7 @@ function applySourceFile(srcFile) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return killNetscriptDelay; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__NetscriptEnvironment_js__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NetscriptWorker_js__ = __webpack_require__(10); @@ -45260,7 +44176,7 @@ function runScriptFromScript(server, scriptname, args, workerScript, threads=1) var script = server.scripts[i]; var ramUsage = script.ramUsage; threads = Math.round(Number(threads)); //Convert to number and round - ramUsage = ramUsage * threads * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].MultithreadingRAMCost, threads-1); + ramUsage = ramUsage * threads * Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].MultithreadingRAMCost, threads-1); var ramAvailable = server.maxRam - server.ramUsed; if (server.hasAdminRights == false) { @@ -49123,6 +48039,7 @@ Object.defineProperty(exports, '__esModule', { value: true }); /* unused harmony export getHacknetNode */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__InteractiveTutorial_js__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Player_js__ = __webpack_require__(0); @@ -49188,7 +48105,7 @@ function HacknetNode(name) { HacknetNode.prototype.updateMoneyGainRate = function() { //How much extra $/s is gained per level - var gainPerLevel = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMoneyGainPerLevel; + var gainPerLevel = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMoneyGainPerLevel; this.moneyGainRatePerSecond = (this.level * gainPerLevel) * Math.pow(1.035, this.ram-1) * @@ -49206,14 +48123,14 @@ HacknetNode.prototype.updateMoneyGainRate = function() { HacknetNode.prototype.calculateLevelUpgradeCost = function(levels=1) { levels = Math.round(levels); if (isNaN(levels) || levels < 1) {return 0;} - var mult = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeUpgradeLevelMult; + var mult = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeUpgradeLevelMult; var totalMultiplier = 0; //Summed var currLevel = this.level; for (var i = 0; i < levels; ++i) { totalMultiplier += Math.pow(mult, currLevel); ++currLevel; } - return __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].BaseCostForHacknetNode / 2 * totalMultiplier * __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknet_node_level_cost_mult; + return __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].BaseCostForHacknetNode / 2 * totalMultiplier * __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknet_node_level_cost_mult; } //Wrapper function for Netscript @@ -49225,8 +48142,8 @@ HacknetNode.prototype.purchaseLevelUpgrade = function(levels=1) { levels = Math.round(levels); var cost = this.calculateLevelUpgradeCost(levels); if (isNaN(cost) || levels < 0) {return false;} - if (this.level + levels > __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel) { - var diff = Math.max(0, __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel - this.level); + if (this.level + levels > __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel) { + var diff = Math.max(0, __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel - this.level); return this.purchaseLevelUpgrade(diff); } if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.lt(cost)) {return false;} @@ -49246,8 +48163,8 @@ HacknetNode.prototype.calculateRamUpgradeCost = function() { //Calculate cost //Base cost of RAM is 50k per 1GB, increased by some multiplier for each time RAM is upgraded - var baseCost = this.ram * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].BaseCostFor1GBOfRamHacknetNode; - var mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeUpgradeRamMult, numUpgrades); + var baseCost = this.ram * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].BaseCostFor1GBOfRamHacknetNode; + var mult = Math.pow(__WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeUpgradeRamMult, numUpgrades); return baseCost * mult * __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknet_node_ram_cost_mult; } @@ -49260,7 +48177,7 @@ HacknetNode.prototype.purchaseRamUpgrade = function() { var cost = this.calculateRamUpgradeCost(); if (isNaN(cost)) {return false;} if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.lt(cost)) {return false;} - if (this.ram >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxRam) {return false;} + if (this.ram >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxRam) {return false;} __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].loseMoney(cost); this.ram *= 2; //Ram is always doubled this.updateMoneyGainRate(); @@ -49273,8 +48190,8 @@ HacknetNode.prototype.upgradeRam = function() { } HacknetNode.prototype.calculateCoreUpgradeCost = function() { - var coreBaseCost = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].BaseCostForHacknetNodeCore; - var mult = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeUpgradeCoreMult; + var coreBaseCost = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].BaseCostForHacknetNodeCore; + var mult = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeUpgradeCoreMult; return coreBaseCost * Math.pow(mult, this.cores-1) * __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknet_node_core_cost_mult; } @@ -49287,7 +48204,7 @@ HacknetNode.prototype.purchaseCoreUpgrade = function() { var cost = this.calculateCoreUpgradeCost(); if (isNaN(cost)) {return false;} if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.lt(cost)) {return false;} - if (this.cores >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxCores) {return false;} + if (this.cores >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxCores) {return false;} __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].loseMoney(cost); ++this.cores; this.updateMoneyGainRate(); @@ -49356,8 +48273,8 @@ function updateTotalHacknetProduction() { function getCostOfNextHacknetNode() { //Cost increases exponentially based on how many you own var numOwned = __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknetNodes.length; - var mult = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodePurchaseNextMult; - return __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].BaseCostForHacknetNode * Math.pow(mult, numOwned) * __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknet_node_purchase_cost_mult; + var mult = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodePurchaseNextMult; + return __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].BaseCostForHacknetNode * Math.pow(mult, numOwned) * __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].hacknet_node_purchase_cost_mult; } var hacknetNodePurchaseMultiplier = 1; @@ -49391,15 +48308,15 @@ function updateHacknetNodesMultiplierButtons() { function getMaxNumberLevelUpgrades(nodeObj) { if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.lt(nodeObj.calculateLevelUpgradeCost(1))) {return 0;} var min = 1; - var max = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel-1; - var levelsToMax = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel - nodeObj.level; + var max = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel-1; + var levelsToMax = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel - nodeObj.level; if (__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.gt(nodeObj.calculateLevelUpgradeCost(levelsToMax))) { return levelsToMax; } while (min <= max) { var curr = (min + max) / 2 | 0; - if (curr != __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel && + if (curr != __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel && __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.gt(nodeObj.calculateLevelUpgradeCost(curr)) && __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].money.lt(nodeObj.calculateLevelUpgradeCost(curr+1))) { return Math.min(levelsToMax, curr); @@ -49543,7 +48460,7 @@ function updateHacknetNodeDomElement(nodeObj) { //Upgrade level var upgradeLevelButton = document.getElementById("hacknet-node-upgrade-level-" + nodeName); if (upgradeLevelButton == null) {throw new Error("Cannot find upgrade level button element");} - if (nodeObj.level >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel) { + if (nodeObj.level >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel) { upgradeLevelButton.innerHTML = "MAX LEVEL"; upgradeLevelButton.setAttribute("class", "a-link-button-inactive"); } else { @@ -49552,7 +48469,7 @@ function updateHacknetNodeDomElement(nodeObj) { //Max multiplier = getMaxNumberLevelUpgrades(nodeObj); } else { - var levelsToMax = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxLevel - nodeObj.level; + var levelsToMax = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxLevel - nodeObj.level; multiplier = Math.min(levelsToMax, hacknetNodePurchaseMultiplier); } @@ -49569,7 +48486,7 @@ function updateHacknetNodeDomElement(nodeObj) { //Upgrade RAM var upgradeRamButton = document.getElementById("hacknet-node-upgrade-ram-" + nodeName); if (upgradeRamButton == null) {throw new Error("Cannot find upgrade ram button element");} - if (nodeObj.ram >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxRam) { + if (nodeObj.ram >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxRam) { upgradeRamButton.innerHTML = "MAX RAM"; upgradeRamButton.setAttribute("class", "a-link-button-inactive"); } else { @@ -49585,7 +48502,7 @@ function updateHacknetNodeDomElement(nodeObj) { //Upgrade Cores var upgradeCoreButton = document.getElementById("hacknet-node-upgrade-core-" + nodeName); if (upgradeCoreButton == null) {throw new Error("Cannot find upgrade cores button element");} - if (nodeObj.cores >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].HacknetNodeMaxCores) { + if (nodeObj.cores >= __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].HacknetNodeMaxCores) { upgradeCoreButton.innerHTML = "MAX CORES"; upgradeCoreButton.setAttribute("class", "a-link-button-inactive"); } else { @@ -49645,6 +48562,7 @@ function getHacknetNode(name) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AllGangs; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return resetGangs; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Faction_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Location_js__ = __webpack_require__(12); @@ -49796,7 +48714,7 @@ let gangStoredTerritoryCycles = 0; function processAllGangTerritory(numCycles=1) { if (!__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].inGang()) {return;} gangStoredTerritoryCycles += numCycles; - if (gangStoredTerritoryCycles < __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].GangTerritoryUpdateTimer) {return;} + if (gangStoredTerritoryCycles < __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].GangTerritoryUpdateTimer) {return;} for (var i = 0; i < GangNames.length; ++i) { var other = Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["g" /* getRandomInt */])(0, GangNames.length-1); @@ -49822,7 +48740,7 @@ function processAllGangTerritory(numCycles=1) { } } - gangStoredTerritoryCycles -= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].GangTerritoryUpdateTimer; + gangStoredTerritoryCycles -= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].GangTerritoryUpdateTimer; } /* faction - Name of corresponding faction @@ -49881,7 +48799,7 @@ Gang.prototype.processGains = function(numCycles=1) { Object(__WEBPACK_IMPORTED_MODULE_5__utils_DialogBox_js__["a" /* dialogBoxCreate */])("ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev"); } else { var favorMult = 1 + (fac.favor / 100); - fac.playerReputation += ((__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].faction_rep_mult * gain * favorMult) / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].GangRespectToReputationRatio); + fac.playerReputation += ((__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].faction_rep_mult * gain * favorMult) / __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].GangRespectToReputationRatio); } } else { @@ -50751,7 +49669,7 @@ function updateGangContent() { var numMembers = __WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].gang.members.length; var repCost = 0; if (numMembers > 0) { - var repCost = Math.pow(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].GangRecruitCostMultiplier, numMembers); + var repCost = Math.pow(__WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].GangRecruitCostMultiplier, numMembers); } var faction = __WEBPACK_IMPORTED_MODULE_2__Faction_js__["b" /* Factions */][__WEBPACK_IMPORTED_MODULE_4__Player_js__["a" /* Player */].gang.facName]; if (faction == null) { @@ -50759,7 +49677,7 @@ function updateGangContent() { return; } var btn = document.getElementById("gang-management-recruit-member-btn"); - if (numMembers >= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].MaximumGangMembers) { + if (numMembers >= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].MaximumGangMembers) { btn.className = "a-link-button-inactive"; document.getElementById("gang-recruit-requirement-text").style.display = "block"; document.getElementById("gang-recruit-requirement-text").innerHTML = @@ -52401,6 +51319,7 @@ let FactionInfo = { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return beginInfiltration; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__ = __webpack_require__(1); @@ -52766,7 +51685,7 @@ function nextInfiltrationLevel(inst) { }); bribeButton.addEventListener("click", function() { - var bribeAmt = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].InfiltrationBribeBaseAmount * inst.clearanceLevel; + var bribeAmt = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].InfiltrationBribeBaseAmount * inst.clearanceLevel; if (__WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].money.lt(bribeAmt)) { writeInfiltrationStatusText("You do not have enough money to bribe the guard. " + "You need $" + bribeAmt); @@ -52820,8 +51739,8 @@ function endInfiltrationLevel(inst) { if (inst.clearanceLevel % 5 == 0) { var baseSecretValue = inst.baseValue * inst.clearanceLevel / 2; var secretValue = baseSecretValue * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].faction_rep_mult * - __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].InfiltrationRepValue * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationRep; - var secretMoneyValue = baseSecretValue * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].InfiltrationMoneyValue * + __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].InfiltrationRepValue * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationRep; + var secretMoneyValue = baseSecretValue * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].InfiltrationMoneyValue * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationMoney; inst.secretsStolen.push(baseSecretValue); Object(__WEBPACK_IMPORTED_MODULE_4__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You found and stole a set of classified documents from the company. " + @@ -52858,8 +51777,8 @@ function updateInfiltrationLevelText(inst) { var totalMoneyValue = 0; for (var i = 0; i < inst.secretsStolen.length; ++i) { totalValue += (inst.secretsStolen[i] * __WEBPACK_IMPORTED_MODULE_3__Player_js__["a" /* Player */].faction_rep_mult * - __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].InfiltrationRepValue * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationRep); - totalMoneyValue += inst.secretsStolen[i] * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].InfiltrationMoneyValue * + __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].InfiltrationRepValue * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationRep); + totalMoneyValue += inst.secretsStolen[i] * __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].InfiltrationMoneyValue * __WEBPACK_IMPORTED_MODULE_0__BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationMoney; } document.getElementById("infiltration-level-text").innerHTML = @@ -52995,7 +51914,7 @@ function updateInfiltrationButtons(inst, scenario) { } } -let intWgt = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["a" /* CONSTANTS */].IntelligenceInfiltrationWeight; +let intWgt = __WEBPACK_IMPORTED_MODULE_1__Constants_js__["CONSTANTS"].IntelligenceInfiltrationWeight; //Kill //Success: 5%, Failure 10%, -Karma @@ -53240,6 +52159,7 @@ function getInfiltrationEscapeChance(inst) { /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return infiltrationBoxCreate; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__src_BitNode_js__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__src_Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_Faction_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__src_Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__DialogBox_js__ = __webpack_require__(1); @@ -53297,8 +52217,8 @@ function infiltrationBoxCreate(inst) { return; } var facValue = totalValue * __WEBPACK_IMPORTED_MODULE_3__src_Player_js__["a" /* Player */].faction_rep_mult * - __WEBPACK_IMPORTED_MODULE_1__src_Constants_js__["a" /* CONSTANTS */].InfiltrationRepValue * __WEBPACK_IMPORTED_MODULE_0__src_BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationRep; - var moneyValue = totalValue * __WEBPACK_IMPORTED_MODULE_1__src_Constants_js__["a" /* CONSTANTS */].InfiltrationMoneyValue * __WEBPACK_IMPORTED_MODULE_0__src_BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationMoney; + __WEBPACK_IMPORTED_MODULE_1__src_Constants_js__["CONSTANTS"].InfiltrationRepValue * __WEBPACK_IMPORTED_MODULE_0__src_BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationRep; + var moneyValue = totalValue * __WEBPACK_IMPORTED_MODULE_1__src_Constants_js__["CONSTANTS"].InfiltrationMoneyValue * __WEBPACK_IMPORTED_MODULE_0__src_BitNode_js__["a" /* BitNodeMultipliers */].InfiltrationMoney; infiltrationSetText("You can sell the classified documents and secrets " + "you stole from " + inst.companyName + " for $" + Object(__WEBPACK_IMPORTED_MODULE_6__StringHelperFunctions_js__["c" /* formatNumber */])(moneyValue, 2) + " on the black market or you can give it " + @@ -104405,6 +103325,7 @@ exports.clearImmediate = clearImmediate; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return purchaseServer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return purchaseRamForHomeComputer; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Player_js__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Server_js__ = __webpack_require__(6); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__utils_DialogBox_js__ = __webpack_require__(1); @@ -104430,8 +103351,8 @@ function purchaseServer(ram, cost) { } //Maximum server limit - if (__WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].purchasedServers.length >= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit) { - Object(__WEBPACK_IMPORTED_MODULE_3__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You have reached the maximum limit of " + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["a" /* CONSTANTS */].PurchasedServerLimit + " servers. " + + if (__WEBPACK_IMPORTED_MODULE_1__Player_js__["a" /* Player */].purchasedServers.length >= __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].PurchasedServerLimit) { + Object(__WEBPACK_IMPORTED_MODULE_3__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You have reached the maximum limit of " + __WEBPACK_IMPORTED_MODULE_0__Constants_js__["CONSTANTS"].PurchasedServerLimit + " servers. " + "You cannot purchase any more. You can " + "delete some of your purchased servers using the deleteServer() Netscript function in a script"); return; @@ -104548,6 +103469,7 @@ function factionInvitationBoxCreate(faction) { /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Alias_js__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Company_js__ = __webpack_require__(22); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js__ = __webpack_require__(3); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Constants_js___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__Constants_js__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__engine_js__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Faction_js__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Gang_js__ = __webpack_require__(41); @@ -104631,7 +103553,7 @@ BitburnerSaveObject.prototype.saveGame = function(db) { this.MessagesSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_7__Message_js__["b" /* Messages */]); this.StockMarketSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["c" /* StockMarket */]); this.SettingsSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_11__Settings_js__["a" /* Settings */]); - this.VersionSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].Version); + this.VersionSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].Version); if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN == 2 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].inGang()) { this.AllGangsSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_5__Gang_js__["a" /* AllGangs */]); } @@ -104762,7 +103684,7 @@ function loadGame(saveString) { } } } - if (ver != __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].Version) { + if (ver != __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].Version) { createNewUpdateText(); } } catch(e) { @@ -104863,7 +103785,7 @@ function loadImportedGame(saveObj, saveString) { tempPlayer.sourceFiles = []; } } - if (ver != __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].Version) { + if (ver != __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].Version) { //createNewUpdateText(); } } catch(e) { @@ -104970,7 +103892,7 @@ function loadImportedGame(saveObj, saveString) { } } } - if (ver != __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].Version) { + if (ver != __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].Version) { createNewUpdateText(); } } catch(e) { @@ -105006,15 +103928,15 @@ function loadImportedGame(saveObj, saveString) { var offlineProductionFromScripts = Object(__WEBPACK_IMPORTED_MODULE_9__Script_js__["e" /* loadAllRunningScripts */])(); //This also takes care of offline production for those scripts if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) { console.log("work() called in load() for " + numCyclesOffline * __WEBPACK_IMPORTED_MODULE_3__engine_js__["Engine"]._idleSpeed + " milliseconds"); - if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].WorkTypeFaction) { + if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].WorkTypeFaction) { __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workForFaction(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].WorkTypeCreateProgram) { + } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].WorkTypeCreateProgram) { __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].createProgramWork(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].WorkTypeStudyClass) { + } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].WorkTypeStudyClass) { __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].takeClass(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].WorkTypeCrime) { + } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].WorkTypeCrime) { __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].commitCrime(numCyclesOffline); - } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].WorkTypeCompanyPartTime) { + } else if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workType == __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].WorkTypeCompanyPartTime) { __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].workPartTime(numCyclesOffline); } else { __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].work(numCyclesOffline); @@ -105059,7 +103981,7 @@ BitburnerSaveObject.prototype.exportGame = function() { this.MessagesSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_7__Message_js__["b" /* Messages */]); this.StockMarketSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_13__StockMarket_js__["c" /* StockMarket */]); this.SettingsSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_11__Settings_js__["a" /* Settings */]); - this.VersionSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].Version); + this.VersionSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].Version); if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN == 2 && __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].inGang()) { this.AllGangsSave = JSON.stringify(__WEBPACK_IMPORTED_MODULE_5__Gang_js__["a" /* AllGangs */]); } @@ -105115,7 +104037,7 @@ function createNewUpdateText() { Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("New update!
" + "Please report any bugs/issues through the github repository " + "or the Bitburner subreddit (reddit.com/r/bitburner).

" + - __WEBPACK_IMPORTED_MODULE_2__Constants_js__["a" /* CONSTANTS */].LatestUpdate); + __WEBPACK_IMPORTED_MODULE_2__Constants_js__["CONSTANTS"].LatestUpdate); } diff --git a/src/CompanyManagement.js b/src/CompanyManagement.js index ef5430b20..7b6c9cce4 100644 --- a/src/CompanyManagement.js +++ b/src/CompanyManagement.js @@ -353,7 +353,7 @@ Product.prototype.finishProduct = function(employeeProd, industry) { var advMult = 1 + (Math.pow(this.advCost, 0.1) / 100); console.log("advMult: " + advMult); this.mku = 100 / (advMult * this.qlt * (busRatio + mgmtRatio)); - this.dmd = industry.awareness === 0 ? 100 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness))); + this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness))); this.cmp = getRandomInt(0, 70); //Calculate the product's required materials @@ -880,10 +880,18 @@ Industry.prototype.process = function(marketCycles=1, state, company) { //At the start of a cycle, store and reset revenue/expenses //Then calculate salaries and processs the markets if (state === "START") { + if (this.thisCycleRevenue.isNaN() || this.thisCycleExpenses.isNaN()) { + console.log("ERROR: NaN in Corporation's computed revenue/expenses"); + console.log(this.thisCycleRevenue.toString()); + console.log(this.thisCycleExpenses.toString()); + dialogBoxCreate("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"); + this.thisCycleRevenue = new Decimal(0); + this.thisCycleExpenses = new Decimal(0); + } this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * SecsPerMarketCycle); this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * SecsPerMarketCycle); - this.thisCycleRevenue = this.thisCycleRevenue.times(0); - this.thisCycleExpenses = this.thisCycleExpenses.times(0); + this.thisCycleRevenue = new Decimal(0); + this.thisCycleExpenses = new Decimal(0); //Process offices (and the employees in them) var employeeSalary = 0; @@ -922,6 +930,7 @@ Industry.prototype.process = function(marketCycles=1, state, company) { res = this.processProducts(marketCycles, company); this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]); this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]); + } //Process change in demand and competition for this industry's materials @@ -961,14 +970,16 @@ Industry.prototype.processProductMarket = function(marketCycles=1) { for (var name in this.products) { if (this.products.hasOwnProperty(name)) { var product = this.products[name]; - var change = getRandomInt(1, 5) * 0.001; + var change = getRandomInt(1, 4) * 0.0005; if (this.type === Industries.Pharmaceutical || this.type === Industries.Software || this.type === Industries.Robotics) { - change *= 2.5; + change *= 3; } change *= marketCycles; product.dmd -= change; product.cmp += change; + product.cmp = Math.min(product.cmp, 99.99); + product.dmd = Math.max(product.dmd, 0.001); } } } @@ -1062,6 +1073,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { } } } + if (producableFrac <= 0) {producableFrac = 0; prod = 0;} //Make our materials if they are producable if (producableFrac > 0 && prod > 0) { @@ -1080,7 +1092,14 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials["AICores"].qty, this.aiFac) / 10e3); } + } else { + for (var reqMatName in this.reqMats) { + if (this.reqMats.hasOwnProperty(reqMatName)) { + warehouse.materials[reqMatName].prd = 0; + } + } } + //Per second var fooProd = prod * producableFrac / (SecsPerMarketCycle * marketCycles); for (var fooI = 0; fooI < this.prodMats.length; ++fooI) { @@ -1125,7 +1144,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { } var businessFactor = 1 + (office.employeeProd[EmployeePositions.Business] / office.employeeProd["total"]); var maxSell = (mat.qlt + .001) * mat.dmd * (100 - mat.cmp)/100 * markup * businessFactor * - Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) * + Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) * company.getSalesMultiplier() * (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01)); var sellAmt; @@ -1135,7 +1154,7 @@ Industry.prototype.processMaterials = function(marketCycles=1, company) { } else { sellAmt = maxSell; } - sellAmt = (sellAmt * company.getSalesMultiplier() * SecsPerMarketCycle * marketCycles); + sellAmt = (sellAmt * SecsPerMarketCycle * marketCycles); sellAmt = Math.min(mat.qty, sellAmt); if (sellAmt < 0) { console.log("ERROR: sellAmt is negative"); @@ -1254,15 +1273,21 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio switch(this.state) { case "PRODUCTION": - //Calculate the maximum production of this Product based on - //office's productivity, materials, etc. + //Calculate the maximum production of this material based + //on the office's productivity var total = office.employeeProd[EmployeePositions.Operations] + office.employeeProd[EmployeePositions.Engineer] + - office.employeeProd[EmployeePositions.Management]; - var ratio = (office.employeeProd[EmployeePositions.Operations] / total) * + office.employeeProd[EmployeePositions.Management], ratio; + if (total === 0) { + ratio = 0; + } else { + ratio = (office.employeeProd[EmployeePositions.Operations] / total) * (office.employeeProd[EmployeePositions.Engineer] / total) * (office.employeeProd[EmployeePositions.Management] / total); - var maxProd = ratio * Math.pow(total, 0.2), prod; + ratio = Math.max(0.01, ratio); //Minimum ratio value if you have employees + } + var maxProd = ratio * Math.pow(total, 0.2) * + corporation.getProductionMultiplier() * this.prodMult, prod; //Account for whether production is manually limited if (product.prdman[city][0]) { @@ -1270,7 +1295,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } else { prod = maxProd; } - prod *= (this.prodMult * corporation.getProductionMultiplier() * SecsPerMarketCycle * marketCycles); + prod *= (SecsPerMarketCycle * marketCycles); //Calculate net change in warehouse storage making the Products will cost @@ -1300,7 +1325,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } //Make our Products if they are producable - if (producableFrac > 0) { + if (producableFrac > 0 && prod > 0) { for (var reqMatName in product.reqMats) { if (product.reqMats.hasOwnProperty(reqMatName)) { var reqMatQtyNeeded = (product.reqMats[reqMatName] * prod * producableFrac); @@ -1335,9 +1360,9 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } } var businessFactor = 1 + (office.employeeProd[EmployeePositions.Business] / office.employeeProd["total"]); - var maxSell = Math.pow(product.rat, 0.95) * product.dmd * (1-(product.cmp/100)) * + var maxSell = Math.pow(product.rat, 0.95) * product.dmd * (1-(product.cmp/100)) * corporation.getSalesMultiplier() * markup * businessFactor * Math.pow(this.awareness + 1, 0.05) * Math.pow(this.popularity + 1, 0.07) * - (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01)); + (this.awareness === 0 ? 0.01 : Math.max((this.popularity + .001) / this.awareness, 0.01)) ; var sellAmt; if (product.sllman[city][0] && product.sllman[city][1] > 0) { //Sell amount is manually limited @@ -1345,7 +1370,7 @@ Industry.prototype.processProduct = function(marketCycles=1, product, corporatio } else { sellAmt = maxSell; } - sellAmt = sellAmt * corporation.getSalesMultiplier() * SecsPerMarketCycle * marketCycles; + sellAmt = sellAmt * SecsPerMarketCycle * marketCycles; sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty if (sellAmt && product.sCost) { product.data[city][0] -= sellAmt; //data[0] is qty @@ -2305,6 +2330,13 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { } //Completed products + var cmpAndDmdText = ""; + if (company.unlockUpgrades[2] === 1) { + cmpAndDmdText += "
Competition: " + formatNumber(product.cmp, 3); + } + if (company.unlockUpgrades[3] === 1) { + cmpAndDmdText += "
Demand: " + formatNumber(product.dmd, 3); + } var totalGain = product.data[city][1] - product.data[city][2]; //Production - sale div.appendChild(createElement("p", { innerHTML: "

" + product.name + ": " + formatNumber(product.data[city][0], 3) + //Quantity @@ -2317,7 +2349,8 @@ Warehouse.prototype.createProductUI = function(product, parentRefs) { "Durability: " + formatNumber(product.dur, 3) + "
" + "Reliability: " + formatNumber(product.rel, 3) + "
" + "Aesthetics: " + formatNumber(product.aes, 3) + "
" + - "Features: " + formatNumber(product.fea, 3) + "


" + + "Features: " + formatNumber(product.fea, 3) + + cmpAndDmdText + "


" + "

Est. Production Cost: " + numeral(product.pCost).format("$0.000a") + "An estimate of how much it costs to produce one unit of this product. " + "If your sell price exceeds this by too much, people won't buy your product. The better your " + @@ -2523,9 +2556,9 @@ var CorporationUnlockUpgrades = { // name, desc] var CorporationUpgrades = { //Smart factories, increases production - "0": [0, 2e9, 1.07, 0.02, + "0": [0, 2e9, 1.07, 0.03, "Smart Factories", "Advanced AI automatically optimizes the operation and productivity " + - "of factories. Each level of this upgrade increases your global production by 2% (additive)."], + "of factories. Each level of this upgrade increases your global production by 3% (additive)."], //Smart warehouses, increases storage size "1": [1, 2e9, 1.07, .1, @@ -2569,7 +2602,7 @@ var CorporationUpgrades = { "of this upgrade globally increases the efficiency of your employees by 10% (additive)."], //Improves sales of materials/products - "8": [8, 1e9, 1.09, 0.01, + "8": [8, 1e9, 1.08, 0.01, "ABC SalesBots", "Always Be Closing. Purchase these robotic salesmen to increase the amount of " + "materials and products you sell. Each level of this upgrade globally increases your sales " + "by 1% (additive)."], @@ -2624,14 +2657,20 @@ Corporation.prototype.process = function(numCycles=1) { //At the start of a new cycle, calculate profits from previous cycle if (state === "START") { - this.revenue = this.revenue.times(0); - this.expenses = this.expenses.times(0); + this.revenue = new Decimal(0); + this.expenses = new Decimal(0); this.divisions.forEach((ind)=>{ this.revenue = this.revenue.plus(ind.lastCycleRevenue); this.expenses = this.expenses.plus(ind.lastCycleExpenses); }); var profit = this.revenue.minus(this.expenses); var cycleProfit = profit.times(marketCycles * SecsPerMarketCycle); + if (this.funds.isNaN()) { + dialogBoxCreate("There was an error calculating your Corporations funds and they got reset to 0. " + + "This is a bug. Please report to game developer.

" + + "(Your funds have been set to $150b for the inconvenience)"); + this.funds = new Decimal(150e9); + } this.funds = this.funds.plus(cycleProfit); this.updateSharePrice(); } @@ -2678,7 +2717,7 @@ Corporation.prototype.getInvestment = function() { case 4: return; } - var funding = val * percShares * 2, + var funding = val * percShares * 4, investShares = Math.floor(TOTALSHARES * percShares), yesBtn = yesNoBoxGetYesButton(), noBtn = yesNoBoxGetNoButton(); diff --git a/src/Constants.js b/src/Constants.js index 63c18cd8b..d57db5e15 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -59,7 +59,7 @@ let CONSTANTS = { ScriptFileExistsRamCost: 0.1, ScriptIsRunningRamCost: 0.1, ScriptPurchaseHacknetRamCost: 1.5, - ScriptHacknetNodesRamCost: 1.0, //Base cost for accessing hacknet nodes array + ScriptHacknetNodesRamCost: 4.0, //Base cost for accessing hacknet nodes array ScriptHNUpgLevelRamCost: 0.4, ScriptHNUpgRamRamCost: 0.6, ScriptHNUpgCoreRamCost: 0.8, @@ -1121,24 +1121,24 @@ let CONSTANTS = { "---Rebalancing: Made many upgrades/purchases cheaper. Receive more money from investors in early stage. Company valuation is higher after going public
" + "---Multiple bug fixes
" + "-Added rm() Netscript function
" + - "-Updated the way script RAM usage is calculated. Now, a function only increases RAM usage the " + - "first time it is called. i.e. even if you call hack() multiple times in a script, it only counts " + - "against RAM usage once. The same change applies for while/for loops and if conditionals.
" + + "-Updated the way script RAM usage is calculated. Now, a function only increases RAM usage the first time it is called. i.e. even if you call hack() multiple times in a script, it only counts against RAM usage once. The same change applies for while/for loops and if conditionals.
" + "-The RAM cost of the following were increased:
" + "---If statements: increased by 0.05GB
" + "---run() and exec(): increased by 0.2GB
" + "---scp(): increased by 0.1GB
" + "---purchaseServer(): increased by 0.25GB
" + - "-Note: You may need to re-save all of your scripts in order to re-calculate their RAM usages. Otherwise, " + - "it should automatically be re-calculated when you reset/prestige
" + + "-Note: You may need to re-save all of your scripts in order to re-calculate their RAM usages. Otherwise, it should automatically be re-calculated when you reset/prestige
" + "-The cost to upgrade your home computer's RAM has been increased (both the base cost and the exponential upgrade multiplier)
" + "-The cost of purchasing a server was increased by 10% (it is now $55k per RAM)
" + - "-Bug fix: (Hopefully) removed an exploit where you could avoid RAM usage for Netscript function calls " + - "by assigning functions to a variable (foo = hack(); foo('helios');)
" + - "-Bug fix: (Hopefully) removed an exploit where you could run arbitrary Javascript code using the constructor() " + - "method
" + + "-Bug fix: (Hopefully) removed an exploit where you could avoid RAM usage for Netscript function calls by assigning functions to a variable (foo = hack(); foo('helios');)
" + + "-Bug fix: (Hopefully) removed an exploit where you could run arbitrary Javascript code using the constructor() method
" + "-Thanks to Github user mateon1 and Reddit users havoc_mayhem and spaceglace for notifying me of the above exploits
" + - "-The fileExists() Netscript function now works on text files (.txt). Thanks to Github user devoidfury for this
" + "-The fileExists() Netscript function now works on text files (.txt). Thanks to Github user devoidfury for this

" + + "v0.34.3
" + + "-Minor balance changes to Corporation. Upgrades are generally cheaper and/or have more powerful effects. " + + "You will receive more funding while your are a private company. " + "-Accessing the hacknetnodes array in Netscript now costs 4.0GB of RAM (only counts against RAM usage once)
" + } export {CONSTANTS}; diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index 6a4daa2d5..04da98c3c 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -1164,7 +1164,7 @@ function NetscriptFunctions(workerScript) { return CONSTANTS.ScriptPurchaseHacknetRamCost; } } - purchaseHacknet(); + return purchaseHacknet(); }, getStockPrice : function(symbol) { if (workerScript.checkingRam) { diff --git a/src/Script.js b/src/Script.js index d7a676fda..d8b42ae2c 100644 --- a/src/Script.js +++ b/src/Script.js @@ -296,7 +296,6 @@ function calculateRamUsage(codeCopy) { try { var ast = parse(codeCopy); } catch(e) { - console.log("returning -1 bc parsing error: " + e.toString()); return -1; } @@ -339,7 +338,9 @@ function calculateRamUsage(codeCopy) { if (typeof func === "function") { try { var res = func.apply(null, []); - if (!isNaN(res)) {ramUsage += res;} + if (typeof res === "number") { + ramUsage += res; + } } catch(e) { console.log("ERROR applying function: " + e); } @@ -358,6 +359,11 @@ function calculateRamUsage(codeCopy) { } } } + + //Special case: hacknetnodes array + if (codeCopy.includes("hacknetnodes")) { + ramUsage += CONSTANTS.ScriptHacknetNodesRamCost; + } return ramUsage; }