mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 21:53:50 +01:00
Merge branch 'master' of https://github.com/danielyxie/bitburner into dev
This commit is contained in:
commit
24cd1bb498
@ -908,7 +908,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div id="game-options-right-panel">
|
||||
<a class="a-link-button" style="display:block;" href="https://bitburner.wikia.com/wiki/Changelog" target="_blank"> Changelog </a>
|
||||
<a class="a-link-button" style="display:block;" href="https://bitburner.readthedocs.io/en/latest/changelog.html" target="_blank"> Changelog </a>
|
||||
<a class="a-link-button" style="display:block;" href="https://bitburner.wikia.com" target="_blank">Wiki</a>
|
||||
<a class="a-link-button" style="display:block;" href="https://www.reddit.com/r/bitburner" target="_blank">Subreddit</a>
|
||||
<a id="save-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Save Game </a>
|
||||
|
16
src/Gang.js
16
src/Gang.js
@ -336,17 +336,17 @@ function GangMember(name) {
|
||||
}
|
||||
|
||||
//Same formula for Player
|
||||
GangMember.prototype.calculateSkill = function(exp) {
|
||||
return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
|
||||
GangMember.prototype.calculateSkill = function(exp, mult=1) {
|
||||
return Math.max(Math.floor(mult*(32 * Math.log(exp + 534.5) - 200)), 1);
|
||||
}
|
||||
|
||||
GangMember.prototype.updateSkillLevels = function() {
|
||||
this.hack = Math.floor(this.calculateSkill(this.hack_exp) * this.hack_mult);
|
||||
this.str = Math.floor(this.calculateSkill(this.str_exp) * this.str_mult);
|
||||
this.def = Math.floor(this.calculateSkill(this.def_exp) * this.def_mult);
|
||||
this.dex = Math.floor(this.calculateSkill(this.dex_exp) * this.dex_mult);
|
||||
this.agi = Math.floor(this.calculateSkill(this.agi_exp) * this.agi_mult);
|
||||
this.cha = Math.floor(this.calculateSkill(this.cha_exp) * this.cha_mult);
|
||||
this.hack = this.calculateSkill(this.hack_exp, this.hack_mult);
|
||||
this.str = this.calculateSkill(this.str_exp, this.str_mult);
|
||||
this.def = this.calculateSkill(this.def_exp, this.def_mult);
|
||||
this.dex = this.calculateSkill(this.dex_exp, this.dex_mult);
|
||||
this.agi = this.calculateSkill(this.agi_exp, this.agi_mult);
|
||||
this.cha = this.calculateSkill(this.cha_exp, this.cha_mult);
|
||||
}
|
||||
|
||||
GangMember.prototype.calculatePower = function() {
|
||||
|
@ -422,17 +422,17 @@ PlayerObject.prototype.receiveInvite = function(factionName) {
|
||||
}
|
||||
|
||||
//Calculates skill level based on experience. The same formula will be used for every skill
|
||||
PlayerObject.prototype.calculateSkill = function(exp) {
|
||||
return Math.max(Math.floor(32 * Math.log(exp + 534.5) - 200), 1);
|
||||
PlayerObject.prototype.calculateSkill = function(exp, mult=1) {
|
||||
return Math.max(Math.floor(mult*(32 * Math.log(exp + 534.5) - 200)), 1);
|
||||
}
|
||||
|
||||
PlayerObject.prototype.updateSkillLevels = function() {
|
||||
this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp) * this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier));
|
||||
this.strength = Math.floor(this.calculateSkill(this.strength_exp) * this.strength_mult);
|
||||
this.defense = Math.floor(this.calculateSkill(this.defense_exp) * this.defense_mult);
|
||||
this.dexterity = Math.floor(this.calculateSkill(this.dexterity_exp) * this.dexterity_mult);
|
||||
this.agility = Math.floor(this.calculateSkill(this.agility_exp) * this.agility_mult);
|
||||
this.charisma = Math.floor(this.calculateSkill(this.charisma_exp) * this.charisma_mult);
|
||||
this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult) * BitNodeMultipliers.HackingLevelMultiplier));
|
||||
this.strength = this.calculateSkill(this.strength_exp, this.strength_mult);
|
||||
this.defense = this.calculateSkill(this.defense_exp, this.defense_mult);
|
||||
this.dexterity = this.calculateSkill(this.dexterity_exp, this.dexterity_mult);
|
||||
this.agility = this.calculateSkill(this.agility_exp, this.agility_mult);
|
||||
this.charisma = this.calculateSkill(this.charisma_exp, this.charisma_mult);
|
||||
|
||||
if (this.intelligence > 0) {
|
||||
this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));
|
||||
|
Loading…
Reference in New Issue
Block a user