Rebalancing crime exp rates, small UI improvements and bug fixes

This commit is contained in:
Daniel Xie 2017-05-04 23:54:40 -05:00
parent 56ebfaf2bf
commit cdd51e675d
4 changed files with 22 additions and 22 deletions

@ -49,7 +49,7 @@ function displayCreateProgramContent() {
Player.hacking_skill >= 100) {
ftpCrackALink.style.display = "block";
ftpCrackALink.addEventListener("click", function() {
Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsHalfHour);
Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsPerHalfHour);
});
}

@ -1,32 +1,32 @@
/* Crimes.js */
function commitShopliftCrime() {
Player.crimeType = CONSTANTS.CrimeShoplift;
Player.startCrime(0, 1, 1, 1, 1, 0, 100, 3000); //$33.33/s, .333 exp/s
Player.startCrime(0, 0.5, 0.5, 0.5, 0.5, 0, 100, 3000); //$33.33/s, .167 exp/s
}
function commitMugCrime() {
Player.crimeType = CONSTANTS.CrimeMug;
Player.startCrime(0, 2, 2, 2, 2, 0, 250, 5000); //$50/s, .4 exp/s
Player.startCrime(0, 1, 1, 1, 1, 0, 250, 5000); //$50/s, .2 exp/s
}
function commitDealDrugsCrime() {
Player.crimeType = CONSTANTS.CrimeDrugs;
Player.startCrime(0, 2, 2, 2, 2, 4, 1000, 10000); //$100/s, .2 combat exp/s, .4 cha exp/s
Player.startCrime(0, 2, 2, 2, 2, 2, 1000, 10000); //$100/s, .2 exp/s
}
function commitTraffickArmsCrime() {
Player.crimeType = CONSTANTS.CrimeTraffickArms;
Player.startCrime(0, 10, 10, 10, 10, 16, 5000, 40000); //$125/s, .25 combat exp/s, .4 cha exp/s
Player.startCrime(0, 8, 8, 8, 8, 12, 5000, 40000); //$125/s, .2 combat exp/s, .3 cha exp/s
}
function commitHomicideCrime() {
Player.crimeType = CONSTANTS.CrimeHomicide;
Player.startCrime(0, 3, 3, 3, 3, 0, 300, 3000); //$100/s, 1 combat exp/s
Player.startCrime(0, 2, 2, 2, 2, 0, 300, 3000); //$100/s, 0.66 combat exp/s
}
function commitKidnapCrime() {
Player.crimeType = CONSTANTS.CrimeKidnap;
Player.startCrime(0, 30, 30, 30, 30, 30, 20000, 120000); //$166.67/s. .25 exp/s
Player.startCrime(0, 20, 20, 20, 20, 20, 20000, 120000); //$166.67/s. .167 exp/s
}
function determineCrimeSuccess(crime, moneyGained) {

@ -1003,22 +1003,22 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
dialogBoxCreate("Crime successful! <br><br>" +
"You gained:<br>"+
"$" + this.workMoneyGained + "<br>" +
this.workHackExpGained + " hacking experience <br>" +
this.workStrExpGained + " strength experience<br>" +
this.workDefExpGained + " defense experience<br>" +
this.workDexExpGained + " dexterity experience<br>" +
this.workAgiExpGained + " agility experience<br>" +
this.workChaExpGained + " charisma experience");
"$" + formatNumber(this.workMoneyGained, 2) + "<br>" +
formatNumber(this.workHackExpGained, 4) + " hacking experience <br>" +
formatNumber(this.workStrExpGained, 4) + " strength experience<br>" +
formatNumber(this.workDefExpGained, 4) + " defense experience<br>" +
formatNumber(this.workDexExpGained, 4) + " dexterity experience<br>" +
formatNumber(this.workAgiExpGained, 4) + " agility experience<br>" +
formatNumber(this.workChaExpGained, 4) + " charisma experience");
} else {
dialogBoxCreate("Crime failed! <br><br>" +
"You gained:<br>"+
this.workHackExpGained + " hacking experience <br>" +
this.workStrExpGained + " strength experience<br>" +
this.workDefExpGained + " defense experience<br>" +
this.workDexExpGained + " dexterity experience<br>" +
this.workAgiExpGained + " agility experience<br>" +
this.workChaExpGained + " charisma experience");
formatNumber(this.workHackExpGained, 4) + " hacking experience <br>" +
formatNumber(this.workStrExpGained, 4) + " strength experience<br>" +
formatNumber(this.workDefExpGained, 4) + " defense experience<br>" +
formatNumber(this.workDexExpGained, 4) + " dexterity experience<br>" +
formatNumber(this.workAgiExpGained, 4) + " agility experience<br>" +
formatNumber(this.workChaExpGained, 4) + " charisma experience");
}
}

@ -20,7 +20,7 @@ BitburnerSaveObject.prototype.saveGame = function() {
this.SpecialServerIpsSave = JSON.stringify(SpecialServerIps);
this.AugmentationsSave = JSON.stringify(Augmentations);
var saveString = JSON.stringify(this);
var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));
window.localStorage.setItem("bitburnerSave", saveString);
}
@ -29,7 +29,7 @@ loadGame = function(saveObj) {
console.log("No save file to load");
return false;
}
var saveString = window.localStorage.getItem("bitburnerSave");
var saveString = decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave"))));
saveObj = JSON.parse(saveString, Reviver);
Player = JSON.parse(saveObj.PlayerSave, Reviver);