diff --git a/src/Constants.js b/src/Constants.js
index ddb4f5437..a685acd87 100644
--- a/src/Constants.js
+++ b/src/Constants.js
@@ -65,7 +65,7 @@ CONSTANTS = {
ScriptHNUpgCoreRamCost: 0.8,
//Server constants
- ServerGrowthRate: 1.002, //Growth rate
+ ServerGrowthRate: 1.0015, //Growth rate
ServerFortifyAmount: 0.002, //Amount by which server's security increases when its hacked
ServerWeakenAmount: 0.1, //Amount by which server's security decreases when weakened
@@ -489,10 +489,13 @@ CONSTANTS = {
Changelog:
"v0.20.0
" +
- "Refactor Netscript Interpreter code. Operations in Netscript should now run significantly faster (Every operation " +
+ "-Refactored Netscript Interpreter code. Operations in Netscript should now run significantly faster (Every operation " +
"such as a variable assignment, a function call, a binary operator, getting a variable's value, etc. used to take up to several seconds, " +
"now each one should only take 750 milliseconds).
" +
- ""
+ "-Percentage money stolen when hacking lowered to compensate for faster script speeds
" +
+ "-Lowered base growth rate by 25%(which affects amount of money gained from grow())
" +
+ "-Hacking experience granted by grow() halved" +
+ "-Weaken() is now 10% faster, but only grants 3 hacking exp upon completion instead of 5
"
"v0.19.7
" +
"-Added changelog to Options menu
" +
"-Bug fix with autocompletion (wasn't working properly for capitalized filenames/programs
" +
diff --git a/src/NetscriptEvaluator.js b/src/NetscriptEvaluator.js
index 949fb9f55..3b91a827c 100644
--- a/src/NetscriptEvaluator.js
+++ b/src/NetscriptEvaluator.js
@@ -838,7 +838,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 / 150;
+ var percentMoneyHacked = difficultyMult * skillMult * Player.hacking_money_mult / 200;
if (percentMoneyHacked < 0) {return 0;}
if (percentMoneyHacked > 1) {return 1;}
return percentMoneyHacked;
@@ -848,7 +848,7 @@ function scriptCalculatePercentMoneyHacked(server) {
function scriptCalculateGrowTime(server) {
var difficultyMult = server.requiredHackingSkill * server.hackDifficulty;
var skillFactor = (2.5 * difficultyMult + 500) / (Player.hacking_skill + 50);
- var growTime = skillFactor * Player.hacking_speed_mult * 16; //This is in seconds
+ var growTime = skillFactor * Player.hacking_speed_mult * 17; //This is in seconds
return growTime * 1000;
}
@@ -856,6 +856,6 @@ function scriptCalculateGrowTime(server) {
function scriptCalculateWeakenTime(server) {
var difficultyMult = server.requiredHackingSkill * server.hackDifficulty;
var skillFactor = (2.5 * difficultyMult + 500) / (Player.hacking_skill + 50);
- var weakenTime = skillFactor * Player.hacking_speed_mult * 50; //This is in seconds
+ var weakenTime = skillFactor * Player.hacking_speed_mult * 45; //This is in seconds
return weakenTime * 1000;
}
\ No newline at end of file
diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js
index f45ded862..9ceab47dd 100644
--- a/src/NetscriptFunctions.js
+++ b/src/NetscriptFunctions.js
@@ -147,6 +147,11 @@ function netscriptGrow(exp, workerScript) {
server.moneyAvailable += 1; //It can be grown even if it has no money
var growthPercentage = processSingleServerGrowth(server, 450);
workerScript.scriptRef.recordGrow(server.ip);
+ workerScript.scriptRef.log("Available money on " + server.hostname + " grown by "
+ + formatNumber(growthPercentage*100 - 100, 6) + "%");
+ var expGain = 0.5 * Player.hacking_exp_mult;
+ workerScript.scriptRef.log("Gained " + expGain + " hacking experience");
+ Player.gainHackingExp(expGain);
return Promise.resolve(growthPercentage);
});
}).then(function(res) {
@@ -188,6 +193,11 @@ function netscriptWeaken(exp, workerScript) {
if (env.stopFlag) {return Promise.reject(workerScript);}
server.weaken(CONSTANTS.ServerWeakenAmount);
workerScript.scriptRef.recordWeaken(server.ip);
+ workerScript.scriptRef.log("Server security level on " + server.hostname + " weakened to " + server.hackDifficulty);
+ workerScript.scriptRef.log("Gained 3 hacking experience");
+ var expGain = 3 * Player.hacking_exp_mult;
+ workerScript.scriptRef.log("Gained " + expGain + " hacking experience");
+ Player.gainHackingExp(expGain);
return Promise.resolve(CONSTANTS.ServerWeakenAmount);
});
}).then(function(res) {
diff --git a/src/Player.js b/src/Player.js
index 8497f4ad9..b74ee0357 100644
--- a/src/Player.js
+++ b/src/Player.js
@@ -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 / 150;
+ var percentMoneyHacked = difficultyMult * skillMult * this.hacking_money_mult / 200;
console.log("Percent money hacked calculated to be: " + percentMoneyHacked);
if (percentMoneyHacked < 0) {return 0;}
if (percentMoneyHacked > 1) {return 1;}