Slightly buffed amount of money gained from hacking. Slightly increased cost for Hacknet Node upgrades

This commit is contained in:
Daniel Xie 2017-05-23 08:54:48 -05:00
parent f325aeb897
commit 99e7af48a3
3 changed files with 5 additions and 4 deletions

@ -21,8 +21,8 @@ CONSTANTS = {
HacknetNodeMoneyGainPerLevel: 1.25,
HacknetNodePurchaseNextMult: 1.33, //Multiplier when purchasing an additional hacknet node
HacknetNodeUpgradeLevelMult: 1.04, //Multiplier for cost when upgrading level
HacknetNodeUpgradeRamMult: 1.22, //Multiplier for cost when upgrading RAM
HacknetNodeUpgradeCoreMult: 1.42, //Multiplier for cost when buying another core
HacknetNodeUpgradeRamMult: 1.23, //Multiplier for cost when upgrading RAM
HacknetNodeUpgradeCoreMult: 1.43, //Multiplier for cost when buying another core
HacknetNodeMaxLevel: 200,
HacknetNodeMaxRam: 64,

@ -375,6 +375,7 @@ function evaluate(exp, workerScript) {
var p = new Promise(function(resolve, reject) {
if (env.stopFlag) {reject(workerScript);}
setTimeout(function() {
server.moneyAvailable += 1; //It can be grown even if it has no money
var growthPercentage = processSingleServerGrowth(server, 450);
resolve(growthPercentage);
}, 120 * 1000); //grow() takes flat 2 minutes right now
@ -1092,7 +1093,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 / 1000;
var percentMoneyHacked = difficultyMult * skillMult * Player.hacking_money_mult / 950;
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 / 1000;
var percentMoneyHacked = difficultyMult * skillMult * this.hacking_money_mult / 950;
console.log("Percent money hacked calculated to be: " + percentMoneyHacked);
if (percentMoneyHacked < 0) {return 0;}
if (percentMoneyHacked > 1) {return 1;}