Decimal.js support for player's money. Buffed early game servers.

This commit is contained in:
danielyxie
2017-07-29 11:25:40 -05:00
parent e5322e466b
commit 53d514d28e
21 changed files with 381 additions and 392 deletions
+5 -1
View File
@@ -107,8 +107,12 @@ function evaluate(exp, workerScript) {
if (exp.computed){
var p = evaluate(exp.property, workerScript);
p.then(function(index) {
if (index >= object.length) {
return reject(makeRuntimeRejectMsg(workerScript, "Invalid index for arrays"));
}
resolve(object[index]);
}).catch(function(e) {
console.log("here");
reject(makeRuntimeRejectMsg(workerScript, "Invalid MemberExpression"));
});
} else {
@@ -647,7 +651,7 @@ function scriptCalculateExpGain(server) {
if (server.baseDifficulty == null) {
server.baseDifficulty = server.hackDifficulty;
}
return (server.baseDifficulty * Player.hacking_exp_mult * 0.3 + 2);
return (server.baseDifficulty * Player.hacking_exp_mult * 0.3 + 3);
}
//The same as Player's calculatePercentMoneyHacked() function but takes in the server as an argument