Trying to get hack progress bar to work

This commit is contained in:
Daniel Xie
2016-10-26 22:34:18 -05:00
parent d268ea09f8
commit 0a13496984
3 changed files with 25 additions and 19 deletions
+3 -9
View File
@@ -8,7 +8,8 @@ var Player = {
dexterity: 1,
agility: 1,
hacking_chance_multiplier: 2, //Increase through ascensions/augmentations
hacking_speed_multiplier: 5, //Decrease through ascensions/augmentations
//hacking_speed_multiplier: 5, //Decrease through ascensions/augmentations
hacking_speed_multiplier: 1, //Make it faster for debugging
//Note: "Lifetime" refers to current ascension, "total" refers to the entire game history
//Accumulative stats and skills
@@ -95,10 +96,8 @@ var Player = {
// ------------------------------- * hacking_speed_multiplier
// hacking_skill
calculateHackingTime: function() {
var difficultyMult = Player.currentServer.requiredHackingSkill * Player.currentServer.difficulty;
console.log("difficultyMult: " + difficultyMult);
var difficultyMult = Player.currentServer.requiredHackingSkill * Player.currentServer.hackDifficulty;
var skillFactor = difficultyMult / Player.hacking_skill;
console.log("skillFactor: " + skillFactor);
console.log("Player.hacking_speed_multiplier: " + Player.hacking_speed_multiplier);
return skillFactor * Player.hacking_speed_multiplier;
},
@@ -112,11 +111,6 @@ var Player = {
//Set the startHack flag so the engine starts the hacking process
Player.startHack = true;
while (Player.finishHack == false) {
//Waiting for hack to complete
}
Player.finishHack = false;
//DEBUG
return 5;
}