mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-04 06:37:49 +02:00
Rebalancing Create program times, crime exp gains
This commit is contained in:
+33
-22
@@ -927,7 +927,7 @@ PlayerObject.prototype.startCrime = function(hackExp, strExp, defExp, dexExp, ag
|
||||
this.workHackExpGained = hackExp * this.hacking_exp_mult;
|
||||
this.workStrExpGained = strExp * this.strength_exp_mult;
|
||||
this.workDefExpGained = defExp * this.defense_exp_mult;
|
||||
this.workDexExpGained = dexExp * this.dexteriy_exp_mult;
|
||||
this.workDexExpGained = dexExp * this.dexterity_exp_mult;
|
||||
this.workAgiExpGained = agiExp * this.agility_exp_mult;
|
||||
this.workChaExpGained = chaExp * this.charisma_exp_mult;
|
||||
this.workMoneyGained = money; //TODO multiplier for this?
|
||||
@@ -949,9 +949,11 @@ PlayerObject.prototype.startCrime = function(hackExp, strExp, defExp, dexExp, ag
|
||||
Engine.loadWorkInProgressContent();
|
||||
}
|
||||
|
||||
PlayerObject.prototype.commitCrime = function () {
|
||||
PlayerObject.prototype.commitCrime = function (numCycles) {
|
||||
this.timeWorked += Engine._idleSpeed * numCycles;
|
||||
|
||||
if (this.timeWorked >= this.timeNeededToCompleteWork) {Player.finishCrime(false);}
|
||||
|
||||
var txt = document.getElementById("work-in-progress-text");
|
||||
txt.innerHTML = "You are attempting to " + Player.crimeType + ".<br>" +
|
||||
"Time remaining: " + convertTimeMsToTimeElapsedString(this.timeNeededToCompleteWork - this.timeWorked);
|
||||
@@ -961,9 +963,6 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
|
||||
if (cancelled) {
|
||||
//Do nothing
|
||||
} else {
|
||||
this.gainWorkExp();
|
||||
|
||||
|
||||
//Handle Karma and crime statistics
|
||||
switch(this.crimeType) {
|
||||
case CONSTANTS.CrimeShoplift:
|
||||
@@ -997,25 +996,37 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
|
||||
}
|
||||
|
||||
//Determine crime success/failure
|
||||
if (determineCrimeSuccess(this.crimeType, this.workMoneyGained)) {
|
||||
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>");
|
||||
} 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>");
|
||||
if (!cancelled) {
|
||||
if (determineCrimeSuccess(this.crimeType, this.workMoneyGained)) {
|
||||
//On a crime success, gain 2x exp
|
||||
this.workHackExpGained *= 2;
|
||||
this.workStrExpGained *= 2;
|
||||
this.workDefExpGained *= 2;
|
||||
this.workDexExpGained *= 2;
|
||||
this.workAgiExpGained *= 2;
|
||||
this.workChaExpGained *= 2;
|
||||
|
||||
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>");
|
||||
} 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.gainWorkExp();
|
||||
|
||||
var mainMenu = document.getElementById("mainmenu-container");
|
||||
mainMenu.style.visibility = "visible";
|
||||
this.isWorking = false;
|
||||
|
||||
Reference in New Issue
Block a user