mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 20:25:45 +01:00
Rebalancing Create program times, crime exp gains
This commit is contained in:
parent
a934205d08
commit
01f9bf14af
@ -557,7 +557,7 @@
|
||||
In the Slums you can commit crimes to earn money and experience. Crime attempts are not always
|
||||
successful. Your chance at successfully committing a crime is determined by your stats.
|
||||
</p>
|
||||
<a href="3" id="location-slums-shoplift" class="a-link-button"> Shoplift </a>
|
||||
<a href="#" id="location-slums-shoplift" class="a-link-button"> Shoplift </a>
|
||||
<a href="#" id="location-slums-mug" class="a-link-button"> Mug someone </a>
|
||||
<a href="#" id="location-slums-deal-drugs" class="a-link-button"> Deal Drugs </a>
|
||||
<a href="#" id="location-slums-traffic-arms" class="a-link-button"> Traffick Illegal Arms </a>
|
||||
|
@ -49,12 +49,18 @@ CONSTANTS = {
|
||||
MillisecondsPer4Hours: 14400000,
|
||||
GameCyclesPer4Hours: 14400000 / 200,
|
||||
|
||||
MillisecondsPer2Hours: 7200000,
|
||||
GameCyclesPer2Hours: 7200000 / 200,
|
||||
|
||||
MillisecondsPerHour: 3600000,
|
||||
GameCyclesPerHour: 3600000 / 200,
|
||||
|
||||
MillisecondsPerHalfHour: 1800000,
|
||||
GameCyclesPerHalfHour: 1800000 / 200,
|
||||
|
||||
MillisecondsPerQuarterHour: 900000,
|
||||
GameCyclesPerQuarterHour: 900000 / 200,
|
||||
|
||||
FactionWorkHacking: "Faction Hacking Work",
|
||||
FactionWorkField: "Faction Field Work",
|
||||
FactionWorkSecurity: "Faction Security Work",
|
||||
|
@ -40,7 +40,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 50) {
|
||||
bruteSshALink.style.display = "block";
|
||||
bruteSshALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.BruteSSHProgram, CONSTANTS.MillisecondsPerHalfHour);
|
||||
Player.startCreateProgramWork(Programs.BruteSSHProgram, CONSTANTS.MillisecondsPerQuarterHour);
|
||||
});
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 100) {
|
||||
ftpCrackALink.style.display = "block";
|
||||
ftpCrackALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsPerHour);
|
||||
Player.startCreateProgramWork(Programs.FTPCrackProgram, CONSTANTS.MillisecondsHalfHour);
|
||||
});
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 250) {
|
||||
relaySmtpALink.style.display = "block";
|
||||
relaySmtpAlink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.RelaySMTPProgram. CONSTANTS.MillisecondsPer4Hours);
|
||||
Player.startCreateProgramWork(Programs.RelaySMTPProgram. CONSTANTS.MillisecondsPer2Hours);
|
||||
});
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 500) {
|
||||
httpWormALink.style.display = "block";
|
||||
httpWormALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.HTTPWormProgram, CONSTANTS.MillisecondsPer8Hours);
|
||||
Player.startCreateProgramWork(Programs.HTTPWormProgram, CONSTANTS.MillisecondsPer4Hours);
|
||||
});
|
||||
}
|
||||
|
||||
@ -76,7 +76,7 @@ function displayCreateProgramContent() {
|
||||
Player.hacking_skill >= 750) {
|
||||
sqlInjectALink.style.display = "block";
|
||||
sqlInjectALink.addEventListener("click", function() {
|
||||
Player.startCreateProgramWork(Programs.SQLInjectProgram, CONSTANTS.MillisecondsPer10Hours);
|
||||
Player.startCreateProgramWork(Programs.SQLInjectProgram, CONSTANTS.MillisecondsPer8Hours);
|
||||
});
|
||||
}
|
||||
}
|
@ -11,22 +11,22 @@ function commitMugCrime() {
|
||||
|
||||
function commitDealDrugsCrime() {
|
||||
Player.crimeType = CONSTANTS.CrimeDrugs;
|
||||
Player.startCrime(0, 2, 2, 2, 2, 5, 1000, 10000); //$100 per sec
|
||||
Player.startCrime(0, 2, 2, 2, 2, 4, 1000, 10000); //$100 per sec
|
||||
}
|
||||
|
||||
function commitTraffickArmsCrime() {
|
||||
Player.crimeType = CONSTANTS.CrimeTraffickArms;
|
||||
Player.startCrime(0, 5, 5, 5, 5, 10, 2500, 20000); //$125 per sec
|
||||
Player.startCrime(0, 5, 5, 5, 5, 8, 2500, 20000); //$125 per sec
|
||||
}
|
||||
|
||||
function commitHomicideCrime() {
|
||||
Player.crimeType = CONSTANTS.CrimeHomicide;
|
||||
Player.startCrime(0, 20, 20, 20, 20, 0, 300, 3000); //$100 per sec
|
||||
Player.startCrime(0, 15, 15, 15, 15, 0, 300, 3000); //$100 per sec
|
||||
}
|
||||
|
||||
function commitKidnapCrime() {
|
||||
Player.crimeType = CONSTANTS.CrimeKidnap;
|
||||
Player.startCrime(0, 6, 6, 6, 6, 6, 10000, 60000); //$166.67 per sec
|
||||
Player.startCrime(0, 10, 10, 10, 10, 10, 10000, 60000); //$166.67 per sec
|
||||
}
|
||||
|
||||
function determineCrimeSuccess(crime, moneyGained) {
|
||||
|
@ -834,6 +834,7 @@ displayLocationContent = function() {
|
||||
slumsKidnap.style.display = "block";
|
||||
slumsKidnap.innerHTML = "Kidnap and Ransom (" + (kidnapChance*100).toFixed(3) + "% chance of success)";
|
||||
|
||||
break;
|
||||
default:
|
||||
console.log("ERROR: INVALID LOCATION");
|
||||
|
||||
|
@ -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,7 +996,16 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
|
||||
}
|
||||
|
||||
//Determine crime success/failure
|
||||
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>" +
|
||||
@ -1015,6 +1023,9 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
|
||||
this.workDexExpGained + " dexterity experience<br>" +
|
||||
this.workAgiExpGained + " agility experience<br>");
|
||||
}
|
||||
}
|
||||
|
||||
this.gainWorkExp();
|
||||
|
||||
var mainMenu = document.getElementById("mainmenu-container");
|
||||
mainMenu.style.visibility = "visible";
|
||||
|
@ -582,6 +582,8 @@ var Engine = {
|
||||
Player.createProgramWork(numCycles);
|
||||
} else if (Player.workType == CONSTANTS.WorkTypeStudyClass) {
|
||||
Player.takeClass(numCycles);
|
||||
} else if (Player.workType == CONSTANTS.WorkTypeCrime) {
|
||||
Player.commitCrime(numCycles);
|
||||
} else {
|
||||
Player.work(numCycles);
|
||||
}
|
||||
@ -608,7 +610,7 @@ var Engine = {
|
||||
Counters: {
|
||||
autoSaveCounter: 300, //Autosave every minute
|
||||
updateSkillLevelsCounter: 10, //Only update skill levels every 2 seconds. Might improve performance
|
||||
updateDisplays: 4, //Update displays such as Active Scripts display and character display
|
||||
updateDisplays: 3, //Update displays such as Active Scripts display and character display
|
||||
serverGrowth: 450, //Process server growth every minute and a half
|
||||
checkFactionInvitations: 1500, //Check whether you qualify for any faction invitations every 5 minutes
|
||||
passiveFactionGrowth: 600,
|
||||
@ -644,7 +646,7 @@ var Engine = {
|
||||
updateHacknetNodesContent();
|
||||
}
|
||||
|
||||
Engine.Counters.updateDisplays = 4;
|
||||
Engine.Counters.updateDisplays = 3;
|
||||
}
|
||||
|
||||
if (Engine.Counters.serverGrowth <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user