Merge pull request #5 from danielyxie/dev

Removed some log statements. Rebalancing on RAM for home comp
This commit is contained in:
danielyxie 2017-05-13 14:48:42 -05:00 committed by GitHub
commit 243f256832
5 changed files with 4 additions and 6 deletions

@ -237,6 +237,7 @@ CONSTANTS = {
"<i>sleep(n)</i><br>Suspends the script for n milliseconds. <br>Example: sleep(5000);<br><br>" +
"<i>grow(hostname/ip)</i><br>Use your hacking skills to increase the amount of money available on a server. The argument passed in " +
"must be a string with either the IP or hostname of the target server. <br> Example: grow('foodnstuff');<br><br>" +
"<i>print(x)</i> <br> Prints a value or a variable to the scripts logs (which can be viewed with the 'tail [script]' terminal command <br><br>" +
"<i>nuke(hostname/ip)</i><br>Run NUKE.exe on the target server. NUKE.exe must exist on your home computer. <br> Example: nuke('foodnstuff'); <br><br>" +
"<i>brutessh(hostname/ip)</i><br>Run BruteSSH.exe on the target server. BruteSSH.exe must exist on your home computer <br> Example: brutessh('foodnstuff');<br><br>" +
"<i>ftpcrack(hostname/ip)</i><br>Run FTPCrack.exe on the target server. FTPCrack.exe must exist on your home computer <br> Example: ftpcrack('foodnstuff');<br><br>" +

@ -425,7 +425,6 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
}
//Tian Di Hui
console.log("here");
var tiandihuiFac = Factions["Tian Di Hui"];
if (tiandihuiFac.isBanned == false && tiandihuiFac.isMember == false &&
this.money >= 1000000 && this.hacking_skill >= 50 &&

@ -272,7 +272,6 @@ function evaluate(exp, workerScript) {
server.moneyAvailable -= moneyGained;
Player.gainMoney(moneyGained);
workerScript.scriptRef.onlineMoneyMade += moneyGained;
console.log("About to add to moneystolenmap for " + server.hostname);
workerScript.scriptRef.moneyStolenMap[server.ip] += moneyGained;
Player.gainHackingExp(expGainedOnSuccess);

@ -33,7 +33,6 @@ function saveAndCloseScriptEditor() {
}
var code = document.getElementById("script-editor-text").value;
code = code.replace(/\s\s+/g, '');
console.log(code);
if (code.indexOf("while(true) {hack('foodnstuff');}") == -1) {
dialogBoxCreate("Please copy and paste the code from the tutorial!");
return;

@ -34,10 +34,10 @@ purchaseRamForHomeBoxCreate = function() {
var numUpgrades = Math.log2(currentRam);
//Calculate cost
//Base cost of RAM is 50k per 1GB...but lets have this increase by 21% for every time
//the RAM has been upgraded
//Base cost of RAM is 50k per 1GB...but lets have this increase by some percentage
//each time the ram has been upgraded
var cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome;
var mult = Math.pow(1.21, numUpgrades);
var mult = Math.pow(1.32, numUpgrades);
cost = cost * mult;
purchaseRamForHomeBoxSetText("Would you like to purchase additional RAM for your home computer? <br><br>" +