Merge pull request #38 from danielyxie/dev

FIxed a bug with manuallyHacked flag
This commit is contained in:
danielyxie 2017-06-02 09:46:02 -05:00 committed by GitHub
commit d47cda8a8d

@ -280,7 +280,6 @@ var Terminal = {
finishHack: function(cancelled = false) {
if (cancelled == false) {
var server = Player.getCurrentServer();
server.manuallyHacked = true;
//Calculate whether hack was successful
var hackChance = Player.calculateHackingChance();
@ -289,6 +288,7 @@ var Terminal = {
var expGainedOnSuccess = Player.calculateExpGain();
var expGainedOnFailure = (expGainedOnSuccess / 4);
if (rand < hackChance) { //Success!
server.manuallyHacked = true;
var moneyGained = Player.calculatePercentMoneyHacked();
moneyGained = Math.floor(server.moneyAvailable * moneyGained);