work on the dev menu

This commit is contained in:
Olivier Gagnon
2018-06-12 15:27:37 -04:00
parent 2e3254877f
commit bc14a6a147
4 changed files with 133 additions and 8 deletions
+8
View File
@@ -413,6 +413,14 @@ PlayerObject.prototype.getUpgradeHomeRamCost = function() {
return cost;
}
PlayerObject.prototype.receiveInvite = function(factionName) {
if(this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {
return;
}
this.firstFacInvRecvd = true;
this.factionInvitations.push(factionName);
}
//Calculates skill level based on experience. The same formula will be used for every skill
PlayerObject.prototype.calculateSkill = function(exp) {
return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);