Added comments for optimizing Script object

This commit is contained in:
Daniel Xie
2017-06-13 00:34:45 -05:00
parent 8444e154ee
commit 064282682f
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ PlayerObject.prototype.updateSkillLevels = function() {
//The formula is:
// (2 * hacking_chance_multiplier * hacking_skill - requiredLevel) 100 - difficulty
// ----------------------------------------------------------- * -----------------
// (hacking_chance_multiplier * hacking_skill) 100
// (2 * hacking_chance_multiplier * hacking_skill) 100
PlayerObject.prototype.calculateHackingChance = function() {
var difficultyMult = (100 - this.getCurrentServer().hackDifficulty) / 100;
var skillMult = (2 * this.hacking_chance_mult * this.hacking_skill);