Added tooltips for companies. Rebalanced and randomized server starting money

This commit is contained in:
danielyxie 2017-07-28 09:19:28 -05:00
parent 0e64359814
commit e5322e466b
6 changed files with 698 additions and 623 deletions

@ -656,19 +656,19 @@
<p id="location-text-divider-3"> --------------- </p>
<!-- Jobs/Work at a company -->
<a id="location-software-job" class="a-link-button"> Apply for Software Job</a>
<a id="location-software-consultant-job" class="a-link-button"> Apply for Software Consultant Job</a>
<a id="location-it-job" class="a-link-button"> Apply for IT Job </a>
<a id="location-security-engineer-job" class="a-link-button"> Apply for Security Engineer Job</a>
<a id="location-network-engineer-job" class="a-link-button"> Apply for Network Engineer Job</a>
<a id="location-business-job" class="a-link-button"> Apply for Business Job</a>
<a id="location-business-consultant-job" class="a-link-button"> Apply for Business Consultant Job </a>
<a id="location-security-job" class="a-link-button"> Apply for Security Job</a>
<a id="location-agent-job" class="a-link-button"> Apply to be an Agent</a>
<a id="location-employee-job" class="a-link-button"> Apply to be an Employee </a>
<a id="location-parttime-employee-job" class="a-link-button"> Apply to be a Part-time Employee </a>
<a id="location-waiter-job" class="a-link-button"> Apply to be a Waiter</a>
<a id="location-parttime-waiter-job" class="a-link-button"> Apply to be a Part-time Waiter</a>
<a id="location-software-job" class="a-link-button tooltip"> Apply for Software Job</a>
<a id="location-software-consultant-job" class="a-link-button tooltip"> Apply for Software Consultant Job</a>
<a id="location-it-job" class="a-link-button tooltip"> Apply for IT Job </a>
<a id="location-security-engineer-job" class="a-link-button tooltip"> Apply for Security Engineer Job</a>
<a id="location-network-engineer-job" class="a-link-button tooltip"> Apply for Network Engineer Job</a>
<a id="location-business-job" class="a-link-button tooltip"> Apply for Business Job</a>
<a id="location-business-consultant-job" class="a-link-button tooltip"> Apply for Business Consultant Job </a>
<a id="location-security-job" class="a-link-button tooltip"> Apply for Security Job</a>
<a id="location-agent-job" class="a-link-button tooltip"> Apply to be an Agent</a>
<a id="location-employee-job" class="a-link-button tooltip"> Apply to be an Employee </a>
<a id="location-parttime-employee-job" class="a-link-button tooltip"> Apply to be a Part-time Employee </a>
<a id="location-waiter-job" class="a-link-button tooltip"> Apply to be a Waiter</a>
<a id="location-parttime-waiter-job" class="a-link-button tooltip"> Apply to be a Part-time Waiter</a>
<a id="location-work" class="a-link-button"> Work </a>

