mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 20:55:44 +01:00
Player starts with 8GB of RAM on home. scan-analyze displays RAM. Increased percentage money hacked
This commit is contained in:
parent
5d415a1a60
commit
f756f09dbe
@ -15,10 +15,10 @@ CONSTANTS = {
|
||||
BaseCostFor1GBOfRamHacknetNode: 30000,
|
||||
|
||||
BaseCostForHacknetNode: 1000,
|
||||
BaseCostForHacknetNodeCore: 400000,
|
||||
BaseCostForHacknetNodeCore: 500000,
|
||||
|
||||
/* Hacknet Node constants */
|
||||
HacknetNodeMoneyGainPerLevel: 1.25,
|
||||
HacknetNodeMoneyGainPerLevel: 1.5,
|
||||
HacknetNodePurchaseNextMult: 1.33, //Multiplier when purchasing an additional hacknet node
|
||||
HacknetNodeUpgradeLevelMult: 1.04, //Multiplier for cost when upgrading level
|
||||
HacknetNodeUpgradeRamMult: 1.22, //Multiplier for cost when upgrading RAM
|
||||
|
@ -50,7 +50,7 @@ HacknetNode.prototype.updateMoneyGainRate = function() {
|
||||
|
||||
this.moneyGainRatePerSecond = (this.level * gainPerLevel) *
|
||||
Math.pow(1.04, this.ram-1) *
|
||||
((this.numCores + 1) / 2) * Player.hacknet_node_money_mult;
|
||||
((this.numCores + 3) / 4) * Player.hacknet_node_money_mult;
|
||||
if (isNaN(this.moneyGainRatePerSecond)) {
|
||||
this.moneyGainRatePerSecond = 0;
|
||||
dialogBoxCreate("Error in calculating Hacknet Node production. Please report to game developer");
|
||||
|
@ -745,6 +745,7 @@ function evaluate(exp, workerScript) {
|
||||
if (cost > Player.money) {
|
||||
workerScript.scriptRef.log("Could not afford to purchase new Hacknet Node");
|
||||
resolve("");
|
||||
return;
|
||||
}
|
||||
|
||||
//Auto generate a name for the node for now...TODO
|
||||
@ -1127,7 +1128,7 @@ function scriptCalculateExpGain(server) {
|
||||
function scriptCalculatePercentMoneyHacked(server) {
|
||||
var difficultyMult = (100 - server.hackDifficulty) / 100;
|
||||
var skillMult = (Player.hacking_skill - (server.requiredHackingSkill - 1)) / Player.hacking_skill;
|
||||
var percentMoneyHacked = difficultyMult * skillMult * Player.hacking_money_mult / 950;
|
||||
var percentMoneyHacked = difficultyMult * skillMult * Player.hacking_money_mult / 875;
|
||||
if (percentMoneyHacked < 0) {return 0;}
|
||||
if (percentMoneyHacked > 1) {return 1;}
|
||||
return percentMoneyHacked;
|
||||
|
@ -176,7 +176,7 @@ function PlayerObject() {
|
||||
PlayerObject.prototype.init = function() {
|
||||
/* Initialize Player's home computer */
|
||||
var t_homeComp = new Server();
|
||||
t_homeComp.init(createRandomIp(), "home", "Home PC", true, true, true, true, 2);
|
||||
t_homeComp.init(createRandomIp(), "home", "Home PC", true, true, true, true, 8);
|
||||
this.homeComputer = t_homeComp.ip;
|
||||
this.currentServer = t_homeComp.ip;
|
||||
AddToAllServers(t_homeComp);
|
||||
@ -243,7 +243,7 @@ PlayerObject.prototype.calculateHackingTime = function() {
|
||||
PlayerObject.prototype.calculatePercentMoneyHacked = function() {
|
||||
var difficultyMult = (100 - this.getCurrentServer().hackDifficulty) / 100;
|
||||
var skillMult = (this.hacking_skill - (this.getCurrentServer().requiredHackingSkill - 1)) / this.hacking_skill;
|
||||
var percentMoneyHacked = difficultyMult * skillMult * this.hacking_money_mult / 950;
|
||||
var percentMoneyHacked = difficultyMult * skillMult * this.hacking_money_mult / 875;
|
||||
console.log("Percent money hacked calculated to be: " + percentMoneyHacked);
|
||||
if (percentMoneyHacked < 0) {return 0;}
|
||||
if (percentMoneyHacked > 1) {return 1;}
|
||||
|
@ -851,7 +851,8 @@ var Terminal = {
|
||||
if (serv.hasAdminRights) {c = "Y";}
|
||||
post("--Root Access: " + c);
|
||||
post("--Required hacking skill: " + serv.requiredHackingSkill);
|
||||
post("--Number open ports required to NUKE: " + serv.numOpenPortsRequired);
|
||||
post("--Number of open ports required to NUKE: " + serv.numOpenPortsRequired);
|
||||
post("--RAM: " + serv.maxRam);
|
||||
post(" ");
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user