Merge pull request #31 from danielyxie/dev

Dev v0.17.7
This commit is contained in:
danielyxie 2017-05-30 16:33:31 -05:00 committed by GitHub
commit 8deba3b341
4 changed files with 5 additions and 5 deletions

@ -1,5 +1,5 @@
CONSTANTS = {
Version: "0.17.6",
Version: "0.17.7",
//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

@ -49,8 +49,8 @@ HacknetNode.prototype.updateMoneyGainRate = function() {
var gainPerLevel = CONSTANTS.HacknetNodeMoneyGainPerLevel;
this.moneyGainRatePerSecond = (this.level * gainPerLevel) *
Math.pow(1.04, this.ram-1) *
((this.numCores + 3) / 4) * Player.hacknet_node_money_mult;
Math.pow(1.039, this.ram-1) *
((this.numCores + 2.9) / 4) * Player.hacknet_node_money_mult;
if (isNaN(this.moneyGainRatePerSecond)) {
this.moneyGainRatePerSecond = 0;
dialogBoxCreate("Error in calculating Hacknet Node production. Please report to game developer");

@ -1266,7 +1266,7 @@ function scriptCalculateExpGain(server) {
function scriptCalculatePercentMoneyHacked(server) {
var difficultyMult = (100 - server.hackDifficulty) / 100;
var skillMult = (Player.hacking_skill - (server.requiredHackingSkill - 1)) / Player.hacking_skill;
var percentMoneyHacked = difficultyMult * skillMult * Player.hacking_money_mult / 700;
var percentMoneyHacked = difficultyMult * skillMult * Player.hacking_money_mult / 425;
if (percentMoneyHacked < 0) {return 0;}
if (percentMoneyHacked > 1) {return 1;}
return percentMoneyHacked;

@ -243,7 +243,7 @@ PlayerObject.prototype.calculateHackingTime = function() {
PlayerObject.prototype.calculatePercentMoneyHacked = function() {
var difficultyMult = (100 - this.getCurrentServer().hackDifficulty) / 100;
var skillMult = (this.hacking_skill - (this.getCurrentServer().requiredHackingSkill - 1)) / this.hacking_skill;
var percentMoneyHacked = difficultyMult * skillMult * this.hacking_money_mult / 700;
var percentMoneyHacked = difficultyMult * skillMult * this.hacking_money_mult / 425;
console.log("Percent money hacked calculated to be: " + percentMoneyHacked);
if (percentMoneyHacked < 0) {return 0;}
if (percentMoneyHacked > 1) {return 1;}