mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 14:42:28 +01:00
commit
9ea3ddb536
60
index.html
60
index.html
@ -502,6 +502,11 @@
|
||||
<h1> Factions </h1>
|
||||
<p> Lists all factions you have joined </p>
|
||||
<ul class="factions-list" id="factions-list"></ul>
|
||||
<br><br>
|
||||
<h1> Outstanding Faction Invitations </h1>
|
||||
<p style="width:70%;"> Lists factions you have been invited to, as well as factions you have previously rejected.
|
||||
You can accept these faction invitations at any times </p>
|
||||
<ul class="factions-list" id="outstanding-faction-invitations-list"></ul>
|
||||
</div>
|
||||
|
||||
<!-- Single Faction info (when you select a faction from the Factions menu) -->
|
||||
@ -651,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>
|
||||
|
||||
@ -928,7 +933,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input type ="range" max="100" min="20"
|
||||
<input type="range" max="100" min="20"
|
||||
oninput="document.getElementById('settingsNSLogRangeValLabel').innerHTML = this.value;
|
||||
Settings.MaxLogCapacity=this.value;"
|
||||
step="1" name="settingsNSLogRangeVal" id="settingsNSLogRangeVal" value="50">
|
||||
@ -946,7 +951,7 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<input type ="range" max="100" min="20"
|
||||
<input type="range" max="100" min="20"
|
||||
oninput="document.getElementById('settingsNSPortRangeValLabel').innerHTML = this.value;
|
||||
Settings.MaxPortCapacity=this.value;"
|
||||
step="1" name="settingsNSPortRangeVal" id="settingsNSPortRangeVal" value="50">
|
||||
@ -954,6 +959,31 @@
|
||||
<em id="settingsNSPortRangeValLabel" style="font-style: normal;"></em>
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress messages -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressMessages" class="tooltip">Suppress Messages:
|
||||
<span class="tooltiptext">
|
||||
If this is set, then any messages you receive will not appear as popups
|
||||
on the screen. They will still get sent to your home computer as '.msg' files
|
||||
and can be viewed with the 'cat' Terminal command.
|
||||
</span>
|
||||
</label>
|
||||
<input type="checkbox" name="settingsSuppressMessages" id="settingsSuppressMessages"
|
||||
onclick="Settings.SuppressMessages = this.checked;">
|
||||
</fieldset>
|
||||
|
||||
<!-- Suppress faction invites -->
|
||||
<fieldset>
|
||||
<label for="settingsSuppressFactionInvites" class="tooltip">Suppress Faction Invites:
|
||||
<span class="tooltiptext">
|
||||
If this is set, then any faction invites you receive will not appear as popups
|
||||
on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.
|
||||
</span>
|
||||
</label>
|
||||
<input type="checkbox" name="settingsSuppressFactionInvites" id="settingsSuppressFactionInvites"
|
||||
onclick="Settings.SuppressFactionInvites = this.checked;">
|
||||
</fieldset>
|
||||
|
||||
<!-- Donate button -->
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
||||
<input type="hidden" name="cmd" value="_s-xclick">
|
||||
|
213
src/Company.js
213
src/Company.js
@ -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
|
||||
@ -61,9 +61,7 @@ CONSTANTS = {
|
||||
ScriptHasRootAccessRamCost: 0.05,
|
||||
ScriptGetHostnameRamCost: 0.05,
|
||||
ScriptGetHackingLevelRamCost: 0.05,
|
||||
ScriptGetServerMoneyRamCost: 0.1,
|
||||
ScriptGetServerSecurityRamCost: 0.1,
|
||||
ScriptGetServerReqdHackRamCost: 0.1,
|
||||
ScriptGetServerCost: 0.1,
|
||||
ScriptFileExistsRamCost: 0.1,
|
||||
ScriptIsRunningRamCost: 0.1,
|
||||
ScriptOperatorRamCost: 0.01,
|
||||
@ -86,6 +84,8 @@ CONSTANTS = {
|
||||
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
|
||||
@ -678,7 +678,20 @@ CONSTANTS = {
|
||||
"World Stock Exchange account and TIX API Access<br>",
|
||||
|
||||
LatestUpdate:
|
||||
"V0.26.1<br>" +
|
||||
"v0.26.2<br>" +
|
||||
"-Major rebalancing and randomization of the amount of money that servers start with<br>" +
|
||||
"-Significantly lowered hacking exp gain from hacking servers. The exp gain for higher-level servers was lowered more than " +
|
||||
"that of low level servers. (~16% for lower level servers, up to ~25% for higher-level servers)<br>" +
|
||||
"-Added deleteServer() Netscript function<br>" +
|
||||
"-You can now purchase a maximum of 25 servers each run (Deleting a server will allow you to purchase a new one)<br>" +
|
||||
"-Added autocompletion for './' Terminal command<br>" +
|
||||
"-Darkweb prices now displayed properly using toLocaleString()<br>" +
|
||||
"-Added NOT operator (!) and negation operator(-), so negative numbers should be functional now<br>" +
|
||||
"-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>" +
|
||||
"-Added getLevelUpgradeCost(n), getRamUpgradeCost(), getCoreUpgradeCost() functions for Netscript Hacknet Node API<br>" +
|
||||
|
@ -6,11 +6,11 @@ checkIfConnectedToDarkweb = function() {
|
||||
if (!isValidIPAddress(darkwebIp)) {return;}
|
||||
if (darkwebIp == Player.getCurrentServer().ip) {
|
||||
post("You are now connected to the dark web. From the dark web you can purchase illegal items. " +
|
||||
"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] " +
|
||||
"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] " +
|
||||
"to purchase an item");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//Handler for dark web commands. The terminal's executeCommand() function will pass
|
||||
@ -41,9 +41,39 @@ executeDarkwebTerminalCommand = function(commandArray) {
|
||||
listAllDarkwebItems = function() {
|
||||
for (var item in DarkWebItems) {
|
||||
if (DarkWebItems.hasOwnProperty(item)) {
|
||||
post(DarkWebItems[item]);
|
||||
var item = DarkWebItems[item];
|
||||
//Convert string using toLocaleString
|
||||
var split = item.split(" - ");
|
||||
if (split.length == 3 && split[1].charAt(0) == '$') {
|
||||
split[1] = split[1].slice(1);
|
||||
split[1] = split[1].replace(/,/g, '');
|
||||
var price = parseFloat(split[1]);
|
||||
if (isNaN(price)) {
|
||||
post(item);
|
||||
return;
|
||||
}
|
||||
price = formatNumber(price, 0);
|
||||
split[1] = "$" + price.toString();
|
||||
post(split.join(" - "));
|
||||
} else {
|
||||
post(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var priceString = split[1];
|
||||
//Check for errors
|
||||
if (priceString.length == 0 || priceString.charAt(0) != '$') {
|
||||
return -1;
|
||||
}
|
||||
//Remove dollar sign and commas
|
||||
priceString = priceString.slice(1);
|
||||
priceString = priceString.replace(/,/g, '');
|
||||
|
||||
//Convert string to numeric
|
||||
var price = parseFloat(priceString);
|
||||
if (isNaN(price)) {return -1;}
|
||||
else {return price;}
|
||||
}
|
||||
|
||||
buyDarkwebItem = function(itemName) {
|
||||
@ -52,7 +82,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.BruteSSHProgram);
|
||||
post("You have purchased the BruteSSH.exe program. The new program " +
|
||||
post("You have purchased the BruteSSH.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -62,7 +92,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.FTPCrackProgram);
|
||||
post("You have purchased the FTPCrack.exe program. The new program " +
|
||||
post("You have purchased the FTPCrack.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -72,7 +102,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.RelaySMTPProgram);
|
||||
post("You have purchased the relaySMTP.exe program. The new program " +
|
||||
post("You have purchased the relaySMTP.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -82,7 +112,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.HTTPWormProgram);
|
||||
post("You have purchased the HTTPWorm.exe program. The new program " +
|
||||
post("You have purchased the HTTPWorm.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -92,7 +122,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.SQLInjectProgram);
|
||||
post("You have purchased the SQLInject.exe program. The new program " +
|
||||
post("You have purchased the SQLInject.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -102,7 +132,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.DeepscanV1);
|
||||
post("You have purchased the DeepscanV1.exe program. The new program " +
|
||||
post("You have purchased the DeepscanV1.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -112,7 +142,7 @@ buyDarkwebItem = function(itemName) {
|
||||
if (price > 0 && Player.money >= price) {
|
||||
Player.loseMoney(price);
|
||||
Player.getHomeComputer().programs.push(Programs.DeepscanV2);
|
||||
post("You have purchased the DeepscanV2.exe program. The new program " +
|
||||
post("You have purchased the DeepscanV2.exe program. The new program " +
|
||||
"can be found on your home computer.");
|
||||
} else {
|
||||
post("Not enough money to purchase " + itemName);
|
||||
@ -133,7 +163,7 @@ parseDarkwebItemPrice = function(itemDesc) {
|
||||
//Remove dollar sign and commas
|
||||
priceString = priceString.slice(1);
|
||||
priceString = priceString.replace(/,/g, '');
|
||||
|
||||
|
||||
//Convert string to numeric
|
||||
var price = parseFloat(priceString);
|
||||
if (isNaN(price)) {return -1;}
|
||||
@ -151,4 +181,4 @@ DarkWebItems = {
|
||||
SQLInjectProgram: Programs.SQLInjectProgram + " - $250,000,000 - Opens up SQL Ports",
|
||||
DeepScanV1Program: Programs.DeepscanV1 + " - $500,000 - Enables 'scan-analyze' with a depth up to 5",
|
||||
DeepScanV2Program: Programs.DeepscanV2 + " - $25,000,000 - Enables 'scan-analyze' with a depth up to 10",
|
||||
}
|
||||
}
|
||||
|
@ -630,7 +630,12 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
|
||||
}
|
||||
|
||||
inviteToFaction = function(faction) {
|
||||
factionInvitationBoxCreate(faction);
|
||||
if (Settings.SuppressFactionInvites) {
|
||||
faction.alreadyInvited = true;
|
||||
Player.factionInvitations.push(faction.name);
|
||||
} else {
|
||||
factionInvitationBoxCreate(faction);
|
||||
}
|
||||
}
|
||||
|
||||
joinFaction = function(faction) {
|
||||
|
648
src/Location.js
648
src/Location.js
File diff suppressed because it is too large
Load Diff
@ -20,13 +20,15 @@ Reviver.constructors.Message = Message;
|
||||
function sendMessage(msg) {
|
||||
console.log("sending message: " + msg.filename);
|
||||
msg.recvd = true;
|
||||
showMessage(msg);
|
||||
if (!Settings.SuppressMessages) {
|
||||
showMessage(msg);
|
||||
}
|
||||
addMessageToServer(msg, "home");
|
||||
}
|
||||
|
||||
function showMessage(msg) {
|
||||
var txt = "Message received from unknown sender: <br><br>" +
|
||||
"<i>" + msg.msg + "</i><br><br>" +
|
||||
var txt = "Message received from unknown sender: <br><br>" +
|
||||
"<i>" + msg.msg + "</i><br><br>" +
|
||||
"This message was saved as " + msg.filename + " onto your home computer.";
|
||||
dialogBoxCreate(txt);
|
||||
}
|
||||
@ -53,7 +55,7 @@ function checkForMessagesToSend() {
|
||||
var nitesecTest = Messages[MessageFilenames.NiteSecTest];
|
||||
var bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];
|
||||
var redpill = Messages[MessageFilenames.RedPill];
|
||||
|
||||
|
||||
if (jumper0 && !jumper0.recvd && Player.hacking_skill >= 25) {
|
||||
sendMessage(jumper0);
|
||||
} else if (jumper1 && !jumper1.recvd && Player.hacking_skill >= 40) {
|
||||
@ -100,61 +102,61 @@ MessageFilenames = {
|
||||
function initMessages() {
|
||||
//Reset
|
||||
Messages = {};
|
||||
|
||||
|
||||
//jump3R Messages
|
||||
AddToAllMessages(new Message(MessageFilenames.Jumper0,
|
||||
"I know you can sense it. I know you're searching for it. " +
|
||||
"It's why you spend night after " +
|
||||
"night at your computer. <br><br>It's real, I've seen it. And I can " +
|
||||
"I know you can sense it. I know you're searching for it. " +
|
||||
"It's why you spend night after " +
|
||||
"night at your computer. <br><br>It's real, I've seen it. And I can " +
|
||||
"help you find it. But not right now. You're not ready yet.<br><br>-jump3R"));
|
||||
AddToAllMessages(new Message(MessageFilenames.Jumper1,
|
||||
"Soon you will be contacted by a hacking group known as CyberSec. " +
|
||||
"They can help you with your search. <br><br>" +
|
||||
"You should join them, garner their favor, and " +
|
||||
"exploit them for their Augmentations. But do not trust them. " +
|
||||
"They are not what they seem. No one is.<br><br>" +
|
||||
"You should join them, garner their favor, and " +
|
||||
"exploit them for their Augmentations. But do not trust them. " +
|
||||
"They are not what they seem. No one is.<br><br>" +
|
||||
"-jump3R"));
|
||||
AddToAllMessages(new Message(MessageFilenames.Jumper2,
|
||||
"Do not try to save the world. There is no world to save. If " +
|
||||
"you want to find the truth, worry only about yourself. Ethics and " +
|
||||
"morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec." +
|
||||
"Do not try to save the world. There is no world to save. If " +
|
||||
"you want to find the truth, worry only about yourself. Ethics and " +
|
||||
"morals will get you killed. <br><br>Watch out for a hacking group known as NiteSec." +
|
||||
"<br><br>-jump3R"));
|
||||
AddToAllMessages(new Message(MessageFilenames.Jumper3,
|
||||
"You must learn to walk before you can run. And you must " +
|
||||
"run before you can fly. Look for the black hand. <br><br>" +
|
||||
"You must learn to walk before you can run. And you must " +
|
||||
"run before you can fly. Look for the black hand. <br><br>" +
|
||||
"I.I.I.I <br><br>-jump3R"));
|
||||
AddToAllMessages(new Message(MessageFilenames.Jumper4,
|
||||
"To find what you are searching for, you must understand the bits. " +
|
||||
"The bits are all around us. The runners will help you.<br><br>" +
|
||||
"To find what you are searching for, you must understand the bits. " +
|
||||
"The bits are all around us. The runners will help you.<br><br>" +
|
||||
"-jump3R"));
|
||||
AddToAllMessages(new Message(MessageFilenames.Jumper5,
|
||||
"Build your wings and fly<br><br>-jump3R<br><br> " +
|
||||
"The fl1ght.exe program was added to your home computer"));
|
||||
|
||||
|
||||
//Messages from hacking factions
|
||||
AddToAllMessages(new Message(MessageFilenames.CyberSecTest,
|
||||
"We've been watching you. Your skills are very impressive. But you're wasting " +
|
||||
"your talents. If you join us, you can put your skills to good use and change " +
|
||||
"the world for the better. If you join us, we can unlock your full potential. <br><br>" +
|
||||
"But first, you must pass our test. Find and hack our server using the Terminal. <br><br>" +
|
||||
"the world for the better. If you join us, we can unlock your full potential. <br><br>" +
|
||||
"But first, you must pass our test. Find and hack our server using the Terminal. <br><br>" +
|
||||
"-CyberSec"));
|
||||
AddToAllMessages(new Message(MessageFilenames.NiteSecTest,
|
||||
"People say that the corrupted governments and corporations rule the world. " +
|
||||
"Yes, maybe they do. But do you know who everyone really fears? People " +
|
||||
"People say that the corrupted governments and corporations rule the world. " +
|
||||
"Yes, maybe they do. But do you know who everyone really fears? People " +
|
||||
"like us. Because they can't hide from us. Because they can't fight shadows " +
|
||||
"and ideas with bullets. <br><br>" +
|
||||
"Join us, and people will fear you, too. <br><br>" +
|
||||
"Find and hack our hidden server using the Terminal. Then, we will contact you again." +
|
||||
"and ideas with bullets. <br><br>" +
|
||||
"Join us, and people will fear you, too. <br><br>" +
|
||||
"Find and hack our hidden server using the Terminal. Then, we will contact you again." +
|
||||
"<br><br>-NiteSec"));
|
||||
AddToAllMessages(new Message(MessageFilenames.BitRunnersTest,
|
||||
"We know what you are doing. We know what drives you. We know " +
|
||||
"what you are looking for. <br><br> " +
|
||||
"We can help you find the answers.<br><br>" +
|
||||
"We know what you are doing. We know what drives you. We know " +
|
||||
"what you are looking for. <br><br> " +
|
||||
"We can help you find the answers.<br><br>" +
|
||||
"run4theh111z"));
|
||||
|
||||
|
||||
AddToAllMessages(new Message(MessageFilenames.RedPill,
|
||||
"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>" +
|
||||
")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>" +
|
||||
"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>" +
|
||||
"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>" +
|
||||
")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>" +
|
||||
"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>" +
|
||||
"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"));
|
||||
}
|
||||
}
|
||||
|
@ -131,6 +131,14 @@ function evaluate(exp, workerScript) {
|
||||
reject(e);
|
||||
});
|
||||
break;
|
||||
case "UnaryExpression":
|
||||
var p = evalUnary(exp, workerScript, resolve, reject);
|
||||
p.then(function(res) {
|
||||
resolve(res);
|
||||
}).catch(function(e) {
|
||||
reject(e);
|
||||
});
|
||||
break;
|
||||
case "AssignmentExpression":
|
||||
var p = evalAssignment(exp, workerScript);
|
||||
p.then(function(res) {
|
||||
@ -210,58 +218,6 @@ function evaluate(exp, workerScript) {
|
||||
}); // End Promise
|
||||
}
|
||||
|
||||
/*
|
||||
function evalFunction(exp, workerScript){
|
||||
return new Promise(function(resolve, reject) {
|
||||
if (exp.callee.type!="Identifier"){
|
||||
reject(makeRuntimeRejectMsg(workerScript, "callee must be an Identifier"));
|
||||
return;
|
||||
}
|
||||
switch(exp.callee.name){
|
||||
case "print":
|
||||
if (exp.arguments.length != 1) {
|
||||
return reject(makeRuntimeRejectMsg(workerScript, "print() call has incorrect number of arguments. Takes 1 argument"));
|
||||
}
|
||||
var evaluatePromise = evaluate(exp.arguments[0], workerScript);
|
||||
evaluatePromise.then(function(res) {
|
||||
workerScript.scriptRef.log(res.toString());
|
||||
resolve(true);
|
||||
}).catch(function(e) {
|
||||
reject(e);
|
||||
});
|
||||
break;
|
||||
case "scan":
|
||||
if (exp.arguments.length != 1) {
|
||||
exp.arguments = [{value:Player.getCurrentServer().hostname,type:"Literal"}];
|
||||
}
|
||||
var ipPromise = evaluate(exp.arguments[0], workerScript);
|
||||
ipPromise.then(function (ip) {
|
||||
var server = getServer(ip);
|
||||
if (server == null) {
|
||||
workerScript.scriptRef.log('getServerOpenPortsCount() failed. Invalid IP or hostname passed in: ' + ip);
|
||||
return reject(makeRuntimeRejectMsg(workerScript, 'Invalid IP or hostname passed into getServerOpenPortsCount() command'));
|
||||
}
|
||||
var out = [];
|
||||
for (var i = 0; i < server.serversOnNetwork.length; i++) {
|
||||
var entry = server.getServerOnNetwork(i).hostname;
|
||||
if (entry == null) {
|
||||
continue;
|
||||
}
|
||||
out.push(entry);
|
||||
}
|
||||
workerScript.scriptRef.log('scan() returned ' + server.serversOnNetwork.length + ' connections for ' + server.hostname);
|
||||
resolve(out);
|
||||
}).catch(function(e) {
|
||||
reject(e);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Invalid function: " + exp.callee));
|
||||
}
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
function evalBinary(exp, workerScript){
|
||||
return new Promise(function(resolve, reject) {
|
||||
var expLeftPromise = evaluate(exp.left, workerScript);
|
||||
@ -329,17 +285,24 @@ function evalBinary(exp, workerScript){
|
||||
}
|
||||
|
||||
function evalUnary(exp, workerScript){
|
||||
var env = workerScript.env;
|
||||
return new Promise(function(resolve, reject) {
|
||||
var expLeftPromise = evaluate(exp.left, workerScript);
|
||||
expLeftPromise.then(function(expLeft) {
|
||||
switch(exp.operator){
|
||||
case "++":
|
||||
break
|
||||
case "--":
|
||||
break;
|
||||
if (env.stopFlag) {return reject(workerScript);}
|
||||
var p = evaluate(exp.argument, workerScript);
|
||||
p.then(function(res) {
|
||||
if (exp.operator == "!") {
|
||||
resolve(!res);
|
||||
} else if (exp.operator == "-") {
|
||||
if (isNaN(res)) {
|
||||
resolve(res);
|
||||
} else {
|
||||
resolve(-1 * res);
|
||||
}
|
||||
} else {
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Unimplemented unary operator: " + exp.operator));
|
||||
}
|
||||
}, function(e) {
|
||||
reject(e);
|
||||
}).catch(function(e) {
|
||||
reject(e);
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -534,113 +497,6 @@ function evaluateWhile(exp, workerScript) {
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
function evaluateHacknetNode(exp, workerScript) {
|
||||
console.log("here");
|
||||
var env = workerScript.env;
|
||||
return new Promise(function(resolve, reject) {
|
||||
setTimeout(function() {
|
||||
if (exp.index == null) {
|
||||
if ((exp.op.type == "call" && exp.op.func.value == "length") ||
|
||||
(exp.op.type == "var" && exp.op.value == "length")) {
|
||||
resolve(Player.hacknetNodes.length);
|
||||
workerScript.scriptRef.log("hacknetnodes.length returned " + Player.hacknetNodes.length);
|
||||
return;
|
||||
} else {
|
||||
workerScript.scriptRef.log("Invalid/null index for hacknetnodes");
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Invalid/null index. hacknetnodes array must be accessed with an index"));
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
var indexPromise = evaluate(exp.index.value, workerScript);
|
||||
indexPromise.then(function(index) {
|
||||
if (isNaN(index) || index >= Player.hacknetNodes.length || index < 0) {
|
||||
workerScript.scriptRef.log("Invalid index value for hacknetnodes[]");
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Invalid index value for hacknetnodes[]."));
|
||||
return;
|
||||
}
|
||||
var nodeObj = Player.hacknetNodes[index];
|
||||
if (exp.op == null) {
|
||||
reject(makeRuntimeRejectMsg(workerScript, "No operator or property called for hacknetnodes. Usage: hacknetnodes[i].property/operator"));
|
||||
return;
|
||||
} else if (exp.op.type == "var") {
|
||||
//Get properties: level, ram, cores
|
||||
switch(exp.op.value) {
|
||||
case "level":
|
||||
resolve(nodeObj.level);
|
||||
break;
|
||||
case "ram":
|
||||
resolve(nodeObj.ram);
|
||||
break;
|
||||
case "cores":
|
||||
resolve(nodeObj.numCores);
|
||||
break;
|
||||
default:
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Unrecognized property for Hacknet Node. Valid properties: ram, cores, level"));
|
||||
break;
|
||||
}
|
||||
|
||||
} else if (exp.op.type == "call") {
|
||||
switch(exp.op.func.value) {
|
||||
case "upgradeLevel":
|
||||
if (exp.op.args.length == 1) {
|
||||
var argPromise = evaluate(exp.op.args[0], workerScript);
|
||||
argPromise.then(function(arg) {
|
||||
if (isNaN(arg) || arg < 0) {
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Invalid argument passed into upgradeLevel()"));
|
||||
return;
|
||||
}
|
||||
arg = Math.round(arg);
|
||||
var res = nodeObj.purchaseLevelUpgrade(arg);
|
||||
if (res) {
|
||||
workerScript.scriptRef.log("Upgraded " + nodeObj.name + " " + arg + " times to level " + nodeObj.level);
|
||||
}
|
||||
resolve(res);
|
||||
}, function(e) {
|
||||
reject(e);
|
||||
});
|
||||
} else {
|
||||
var res = nodeObj.purchaseLevelUpgrade(1);
|
||||
if (res) {
|
||||
workerScript.scriptRef.log("Upgraded " + nodeObj.name + " once to level " + nodeObj.level);
|
||||
}
|
||||
resolve(res);
|
||||
}
|
||||
break;
|
||||
case "upgradeRam":
|
||||
var res = nodeObj.purchaseRamUpgrade();
|
||||
if (res) {
|
||||
workerScript.scriptRef.log("Upgraded " + nodeObj.name + "'s RAM to " + nodeObj.ram + "GB");
|
||||
}
|
||||
resolve(res);
|
||||
break;
|
||||
case "upgradeCore":
|
||||
var res = nodeObj.purchaseCoreUpgrade();
|
||||
if (res) {
|
||||
workerScript.scriptRef.log("Upgraded " + nodeObj.name + "'s number of cores to " + nodeObj.numCores);
|
||||
}
|
||||
resolve(res);
|
||||
break;
|
||||
default:
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Unrecognized function/operator for hacknet node. Valid functions: upgradeLevel(n), upgradeRam(), upgradeCore()"));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
reject(makeRuntimeRejectMsg(workerScript, "Unrecognized operation for hacknet node"));
|
||||
return;
|
||||
}
|
||||
}, function(e) {
|
||||
reject(e);
|
||||
});
|
||||
|
||||
}, CONSTANTS.CodeInstructionRunTime);
|
||||
}, function(e) {
|
||||
reject(e);
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
function evaluateProg(exp, workerScript, index) {
|
||||
var env = workerScript.env;
|
||||
|
||||
@ -791,7 +647,7 @@ function scriptCalculateExpGain(server) {
|
||||
if (server.baseDifficulty == null) {
|
||||
server.baseDifficulty = server.hackDifficulty;
|
||||
}
|
||||
return (server.baseDifficulty * Player.hacking_exp_mult * 0.4 + 2);
|
||||
return (server.baseDifficulty * Player.hacking_exp_mult * 0.3 + 2);
|
||||
}
|
||||
|
||||
//The same as Player's calculatePercentMoneyHacked() function but takes in the server as an argument
|
||||
|
@ -654,6 +654,12 @@ function NetscriptFunctions(workerScript) {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (Player.purchasedServers.length >= CONSTANTS.PurchasedServerLimit) {
|
||||
workerScript.scriptRef.log("Error: You have reached the maximum limit of " + CONSTANTS.PurchasedServerLimit +
|
||||
" servers. You cannot purchase any more.");
|
||||
return "";
|
||||
}
|
||||
|
||||
ram = Math.round(ram);
|
||||
if (isNaN(ram) || !powerOfTwo(ram)) {
|
||||
workerScript.scriptRef.log("Error: Invalid ram argument passed to purchaseServer(). Must be numeric and a power of 2");
|
||||
@ -677,6 +683,56 @@ function NetscriptFunctions(workerScript) {
|
||||
workerScript.scriptRef.log("Purchased new server with hostname " + newServ.hostname + " for $" + formatNumber(cost, 2));
|
||||
return newServ.hostname;
|
||||
},
|
||||
deleteServer : function(hostname) {
|
||||
var hostnameStr = String(hostname);
|
||||
hostnameStr = hostnameStr.replace(/\s\s+/g, '');
|
||||
var server = GetServerByHostname(hostnameStr);
|
||||
if (server == null) {
|
||||
workerScript.scriptRef.log("Error: Could not find server with hostname " + hostnameStr + ". deleteServer() failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!server.purchasedByPlayer) {
|
||||
workerScript.scriptRef.log("Error: Server " + server.hostname + " is not a purchased server. " +
|
||||
"Cannot be deleted. deleteSErver failed");
|
||||
return false;
|
||||
}
|
||||
var ip = server.ip;
|
||||
|
||||
//Delete from all servers
|
||||
delete AllServers[ip];
|
||||
|
||||
//Delete from player's purchasedServers array
|
||||
var found = false;
|
||||
for (var i = 0; i < Player.purchasedServers.length; ++i) {
|
||||
if (ip == Player.purchasedServers[i]) {
|
||||
found = true;
|
||||
Player.purchasedServers.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
workerScript.scriptRef.log("Error: Could not identify server " + server.hostname +
|
||||
"as a purchased server. This is likely a bug please contact game dev");
|
||||
return false;
|
||||
}
|
||||
|
||||
//Delete from home computer
|
||||
found = false;
|
||||
var homeComputer = Player.getHomeComputer();
|
||||
for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {
|
||||
if (ip == homeComputer.serversOnNetwork[i]) {
|
||||
homeComputer.serversOnNetwork.splice(i, 1);
|
||||
workerScript.scriptRef.log("Deleted server " + hostnameStr);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//Wasn't found on home computer
|
||||
workerScript.scriptRef.log("Error: Could not find server " + server.hostname +
|
||||
"as a purchased server. This is likely a bug please contact game dev");
|
||||
return false;
|
||||
},
|
||||
round : function(n) {
|
||||
if (isNaN(n)) {return 0;}
|
||||
return Math.round(n);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Worker code, contains Netscript scripts that are actually running */
|
||||
|
||||
//TODO Tested For and while and generic call statements. Have not tested if statements
|
||||
/* Worker code, contains Netscript scripts that are actually running */
|
||||
|
||||
//TODO Tested For and while and generic call statements. Have not tested if statements
|
||||
|
||||
/* Actual Worker Code */
|
||||
function WorkerScript(runningScriptObj) {
|
||||
@ -53,7 +53,7 @@ function runScriptsLoop() {
|
||||
workerScripts[i].env.stopFlag = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
workerScripts[i].running = true;
|
||||
var p = evaluate(ast, workerScripts[i]);
|
||||
//Once the code finishes (either resolved or rejected, doesnt matter), set its
|
||||
@ -79,9 +79,9 @@ function runScriptsLoop() {
|
||||
var serverIp = errorTextArray[1];
|
||||
var scriptName = errorTextArray[2];
|
||||
var errorMsg = errorTextArray[3];
|
||||
|
||||
dialogBoxCreate("Script runtime error: <br>Server Ip: " + serverIp +
|
||||
"<br>Script name: " + scriptName +
|
||||
|
||||
dialogBoxCreate("Script runtime error: <br>Server Ip: " + serverIp +
|
||||
"<br>Script name: " + scriptName +
|
||||
"<br>Args:" + printArray(w.args) + "<br>" + errorMsg);
|
||||
w.scriptRef.log("Script crashed with runtime error");
|
||||
} else {
|
||||
@ -89,7 +89,7 @@ function runScriptsLoop() {
|
||||
}
|
||||
w.running = false;
|
||||
w.env.stopFlag = true;
|
||||
|
||||
|
||||
} else if (isScriptErrorMessage(w)) {
|
||||
dialogBoxCreate("Script runtime unknown error. This is a bug please contact game developer");
|
||||
console.log("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN");
|
||||
@ -100,13 +100,13 @@ function runScriptsLoop() {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Delete any scripts that finished or have been killed. Loop backwards bc removing
|
||||
//items fucks up the indexing
|
||||
for (var i = workerScripts.length - 1; i >= 0; i--) {
|
||||
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == true) {
|
||||
console.log("Deleting script: " + workerScripts[i].name);
|
||||
//Delete script from the runningScripts array on its host serverIp
|
||||
//Delete script from the runningScripts array on its host serverIp
|
||||
var ip = workerScripts[i].serverIp;
|
||||
var name = workerScripts[i].name;
|
||||
for (var j = 0; j < AllServers[ip].runningScripts.length; j++) {
|
||||
@ -116,18 +116,18 @@ function runScriptsLoop() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Free RAM
|
||||
AllServers[ip].ramUsed -= workerScripts[i].ramUsage;
|
||||
|
||||
|
||||
//Delete script from Active Scripts
|
||||
deleteActiveScriptsItem(workerScripts[i]);
|
||||
|
||||
|
||||
//Delete script from workerScripts
|
||||
workerScripts.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setTimeout(runScriptsLoop, 10000);
|
||||
}
|
||||
|
||||
@ -145,10 +145,10 @@ function killWorkerScript(runningScriptObj, serverIp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Queues a script to be run
|
||||
//Queues a script to be run
|
||||
function addWorkerScript(runningScriptObj, server) {
|
||||
var filename = runningScriptObj.filename;
|
||||
|
||||
|
||||
//Update server's ram usage
|
||||
var threads = 1;
|
||||
if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {
|
||||
@ -156,18 +156,18 @@ function addWorkerScript(runningScriptObj, server) {
|
||||
} else {
|
||||
runningScriptObj.threads = 1;
|
||||
}
|
||||
var ramUsage = runningScriptObj.scriptRef.ramUsage * threads
|
||||
var ramUsage = runningScriptObj.scriptRef.ramUsage * threads
|
||||
* Math.pow(CONSTANTS.MultithreadingRAMCost, threads-1);
|
||||
server.ramUsed += ramUsage;
|
||||
|
||||
|
||||
//Create the WorkerScript
|
||||
var s = new WorkerScript(runningScriptObj);
|
||||
s.serverIp = server.ip;
|
||||
s.ramUsage = ramUsage;
|
||||
|
||||
|
||||
//Add the WorkerScript to the Active Scripts list
|
||||
addActiveScriptsItem(s);
|
||||
|
||||
|
||||
//Add the WorkerScript
|
||||
workerScripts.push(s);
|
||||
return;
|
||||
@ -181,4 +181,4 @@ function updateOnlineScriptTimes(numCycles = 1) {
|
||||
}
|
||||
}
|
||||
|
||||
runScriptsLoop();
|
||||
runScriptsLoop();
|
||||
|
518
src/Player.js
518
src/Player.js
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@ function prestigeAugmentation() {
|
||||
Player.lifetime_agility += Player.agility;
|
||||
Player.total_charisma += Player.charisma;
|
||||
Player.lifetime_charisma += Player.charisma;
|
||||
|
||||
|
||||
//Crime statistics
|
||||
Player.numTimesShopliftedTotal += Player.numTimesShoplifted;
|
||||
Player.numTimesShopliftedLifetime += Player.numTimesShoplifted;
|
||||
@ -41,52 +41,53 @@ function prestigeAugmentation() {
|
||||
Player.numTimesHeistTotal += Player.numTimesHeist;
|
||||
Player.numTimesHeistLifetime += Player.numTimesHeist;
|
||||
Player.numTimesHeist = 0;
|
||||
|
||||
|
||||
Player.karma = 0;
|
||||
|
||||
|
||||
//Reset stats
|
||||
Player.hacking_skill = 1;
|
||||
|
||||
|
||||
Player.strength = 1;
|
||||
Player.defense = 1;
|
||||
Player.dexterity = 1;
|
||||
Player.agility = 1;
|
||||
|
||||
|
||||
Player.charisma = 1;
|
||||
|
||||
|
||||
Player.hacking_exp = 0;
|
||||
Player.strength_exp = 0;
|
||||
Player.defense_exp = 0;
|
||||
Player.dexterity_exp = 0;
|
||||
Player.agility_exp = 0;
|
||||
Player.charisma_exp = 0;
|
||||
|
||||
|
||||
Player.money = 1000;
|
||||
|
||||
|
||||
Player.city = Locations.Sector12;
|
||||
Player.location = "";
|
||||
|
||||
|
||||
Player.companyName = "";
|
||||
Player.companyPosition = "";
|
||||
|
||||
|
||||
Player.currentServer = "";
|
||||
Player.discoveredServers = [];
|
||||
Player.purchasedServers = [];
|
||||
|
||||
|
||||
Player.factions = [];
|
||||
|
||||
Player.factionInvitations = [];
|
||||
|
||||
Player.queuedAugmentations = [];
|
||||
|
||||
|
||||
Player.startAction = false;
|
||||
Player.actionTime = 0;
|
||||
|
||||
|
||||
Player.isWorking = false;
|
||||
Player.currentWorkFactionName = "";
|
||||
Player.currentWorkFactionDescription = "";
|
||||
this.createProgramName = "";
|
||||
this.className = "";
|
||||
this.crimeType = "";
|
||||
|
||||
|
||||
Player.workHackExpGainRate = 0;
|
||||
Player.workStrExpGainRate = 0;
|
||||
Player.workDefExpGainRate = 0;
|
||||
@ -95,7 +96,7 @@ function prestigeAugmentation() {
|
||||
Player.workChaExpGainRate = 0;
|
||||
Player.workRepGainRate = 0;
|
||||
Player.workMoneyGainRate = 0;
|
||||
|
||||
|
||||
Player.workHackExpGained = 0;
|
||||
Player.workStrExpGained = 0;
|
||||
Player.workDefExpGained = 0;
|
||||
@ -104,18 +105,18 @@ function prestigeAugmentation() {
|
||||
Player.workChaExpGained = 0;
|
||||
Player.workRepGained = 0;
|
||||
Player.workMoneyGained = 0;
|
||||
|
||||
|
||||
Player.timeWorked = 0;
|
||||
|
||||
|
||||
Player.lastUpdate = new Date().getTime();
|
||||
|
||||
|
||||
//Delete all Worker Scripts objects
|
||||
for (var i = 0; i < workerScripts.length; ++i) {
|
||||
deleteActiveScriptsItem(workerScripts[i]);
|
||||
workerScripts[i].env.stopFlag = true;
|
||||
}
|
||||
workerScripts.length = 0;
|
||||
|
||||
|
||||
var homeComp = Player.getHomeComputer();
|
||||
//Delete all servers except home computer
|
||||
for (var member in AllServers) {
|
||||
@ -127,7 +128,7 @@ function prestigeAugmentation() {
|
||||
delete SpecialServerIps[member];
|
||||
}
|
||||
SpecialServersIps = null;
|
||||
|
||||
|
||||
//Reset home computer (only the programs) and add to AllServers
|
||||
homeComp.programs.length = 0;
|
||||
homeComp.runningScripts = [];
|
||||
@ -136,12 +137,12 @@ function prestigeAugmentation() {
|
||||
homeComp.isOnline = true;
|
||||
homeComp.ramUsed = 0;
|
||||
homeComp.programs.push(Programs.NukeProgram);
|
||||
if (augmentationExists(AugmentationNames.Neurolink) &&
|
||||
if (augmentationExists(AugmentationNames.Neurolink) &&
|
||||
Augmentations[AugmentationNames.Neurolink].owned) {
|
||||
homeComp.programs.push(Programs.FTPCrackProgram);
|
||||
homeComp.programs.push(Programs.RelaySMTPProgram);
|
||||
}
|
||||
if (augmentationExists(AugmentationNames.CashRoot) &&
|
||||
}
|
||||
if (augmentationExists(AugmentationNames.CashRoot) &&
|
||||
Augmentations[AugmentationNames.CashRoot].owned) {
|
||||
Player.money = 1000000;
|
||||
homeComp.programs.push(Programs.BruteSSHProgram);
|
||||
@ -149,57 +150,57 @@ function prestigeAugmentation() {
|
||||
Player.currentServer = homeComp.ip;
|
||||
Player.homeComputer = homeComp.ip;
|
||||
AddToAllServers(homeComp);
|
||||
|
||||
|
||||
//Re-create foreign servers
|
||||
SpecialServerIps = new SpecialServerIpsMap(); //Must be done before initForeignServers()
|
||||
initForeignServers();
|
||||
|
||||
|
||||
//Darkweb is purchase-able
|
||||
document.getElementById("location-purchase-tor").setAttribute("class", "a-link-button");
|
||||
|
||||
|
||||
//Reset statistics of all scripts on home computer
|
||||
for (var i = 0; i < homeComp.scripts.length; ++i) {
|
||||
var s = homeComp.scripts[i];
|
||||
}
|
||||
//Delete messages on home computer
|
||||
homeComp.messages.length = 0;
|
||||
|
||||
|
||||
//Delete Hacknet Nodes
|
||||
Player.hacknetNodes.length = 0;
|
||||
Player.totalHacknetNodeProduction = 0;
|
||||
|
||||
|
||||
//Gain favor for Companies
|
||||
for (var member in Companies) {
|
||||
if (Companies.hasOwnProperty(member)) {
|
||||
Companies[member].gainFavor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Gain favor for factions
|
||||
for (var member in Factions) {
|
||||
if (Factions.hasOwnProperty(member)) {
|
||||
Factions[member].gainFavor();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Stop a Terminal action if there is onerror
|
||||
if (Engine._actionInProgress) {
|
||||
Engine._actionInProgress = false;
|
||||
Terminal.finishAction(true);
|
||||
}
|
||||
|
||||
//Re-initialize things - This will update any changes
|
||||
|
||||
//Re-initialize things - This will update any changes
|
||||
initFactions(); //Factions must be initialized before augmentations
|
||||
initAugmentations();
|
||||
initCompanies();
|
||||
|
||||
|
||||
//Clear terminal
|
||||
$("#terminal tr:not(:last)").remove();
|
||||
postNetburnerText();
|
||||
|
||||
|
||||
//Messages
|
||||
initMessages();
|
||||
|
||||
|
||||
//Reset Stock market
|
||||
if (Player.hasWseAccount) {
|
||||
initStockMarket();
|
||||
@ -210,13 +211,13 @@ function prestigeAugmentation() {
|
||||
stockMarketList.removeChild(stockMarketList.firstChild);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Player.playtimeSinceLastAug = 0;
|
||||
|
||||
|
||||
var mainMenu = document.getElementById("mainmenu-container");
|
||||
mainMenu.style.visibility = "visible";
|
||||
Engine.loadTerminalContent();
|
||||
|
||||
|
||||
//Red Pill
|
||||
if (augmentationExists(AugmentationNames.TheRedPill) &&
|
||||
Augmentations[AugmentationNames.TheRedPill].owned) {
|
||||
@ -227,4 +228,4 @@ function prestigeAugmentation() {
|
||||
DaedalusServer.serversOnNetwork.push(WorldDaemon.ip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -173,6 +173,8 @@ function calculateRamUsage(codeCopy) {
|
||||
var getServerSecurityCount = numOccurrences(codeCopy, "getServerSecurityLevel(");
|
||||
var getServerBaseSecurityCount = numOccurrences(codeCopy, "getServerBaseSecurityLevel(");
|
||||
var getServerReqdHackingCount = numOccurrences(codeCopy, "getServerRequiredHackingLevel(");
|
||||
var getServerNumPortsReqdCount = numOccurrences(codeCopy, "getServerNumPortsRequired(");
|
||||
var getServerRamCount = numOccurrences(codeCopy, "getServerRam(");
|
||||
var fileExistsCount = numOccurrences(codeCopy, "fileExists(");
|
||||
var isRunningCount = numOccurrences(codeCopy, "isRunning(");
|
||||
var numOperators = numNetscriptOperators(codeCopy);
|
||||
@ -185,7 +187,8 @@ function calculateRamUsage(codeCopy) {
|
||||
numOccurrences(codeCopy, "getStockPosition(");
|
||||
var scriptBuySellStockCount = numOccurrences(codeCopy, "buyStock(") +
|
||||
numOccurrences(codeCopy, "sellStock(");
|
||||
var scriptPurchaseServerCount = numOccurrences(codeCopy, "purchaseServer(");
|
||||
var scriptPurchaseServerCount = numOccurrences(codeCopy, "purchaseServer(") +
|
||||
numOccurrences(codeCopy, "deleteServer(");
|
||||
var scriptRoundCount = numOccurrences(codeCopy, "round(");
|
||||
var scriptWriteCount = numOccurrences(codeCopy, "write(");
|
||||
var scriptReadCount = numOccurrences(codeCopy, "read(");
|
||||
@ -210,11 +213,13 @@ function calculateRamUsage(codeCopy) {
|
||||
(hasRootAccessCount * CONSTANTS.ScriptHasRootAccessRamCost) +
|
||||
(getHostnameCount * CONSTANTS.ScriptGetHostnameRamCost) +
|
||||
(getHackingLevelCount * CONSTANTS.ScriptGetHackingLevelRamCost) +
|
||||
(getServerMoneyAvailableCount * CONSTANTS.ScriptGetServerMoneyRamCost) +
|
||||
(getServerMaxMoneyCount * CONSTANTS.ScriptGetServerMoneyRamCost) +
|
||||
(getServerSecurityCount * CONSTANTS.ScriptGetServerSecurityRamCost) +
|
||||
(getServerBaseSecurityCount * CONSTANTS.ScriptGetServerSecurityRamCost) +
|
||||
(getServerReqdHackingCount * CONSTANTS.ScriptGetServerReqdHackRamCost) +
|
||||
(getServerMoneyAvailableCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(getServerMaxMoneyCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(getServerSecurityCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(getServerBaseSecurityCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(getServerReqdHackingCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(getServerNumPortsReqdCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(getServerRamCount * CONSTANTS.ScriptGetServerCost) +
|
||||
(fileExistsCount * CONSTANTS.ScriptFileExistsRamCost) +
|
||||
(isRunningCount * CONSTANTS.ScriptIsRunningRamCost) +
|
||||
(numOperators * CONSTANTS.ScriptOperatorRamCost) +
|
||||
|
326
src/Server.js
326
src/Server.js
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,15 @@ purchaseServer = function(ram, cost) {
|
||||
dialogBoxCreate("You don't have enough money to purchase this server!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Maximum of 30 servers
|
||||
if (Player.purchasedServers.length >= CONSTANTS.PurchasedServerLimit) {
|
||||
dialogBoxCreate("You have reached the maximum limit of " + 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;
|
||||
}
|
||||
|
||||
var newServ = new Server();
|
||||
var hostname = document.getElementById("purchase-server-box-input").value;
|
||||
hostname = hostname.replace(/\s\s+/g, '');
|
||||
@ -16,21 +24,21 @@ purchaseServer = function(ram, cost) {
|
||||
dialogBoxCreate("You must enter a hostname for your new server!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Create server
|
||||
newServ.init(createRandomIp(), hostname, "", true, false, true, true, ram);
|
||||
AddToAllServers(newServ);
|
||||
|
||||
|
||||
//Add to Player's purchasedServers array
|
||||
Player.purchasedServers.push(newServ.ip);
|
||||
|
||||
|
||||
//Connect new server to home computer
|
||||
var homeComputer = Player.getHomeComputer();
|
||||
homeComputer.serversOnNetwork.push(newServ.ip);
|
||||
newServ.serversOnNetwork.push(homeComputer.ip);
|
||||
|
||||
Player.loseMoney(cost);
|
||||
|
||||
|
||||
Player.loseMoney(cost);
|
||||
|
||||
dialogBoxCreate("Server successfully purchased with hostname " + hostname);
|
||||
}
|
||||
|
||||
@ -40,11 +48,11 @@ purchaseRamForHomeComputer = function(cost) {
|
||||
dialogBoxCreate("You do not have enough money to purchase additional RAM for your home computer");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var homeComputer = Player.getHomeComputer();
|
||||
homeComputer.maxRam *= 2;
|
||||
|
||||
Player.loseMoney(cost);
|
||||
|
||||
|
||||
Player.loseMoney(cost);
|
||||
|
||||
dialogBoxCreate("Purchased additional RAM for home computer! It now has " + homeComputer.maxRam + "GB of RAM.");
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,18 @@
|
||||
/* Settings.js */
|
||||
Settings = {
|
||||
CodeInstructionRunTime: 100,
|
||||
suppressMessages: false,
|
||||
MaxLogCapacity: 50,
|
||||
MaxPortCapacity: 50,
|
||||
SuppressMessages: false,
|
||||
SuppressFactionInvites: false,
|
||||
}
|
||||
|
||||
function initSettings() {
|
||||
Settings.CodeInstructionRunTime = 100;
|
||||
Settings.suppressMessages = false;
|
||||
Settings.MaxLogCapacity = 50;
|
||||
Settings.MaxPortCapacity = 50;
|
||||
Settings.SuppressMessages = false;
|
||||
Settings.SuppressFactionInvites = false;
|
||||
}
|
||||
|
||||
function setSettingsLabels() {
|
||||
@ -20,4 +22,8 @@ function setSettingsLabels() {
|
||||
= Settings.MaxLogCapacity;
|
||||
document.getElementById("settingsNSPortRangeValLabel").innerHTML
|
||||
= Settings.MaxPortCapacity;
|
||||
document.getElementById("settingsSuppressMessages").checked
|
||||
= Settings.SuppressMessages;
|
||||
document.getElementById("settingsSuppressFactionInvites").checked
|
||||
= Settings.SuppressFactionInvites;
|
||||
}
|
||||
|
@ -175,7 +175,9 @@ function tabCompletion(command, arg, allPossibilities, index=0) {
|
||||
if (!(allPossibilities.constructor === Array)) {return;}
|
||||
if (!containsAllStrings(allPossibilities)) {return;}
|
||||
|
||||
command = command.toLowerCase();
|
||||
if (!command.startsWith("./")) {
|
||||
command = command.toLowerCase();
|
||||
}
|
||||
|
||||
//Remove all options in allPossibilities that do not match the current string
|
||||
//that we are attempting to autocomplete
|
||||
@ -243,6 +245,23 @@ function determineAllPossibilitiesForTabCompletion(input, index=0) {
|
||||
var currServ = Player.getCurrentServer();
|
||||
input = input.toLowerCase();
|
||||
|
||||
//If the command starts with './' and the index == -1, then the user
|
||||
//has input ./partialexecutablename so autocomplete the script or program
|
||||
//Put './' in front of each script/executable
|
||||
if (input.startsWith("./") && index == -1) {
|
||||
//All programs and scripts
|
||||
for (var i = 0; i < currServ.scripts.length; ++i) {
|
||||
allPos.push("./" + currServ.scripts[i].filename);
|
||||
}
|
||||
|
||||
//Programs are on home computer
|
||||
var homeComputer = Player.getHomeComputer();
|
||||
for(var i = 0; i < homeComputer.programs.length; ++i) {
|
||||
allPos.push("./" + homeComputer.programs[i]);
|
||||
}
|
||||
return allPos;
|
||||
}
|
||||
|
||||
//Autocomplete the command
|
||||
if (index == -1) {
|
||||
return ["alias", "analyze", "cat", "check", "clear", "cls", "connect", "free",
|
||||
@ -447,7 +466,7 @@ var Terminal = {
|
||||
|
||||
//Allow usage of ./
|
||||
if (command.startsWith("./")) {
|
||||
command = command.slice(0, 2) + " " + command.slice(2);
|
||||
command = "run " + command.slice(2);
|
||||
}
|
||||
|
||||
//Only split the first space
|
||||
@ -895,7 +914,6 @@ var Terminal = {
|
||||
post("No such file exists");
|
||||
break;
|
||||
case "run":
|
||||
case "./":
|
||||
//Run a program or a script
|
||||
if (commandArray.length != 2) {
|
||||
post("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");
|
||||
|
@ -485,9 +485,8 @@ var Engine = {
|
||||
},
|
||||
|
||||
displayFactionsInfo: function() {
|
||||
//Clear the list of joined factions
|
||||
var factionsList = document.getElementById("factions-list");
|
||||
|
||||
//Clear the list
|
||||
while (factionsList.firstChild) {
|
||||
factionsList.removeChild(factionsList.firstChild);
|
||||
}
|
||||
@ -500,7 +499,6 @@ var Engine = {
|
||||
//Add the faction to the Factions page content
|
||||
var item = document.createElement("li");
|
||||
var aElem = document.createElement("a");
|
||||
aElem.setAttribute("href", "#");
|
||||
aElem.setAttribute("class", "a-link-button");
|
||||
aElem.innerHTML = factionName;
|
||||
aElem.addEventListener("click", function() {
|
||||
@ -509,10 +507,54 @@ var Engine = {
|
||||
return false;
|
||||
});
|
||||
item.appendChild(aElem);
|
||||
|
||||
factionsList.appendChild(item);
|
||||
}()); //Immediate invocation
|
||||
}
|
||||
|
||||
//Clear the list of invitations
|
||||
var invitationsList = document.getElementById("outstanding-faction-invitations-list");
|
||||
while (invitationsList.firstChild) {
|
||||
invitationsList.removeChild(invitationsList.firstChild);
|
||||
}
|
||||
|
||||
//Add a link to accept for each faction you have invitiations for
|
||||
for (var i = 0; i < Player.factionInvitations.length; ++i) {
|
||||
(function () {
|
||||
var factionName = Player.factionInvitations[i];
|
||||
|
||||
var item = document.createElement("li");
|
||||
|
||||
var pElem = document.createElement("p");
|
||||
pElem.innerText = factionName;
|
||||
pElem.style.display = "inline";
|
||||
pElem.style.margin = "4px";
|
||||
pElem.style.padding = "4px";
|
||||
|
||||
var aElem = document.createElement("a");
|
||||
aElem.innerText = "Accept Faction Invitation";
|
||||
aElem.setAttribute("class", "a-link-button");
|
||||
aElem.style.display = "inline";
|
||||
aElem.style.margin = "4px";
|
||||
aElem.style.padding = "4px";
|
||||
aElem.addEventListener("click", function() {
|
||||
joinFaction(Factions[factionName]);
|
||||
for (var i = 0; i < Player.factionInvitations.length; ++i) {
|
||||
if (Player.factionInvitations[i] == factionName) {
|
||||
Player.factionInvitations.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Engine.displayFactionsInfo();
|
||||
return false;
|
||||
});
|
||||
|
||||
item.appendChild(pElem);
|
||||
item.appendChild(aElem);
|
||||
item.style.margin = "6px";
|
||||
item.style.padding = "6px";
|
||||
invitationsList.appendChild(item);
|
||||
}());
|
||||
}
|
||||
},
|
||||
|
||||
displayAugmentationsContent: function() {
|
||||
@ -693,7 +735,7 @@ var Engine = {
|
||||
updateSkillLevelsCounter: 10, //Only update skill levels every 2 seconds. Might improve performance
|
||||
updateDisplays: 3, //Update displays such as Active Scripts display and character display
|
||||
createProgramNotifications: 10, //Checks whether any programs can be created and notifies
|
||||
checkFactionInvitations: 100, //Check whether you qualify for any faction invitations every 5 minutes
|
||||
checkFactionInvitations: 100, //Check whether you qualify for any faction invitations
|
||||
passiveFactionGrowth: 600,
|
||||
messages: 150,
|
||||
stockTick: 30, //Update stock prices
|
||||
|
@ -23,20 +23,21 @@ factionInvitationSetMessage = function(msg) {
|
||||
factionInvitationBoxCreate = function(faction) {
|
||||
factionInvitationSetText("You have received a faction invitation from " + faction.name);
|
||||
//TODO Faction invitation message
|
||||
|
||||
|
||||
var newYesButton = clearEventListeners("faction-invitation-box-yes");
|
||||
newYesButton.addEventListener("click", function() {
|
||||
joinFaction(faction);
|
||||
factionInvitationBoxClose();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
var noButton = clearEventListeners("faction-invitation-box-no");
|
||||
noButton.addEventListener("click", function() {
|
||||
factionInvitationBoxClose();
|
||||
faction.alreadyInvited = true;
|
||||
Player.factionInvitations.push(faction.name);
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
factionInvitationBoxOpen();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user