Finished initializing new servers (johnson ortho and newerth police). Finished init functions for Company class, and began declaring all possible companies.

This commit is contained in:
Daniel Xie 2016-11-01 16:19:57 -05:00
parent 6e0644555c
commit 8530e51628
3 changed files with 87 additions and 8 deletions

@ -5,15 +5,86 @@ function Company() {
//Player-related properties for company
this.isPlayerEmployed = false;
this.playerPosition = false;
this.playerPosition = null;
this.playerReputation = 0; //"Reputation" within company, gain reputation by working for company
};
function CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi) {
Company.prototype.init(name) {
this.companyName = name;
}
Company.prototype.addPosition(pos) {
this.companyPositions.push(pos);
}
//Object that defines a position within a Company and its requirements
function CompanyPosition(name, reqHack, reqStr, reqDef, reqDex, reqAgi, reqRep, salary) {
this.positionName = name;
this.requiredHacking = reqHack;
this.requiredStrength = reqStr;
this.requiredDefense = reqDef;
this.requiredDexterity = reqDex;
this.requiredAgility = reqAgi;
this.requiredReputation = reqRep;
this.salary salary; //TODO determine interval. Every 10 minutes?
};
Companies = {
/* Companies that also have servers */
//Megacorporations
ECorp: new Company(),
MegaCorp: new Company(),
BachmanAndAssociates: new Company(),
BladeIndustries: new Company(),
NWO: new Company(),
ClarkeIncorporated: new Company(),
OmniTekIncorporated: new Company(),
FourSigma: new Company(),
KuaiGongInternational: new Company(),
//Technology and communication companies ("Large" servers)
FulcrumTechnologies: new Company(),
StormTechnologies: new Company(),
DefComm: new Company(),
HeliosLabs: new Company(),
VitaLife: new Company(),
IcarusMicrosystems: new Company(),
UniversalEnergy: new Company(),
MicrodyneTechnologies: new Company(),
GalacticCybersystems: new Company(),
//Defense Companies ("Large" Companies)
AeroCorp: new Company(),
OmniaCybersystems: new Company(),
SolarisSpaceSystems: new Company(),
DeltaOne: new Company(),
//Health, medicine, pharmaceutical companies ("Large" servers)
GlobalPharmaceuticals: new Company(),
NovaMedical: new Company(),
//"Medium level" servers
LexoCorp: new Company(),
RhoConstruction: new Company(),
AlphaEnterprises: new Company(),
NewerthPolice: new Company(),
SysCoreSecurities: new Company(),
CatalystVentures: new Company(),
CompuTek: new Company(),
NetLinkTechnologies: new Company(),
//"Low level" servers
FoodNStuff: new Company(),
JoesGuns: new Company(),
HaraKiriSushiBar: new Company(),
MaxHardware: new Company(),
OmegaSoftware: new Company(),
/* Companies that do not have servers */
NoodleBar: new Company(),
init: function() {
}
}

@ -74,10 +74,10 @@ var Player = {
}
},
//Calculates hacking skill based on experience
//Calculates skill level based on experience. The same formula will be used for every skill
// At the maximum possible exp (MAX_INT = 9007199254740991), the hacking skill will by 1796
// Gets to level 1000 hacking skill at ~1,100,000,000 exp
calculateHackingSkill: function(exp) {
calculateSkill: function(exp) {
return Math.max(Math.floor(50 * log(9007199254740991+ 2.270) - 40), 1);
},

@ -136,7 +136,7 @@ ForeignServers = {
LexoCorp: new Server(), //Group6
RhoConstruction: new Server(), //Group6
AlphaEnterprises: new Server(), //Group6
NewerthPolice: new Server(), //Group6 //NEW
NewerthPolice: new Server(), //Group6
RothmanUniversity: new Server(), //Group5
ZBInstituteOfTechnology: new Server(), //Group5
SummitUniversity: new Server(), //Group5
@ -145,7 +145,7 @@ ForeignServers = {
TheHub: new Server(), //Group4
CompuTek: new Server(), //Group4
NetLinkTechnologies: new Server(), //Group4
JohnsonOrthopedics: new Server(), //Group4 //nEW
JohnsonOrthopedics: new Server(), //Group4
//"Low level" targets
FoodNStuff: new Server(), //Group1
@ -315,6 +315,10 @@ ForeignServers = {
ForeignServers.AlphaEnterprises.setHackingParameters(550, 800000000, 60, 55);
ForeignServers.AlphaEnterprises.setPortProperties(4);
ForeignServers.NewerthPolice.init(createRandomIp(), "newerth-police", "Newerth Police Network", true, false, false, false, 160);
ForeignServers.NewerthPolice.setHackingParameters(425, 100000000, 75, 40);
ForeignServers.NewerthPolice.setPortProperties(4);
ForeignServers.RothmanUniversity.init(createRandomIp(), "rothman-uni", "Rothman University Network", true, false, false, false, 160);
ForeignServers.RothmanUniversity.setHackingParameters(400, 250000000, 50, 40);
ForeignServers.RothmanUniversity.setPortProperties(3);
@ -347,6 +351,10 @@ ForeignServers = {
ForeignServers.NetLinkTechnologies.setHackingParameters(400, 350000000, 70, 60);
ForeignServers.NetLinkTechnologies.setPortProperties(3);
ForeignServers.JohnsonOrthopedics.init(createRandomIp(), "johnson-ortho", "Johnson Orthopedics", true, false, false, false, 128);
ForeignServers.JohnsonOrthopedics.setHackingParameters(275, 100000000, 50, 50);
ForeignServers.JohnsonOrthopedics.setPortProperties(2);
//"Low level" targets
ForeignServers.FoodNStuff.init(createRandomIp(), "foodnstuff", "Food N Stuff Supermarket", true, false, false, false, 8);
ForeignServers.FoodNStuff.setHackingParameters(1, 1000000, 10, 20);
@ -429,9 +437,9 @@ ForeignServers = {
var NetworkGroup1 = [ForeignServers.IronGym, ForeignServers.FoodNStuff, ForeignServers.SigmaCosmetics, ForeignServers.JoesGuns, ForeignServers.HongFangTeaHouse, ForeignServers.HaraKiriSushiBar];
var NetworkGroup2 = [ForeignServers.MaxHardware, ForeignServers.NectarNightclub, ForeignServers.Zer0Nightclub];
var NetworkGroup3 = [ForeignServers.OmegaSoftware, ForeignServers.Phantasy, ForeignServers.SilverHelix, ForeignServers.NeoNightclub];
var NetworkGroup4 = [ForeignServers.CrushFitnessGym, ForeignServers.NetLinkTechnologies, ForeignServers.CompuTek, ForeignServers.TheHub];
var NetworkGroup4 = [ForeignServers.CrushFitnessGym, ForeignServers.NetLinkTechnologies, ForeignServers.CompuTek, ForeignServers.TheHub, ForeignServers.JohnsonOrthopedics];
var NetworkGroup5 = [ForeignServers.CatalystVentures, ForeignServers.SysCoreSecurities, ForeignServers.SummitUniversity, ForeignServers.ZBInstituteOfTechnology, ForeignServers.RothmanUniversity];
var NetworkGroup6 = [ForeignServers.LexoCorp, ForeignServers.RhoConstruction, ForeignServers.AlphaEnterprises, ForeignServers.MilleniumFitnessGym];
var NetworkGroup6 = [ForeignServers.LexoCorp, ForeignServers.RhoConstruction, ForeignServers.AlphaEnterprises, ForeignServers.NewerthPolice, ForeignServers.MilleniumFitnessGym];
var NetworkGroup7 = [ForeignServers.GlobalPharmaceuticals, ForeignServers.AeroCorp, ForeignServers.GalacticCybersystems, ForeignServers.SnapFitnessGym];
var NetworkGroup8 = [ForeignServers.DeltaOne, ForeignServers.UnitaLifeGroup, ForeignServers.OmniaCybersystems];
var NetworkGroup9 = [ForeignServers.ZeusMedical, ForeignServers.SolarisSpaceSystems, ForeignServers.UniversalEnergy, ForeignServers.IcarusMicrosystems, ForeignServers.DefComm];