@ -8,12 +8,12 @@ function Company(name, salaryMult, expMult, jobStatReqOffset) {
this.perks = []; //Available Perks
this.salaryMultiplier = salaryMult; //Multiplier for base salary
this.expMultiplier = expMult; //Multiplier for base exp gain
//The additional levels you need in the relevant stat to qualify for a job.
//E.g the offset for a megacorporation will be high, let's say 200, so the
//stat level you'd need to get an intern job would be 200 instead of 1.
this.jobStatReqOffset = jobStatReqOffset;
//stat level you'd need to get an intern job would be 200 instead of 1.
this.jobStatReqOffset = jobStatReqOffset;
//Player-related properties for company
this.isPlayerEmployed = false;
this.playerPosition = ""; //Name (only name, not object) of the current position player holds
@ -69,7 +69,7 @@ function CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqCha,
this.requiredAgility = reqAgi;
this.requiredCharisma = reqCha;
this.requiredReputation = reqRep;
//Base salary for a position. This will be multiplied by a company-specific multiplier. Better companies will have
//higher multipliers.
//
@ -77,7 +77,7 @@ function CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqCha,
this.baseSalary = salary;
};
//Set the parameters that are used to determine how good/effective the Player is at a job.
//Set the parameters that are used to determine how good/effective the Player is at a job.
//The Player's "effectiveness" at a job determines how much reputation he gains when he works
//
//NOTE: These parameters should total to 100, such that each parameter represents a "weighting" of how
@ -116,7 +116,7 @@ CompanyPosition.prototype.calculateJobPerformance = function(hacking, str, def,
var dexRatio = this.dexterityEffectiveness * dex / CONSTANTS.MaxSkillLevel;
var agiRatio = this.agilityEffectiveness * agi / CONSTANTS.MaxSkillLevel;
var chaRatio = this.charismaEffectiveness * cha / CONSTANTS.MaxSkillLevel;
var reputationGain = this.positionMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;
if (isNaN(reputationGain)) {
console.log("ERROR: Code should not reach here");
@ -126,13 +126,13 @@ CompanyPosition.prototype.calculateJobPerformance = function(hacking, str, def,
}
CompanyPosition.prototype.isSoftwareJob = function() {
if (this.positionName == "Software Engineering Intern" ||
this.positionName == "Junior Software Engineer" ||
this.positionName == "Senior Software Engineer" ||
this.positionName == "Lead Software Developer" ||
if (this.positionName == "Software Engineering Intern" ||
this.positionName == "Junior Software Engineer" ||
this.positionName == "Senior Software Engineer" ||
this.positionName == "Lead Software Developer" ||
this.positionName == "Head of Software" ||
this.positionName == "Head of Engineering" ||
this.positionName == "Vice President of Technology" ||
this.positionName == "Head of Engineering" ||
this.positionName == "Vice President of Technology" ||
this.positionName == "Chief Technology Officer") {
return true;
}
@ -140,9 +140,9 @@ CompanyPosition.prototype.isSoftwareJob = function() {
}
CompanyPosition.prototype.isITJob = function() {
if (this.positionName == "IT Intern" ||
this.positionName == "IT Analyst" ||
this.positionName == "IT Manager" ||
if (this.positionName == "IT Intern" ||
this.positionName == "IT Analyst" ||
this.positionName == "IT Manager" ||
this.positionName == "Systems Administrator") {
return true;
}
@ -187,8 +187,8 @@ CompanyPosition.prototype.isSecurityJob = function() {
}
CompanyPosition.prototype.isAgentJob = function() {
if (this.positionName == "Field Agent" ||
this.positionName == "Secret Agent" ||
if (this.positionName == "Field Agent" ||
this.positionName == "Secret Agent" ||
this.positionName == "Special Operative") {
return true;
}
@ -196,7 +196,7 @@ CompanyPosition.prototype.isAgentJob = function() {
}
CompanyPosition.prototype.isSoftwareConsultantJob = function() {
if (this.positionName == "Software Consultant" ||
if (this.positionName == "Software Consultant" ||
this.positionName == "Senior Software Consultant") {return true;}
return false;
}
@ -209,7 +209,7 @@ CompanyPosition.prototype.isBusinessConsultantJob = function() {
CompanyPosition.prototype.isPartTimeJob = function() {
if (this.isSoftwareConsultantJob() ||
this.isBusinessConsultantJob() ||
this.isBusinessConsultantJob() ||
this.positionName == "Part-time Waiter" ||
this.positionName == "Part-time Employee") {return true;}
return false;
@ -233,13 +233,13 @@ CompanyPositions = {
JuniorDev: new CompanyPosition("Junior Software Engineer", 51, 0, 0, 0, 0, 0, 8000, 32),
SeniorDev: new CompanyPosition("Senior Software Engineer", 251, 0, 0, 0, 0, 51, 40000, 63),
LeadDev: new CompanyPosition("Lead Software Developer", 401, 0, 0, 0, 0, 151, 200000, 210),
//TODO Through darkweb, maybe?
FreelanceDeveloper: new CompanyPosition("Freelance Developer", 0, 0, 0, 0, 0, 0, 0, 0),
SoftwareConsultant: new CompanyPosition("Software Consultant", 51, 0, 0, 0, 0, 0, 0, 22),
SeniorSoftwareConsultant: new CompanyPosition("Senior Software Consultant", 251, 0, 0, 0, 0, 51, 0, 45),
//IT
ITIntern: new CompanyPosition("IT Intern", 1, 0, 0, 0, 0, 0, 0, 11),
ITAnalyst: new CompanyPosition("IT Analyst", 26, 0, 0, 0, 0, 0, 7000, 25),
@ -248,13 +248,13 @@ CompanyPositions = {
SecurityEngineer: new CompanyPosition("Security Engineer", 151, 0, 0, 0, 0, 26, 35000, 55),
NetworkEngineer: new CompanyPosition("Network Engineer", 151, 0, 0, 0, 0, 26, 35000, 55),
NetworkAdministrator: new CompanyPosition("Network Administrator", 251, 0, 0, 0, 0, 76, 175000, 165),
//Technology management
HeadOfSoftware: new CompanyPosition("Head of Software", 501, 0, 0, 0, 0, 251, 400000, 330),
HeadOfEngineering: new CompanyPosition("Head of Engineering", 501, 0, 0, 0, 0, 251, 800000, 660),
VicePresident: new CompanyPosition("Vice President of Technology", 601, 0, 0, 0, 0, 401, 1600000, 990),
CTO: new CompanyPosition("Chief Technology Officer", 751, 0, 0, 0, 0, 501, 3200000, 1100),
//Business
BusinessIntern: new CompanyPosition("Business Intern", 1, 0, 0, 0, 0, 1, 0, 18),
BusinessAnalyst: new CompanyPosition("Business Analyst", 6, 0, 0, 0, 0, 51, 8000, 42),
@ -262,14 +262,14 @@ CompanyPositions = {
OperationsManager: new CompanyPosition("Operations Manager", 51, 0, 0, 0, 0, 226, 200000, 275),
CFO: new CompanyPosition("Chief Financial Officer", 76, 0, 0, 0, 0, 501, 800000, 800),
CEO: new CompanyPosition("Chief Executive Officer", 101, 0, 0, 0, 0, 751, 3200000, 1500),
BusinessConsultant: new CompanyPosition("Business Consultant", 6, 0, 0, 0, 0, 51, 0, 28),
SeniorBusinessConsultant: new CompanyPosition("Senior Business Consultant", 51, 0, 0, 0, 0, 226, 0, 175),
//Non-tech/management jobs
PartTimeWaiter: new CompanyPosition("Part-time Waiter", 0, 0, 0, 0, 0, 0, 0, 9),
PartTimeEmployee: new CompanyPosition("Part-time Employee", 0, 0, 0, 0, 0, 0, 0, 9),
Waiter: new CompanyPosition("Waiter", 0, 0, 0, 0, 0, 0, 0, 11),
Employee: new CompanyPosition("Employee", 0, 0, 0, 0, 0, 0, 0, 11),
PoliceOfficer: new CompanyPosition("Police Officer", 11, 101, 101, 101, 101, 51, 8000, 36),
@ -281,7 +281,7 @@ CompanyPositions = {
FieldAgent: new CompanyPosition("Field Agent", 101, 101, 101, 101, 101, 101, 8000, 55),
SecretAgent: new CompanyPosition("Secret Agent", 201, 251, 251, 251, 251, 201, 32000, 190),
SpecialOperative: new CompanyPosition("Special Operative", 251, 501, 501, 501, 501, 251, 162000, 425),
init: function() {
//Argument order: hack, str, def, dex, agi, cha
//Software
@ -293,12 +293,12 @@ CompanyPositions = {
CompanyPositions.SeniorDev.setExperienceGains(.3, 0, 0, 0, 0, .08);
CompanyPositions.LeadDev.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.5);
CompanyPositions.LeadDev.setExperienceGains(.5, 0, 0, 0, 0, .1);
CompanyPositions.SoftwareConsultant.setPerformanceParameters(80, 0, 0, 0, 0, 20, 1);
CompanyPositions.SoftwareConsultant.setExperienceGains(.08, 0, 0, 0, 0, .03);
CompanyPositions.SeniorSoftwareConsultant.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.2);
CompanyPositions.SeniorSoftwareConsultant.setExperienceGains(.25, 0, 0, 0, 0, .06);
//Security
CompanyPositions.ITIntern.setPerformanceParameters(90, 0, 0, 0, 0, 10, 0.9);
CompanyPositions.ITIntern.setExperienceGains(.04, 0, 0, 0, 0, .01);
@ -314,7 +314,7 @@ CompanyPositions = {
CompanyPositions.NetworkEngineer.setExperienceGains(0.4, 0, 0, 0, 0, .05);
CompanyPositions.NetworkAdministrator.setPerformanceParameters(80, 0, 0, 0, 0, 20, 1.3);
CompanyPositions.NetworkAdministrator.setExperienceGains(0.5, 0, 0, 0, 0, .1);
//Technology management
CompanyPositions.HeadOfSoftware.setPerformanceParameters(75, 0, 0, 0, 0, 25, 1.6);
CompanyPositions.HeadOfSoftware.setExperienceGains(1, 0, 0, 0, 0, .5);
@ -324,7 +324,7 @@ CompanyPositions = {
CompanyPositions.VicePresident.setExperienceGains(1.2, 0, 0, 0, 0, .6);
CompanyPositions.CTO.setPerformanceParameters(65, 0, 0, 0, 0, 35, 2);
CompanyPositions.CTO.setExperienceGains(1.5, 0, 0, 0, 1);
//Business
CompanyPositions.BusinessIntern.setPerformanceParameters(10, 0, 0, 0, 0, 90, 0.9);
CompanyPositions.BusinessIntern.setExperienceGains(.01, 0, 0, 0, 0, .08);
@ -338,18 +338,18 @@ CompanyPositions = {
CompanyPositions.CFO.setExperienceGains(.05, 0, 0, 0, 0, 1);
CompanyPositions.CEO.setPerformanceParameters(10, 0, 0, 0, 0, 90, 1.75);
CompanyPositions.CEO.setExperienceGains(.1, 0, 0, 0, 0, 1.5);
CompanyPositions.BusinessConsultant.setPerformanceParameters(20, 0, 0, 0, 0, 80, 1);
CompanyPositions.BusinessConsultant.setExperienceGains(.015, 0, 0, 0, 0, .15);
CompanyPositions.SeniorBusinessConsultant.setPerformanceParameters(15, 0, 0, 0, 0, 85, 1.2);
CompanyPositions.SeniorBusinessConsultant.setExperienceGains(.015, 0, 0, 0, 0, .3);
//Non-tech/management jobs
CompanyPositions.PartTimeWaiter.setPerformanceParameters(0, 10, 0, 10, 10, 70);
CompanyPositions.PartTimeWaiter.setExperienceGains(0, .0075, .0075, .0075, .0075, .04);
CompanyPositions.PartTimeEmployee.setPerformanceParameters(0, 10, 0, 10, 10, 70);
CompanyPositions.PartTimeEmployee.setExperienceGains(0, .0075, .0075, .0075, .0075, .03);
CompanyPositions.Waiter.setPerformanceParameters(0, 10, 0, 10, 10, 70);
CompanyPositions.Waiter.setExperienceGains(0, .01, .01, .01, .01, .05);
CompanyPositions.Employee.setPerformanceParameters(0, 10, 0, 10, 10, 70);
@ -378,12 +378,13 @@ CompanyPositions = {
//Returns the next highest position in the company for the relevant career/field
//I.E returns what your next job would be if you qualify for a promotion
getNextCompanyPosition = function(currPos) {
if (currPos == null) {return null;}
//Software
if (currPos.positionName == CompanyPositions.SoftwareIntern.positionName) {
return CompanyPositions.JuniorDev;
}
if (currPos.positionName == CompanyPositions.JuniorDev.positionName) {
return CompanyPositions.SeniorDev;
return CompanyPositions.SeniorDev;
}
if (currPos.positionName == CompanyPositions.SeniorDev.positionName) {
return CompanyPositions.LeadDev;
@ -391,12 +392,12 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.LeadDev.positionName) {
return CompanyPositions.HeadOfSoftware;
}
//Software Consultant
if (currPos.positionName == CompanyPositions.SoftwareConsultant.positionName) {
return CompanyPositions.SeniorSoftwareConsultant;
}
//IT
if (currPos.positionName == CompanyPositions.ITIntern.positionName) {
return CompanyPositions.ITAnalyst;
@ -410,7 +411,7 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.SysAdmin.positionName) {
return CompanyPositions.HeadOfEngineering;
}
//Security/Network Engineer
if (currPos.positionName == CompanyPositions.SecurityEngineer.positionName) {
return CompanyPositions.HeadOfEngineering;
@ -421,7 +422,7 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.NetworkAdministrator.positionName) {
return CompanyPositions.HeadOfEngineering;
}
//Technology management
if (currPos.positionName == CompanyPositions.HeadOfSoftware.positionName) {
return CompanyPositions.HeadOfEngineering;
@ -432,7 +433,7 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.VicePresident.positionName) {
return CompanyPositions.CTO;
}
//Business
if (currPos.positionName == CompanyPositions.BusinessIntern.positionName) {
return CompanyPositions.BusinessAnalyst;
@ -449,17 +450,17 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.CFO.positionName) {
return CompanyPositions.CEO;
}
//Business consultant
if (currPos.positionName == CompanyPositions.BusinessConsultant.positionName) {
return CompanyPositions.SeniorBusinessConsultant;
}
//Police
if (currPos.positionName == CompanyPositions.PoliceOfficer.positionName) {
return CompanyPositions.PoliceChief;
}
//Security
if (currPos.positionName == CompanyPositions.SecurityGuard.positionName) {
return CompanyPositions.SecurityOfficer;
@ -478,7 +479,7 @@ getNextCompanyPosition = function(currPos) {
if (currPos.positionName == CompanyPositions.SecretAgent.positionName) {
return CompanyPositions.SpecialOperative;
}
return null;
}
@ -503,7 +504,7 @@ initCompanies = function() {
delete Companies[Locations.AevumECorp];
}
AddToCompanies(ECorp);
var MegaCorp = new Company(Locations.Sector12MegaCorp, 3.0, 3.0, 249);
MegaCorp.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -520,7 +521,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12MegaCorp];
}
AddToCompanies(MegaCorp);
var BachmanAndAssociates = new Company(Locations.AevumBachmanAndAssociates, 2.6, 2.6, 224);
BachmanAndAssociates.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -537,7 +538,7 @@ initCompanies = function() {
delete Companies[Locations.AevumBachmanAndAssociates];
}
AddToCompanies(BachmanAndAssociates);
var BladeIndustries = new Company(Locations.Sector12BladeIndustries, 2.75, 2.75, 224);
BladeIndustries.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -554,7 +555,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12BladeIndustries];
}
AddToCompanies(BladeIndustries);
var NWO = new Company(Locations.VolhavenNWO, 2.75, 2.75, 249);
NWO.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -571,7 +572,7 @@ initCompanies = function() {
delete Companies[Locations.VolhavenNWO];
}
AddToCompanies(NWO);
var ClarkeIncorporated = new Company(Locations.AevumClarkeIncorporated, 2.25, 2.25, 224);
ClarkeIncorporated.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -588,7 +589,7 @@ initCompanies = function() {
delete Companies[Locations.AevumClarkeIncorporated];
}
AddToCompanies(ClarkeIncorporated);
var OmniTekIncorporated = new Company(Locations.VolhavenOmniTekIncorporated, 2.25, 2.25, 224);
OmniTekIncorporated.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -605,7 +606,7 @@ initCompanies = function() {
delete Companies[Locations.VolhavenOmniTekIncorporated];
}
AddToCompanies(OmniTekIncorporated);
var FourSigma = new Company(Locations.Sector12FourSigma, 2.5, 2.5, 224);
FourSigma.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -622,7 +623,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12FourSigma];
}
AddToCompanies(FourSigma);
var KuaiGongInternational = new Company(Locations.ChongqingKuaiGongInternational, 2.2, 2.2, 224);
KuaiGongInternational.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -639,7 +640,7 @@ initCompanies = function() {
delete Companies[Locations.ChongqingKuaiGongInternational];
}
AddToCompanies(KuaiGongInternational);
//Technology and communication companies ("Large" servers)
var FulcrumTechnologies = new Company(Locations.AevumFulcrumTechnologies, 2.0, 2.0, 224);
FulcrumTechnologies.addPositions([
@ -656,7 +657,7 @@ initCompanies = function() {
delete Companies[Locations.AevumFulcrumTechnologies];
}
AddToCompanies(FulcrumTechnologies);
var StormTechnologies = new Company(Locations.IshimaStormTechnologies, 1.8, 1.8, 199);
StormTechnologies.addPositions([
CompanyPositions.SoftwareIntern,
@ -665,7 +666,7 @@ initCompanies = function() {
CompanyPositions.ITAnalyst, CompanyPositions.ITManager, CompanyPositions.SysAdmin,
CompanyPositions.SecurityEngineer, CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator,
CompanyPositions.HeadOfSoftware, CompanyPositions.HeadOfEngineering,
CompanyPositions.VicePresident, CompanyPositions.CTO,
CompanyPositions.VicePresident, CompanyPositions.CTO,
CompanyPositions.BusinessIntern, CompanyPositions.BusinessAnalyst,
CompanyPositions.BusinessManager, CompanyPositions.OperationsManager, CompanyPositions.CFO,
CompanyPositions.CEO]);
@ -674,12 +675,12 @@ initCompanies = function() {
delete Companies[Locations.IshimaStormTechnologies];
}
AddToCompanies(StormTechnologies);
var DefComm = new Company(Locations.NewTokyoDefComm, 1.75, 1.75, 199);
DefComm.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO, CompanyPositions.CEO]);
@ -688,12 +689,12 @@ initCompanies = function() {
delete Companies[Locations.NewTokyoDefComm];
}
AddToCompanies(DefComm);
var HeliosLabs = new Company(Locations.VolhavenHeliosLabs, 1.8, 1.8, 199);
HeliosLabs.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO, CompanyPositions.CEO]);
@ -701,16 +702,16 @@ initCompanies = function() {
HeliosLabs.favor = Companies[Locations.VolhavenHeliosLabs].favor;
delete Companies[Locations.VolhavenHeliosLabs];
}
AddToCompanies(HeliosLabs);
AddToCompanies(HeliosLabs);
var VitaLife = new Company(Locations.NewTokyoVitaLife, 1.8, 1.8, 199);
VitaLife.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.BusinessIntern, CompanyPositions.BusinessAnalyst, CompanyPositions.BusinessManager,
CompanyPositions.OperationsManager, CompanyPositions.CFO, CompanyPositions.CEO]);
if (companyExists(Locations.NewTokyoVitaLife)) {
@ -718,15 +719,15 @@ initCompanies = function() {
delete Companies[Locations.NewTokyoVitaLife];
}
AddToCompanies(VitaLife);
var IcarusMicrosystems = new Company(Locations.Sector12IcarusMicrosystems, 1.9, 1.9, 199);
IcarusMicrosystems.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.BusinessIntern, CompanyPositions.BusinessAnalyst, CompanyPositions.BusinessManager,
CompanyPositions.OperationsManager, CompanyPositions.CFO, CompanyPositions.CEO]);
if (companyExists(Locations.Sector12IcarusMicrosystems)) {
@ -734,31 +735,31 @@ initCompanies = function() {
delete Companies[Locations.Sector12IcarusMicrosystems];
}
AddToCompanies(IcarusMicrosystems);
var UniversalEnergy = new Company(Locations.Sector12UniversalEnergy, 2.0, 2.0, 199);
UniversalEnergy.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.BusinessIntern, CompanyPositions.BusinessAnalyst, CompanyPositions.BusinessManager,
CompanyPositions.OperationsManager, CompanyPositions.CFO, CompanyPositions.CEO]);
if (companyExists(Locations.Sector12UniversalEnergy)) {
UniversalEnergy.favor = Companies[Locations.Sector12UniversalEnergy].favor;
delete Companies[Locations.Sector12UniversalEnergy];
}
AddToCompanies(UniversalEnergy);
AddToCompanies(UniversalEnergy);
var GalacticCybersystems = new Company(Locations.AevumGalacticCybersystems, 1.9, 1.9, 199);
GalacticCybersystems.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
CompanyPositions.BusinessIntern, CompanyPositions.BusinessAnalyst, CompanyPositions.BusinessManager,
CompanyPositions.OperationsManager, CompanyPositions.CFO, CompanyPositions.CEO]);
if (companyExists(Locations.AevumGalacticCybersystems)) {
@ -766,12 +767,12 @@ initCompanies = function() {
delete Companies[Locations.AevumGalacticCybersystems];
}
AddToCompanies(GalacticCybersystems);
//Defense Companies ("Large" Companies)
var AeroCorp = new Company(Locations.AevumAeroCorp, 1.7, 1.7, 199);
AeroCorp.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
@ -783,11 +784,11 @@ initCompanies = function() {
delete Companies[Locations.AevumAeroCorp];
}
AddToCompanies(AeroCorp);
var OmniaCybersystems = new Company(Locations.VolhavenOmniaCybersystems, 1.7, 1.7, 199);
OmniaCybersystems.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
@ -799,11 +800,11 @@ initCompanies = function() {
delete Companies[Locations.VolhavenOmniaCybersystems];
}
AddToCompanies(OmniaCybersystems);
var SolarisSpaceSystems = new Company(Locations.ChongqingSolarisSpaceSystems, 1.7, 1.7, 199);
SolarisSpaceSystems.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
@ -815,11 +816,11 @@ initCompanies = function() {
delete Companies[Locations.ChongqingSolarisSpaceSystems];
}
AddToCompanies(SolarisSpaceSystems);
var DeltaOne = new Company(Locations.Sector12DeltaOne, 1.6, 1.6, 199);
DeltaOne.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.HeadOfEngineering, CompanyPositions.CTO,
@ -831,7 +832,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12DeltaOne];
}
AddToCompanies(DeltaOne);
//Health, medicine, pharmaceutical companies ("Large" servers)
var GlobalPharmaceuticals = new Company(Locations.NewTokyoGlobalPharmaceuticals, 1.8, 1.8, 224);
GlobalPharmaceuticals.addPositions([
@ -849,7 +850,7 @@ initCompanies = function() {
delete Companies[Locations.NewTokyoGlobalPharmaceuticals];
}
AddToCompanies(GlobalPharmaceuticals);
var NovaMedical = new Company(Locations.IshimaNovaMedical, 1.75, 1.75, 199);
NovaMedical.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.ITIntern, CompanyPositions.BusinessIntern,
@ -868,7 +869,7 @@ initCompanies = function() {
AddToCompanies(NovaMedical);
//Other large companies
var CIA = new Company(Locations.Sector12CIA, 2.0, 2.0, 149);
var CIA = new Company(Locations.Sector12CIA, 2.0, 2.0, 149);
CIA.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
@ -882,7 +883,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12CIA];
}
AddToCompanies(CIA);
var NSA = new Company(Locations.Sector12NSA, 2.0, 2.0, 149);
NSA.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
@ -897,7 +898,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12NSA];
}
AddToCompanies(NSA);
var WatchdogSecurity = new Company(Locations.AevumWatchdogSecurity, 1.5, 1.5, 124);
WatchdogSecurity.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
@ -913,7 +914,7 @@ initCompanies = function() {
delete Companies[Locations.AevumWatchdogSecurity];
}
AddToCompanies(WatchdogSecurity);
//"Medium level" companies
var LexoCorp = new Company(Locations.VolhavenLexoCorp, 1.4, 1.4, 99);
LexoCorp.addPositions([
@ -923,14 +924,14 @@ initCompanies = function() {
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.HeadOfSoftware, CompanyPositions.CTO,
CompanyPositions.BusinessIntern, CompanyPositions.BusinessAnalyst,
CompanyPositions.OperationsManager, CompanyPositions.CFO, CompanyPositions.CEO,
CompanyPositions.OperationsManager, CompanyPositions.CFO, CompanyPositions.CEO,
CompanyPositions.SecurityGuard, CompanyPositions.SecurityOfficer, CompanyPositions.HeadOfSecurity]);
if (companyExists(Locations.VolhavenLexoCorp)) {
LexoCorp.favor = Companies[Locations.VolhavenLexoCorp].favor;
delete Companies[Locations.VolhavenLexoCorp];
}
AddToCompanies(LexoCorp);
var RhoConstruction = new Company(Locations.AevumRhoConstruction, 1.3, 1.3, 49);
RhoConstruction.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
@ -941,7 +942,7 @@ initCompanies = function() {
delete Companies[Locations.AevumRhoConstruction];
}
AddToCompanies(RhoConstruction);
var AlphaEnterprises = new Company(Locations.Sector12AlphaEnterprises, 1.5, 1.5, 99);
AlphaEnterprises.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
@ -953,7 +954,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12AlphaEnterprises];
}
AddToCompanies(AlphaEnterprises);
var AevumPolice = new Company(Locations.AevumPolice, 1.3, 1.3, 99);
AevumPolice.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
@ -963,11 +964,11 @@ initCompanies = function() {
delete Companies[Locations.AevumPolice];
}
AddToCompanies(AevumPolice);
var SysCoreSecurities = new Company(Locations.VolhavenSysCoreSecurities, 1.3, 1.3, 124);
SysCoreSecurities.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.LeadDev, CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.CTO]);
@ -976,12 +977,12 @@ initCompanies = function() {
delete Companies[Locations.VolhavenSysCoreSecurities];
}
AddToCompanies(SysCoreSecurities);
var CompuTek = new Company(Locations.VolhavenCompuTek, 1.2, 1.2, 74);
CompuTek.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.CTO]);
@ -990,12 +991,12 @@ initCompanies = function() {
delete Companies[Locations.VolhavenCompuTek];
}
AddToCompanies(CompuTek);
var NetLinkTechnologies = new Company(Locations.AevumNetLinkTechnologies, 1.2, 1.2, 99);
NetLinkTechnologies.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
CompanyPositions.CTO]);
@ -1004,11 +1005,11 @@ initCompanies = function() {
delete Companies[Locations.AevumNetLinkTechnologies];
}
AddToCompanies(NetLinkTechnologies);
var CarmichaelSecurity = new Company(Locations.Sector12CarmichaelSecurity, 1.2, 1.2, 74);
CarmichaelSecurity.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.LeadDev, CompanyPositions.SoftwareConsultant, CompanyPositions.SeniorSoftwareConsultant,
CompanyPositions.ITIntern, CompanyPositions.ITAnalyst,
CompanyPositions.ITManager, CompanyPositions.SysAdmin, CompanyPositions.SecurityEngineer,
CompanyPositions.NetworkEngineer, CompanyPositions.NetworkAdministrator, CompanyPositions.HeadOfSoftware,
@ -1020,7 +1021,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12CarmichaelSecurity];
}
AddToCompanies(CarmichaelSecurity);
//"Low level" companies
var FoodNStuff = new Company(Locations.Sector12FoodNStuff, 1, 1, 0);
FoodNStuff.addPositions([CompanyPositions.Employee, CompanyPositions.PartTimeEmployee]);
@ -1029,7 +1030,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12FoodNStuff];
}
AddToCompanies(FoodNStuff);
var JoesGuns = new Company(Locations.Sector12JoesGuns, 1, 1, 0);
JoesGuns.addPositions([CompanyPositions.Employee, CompanyPositions.PartTimeEmployee]);
if (companyExists(Locations.Sector12JoesGuns)) {
@ -1037,7 +1038,7 @@ initCompanies = function() {
delete Companies[Locations.Sector12JoesGuns];
}
AddToCompanies(JoesGuns);
var OmegaSoftware = new Company(Locations.IshimaOmegaSoftware, 1.1, 1.1, 49);
OmegaSoftware.addPositions([
CompanyPositions.SoftwareIntern, CompanyPositions.JuniorDev, CompanyPositions.SeniorDev,
@ -1049,7 +1050,7 @@ initCompanies = function() {
delete Companies[Locations.IshimaOmegaSoftware];
}
AddToCompanies(OmegaSoftware);
/* Companies that do not have servers */
var NoodleBar = new Company(Locations.NewTokyoNoodleBar, 1, 1, 0);
NoodleBar.addPositions([CompanyPositions.Waiter, CompanyPositions.PartTimeWaiter]);
@ -1071,4 +1072,4 @@ AddToCompanies = function (company) {
function companyExists(name) {
return Companies.hasOwnProperty(name);
}
}

@ -2,7 +2,7 @@
//Determines the job that the Player should get (if any) at the current
//company
PlayerObject.prototype.applyForJob = function(entryPosType) {
PlayerObject.prototype.applyForJob = function(entryPosType) {
var currCompany = "";
if (this.companyName != "") {
currCompany = Companies[this.companyName];
@ -12,26 +12,26 @@ PlayerObject.prototype.applyForJob = function(entryPosType) {
currPositionName = this.companyPosition.positionName;
}
var company = Companies[this.location]; //Company being applied to
var pos = entryPosType;
if (!this.isQualified(company, pos)) {
var reqText = getJobRequirementText(company, pos);
dialogBoxCreate("Unforunately, you do not qualify for this position<br>" + reqText);
return;
}
while (true) {
if (Engine.Debug) {console.log("Determining qualification for next Company Position");}
var newPos = getNextCompanyPosition(pos);
if (newPos == null) {
if (Engine.Debug) {
console.log("Player already at highest position, cannot go any higher");
}
break;
}
//Check if this company has this position
if (company.hasPosition(newPos)) {
if (!this.isQualified(company, newPos)) {
@ -42,9 +42,9 @@ PlayerObject.prototype.applyForJob = function(entryPosType) {
} else {
break;
}
}
//Check if the determined job is the same as the player's current job
if (currCompany != "") {
if (currCompany.companyName == company.companyName &&
@ -52,12 +52,12 @@ PlayerObject.prototype.applyForJob = function(entryPosType) {
var nextPos = getNextCompanyPosition(pos);
var reqText = getJobRequirementText(company, nextPos);
dialogBoxCreate("Unfortunately, you do not qualify for a promotion<br>" + reqText);
return; //Same job, do nothing
}
}
//Lose reputation from a Company if you are leaving it for another job
var leaveCompany = false;
var oldCompanyName = "";
@ -72,22 +72,22 @@ PlayerObject.prototype.applyForJob = function(entryPosType) {
}
}
}
this.companyName = company.companyName;
this.companyPosition = pos;
if (leaveCompany) {
dialogBoxCreate("Congratulations! You were offered a new job at " + this.companyName + " as a " +
pos.positionName + "!<br>" +
"You lost 1000 reputation at your old company " + oldCompanyName + " because you left.");
dialogBoxCreate("Congratulations! You were offered a new job at " + this.companyName + " as a " +
pos.positionName + "!<br>" +
"You lost 1000 reputation at your old company " + oldCompanyName + " because you left.");
} else {
dialogBoxCreate("Congratulations! You were offered a new job at " + this.companyName + " as a " + pos.positionName + "!");
}
Engine.loadLocationContent();
}
function getJobRequirementText(company, pos) {
function getJobRequirementText(company, pos, tooltiptext=false) {
var reqText = "";
var offset = company.jobStatReqOffset;
var reqHacking = pos.requiredHacking > 0 ? pos.requiredHacking+offset : 0;
@ -97,19 +97,61 @@ function getJobRequirementText(company, pos) {
var reqAgility = pos.requiredDexterity > 0 ? pos.requiredDexterity+offset : 0;
var reqCharisma = pos.requiredCharisma > 0 ? pos.requiredCharisma+offset : 0;
var reqRep = pos.requiredReputation;
var reqText = "(Requires ";
if (reqHacking > 0) {reqText += (reqHacking + " hacking, ");}
if (reqStrength > 0) {reqText += (reqStrength + " strength, ");}
if (reqDefense > 0) {reqText += (reqDefense + " defense, ");}
if (reqDexterity > 0) {reqText += (reqDexterity + " dexterity, ");}
if (reqAgility > 0) {reqText += (reqAgility + " agility, ");}
if (reqCharisma > 0) {reqText += (reqCharisma + " charisma, ");}
if (reqRep > 1) {reqText += (reqRep + " reputation, ");}
reqText = reqText.substring(0, reqText.length - 2);
reqText += ")";
if (tooltiptext) {
reqText = "Requires:<br>";
reqText += (reqHacking.toString() + " hacking<br>");
reqText += (reqStrength.toString() + " strength<br>");
reqText += (reqDefense.toString() + " defense<br>");
reqText += (reqDexterity.toString() + " dexterity<br>");
reqText += (reqAgility.toString() + " agility<br>");
reqText += (reqCharisma.toString() + " charisma<br>");
reqText += (reqRep.toString() + " and reputation");
} else {
reqText = "(Requires ";
if (reqHacking > 0) {reqText += (reqHacking + " hacking, ");}
if (reqStrength > 0) {reqText += (reqStrength + " strength, ");}
if (reqDefense > 0) {reqText += (reqDefense + " defense, ");}
if (reqDexterity > 0) {reqText += (reqDexterity + " dexterity, ");}
if (reqAgility > 0) {reqText += (reqAgility + " agility, ");}
if (reqCharisma > 0) {reqText += (reqCharisma + " charisma, ");}
if (reqRep > 1) {reqText += (reqRep + " reputation, ");}
reqText = reqText.substring(0, reqText.length - 2);
reqText += ")";
}
return reqText;
}
//Returns your next position at a company given the field (software, business, etc.)
PlayerObject.prototype.getNextCompanyPosition = function(company, entryPosType) {
var currCompany = null;
if (this.companyName != "") {
currCompany = Companies[this.companyName];
}
//Not employed at this company, so return the entry position
if (currCompany == null || (currCompany.companyName != company.companyName)) {
return entryPosType;
}
//If the entry pos type and the player's current position have the same type,
//return the player's "nextCompanyPosition". Otherwise return the entryposType
//Employed at this company, so just return the next position if it exists.
if ((this.companyPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||
(this.companyPosition.isITJob() && entryPosType.isITJob()) ||
(this.companyPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob()) ||
(this.companyPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob()) ||
(this.companyPosition.isSecurityJob() && entryPosType.isSecurityJob()) ||
(this.companyPosition.isAgentJob() && entryPosTypeisAgentJob()) ||
(this.companyPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||
(this.companyPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||
(this.companyPosition.isPartTimeJob() && entryPosType.isPartTimeJob())) {
return getNextCompanyPosition(this.companyPosition);
}
return entryPosType;
}
PlayerObject.prototype.applyForSoftwareJob = function() {
this.applyForJob(CompanyPositions.SoftwareIntern);
}
@ -222,10 +264,10 @@ PlayerObject.prototype.isQualified = function(company, position) {
var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity+offset : 0;
var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity+offset : 0;
var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma+offset : 0;
if (this.hacking_skill >= reqHacking &&
this.strength >= reqStrength &&
this.defense >= reqDefense &&
this.defense >= reqDefense &&
this.dexterity >= reqDexterity &&
this.agility >= reqAgility &&
this.charisma >= reqCharisma &&
@ -233,4 +275,4 @@ PlayerObject.prototype.isQualified = function(company, position) {
return true;
}
return false;
}
}

@ -1,5 +1,5 @@
CONSTANTS = {
Version: "0.26.1",
Version: "0.26.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
@ -679,6 +679,7 @@ CONSTANTS = {
LatestUpdate:
"v0.26.2<br>" +
"-Major rebalancing and randomization of the amount of money that servers start with<br>" +
"-Significantly lowered hacking exp gain from hacking servers. The exp gain for higher-level servers was lowered more than " +
"that of low level servers. (~16% for lower level servers, up to ~25% for higher-level servers)<br>" +
"-Added deleteServer() Netscript function<br>" +
@ -689,6 +690,7 @@ CONSTANTS = {
"-Rejected faction invitations will now show up as 'Outstanding Faction Invites' in the Factions page. These " +
"can be accepted at any point in the future<br>" +
"-Added a few more configurable game settings for suppressing messages and faction invitations<br>" +
"-Added tooltips for company job requirements<br><br>" +
"v0.26.1<br>" +
"-Added autocompletion for aliases<br>" +
"-Added getServerRam() Netscript function()<br>" +

File diff suppressed because it is too large Load Diff

@ -7,45 +7,45 @@ function Server() {
this.ip = "0.0.0.0";
this.hostname = "";
this.organizationName = "";
this.isOnline = true;
this.isOnline = true;
this.isConnectedTo = false; //Whether the player is connected to this server
//Access information
this.hasAdminRights = false; //Whether player has admin rights
this.purchasedByPlayer = false;
this.manuallyHacked = false; //Flag that tracks whether or not the server has been hacked at least once
//RAM, CPU speed and Scripts
this.maxRam = 1; //GB
this.maxRam = 1; //GB
this.ramUsed = 0;
this.cpuSpeed = 1; //MHz
this.scripts = [];
this.runningScripts = []; //Stores RunningScript objects
this.programs = [];
this.messages = [];
/* Hacking information (only valid for "foreign" aka non-purchased servers) */
//Skill required to attempt a hack. Whether a hack is successful will be determined
//by a separate formula
this.requiredHackingSkill = 1;
//by a separate formula
this.requiredHackingSkill = 1;
//Total money available on this server
this.moneyAvailable = 0;
this.moneyMax = 0;
//Parameters used in formulas that dictate how moneyAvailable and requiredHackingSkill change.
//Parameters used in formulas that dictate how moneyAvailable and requiredHackingSkill change.
this.hackDifficulty = 1; //Affects hack success rate and how the requiredHackingSkill increases over time (1-100)
this.baseDifficulty = 1; //Starting difficulty
this.minDifficulty = 1;
this.serverGrowth = 0; //Affects how the moneyAvailable increases (0-100)
this.timesHacked = 0;
//The IP's of all servers reachable from this one (what shows up if you run scan/netstat)
// NOTE: Only contains IP and not the Server objects themselves
this.serversOnNetwork = [];
//Port information, required for porthacking servers to get admin rights
this.numOpenPortsRequired = 5;
this.sshPortOpen = false; //Port 22
@ -59,7 +59,7 @@ function Server() {
//Initialize the properties of a server
Server.prototype.init = function(ip, hostname, organizationName, onlineStatus, isConnectedTo, adminRights, purchasedByPlayer, maxRam) {
this.ip = ip;
//Check if hostname is unique
var i = 0;
while (GetServerByHostname(hostname) != null) {
@ -79,7 +79,11 @@ Server.prototype.init = function(ip, hostname, organizationName, onlineStatus, i
//Set the hacking properties of a server
Server.prototype.setHackingParameters = function(requiredHackingSkill, moneyAvailable, hackDifficulty, serverGrowth) {
this.requiredHackingSkill = requiredHackingSkill;
this.moneyAvailable = moneyAvailable;
if (isNaN(moneyAvailable)) {
this.moneyAvailable = 1000000;
} else {
this.moneyAvailable = moneyAvailable;
}
this.moneyMax = 50 * moneyAvailable;
this.hackDifficulty = hackDifficulty;
this.baseDifficulty = hackDifficulty;
@ -88,7 +92,7 @@ Server.prototype.setHackingParameters = function(requiredHackingSkill, moneyAvai
}
//Set the port properties of a server
//Right now its only the number of open ports needed to PortHack the server.
//Right now its only the number of open ports needed to PortHack the server.
Server.prototype.setPortProperties = function(numOpenPortsReq) {
this.numOpenPortsRequired = numOpenPortsReq;
}
@ -111,17 +115,17 @@ Server.prototype.getScript = function(scriptName) {
return this.scripts[i];
}
}
return null;
return null;
}
//Strengthens a server's security level (difficulty) by the specified amount
Server.prototype.fortify = function(amt) {
this.hackDifficulty += amt;
this.hackDifficulty += amt;
if (this.hackDifficulty > 99) {this.hackDifficulty = 99;}
}
Server.prototype.weaken = function(amt) {
this.hackDifficulty -= amt;
this.hackDifficulty -= amt;
if (this.hackDifficulty < this.minDifficulty) {this.hackDifficulty = this.minDifficulty;}
if (this.hackDifficulty < 1) {this.hackDifficulty = 1;}
}
@ -141,384 +145,384 @@ initForeignServers = function() {
//MegaCorporations
var ECorpServer = new Server();
ECorpServer.init(createRandomIp(), "ecorp", "ECorp", true, false, false, false, 0);
ECorpServer.setHackingParameters(getRandomInt(1150, 1300), 90000000000, 99, 99);
ECorpServer.setHackingParameters(getRandomInt(1150, 1300), getRandomInt(30000000000, 70000000000), 99, 99);
ECorpServer.setPortProperties(5);
AddToAllServers(ECorpServer);
var MegaCorpServer = new Server();
MegaCorpServer.init(createRandomIp(), "megacorp", "MegaCorp", true, false, false, false, 0);
MegaCorpServer.setHackingParameters(getRandomInt(1150, 1300), 75000000000, 99, 99);
MegaCorpServer.setHackingParameters(getRandomInt(1150, 1300), getRandomInt(40000000000, 60000000000), 99, 99);
MegaCorpServer.setPortProperties(5);
AddToAllServers(MegaCorpServer);
var BachmanAndAssociatesServer = new Server();
BachmanAndAssociatesServer.init(createRandomIp(), "b-and-a", "Bachman & Associates", true, false, false, false, 0);
BachmanAndAssociatesServer.setHackingParameters(getRandomInt(1000, 1050), 30000000000, getRandomInt(75, 85), getRandomInt(65, 75));
BachmanAndAssociatesServer.setHackingParameters(getRandomInt(1000, 1050), getRandomInt(20000000000, 25000000000), getRandomInt(75, 85), getRandomInt(65, 75));
BachmanAndAssociatesServer.setPortProperties(5);
AddToAllServers(BachmanAndAssociatesServer);
var BladeIndustriesServer = new Server();
BladeIndustriesServer.init(createRandomIp(), "blade", "Blade Industries", true, false, false, false, 0);
BladeIndustriesServer.setHackingParameters(getRandomInt(1000, 1100), 18000000000, getRandomInt(90, 95), getRandomInt(60, 75));
BladeIndustriesServer.setHackingParameters(getRandomInt(1000, 1100), getRandomInt(12000000000, 20000000000), getRandomInt(90, 95), getRandomInt(60, 75));
BladeIndustriesServer.setPortProperties(5);
AddToAllServers(BladeIndustriesServer);
var NWOServer = new Server();
NWOServer.init(createRandomIp(), "nwo", "New World Order", true, false, false, false, 0);
NWOServer.setHackingParameters(getRandomInt(1000, 1200), 36000000000, 99, getRandomInt(75, 85));
NWOServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(25000000000, 35000000000), 99, getRandomInt(75, 85));
NWOServer.setPortProperties(5);
AddToAllServers(NWOServer);
var ClarkeIncorporatedServer = new Server();
ClarkeIncorporatedServer.init(createRandomIp(), "clarkeinc", "Clarke Incorporated", true, false, false, false, 0);
ClarkeIncorporatedServer.setHackingParameters(getRandomInt(1000, 1200), 13000000000, getRandomInt(50, 60), getRandomInt(50, 70));
ClarkeIncorporatedServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(15000000000, 25000000000), getRandomInt(50, 60), getRandomInt(50, 70));
ClarkeIncorporatedServer.setPortProperties(5);
AddToAllServers(ClarkeIncorporatedServer);
var OmniTekIncorporatedServer = new Server();
OmniTekIncorporatedServer.init(createRandomIp(), "omnitek", "OmniTek Incorporated", true, false, false, false, 0);
OmniTekIncorporatedServer.setHackingParameters(getRandomInt(900, 1100), 45000000000, getRandomInt(90, 99), getRandomInt(95, 99));
OmniTekIncorporatedServer.setHackingParameters(getRandomInt(900, 1100), getRandomInt(15000000000, 20000000000), getRandomInt(90, 99), getRandomInt(95, 99));
OmniTekIncorporatedServer.setPortProperties(5);
AddToAllServers(OmniTekIncorporatedServer);
var FourSigmaServer = new Server();
FourSigmaServer.init(createRandomIp(), "4sigma", "FourSigma", true, false, false, false, 0);
FourSigmaServer.setHackingParameters(getRandomInt(950, 1200), 24000000000, getRandomInt(60, 70), getRandomInt(75, 99));
FourSigmaServer.setHackingParameters(getRandomInt(950, 1200), getRandomInt(15000000000, 25000000000), getRandomInt(60, 70), getRandomInt(75, 99));
FourSigmaServer.setPortProperties(5);
AddToAllServers(FourSigmaServer);
var KuaiGongInternationalServer = new Server();
KuaiGongInternationalServer.init(createRandomIp(), "kuai-gong", "KuaiGong International", true, false, false, false, 0);
KuaiGongInternationalServer.setHackingParameters(getRandomInt(1000, 1250), 70000000000, getRandomInt(95, 99), getRandomInt(90, 99));
KuaiGongInternationalServer.setHackingParameters(getRandomInt(1000, 1250), getRandomInt(20000000000, 30000000000), getRandomInt(95, 99), getRandomInt(90, 99));
KuaiGongInternationalServer.setPortProperties(5);
AddToAllServers(KuaiGongInternationalServer);
//Technology and communications companies (large targets)
var FulcrumTechnologiesServer = new Server();
FulcrumTechnologiesServer.init(createRandomIp(), "fulcrumtech", "Fulcrum Technologies", true, false, false, false, 64);
FulcrumTechnologiesServer.setHackingParameters(getRandomInt(1000, 1200), 1500000000, getRandomInt(85, 95), getRandomInt(80, 99));
FulcrumTechnologiesServer.setHackingParameters(getRandomInt(1000, 1200), getRandomInt(1400000000, 1800000000), getRandomInt(85, 95), getRandomInt(80, 99));
FulcrumTechnologiesServer.setPortProperties(5);
AddToAllServers(FulcrumTechnologiesServer);
var FulcrumSecretTechnologiesServer = new Server();
FulcrumSecretTechnologiesServer.init(createRandomIp(), "fulcrumassets", "Fulcrum Technologies Assets", true, false, false, false, 0);
FulcrumSecretTechnologiesServer.setHackingParameters(getRandomInt(1200, 1500), 1000000, 99, 1);
FulcrumSecretTechnologiesServer.setPortProperties(5);
AddToAllServers(FulcrumSecretTechnologiesServer);
SpecialServerIps.addIp(SpecialServerNames.FulcrumSecretTechnologies, FulcrumSecretTechnologiesServer.ip);
var StormTechnologiesServer = new Server();
StormTechnologiesServer.init(createRandomIp(), "stormtech", "Storm Technologies", true, false, false, false, 0);
StormTechnologiesServer.setHackingParameters(getRandomInt(900, 1050), 1300000000, getRandomInt(80, 90), getRandomInt(70, 90));
StormTechnologiesServer.setHackingParameters(getRandomInt(900, 1050), getRandomInt(1000000000, 1200000000), getRandomInt(80, 90), getRandomInt(70, 90));
StormTechnologiesServer.setPortProperties(5);
AddToAllServers(StormTechnologiesServer);
var DefCommServer = new Server();
DefCommServer.init(createRandomIp(), "defcomm", "DefComm", true, false, false, false, 0);
DefCommServer.setHackingParameters(getRandomInt(900, 1000), 850000000, getRandomInt(85, 95), getRandomInt(50, 70));
DefCommServer.setHackingParameters(getRandomInt(900, 1000), getRandomInt(800000000, 950000000), getRandomInt(85, 95), getRandomInt(50, 70));
DefCommServer.setPortProperties(5);
AddToAllServers(DefCommServer);
var InfoCommServer = new Server();
InfoCommServer.init(createRandomIp(), "infocomm", "InfoComm", true, false, false, false, 0);
InfoCommServer.setHackingParameters(getRandomInt(875, 950), 700000000, getRandomInt(70, 90), getRandomInt(35, 75));
InfoCommServer.setHackingParameters(getRandomInt(875, 950), getRandomInt(600000000, 900000000), getRandomInt(70, 90), getRandomInt(35, 75));
InfoCommServer.setPortProperties(5);
AddToAllServers(InfoCommServer);
var HeliosLabsServer = new Server();
HeliosLabsServer.init(createRandomIp(), "helios", "Helios Labs", true, false, false, false, 0);
HeliosLabsServer.setHackingParameters(getRandomInt(800, 900), 450000000, getRandomInt(85, 95), getRandomInt(70, 80));
HeliosLabsServer.setHackingParameters(getRandomInt(800, 900), getRandomInt(550000000, 750000000), getRandomInt(85, 95), getRandomInt(70, 80));
HeliosLabsServer.setPortProperties(5);
AddToAllServers(HeliosLabsServer);
var VitaLifeServer = new Server();
VitaLifeServer.init(createRandomIp(), "vitalife", "VitaLife", true, false, false, false, 32);
VitaLifeServer.setHackingParameters(getRandomInt(775, 900), 720000000, getRandomInt(80, 90), getRandomInt(60, 80));
VitaLifeServer.setHackingParameters(getRandomInt(775, 900), getRandomInt(700000000, 800000000), getRandomInt(80, 90), getRandomInt(60, 80));
VitaLifeServer.setPortProperties(5);
AddToAllServers(VitaLifeServer);
var IcarusMicrosystemsServer = new Server();
IcarusMicrosystemsServer.init(createRandomIp(), "icarus", "Icarus Microsystems", true, false, false, false, 0);
IcarusMicrosystemsServer.setHackingParameters(getRandomInt(850, 925), 1000000000, getRandomInt(85, 95), getRandomInt(85, 95));
IcarusMicrosystemsServer.setHackingParameters(getRandomInt(850, 925), getRandomInt(900000000, 1000000000), getRandomInt(85, 95), getRandomInt(85, 95));
IcarusMicrosystemsServer.setPortProperties(5);
AddToAllServers(IcarusMicrosystemsServer);
var UniversalEnergyServer = new Server();
UniversalEnergyServer.init(createRandomIp(), "univ-energy", "Universal Energy", true, false, false, false, 32);
UniversalEnergyServer.setHackingParameters(getRandomInt(800, 900), 1300000000, getRandomInt(80, 90), getRandomInt(80, 90));
UniversalEnergyServer.setHackingParameters(getRandomInt(800, 900), getRandomInt(1100000000, 1200000000), getRandomInt(80, 90), getRandomInt(80, 90));
UniversalEnergyServer.setPortProperties(4);
AddToAllServers(UniversalEnergyServer);
var TitanLabsServer = new Server();
TitanLabsServer.init(createRandomIp(), "titan-labs", "Titan Laboratories", true, false, false, false, 32);
TitanLabsServer.setHackingParameters(getRandomInt(800, 875), 900000000, getRandomInt(70, 80), getRandomInt(60, 80));
TitanLabsServer.setHackingParameters(getRandomInt(800, 875), getRandomInt(750000000, 900000000), getRandomInt(70, 80), getRandomInt(60, 80));
TitanLabsServer.setPortProperties(5);
AddToAllServers(TitanLabsServer);
var MicrodyneTechnologiesServer = new Server();
MicrodyneTechnologiesServer.init(createRandomIp(), "microdyne", "Microdyne Technologies", true, false, false, false, 16);
MicrodyneTechnologiesServer.setHackingParameters(getRandomInt(800, 875), 750000000, getRandomInt(65, 75), getRandomInt(70, 90));
MicrodyneTechnologiesServer.setHackingParameters(getRandomInt(800, 875), getRandomInt(500000000, 700000000), getRandomInt(65, 75), getRandomInt(70, 90));
MicrodyneTechnologiesServer.setPortProperties(5);
AddToAllServers(MicrodyneTechnologiesServer);
var TaiYangDigitalServer = new Server();
TaiYangDigitalServer.init(createRandomIp(), "taiyang-digital", "Taiyang Digital", true, false, false, false, 0);
TaiYangDigitalServer.setHackingParameters(getRandomInt(850, 950), 1000000000, getRandomInt(70, 80), getRandomInt(70, 80));
TaiYangDigitalServer.setHackingParameters(getRandomInt(850, 950), getRandomInt(800000000, 900000000), getRandomInt(70, 80), getRandomInt(70, 80));
TaiYangDigitalServer.setPortProperties(5);
AddToAllServers(TaiYangDigitalServer);
var GalacticCyberSystemsServer = new Server();
GalacticCyberSystemsServer.init(createRandomIp(), "galactic-cyber", "Galactic Cybersystems", true, false, false, false, 0);
GalacticCyberSystemsServer.setHackingParameters(getRandomInt(825, 875), 450000000, getRandomInt(55, 65), getRandomInt(70, 90));
GalacticCyberSystemsServer.setHackingParameters(getRandomInt(825, 875), getRandomInt(750000000, 850000000), getRandomInt(55, 65), getRandomInt(70, 90));
GalacticCyberSystemsServer.setPortProperties(5);
AddToAllServers(GalacticCyberSystemsServer);
//Defense Companies ("Large" Companies)
var AeroCorpServer = new Server();
AeroCorpServer.init(createRandomIp(), "aerocorp", "AeroCorp", true, false, false, false, 0);
AeroCorpServer.setHackingParameters(getRandomInt(850, 925), 1300000000, getRandomInt(80, 90), getRandomInt(55, 65));
AeroCorpServer.setHackingParameters(getRandomInt(850, 925), getRandomInt(1000000000, 1200000000), getRandomInt(80, 90), getRandomInt(55, 65));
AeroCorpServer.setPortProperties(5);
AddToAllServers(AeroCorpServer);
var OmniaCybersystemsServer = new Server();
OmniaCybersystemsServer.init(createRandomIp(), "omnia", "Omnia Cybersystems", true, false, false, false, 0);
OmniaCybersystemsServer.setHackingParameters(getRandomInt(850, 950), 1100000000, getRandomInt(85, 95), getRandomInt(60, 70));
OmniaCybersystemsServer.setHackingParameters(getRandomInt(850, 950), getRandomInt(900000000, 1000000000), getRandomInt(85, 95), getRandomInt(60, 70));
OmniaCybersystemsServer.setPortProperties(5);
AddToAllServers(OmniaCybersystemsServer);
var ZBDefenseServer = new Server();
ZBDefenseServer.init(createRandomIp(), "zb-def", "ZB Defense Industries", true, false, false, false, 0);
ZBDefenseServer.setHackingParameters(getRandomInt(775, 825), 900000000, getRandomInt(55, 65), getRandomInt(65, 75));
ZBDefenseServer.setHackingParameters(getRandomInt(775, 825), getRandomInt(900000000, 1100000000), getRandomInt(55, 65), getRandomInt(65, 75));
ZBDefenseServer.setPortProperties(4);
AddToAllServers(ZBDefenseServer);
var AppliedEnergeticsServer = new Server();
AppliedEnergeticsServer.init(createRandomIp(), "applied-energetics", "Applied Energetics", true, false, false, false, 0);
AppliedEnergeticsServer.setHackingParameters(getRandomInt(775, 850), 1100000000, getRandomInt(60, 80), getRandomInt(70, 75));
AppliedEnergeticsServer.setHackingParameters(getRandomInt(775, 850), getRandomInt(700000000, 1000000000), getRandomInt(60, 80), getRandomInt(70, 75));
AppliedEnergeticsServer.setPortProperties(4);
AddToAllServers(AppliedEnergeticsServer);
var SolarisSpaceSystemsServer = new Server();
SolarisSpaceSystemsServer.init(createRandomIp(), "solaris", "Solaris Space Systems", true, false, false, false, 0);
SolarisSpaceSystemsServer.setHackingParameters(getRandomInt(750, 850), 800000000, getRandomInt(70, 80), getRandomInt(70, 80));
SolarisSpaceSystemsServer.setHackingParameters(getRandomInt(750, 850), getRandomInt(700000000, 900000000), getRandomInt(70, 80), getRandomInt(70, 80));
SolarisSpaceSystemsServer.setPortProperties(5);
AddToAllServers(SolarisSpaceSystemsServer);
var DeltaOneServer = new Server();
DeltaOneServer.init(createRandomIp(), "deltaone", "Delta One", true, false, false, false, 0);
DeltaOneServer.setHackingParameters(getRandomInt(800, 900), 1400000000, getRandomInt(75, 85), getRandomInt(50, 70));
DeltaOneServer.setHackingParameters(getRandomInt(800, 900), getRandomInt(1300000000, 1700000000), getRandomInt(75, 85), getRandomInt(50, 70));
DeltaOneServer.setPortProperties(5);
AddToAllServers(DeltaOneServer);
//Health, medicine, pharmaceutical companies ("Large" targets)
var GlobalPharmaceuticalsServer = new Server();
GlobalPharmaceuticalsServer.init(createRandomIp(), "global-pharm", "Global Pharmaceuticals", true, false, false, false, 16);
GlobalPharmaceuticalsServer.setHackingParameters(getRandomInt(750, 850), 1800000000, getRandomInt(75, 85), getRandomInt(80, 90));
GlobalPharmaceuticalsServer.setHackingParameters(getRandomInt(750, 850), getRandomInt(1500000000, 1750000000), getRandomInt(75, 85), getRandomInt(80, 90));
GlobalPharmaceuticalsServer.setPortProperties(4);
AddToAllServers(GlobalPharmaceuticalsServer);
var NovaMedicalServer = new Server();
NovaMedicalServer.init(createRandomIp(), "nova-med", "Nova Medical", true, false, false, false, 0);
NovaMedicalServer.setHackingParameters(getRandomInt(775, 850), 1350000000, getRandomInt(60, 80), getRandomInt(65, 85));
NovaMedicalServer.setHackingParameters(getRandomInt(775, 850), getRandomInt(1100000000, 1250000000), getRandomInt(60, 80), getRandomInt(65, 85));
NovaMedicalServer.setPortProperties(4);
AddToAllServers(NovaMedicalServer);
var ZeusMedicalServer = new Server();
ZeusMedicalServer.init(createRandomIp(), "zeus-med", "Zeus Medical", true, false, false, false, 0);
ZeusMedicalServer.setHackingParameters(getRandomInt(800, 850), 1600000000, getRandomInt(70, 90), getRandomInt(70, 80));
ZeusMedicalServer.setHackingParameters(getRandomInt(800, 850), getRandomInt(1300000000, 1500000000), getRandomInt(70, 90), getRandomInt(70, 80));
ZeusMedicalServer.setPortProperties(5);
AddToAllServers(ZeusMedicalServer);
var UnitaLifeGroupServer = new Server();
UnitaLifeGroupServer.init(createRandomIp(), "unitalife", "UnitaLife Group", true, false, false, false, 32);
UnitaLifeGroupServer.setHackingParameters(getRandomInt(775, 825), 1200000000, getRandomInt(70, 80), getRandomInt(70, 80));
UnitaLifeGroupServer.setHackingParameters(getRandomInt(775, 825), getRandomInt(1000000000, 1100000000), getRandomInt(70, 80), getRandomInt(70, 80));
UnitaLifeGroupServer.setPortProperties(4);
AddToAllServers(UnitaLifeGroupServer);
//"Medium level" targets
var LexoCorpServer = new Server();
LexoCorpServer.init(createRandomIp(), "lexo-corp", "Lexo Corporation", true, false, false, false, 16);
LexoCorpServer.setHackingParameters(getRandomInt(650, 750), 800000000, getRandomInt(60, 80), getRandomInt(55, 65));
LexoCorpServer.setHackingParameters(getRandomInt(650, 750), getRandomInt(700000000, 800000000), getRandomInt(60, 80), getRandomInt(55, 65));
LexoCorpServer.setPortProperties(4);
AddToAllServers(LexoCorpServer);
var RhoConstructionServer = new Server();
RhoConstructionServer.init(createRandomIp(), "rho-construction", "Rho Construction", true, false, false, false, 0);
RhoConstructionServer.setHackingParameters(getRandomInt(475, 525), 700000000, getRandomInt(40, 60), getRandomInt(40, 60));
RhoConstructionServer.setHackingParameters(getRandomInt(475, 525), getRandomInt(500000000, 700000000), getRandomInt(40, 60), getRandomInt(40, 60));
RhoConstructionServer.setPortProperties(3);
AddToAllServers(RhoConstructionServer);
var AlphaEnterprisesServer = new Server();
AlphaEnterprisesServer.init(createRandomIp(), "alpha-ent", "Alpha Enterprises", true, false, false, false, 0);
AlphaEnterprisesServer.setHackingParameters(getRandomInt(500, 600), 750000000, getRandomInt(50, 70), getRandomInt(50, 60));
AlphaEnterprisesServer.setHackingParameters(getRandomInt(500, 600), getRandomInt(600000000, 750000000), getRandomInt(50, 70), getRandomInt(50, 60));
AlphaEnterprisesServer.setPortProperties(4);
AddToAllServers(AlphaEnterprisesServer);
var AevumPoliceServer = new Server();
AevumPoliceServer.init(createRandomIp(), "aevum-police", "Aevum Police Network", true, false, false, false, 0);
AevumPoliceServer.setHackingParameters(getRandomInt(400, 450), 100000000, getRandomInt(70, 80), getRandomInt(30, 50));
AevumPoliceServer.setHackingParameters(getRandomInt(400, 450), getRandomInt(200000000, 400000000), getRandomInt(70, 80), getRandomInt(30, 50));
AevumPoliceServer.setPortProperties(4);
AddToAllServers(AevumPoliceServer);
var RothmanUniversityServer = new Server();
RothmanUniversityServer.init(createRandomIp(), "rothman-uni", "Rothman University Network", true, false, false, false, 4);
RothmanUniversityServer.setHackingParameters(getRandomInt(370, 430), 200000000, getRandomInt(45, 55), getRandomInt(35, 45));
RothmanUniversityServer.setHackingParameters(getRandomInt(370, 430), getRandomInt(175000000, 250000000), getRandomInt(45, 55), getRandomInt(35, 45));
RothmanUniversityServer.setPortProperties(3);
AddToAllServers(RothmanUniversityServer);
var ZBInstituteOfTechnologyServer = new Server();
ZBInstituteOfTechnologyServer.init(createRandomIp(), "zb-institute", "ZB Institute of Technology Network", true, false, false, false, 4);
ZBInstituteOfTechnologyServer.setHackingParameters(getRandomInt(725, 775), 1000000000, getRandomInt(65, 85), getRandomInt(75, 85));
ZBInstituteOfTechnologyServer.setHackingParameters(getRandomInt(725, 775), getRandomInt(800000000, 1100000000), getRandomInt(65, 85), getRandomInt(75, 85));
ZBInstituteOfTechnologyServer.setPortProperties(5);
AddToAllServers(ZBInstituteOfTechnologyServer);
var SummitUniversityServer = new Server();
SummitUniversityServer.init(createRandomIp(), "summit-uni", "Summit University Network", true, false, false, false, 4);
SummitUniversityServer.setHackingParameters(getRandomInt(425, 475), 160000000, getRandomInt(45, 65), getRandomInt(40, 60));
SummitUniversityServer.setHackingParameters(getRandomInt(425, 475), getRandomInt(200000000, 350000000), getRandomInt(45, 65), getRandomInt(40, 60));
SummitUniversityServer.setPortProperties(3);
AddToAllServers(SummitUniversityServer);
var SysCoreSecuritiesServer = new Server();
SysCoreSecuritiesServer.init(createRandomIp(), "syscore", "SysCore Securities", true, false, false, false, 0);
SysCoreSecuritiesServer.setHackingParameters(getRandomInt(550, 650), 500000000, getRandomInt(60, 80), getRandomInt(60, 70));
SysCoreSecuritiesServer.setHackingParameters(getRandomInt(550, 650), getRandomInt(400000000, 600000000), getRandomInt(60, 80), getRandomInt(60, 70));
SysCoreSecuritiesServer.setPortProperties(4);
AddToAllServers(SysCoreSecuritiesServer);
var CatalystVenturesServer = new Server();
CatalystVenturesServer.init(createRandomIp(), "catalyst", "Catalyst Ventures", true, false, false, false, 0);
CatalystVenturesServer.setHackingParameters(getRandomInt(400, 450), 750000000, getRandomInt(60, 70), getRandomInt(25, 55));
CatalystVenturesServer.setHackingParameters(getRandomInt(400, 450), getRandomInt(300000000, 550000000), getRandomInt(60, 70), getRandomInt(25, 55));
CatalystVenturesServer.setPortProperties(3);
AddToAllServers(CatalystVenturesServer);
var TheHubServer = new Server();
TheHubServer.init(createRandomIp(), "the-hub", "The Hub", true, false, false, false, 0);
TheHubServer.setHackingParameters(getRandomInt(275, 325), 225000000, getRandomInt(35, 45), getRandomInt(45, 55));
TheHubServer.setHackingParameters(getRandomInt(275, 325), getRandomInt(150000000, 200000000), getRandomInt(35, 45), getRandomInt(45, 55));
TheHubServer.setPortProperties(2);
AddToAllServers(TheHubServer);
var CompuTekServer = new Server();
CompuTekServer.init(createRandomIp(), "comptek", "CompuTek", true, false, false, false, 8);
CompuTekServer.setHackingParameters(getRandomInt(300, 400), 275000000, getRandomInt(55, 65), getRandomInt(45, 65));
CompuTekServer.setHackingParameters(getRandomInt(300, 400), getRandomInt(220000000, 250000000), getRandomInt(55, 65), getRandomInt(45, 65));
CompuTekServer.setPortProperties(3);
AddToAllServers(CompuTekServer);
var NetLinkTechnologiesServer = new Server();
NetLinkTechnologiesServer.init(createRandomIp(), "netlink", "NetLink Technologies", true, false, false, false, 0);
NetLinkTechnologiesServer.setHackingParameters(getRandomInt(375, 425), 320000000, getRandomInt(60, 80), getRandomInt(45, 75));
NetLinkTechnologiesServer.setHackingParameters(getRandomInt(375, 425), 275000000, getRandomInt(60, 80), getRandomInt(45, 75));
NetLinkTechnologiesServer.setPortProperties(3);
AddToAllServers(NetLinkTechnologiesServer);
var JohnsonOrthopedicsServer = new Server();
JohnsonOrthopedicsServer.init(createRandomIp(), "johnson-ortho", "Johnson Orthopedics", true, false, false, false, 4);
JohnsonOrthopedicsServer.setHackingParameters(getRandomInt(250, 300), 80000000, getRandomInt(35, 65), getRandomInt(35, 65));
JohnsonOrthopedicsServer.setHackingParameters(getRandomInt(250, 300), getRandomInt(70000000, 85000000), getRandomInt(35, 65), getRandomInt(35, 65));
JohnsonOrthopedicsServer.setPortProperties(2);
AddToAllServers(JohnsonOrthopedicsServer);
//"Low level" targets
var FoodNStuffServer = new Server();
FoodNStuffServer.init(createRandomIp(), "foodnstuff", "Food N Stuff Supermarket", true, false, false, false, 4);
FoodNStuffServer.setHackingParameters(1, 1000000, 10, 5);
FoodNStuffServer.setPortProperties(0);
AddToAllServers(FoodNStuffServer);
var SigmaCosmeticsServer = new Server();
SigmaCosmeticsServer.init(createRandomIp(), "sigma-cosmetics", "Sigma Cosmetics", true, false, false, false, 4);
SigmaCosmeticsServer.setHackingParameters(5, 1300000, 10, 10);
SigmaCosmeticsServer.setPortProperties(0);
AddToAllServers(SigmaCosmeticsServer);
var JoesGunsServer = new Server();
JoesGunsServer.init(createRandomIp(), "joesguns", "Joe's Guns", true, false, false, false, 4);
JoesGunsServer.setHackingParameters(10, 1750000, 20, 20);
JoesGunsServer.setPortProperties(0);
AddToAllServers(JoesGunsServer);
var Zer0NightclubServer = new Server();
Zer0NightclubServer.init(createRandomIp(), "zer0", "ZER0 Nightclub", true, false, false, false, 4);
Zer0NightclubServer.setHackingParameters(75, 7500000, 25, 40);
Zer0NightclubServer.setPortProperties(1);
AddToAllServers(Zer0NightclubServer);
var NectarNightclubServer = new Server();
NectarNightclubServer.init(createRandomIp(), "nectar-net", "Nectar Nightclub Network", true, false, false, false, 4);
NectarNightclubServer.setHackingParameters(20, 2000000, 20, 25);
NectarNightclubServer.setPortProperties(0);
AddToAllServers(NectarNightclubServer);
var NeoNightclubServer = new Server();
NeoNightclubServer.init(createRandomIp(), "neo-net", "Neo Nightclub Network", true, false, false, false, 4);
NeoNightclubServer.setHackingParameters(50, 4500000, 25, 25);
NeoNightclubServer.setPortProperties(1);
AddToAllServers(NeoNightclubServer);
var SilverHelixServer = new Server();
SilverHelixServer.init(createRandomIp(), "silver-helix", "Silver Helix", true, false, false, false, 2);
SilverHelixServer.setHackingParameters(150, 50000000, 30, 30);
SilverHelixServer.setHackingParameters(150, 45000000, 30, 30);
SilverHelixServer.setPortProperties(2);
AddToAllServers(SilverHelixServer);
var HongFangTeaHouseServer = new Server();
HongFangTeaHouseServer.init(createRandomIp(), "hong-fang-tea", "HongFang Teahouse", true, false, false, false, 4);
HongFangTeaHouseServer.setHackingParameters(30, 2500000, 15, 15);
HongFangTeaHouseServer.setPortProperties(0);
AddToAllServers(HongFangTeaHouseServer);
var HaraKiriSushiBarServer = new Server();
HaraKiriSushiBarServer.init(createRandomIp(), "harakiri-sushi", "HaraKiri Sushi Bar Network", true, false, false, false, 4);
HaraKiriSushiBarServer.setHackingParameters(40, 3500000, 15, 40);
HaraKiriSushiBarServer.setPortProperties(0);
AddToAllServers(HaraKiriSushiBarServer);
var PhantasyServer = new Server();
PhantasyServer.init(createRandomIp(), "phantasy", "Phantasy Club", true, false, false, false, 0);
PhantasyServer.setHackingParameters(100, 27500000, 20, 35);
PhantasyServer.setHackingParameters(100, 24000000, 20, 35);
PhantasyServer.setPortProperties(2);
AddToAllServers(PhantasyServer);
var MaxHardwareServer = new Server();
MaxHardwareServer.init(createRandomIp(), "max-hardware", "Max Hardware Store", true, false, false, false, 4);
MaxHardwareServer.setHackingParameters(80, 11000000, 15, 25);
MaxHardwareServer.setHackingParameters(80, 10000000, 15, 25);
MaxHardwareServer.setPortProperties(1);
AddToAllServers(MaxHardwareServer);
var OmegaSoftwareServer = new Server();
OmegaSoftwareServer.init(createRandomIp(), "omega-net", "Omega Software", true, false, false, false, 8);
OmegaSoftwareServer.setHackingParameters(getRandomInt(180, 220), 75000000, getRandomInt(25, 35), getRandomInt(30, 40));
OmegaSoftwareServer.setHackingParameters(getRandomInt(180, 220), getRandomInt(60000000, 70000000), getRandomInt(25, 35), getRandomInt(30, 40));
OmegaSoftwareServer.setPortProperties(2);
AddToAllServers(OmegaSoftwareServer);
//Gyms
var CrushFitnessGymServer = new Server();
CrushFitnessGymServer.init(createRandomIp(), "crush-fitness", "Crush Fitness", true, false, false, false, 0);
CrushFitnessGymServer.setHackingParameters(getRandomInt(225, 275), 40000000, getRandomInt(35, 45), getRandomInt(27, 33));
CrushFitnessGymServer.setHackingParameters(getRandomInt(225, 275), getRandomInt(40000000, 60000000), getRandomInt(35, 45), getRandomInt(27, 33));
CrushFitnessGymServer.setPortProperties(2);
AddToAllServers(CrushFitnessGymServer);
var IronGymServer = new Server();
IronGymServer.init(createRandomIp(), "iron-gym", "Iron Gym Network", true, false, false, false, 4);
IronGymServer.setHackingParameters(100, 20000000, 30, 20);
IronGymServer.setPortProperties(1);
AddToAllServers(IronGymServer);
var MilleniumFitnessGymServer = new Server();
MilleniumFitnessGymServer.init(createRandomIp(), "millenium-fitness", "Millenium Fitness Network", true, false, false, false, 0);
MilleniumFitnessGymServer.setHackingParameters(getRandomInt(475, 525), 100000000, getRandomInt(45, 55), getRandomInt(25, 45));
MilleniumFitnessGymServer.setHackingParameters(getRandomInt(475, 525), 250000000, getRandomInt(45, 55), getRandomInt(25, 45));
MilleniumFitnessGymServer.setPortProperties(3);
AddToAllServers(MilleniumFitnessGymServer);
var PowerhouseGymServer = new Server();
PowerhouseGymServer.init(createRandomIp(), "powerhouse-fitness", "Powerhouse Fitness", true, false, false, false, 0);
PowerhouseGymServer.setHackingParameters(getRandomInt(950, 1100), 300000000, getRandomInt(55, 65), getRandomInt(50, 60));
PowerhouseGymServer.setHackingParameters(getRandomInt(950, 1100), 900000000, getRandomInt(55, 65), getRandomInt(50, 60));
PowerhouseGymServer.setPortProperties(5);
AddToAllServers(PowerhouseGymServer);
var SnapFitnessGymServer = new Server();
SnapFitnessGymServer.init(createRandomIp(), "snap-fitness", "Snap Fitness", true, false, false, false, 0);
SnapFitnessGymServer.setHackingParameters(getRandomInt(675, 800), 150000000, getRandomInt(40, 60), getRandomInt(40, 60));
SnapFitnessGymServer.setHackingParameters(getRandomInt(675, 800), 450000000, getRandomInt(40, 60), getRandomInt(40, 60));
SnapFitnessGymServer.setPortProperties(4);
AddToAllServers(SnapFitnessGymServer);
//Faction servers, cannot hack money from these
var BitRunnersServer = new Server();
BitRunnersServer.init(createRandomIp(), "run4theh111z", "The Runners", true, false, false, false, 0);
@ -526,42 +530,42 @@ initForeignServers = function() {
BitRunnersServer.setPortProperties(4);
AddToAllServers(BitRunnersServer);
SpecialServerIps.addIp(SpecialServerNames.BitRunnersServer, BitRunnersServer.ip);
var TheBlackHandServer = new Server();
TheBlackHandServer.init(createRandomIp(), "I.I.I.I", "I.I.I.I", true, false, false, false, 0);
TheBlackHandServer.setHackingParameters(getRandomInt(340, 365), 0, 0, 0);
TheBlackHandServer.setPortProperties(3);
AddToAllServers(TheBlackHandServer);
SpecialServerIps.addIp(SpecialServerNames.TheBlackHandServer, TheBlackHandServer.ip);
var NiteSecServer = new Server();
NiteSecServer.init(createRandomIp(), "avmnite-02h", "NiteSec", true, false, false, false, 0);
NiteSecServer.setHackingParameters(getRandomInt(202, 220), 0, 0, 0);
NiteSecServer.setPortProperties(2);
AddToAllServers(NiteSecServer);
SpecialServerIps.addIp(SpecialServerNames.NiteSecServer, NiteSecServer.ip);
var DarkArmyServer = new Server();
DarkArmyServer.init(createRandomIp(), ".", ".", true, false, false, false, 0);
DarkArmyServer.setHackingParameters(getRandomInt(505, 550), 0, 0, 0);
DarkArmyServer.setPortProperties(4);
AddToAllServers(DarkArmyServer);
SpecialServerIps.addIp(SpecialServerNames.TheDarkArmyServer, DarkArmyServer.ip);
var CyberSecServer = new Server();
CyberSecServer.init(createRandomIp(), "CSEC", "CyberSec", true, false, false, false, 0);
CyberSecServer.setHackingParameters(getRandomInt(51, 60), 0, 0, 0);
CyberSecServer.setPortProperties(1);
AddToAllServers(CyberSecServer);
SpecialServerIps.addIp(SpecialServerNames.CyberSecServer, CyberSecServer.ip);
var DaedalusServer = new Server();
DaedalusServer.init(createRandomIp(), "The-Cave", "Helios", true, false, false, false, 0);
DaedalusServer.setHackingParameters(925, 0, 0, 0);
DaedalusServer.setPortProperties(5);
AddToAllServers(DaedalusServer);
SpecialServerIps.addIp(SpecialServerNames.DaedalusServer, DaedalusServer.ip);
//Super special Servers
var WorldDaemon = new Server();
WorldDaemon.init(createRandomIp(), SpecialServerNames.WorldDaemon, SpecialServerNames.WorldDaemon, true, false, false, false, 0);
@ -569,7 +573,7 @@ initForeignServers = function() {
WorldDaemon.setPortProperties(5);
AddToAllServers(WorldDaemon);
SpecialServerIps.addIp(SpecialServerNames.WorldDaemon, WorldDaemon.ip);
/* Create a randomized network for all the foreign servers */
//Groupings for creating a randomized network
var NetworkGroup1 = [IronGymServer, FoodNStuffServer, SigmaCosmeticsServer, JoesGunsServer, HongFangTeaHouseServer, HaraKiriSushiBarServer];
@ -587,91 +591,91 @@ initForeignServers = function() {
var NetworkGroup13 = [KuaiGongInternationalServer, FourSigmaServer, OmniTekIncorporatedServer, DarkArmyServer];
var NetworkGroup14 = [PowerhouseGymServer, ClarkeIncorporatedServer, NWOServer, BladeIndustriesServer, BachmanAndAssociatesServer];
var NetworkGroup15 = [FulcrumSecretTechnologiesServer, MegaCorpServer, ECorpServer, DaedalusServer];
for (var i = 0; i < NetworkGroup2.length; i++) {
var randomServerFromPrevGroup = NetworkGroup1[Math.floor(Math.random() * NetworkGroup1.length)];
NetworkGroup2[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup2[i].ip);
}
for (var i = 0; i < NetworkGroup3.length; i++) {
var randomServerFromPrevGroup = NetworkGroup2[Math.floor(Math.random() * NetworkGroup2.length)];
NetworkGroup3[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup3[i].ip);
}
for (var i = 0; i < NetworkGroup4.length; i++) {
var randomServerFromPrevGroup = NetworkGroup3[Math.floor(Math.random() * NetworkGroup3.length)];
NetworkGroup4[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup4[i].ip);
}
for (var i = 0; i < NetworkGroup5.length; i++) {
var randomServerFromPrevGroup = NetworkGroup4[Math.floor(Math.random() * NetworkGroup4.length)];
NetworkGroup5[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup5[i].ip);
}
for (var i = 0; i < NetworkGroup6.length; i++) {
var randomServerFromPrevGroup = NetworkGroup5[Math.floor(Math.random() * NetworkGroup5.length)];
NetworkGroup6[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup6[i].ip);
}
for (var i = 0; i < NetworkGroup7.length; i++) {
var randomServerFromPrevGroup = NetworkGroup6[Math.floor(Math.random() * NetworkGroup6.length)];
NetworkGroup7[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup7[i].ip);
}
for (var i = 0; i < NetworkGroup8.length; i++) {
var randomServerFromPrevGroup = NetworkGroup7[Math.floor(Math.random() * NetworkGroup7.length)];
NetworkGroup8[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup8[i].ip);
}
for (var i = 0; i < NetworkGroup9.length; i++) {
var randomServerFromPrevGroup = NetworkGroup8[Math.floor(Math.random() * NetworkGroup8.length)];
NetworkGroup9[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup9[i].ip);
}
for (var i = 0; i < NetworkGroup10.length; i++) {
var randomServerFromPrevGroup = NetworkGroup9[Math.floor(Math.random() * NetworkGroup9.length)];
NetworkGroup10[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup10[i].ip);
}
for (var i = 0; i < NetworkGroup11.length; i++) {
var randomServerFromPrevGroup = NetworkGroup10[Math.floor(Math.random() * NetworkGroup10.length)];
NetworkGroup11[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup11[i].ip);
}
for (var i = 0; i < NetworkGroup12.length; i++) {
var randomServerFromPrevGroup = NetworkGroup11[Math.floor(Math.random() * NetworkGroup11.length)];
NetworkGroup12[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup12[i].ip);
}
for (var i = 0; i < NetworkGroup13.length; i++) {
var randomServerFromPrevGroup = NetworkGroup12[Math.floor(Math.random() * NetworkGroup12.length)];
NetworkGroup13[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup13[i].ip);
}
for (var i = 0; i < NetworkGroup14.length; i++) {
var randomServerFromPrevGroup = NetworkGroup13[Math.floor(Math.random() * NetworkGroup13.length)];
NetworkGroup14[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup14[i].ip);
}
for (var i = 0; i < NetworkGroup15.length; i++) {
var randomServerFromPrevGroup = NetworkGroup14[Math.floor(Math.random() * NetworkGroup14.length)];
NetworkGroup15[i].serversOnNetwork.push(randomServerFromPrevGroup.ip);
randomServerFromPrevGroup.serversOnNetwork.push(NetworkGroup15[i].ip);
}
//Connect the first tier of servers to the player's home computer
for (var i = 0; i < NetworkGroup1.length; i++) {
Player.getHomeComputer().serversOnNetwork.push(NetworkGroup1[i].ip);
@ -683,24 +687,24 @@ initForeignServers = function() {
processSingleServerGrowth = function(server, numCycles) {
//Server growth processed once every 450 game cycles
var numServerGrowthCycles = Math.max(Math.floor(numCycles / 450), 0);
//Get adjusted growth rate, which accounts for server security
var growthRate = CONSTANTS.ServerBaseGrowthRate;
var adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;
var growthRate = CONSTANTS.ServerBaseGrowthRate;
var adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;
if (adjGrowthRate > CONSTANTS.ServerMaxGrowthRate) {adjGrowthRate = CONSTANTS.ServerMaxGrowthRate;}
//console.log("Adjusted growth rate: " + adjGrowthRate);
//Calculate adjusted server growth rate based on parameters
var serverGrowthPercentage = server.serverGrowth / 100;
var numServerGrowthCyclesAdjusted = numServerGrowthCycles * serverGrowthPercentage;
//Apply serverGrowth for the calculated number of growth cycles
var serverGrowth = Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * Player.hacking_grow_mult);
if (serverGrowth < 1) {
console.log("WARN: serverGrowth calculated to be less than 1");
serverGrowth = 1;
}
server.moneyAvailable *= serverGrowth;
if (server.moneyMax && isNaN(server.moneyAvailable)) {
server.moneyAvailable = server.moneyMax;
@ -766,4 +770,4 @@ PrintAllServers = function() {
console.log("Ip: " + ip + ", hostname: " + AllServers[ip].hostname);
}
}
}
}