diff --git a/doc/source/netscriptbladeburnerapi.rst b/doc/source/netscriptbladeburnerapi.rst index 4313d6aee..68cbebeee 100644 --- a/doc/source/netscriptbladeburnerapi.rst +++ b/doc/source/netscriptbladeburnerapi.rst @@ -235,18 +235,30 @@ getSkillLevel .. js:function:: getSkillLevel(skillName="") - :param string skillName: Name of skill + :param string skillName: Name of skill. Case-sensitive and must be an exact match This function returns your level in the specified skill. The function returns -1 if an invalid skill name is passed in + +getSkillUpgradeCost +------------------- + +.. js:function:: getSkillUpgradeCost(skillName="") + + :param string skillName: Name of skill. Case-sensitive and must be an exact match + + This function returns the number of skill points needed to upgrade the + specified skill. + + The function returns -1 if an invalid skill name is passed in. upgradeSkill ------------ .. js:function:: upgradeSkill(skillName) - :param string skillName: Name of Skill to be upgraded. Must be an exact match + :param string skillName: Name of Skill to be upgraded. Case-sensitive and must be an exact match Attempts to upgrade the specified Bladeburner skill. Returns true if the skill is successfully upgraded, and false otherwise @@ -357,6 +369,21 @@ joinBladeburnerDivision are already a member. Returns false otherwise + +getBonusTime +------------ + +.. js:function:: getBonusTime() + + Returns the amount of accumulated "bonus time" (seconds) for the Bladeburner mechanic. + + "Bonus time" is accumulated when the game is offline or if the game is + inactive in the browser. + + "Bonus time" makes the game progress faster, up to 5x the normal speed. + For example, if an action takes 30 seconds to complete but you've accumulated + over 30 seconds in bonus time, then the action will only take 6 seconds + in real life to complete. Examples -------- diff --git a/doc/source/netscriptfunctions.rst b/doc/source/netscriptfunctions.rst index e7af06a6a..514a3d484 100644 --- a/doc/source/netscriptfunctions.rst +++ b/doc/source/netscriptfunctions.rst @@ -659,16 +659,14 @@ getNextHacknetNodeCost .. js:function:: getNextHacknetNodeCost() - Returns the cost of purchasing a new Hacknet Node + Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi` purchaseHacknetNode ^^^^^^^^^^^^^^^^^^^ .. js:function:: purchaseHacknetNode() - Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number at the - end of the Hacknet Node's name (e.g The Hacknet Node named 'hacknet-node-4' will have an index of 4). If the player cannot afford - to purchase a new Hacknet Node then the function will return false. + Deprecated (no longer usable). See :doc:`netscripthacknetnodeapi` getPurchasedServerCost ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/doc/source/netscripthacknetnodeapi.rst b/doc/source/netscripthacknetnodeapi.rst index 701203a0a..f506d37a1 100644 --- a/doc/source/netscripthacknetnodeapi.rst +++ b/doc/source/netscripthacknetnodeapi.rst @@ -1,3 +1,5 @@ +.. _netscripthacknetnodeapi: + Netscript Hacknet Node API ========================== diff --git a/netscript.js b/netscript.js index 8089c1779..b632dfdaa 100644 --- a/netscript.js +++ b/netscript.js @@ -100,9 +100,10 @@ let NetscriptFunctions = "getActionTime|getActionEstimatedSuccessChance|getActionCountRemaining|" + "getActionMaxLevel|getActionCurrentLevel|getActionAutolevel|" + "setActionAutolevel|setActionLevel|" + - "getRank|getSkillPoints|getSkillLevel|upgradeSkill|getTeamSize|" + + "getRank|getSkillPoints|getSkillLevel|getSkillUpgradeCost|" + + "upgradeSkill|getTeamSize|" + "setTeamSize|getCityEstimatedPopulation|getCityEstimatedCommunities|" + - "getCityChaos|switchCity|getStamina|joinBladeburnerFaction"; + "getCityChaos|switchCity|getStamina|joinBladeburnerFaction|getBonusTime"; var NetscriptHighlightRules = function(options) { var keywordMapper = this.createKeywordMapper({ diff --git a/src/Augmentations.js b/src/Augmentations.js index eb74714a0..66c7d1a4f 100644 --- a/src/Augmentations.js +++ b/src/Augmentations.js @@ -1575,7 +1575,7 @@ function initAugmentations() { "AR HUD and assist the user in field missions.

" + "This augmentation:
" + "Increases the player's success chance in Bladeburner contracts/operations by 3%.
" + - "Increases the player's dexterity by 3%." + "Increases the player's dexterity by 5%." }); EsperEyewear.addToFactions([BladeburnersFactionName]); resetAugmentation(EsperEyewear); @@ -1589,7 +1589,7 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
" + "Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
" + - "Increases the player's Bladeburner stamina gain rate by 1%." + "Increases the player's Bladeburner stamina gain rate by 2%." }); EMS4Recombination.addToFactions([BladeburnersFactionName]); resetAugmentation(EMS4Recombination); @@ -1602,7 +1602,7 @@ function initAugmentations() { "crystallized graphene plating.

" + "This augmentation:
" + "Increases the player's defense by 5%.
" + - "Increases the player's strength and dexterity by 3%.
" + + "Increases the player's strength and dexterity by 5%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 4%." }); OrionShoulder.addToFactions([BladeburnersFactionName]); @@ -1617,7 +1617,7 @@ function initAugmentations() { "it can also be effective against non-augmented enemies due to its high temperature " + "and concussive force.

" + "This augmentation:
" + - "Increases the player's success chance in Bladeburner contracts/operations by 5%." + "Increases the player's success chance in Bladeburner contracts/operations by 6%." }); HyperionV1.addToFactions([BladeburnersFactionName]); resetAugmentation(HyperionV1); @@ -1629,7 +1629,7 @@ function initAugmentations() { "more power-efficiency, more accurate, and can fire plasma bolts at a much " + "higher velocity than the V1 model.

" + "This augmentation:
" + - "Increases the player's success chance in Bladeburner contracts/operations by 7%.", + "Increases the player's success chance in Bladeburner contracts/operations by 8%.", prereqs:[AugmentationNames.HyperionV1] }); HyperionV2.addToFactions([BladeburnersFactionName]); @@ -1642,7 +1642,7 @@ function initAugmentations() { "serum was originally developed by the Chinese military in an attempt to " + "create super soldiers.

" + "This augmentation:
" + - "Increases all of the player's combat stats by 5%.
" + + "Increases all of the player's combat stats by 7%.
" + "Increases the player's Bladeburner stamina gain rate by 5%.
" }); GolemSerum.addToFactions([BladeburnersFactionName]); @@ -1655,7 +1655,7 @@ function initAugmentations() { "This augmentation:
" + "Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 4%.
" + - "Increases the player's dexterity experience gain rate by 5%." + "Increases the player's dexterity experience gain rate by 10%." }); VangelisVirus.addToFactions([BladeburnersFactionName]); resetAugmentation(VangelisVirus); @@ -1668,7 +1668,7 @@ function initAugmentations() { "agility/reflexes.

" + "This augmentation:
" + "Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
" + - "Increases the player's defense and dexterity experience gain rate by 5%.
" + + "Increases the player's defense and dexterity experience gain rate by 10%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 5%.", prereqs:[AugmentationNames.VangelisVirus] }); @@ -1682,7 +1682,7 @@ function initAugmentations() { "structurally support the body and grants heightened strength and " + "durability.

" + "This augmentation:
" + - "Increases the player's experience gain rate for all combat stats by 4%.
" + + "Increases the player's experience gain rate for all combat stats by 5%.
" + "Increases the player's Bladeburner max stamina by 10%." }); INTERLINKED.addToFactions([BladeburnersFactionName]); @@ -1709,7 +1709,7 @@ function initAugmentations() { "concussive, thermal, chemical, and electric trauma. It also enhances the user's " + "strength and agility.

" + "This augmentation:
" + - "Increases all of the player's combat stats by 2%.
" + + "Increases all of the player's combat stats by 4%.
" + "Increases the player's Bladeburner stamina gain rate by 2%.
" + "Increases the player's success chance in Bladeburner contracts/operations by 3%.", }); @@ -1780,7 +1780,7 @@ function initAugmentations() { resetAugmentation(BladeArmorIPU); var BladesSimulacrum = new Augmentation({ - name:AugmentationNames.BladesSimulacrum, repCost:6e3, moneyCost:75e9, + name:AugmentationNames.BladesSimulacrum, repCost:3e3, moneyCost:80e9, info:"A highly-advanced matter phase-shifter module that is embedded " + "in the brainstem and cerebellum. This augmentation allows " + "the user to project and control a holographic simulacrum within an " + @@ -2297,48 +2297,48 @@ function applyAugmentation(aug, reapply=false) { //Bladeburner augmentations case AugmentationNames.EsperEyewear: Player.bladeburner_success_chance_mult *= 1.03; - Player.dexterity_mult *= 1.03; + Player.dexterity_mult *= 1.05; break; case AugmentationNames.EMS4Recombination: Player.bladeburner_success_chance_mult *= 1.03; Player.bladeburner_analysis_mult *= 1.05; - Player.bladeburner_stamina_gain_mult *= 1.01; + Player.bladeburner_stamina_gain_mult *= 1.02; break; case AugmentationNames.OrionShoulder: Player.defense_mult *= 1.05; - Player.strength_mult *= 1.03; - Player.dexterity_mult *= 1.03; + Player.strength_mult *= 1.05; + Player.dexterity_mult *= 1.05; Player.bladeburner_success_chance_mult *= 1.04; break; case AugmentationNames.HyperionV1: - Player.bladeburner_success_chance_mult *= 1.05; + Player.bladeburner_success_chance_mult *= 1.06; break; case AugmentationNames.HyperionV2: - Player.bladeburner_success_chance_mult *= 1.07; + Player.bladeburner_success_chance_mult *= 1.08; break; case AugmentationNames.GolemSerum: - Player.strength_mult *= 1.05; - Player.defense_mult *= 1.05; - Player.dexterity_mult *= 1.05; - Player.agility_mult *= 1.05; + Player.strength_mult *= 1.07; + Player.defense_mult *= 1.07; + Player.dexterity_mult *= 1.07; + Player.agility_mult *= 1.07; Player.bladeburner_stamina_gain_mult *= 1.05; break; case AugmentationNames.VangelisVirus: - Player.dexterity_exp_mult *= 1.05; + Player.dexterity_exp_mult *= 1.1; Player.bladeburner_analysis_mult *= 1.1; Player.bladeburner_success_chance_mult *= 1.04; break; case AugmentationNames.VangelisVirus3: - Player.defense_exp_mult *= 1.05; - Player.dexterity_exp_mult *= 1.05; + Player.defense_exp_mult *= 1.1; + Player.dexterity_exp_mult *= 1.1; Player.bladeburner_analysis_mult *= 1.15; Player.bladeburner_success_chance_mult *= 1.05; break; case AugmentationNames.INTERLINKED: - Player.strength_exp_mult *= 1.04; - Player.defense_exp_mult *= 1.04; - Player.dexterity_exp_mult *= 1.04; - Player.agility_exp_mult *= 1.04; + Player.strength_exp_mult *= 1.05; + Player.defense_exp_mult *= 1.05; + Player.dexterity_exp_mult *= 1.05; + Player.agility_exp_mult *= 1.05; Player.bladeburner_max_stamina_mult *= 1.1; break; case AugmentationNames.BladeRunner: @@ -2347,10 +2347,10 @@ function applyAugmentation(aug, reapply=false) { Player.bladeburner_stamina_gain_mult *= 1.05; break; case AugmentationNames.BladeArmor: - Player.strength_mult *= 1.02; - Player.defense_mult *= 1.02; - Player.dexterity_mult *= 1.02; - Player.agility_mult *= 1.02; + Player.strength_mult *= 1.04; + Player.defense_mult *= 1.04; + Player.dexterity_mult *= 1.04; + Player.agility_mult *= 1.04; Player.bladeburner_stamina_gain_mult *= 1.02; Player.bladeburner_success_chance_mult *= 1.03; break; diff --git a/src/Bladeburner.js b/src/Bladeburner.js index 9bee0aa0c..dd5bd7d7e 100644 --- a/src/Bladeburner.js +++ b/src/Bladeburner.js @@ -62,12 +62,12 @@ var ActionCountGrowthPeriod = 300; //Time (s) it takes for action count to g var RankToFactionRepFactor = 2; //Delta Faction Rep = this * Delta Rank var RankNeededForFaction = 25; -var ContractSuccessesPerLevel = 3; //How many successes you need to level up a contract -var OperationSuccessesPerLevel = 2.5; //How many successes you need to level up an op +var ContractSuccessesPerLevel = 3.5; //How many successes you need to level up a contract +var OperationSuccessesPerLevel = 3; //How many successes you need to level up an op var RanksPerSkillPoint = 4; //How many ranks needed to get 1 Skill Point -var ContractBaseMoneyGain = 40e3; //Base Money Gained per contract +var ContractBaseMoneyGain = 50e3; //Base Money Gained per contract //DOM related variables var ActiveActionCssClass = "bladeburner-active-action"; @@ -214,8 +214,8 @@ function City(params={}) { this.popEst = this.pop * (Math.random() + 0.5); //Number of Synthoid communities population and estimate - this.comms = params.comms ? params.comms : getRandomInt(1, 40); - this.commsEst = this.comms + getRandomInt(-2, 2); + this.comms = params.comms ? params.comms : getRandomInt(5, 100); + this.commsEst = this.comms + getRandomInt(-5, 5); if (this.commsEst < 0) {this.commsEst = 0;} this.chaos = 0; } @@ -734,7 +734,7 @@ Bladeburner.prototype.create = function() { "whatever city you are currently in.", baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041, rankGain:0.3, hpLoss:0.5, - count:getRandomInt(300, 800), countGrowth:getRandomInt(1, 5), + count:getRandomInt(100, 500), countGrowth:getRandomInt(5, 75)/10, weights:{hack:0,str:0.05,def:0.05,dex:0.35,agi:0.35,cha:0.1, int:0.05}, decays:{hack:0,str:0.91,def:0.91,dex:0.91,agi:0.91,cha:0.9, int:1}, isStealth:true @@ -746,7 +746,7 @@ Bladeburner.prototype.create = function() { "current city, and will also increase its chaos level.", baseDifficulty:250, difficultyFac:1.04,rewardFac:1.085, rankGain:0.9, hpLoss:1, - count:getRandomInt(200, 750), countGrowth:getRandomInt(1, 3), + count:getRandomInt(25, 750), countGrowth:getRandomInt(5, 75)/10, weights:{hack:0,str:0.15,def:0.15,dex:0.25,agi:0.25,cha:0.1, int:0.1}, decays:{hack:0,str:0.91,def:0.91,dex:0.91,agi:0.91,cha:0.8, int:0.9}, isKill:true @@ -758,7 +758,7 @@ Bladeburner.prototype.create = function() { "city, and will also increase its chaos level.", baseDifficulty:200, difficultyFac:1.03, rewardFac:1.065, rankGain:0.6, hpLoss:1, - count:getRandomInt(300, 900), countGrowth:getRandomInt(1,4), + count:getRandomInt(50, 1000), countGrowth:getRandomInt(5,75)/10, weights:{hack:0,str:0.2,def:0.2,dex:0.2,agi:0.2,cha:0.1, int:0.1}, decays:{hack:0,str:0.91,def:0.91,dex:0.91,agi:0.91,cha:0.8, int:0.9}, isKill:true @@ -772,8 +772,8 @@ Bladeburner.prototype.create = function() { "synthoid data.

" + "You will NOT lose HP from failed Investigation ops.", baseDifficulty:400, difficultyFac:1.03,rewardFac:1.07,reqdRank:25, - rankGain:2, rankLoss:0.2, - count:getRandomInt(50, 400), countGrowth:1, + rankGain:2.2, rankLoss:0.2, + count:getRandomInt(50, 200), countGrowth:getRandomInt(10, 40)/10, weights:{hack:0.25,str:0.05,def:0.05,dex:0.2,agi:0.1,cha:0.25, int:0.1}, decays:{hack:0.85,str:0.9,def:0.9,dex:0.9,agi:0.9,cha:0.7, int:0.9}, isStealth:true @@ -785,8 +785,8 @@ Bladeburner.prototype.create = function() { "Successful Undercover ops will increase the accuracy of your synthoid " + "data.", baseDifficulty:500, difficultyFac:1.04, rewardFac:1.09, reqdRank:100, - rankGain:4, rankLoss:0.4, hpLoss:2, - count:getRandomInt(50, 300), countGrowth:1, + rankGain:4.4, rankLoss:0.4, hpLoss:2, + count:getRandomInt(25, 300), countGrowth:getRandomInt(10, 40)/10, weights:{hack:0.2,str:0.05,def:0.05,dex:0.2,agi:0.2,cha:0.2, int:0.1}, decays:{hack:0.8,str:0.9,def:0.9,dex:0.9,agi:0.9,cha:0.7, int:0.9}, isStealth:true @@ -796,8 +796,8 @@ Bladeburner.prototype.create = function() { desc:"Conduct a sting operation to bait and capture particularly " + "notorious Synthoid criminals.", baseDifficulty:650, difficultyFac:1.04, rewardFac:1.095, reqdRank:500, - rankGain:5, rankLoss:0.5, hpLoss:2.5, - count:getRandomInt(25,400), countGrowth:0.75, + rankGain:5.5, rankLoss:0.5, hpLoss:2.5, + count:getRandomInt(25,400), countGrowth:getRandomInt(3, 40)/10, weights:{hack:0.25,str:0.05,def:0.05,dex:0.25,agi:0.1,cha:0.2, int:0.1}, decays:{hack:0.8,str:0.85,def:0.85,dex:0.85,agi:0.85,cha:0.7, int:0.9}, isStealth:true @@ -808,8 +808,8 @@ Bladeburner.prototype.create = function() { "there must be an existing Synthoid community in your current city " + "in order for this Operation to be successful", baseDifficulty:800, difficultyFac:1.045, rewardFac:1.1, reqdRank:3000, - rankGain:50,rankLoss:2.5,hpLoss:50, - count:getRandomInt(25, 150), countGrowth:0.2, + rankGain:55,rankLoss:2.5,hpLoss:50, + count:getRandomInt(25, 150), countGrowth:getRandomInt(2, 40)/10, weights:{hack:0.1,str:0.2,def:0.2,dex:0.2,agi:0.2,cha:0, int:0.1}, decays:{hack:0.7,str:0.8,def:0.8,dex:0.8,agi:0.8,cha:0, int:0.9}, isKill:true @@ -820,8 +820,8 @@ Bladeburner.prototype.create = function() { "objective is to complete the task without " + "drawing any attention. Stealth and discretion are key.", baseDifficulty:1000, difficultyFac:1.05, rewardFac:1.11, reqdRank:20e3, - rankGain:20, rankLoss:2, hpLoss:10, - count:getRandomInt(25, 250), countGrowth:0.1, + rankGain:22, rankLoss:2, hpLoss:10, + count:getRandomInt(25, 250), countGrowth:getRandomInt(1, 20)/10, weights:{hack:0.1,str:0.1,def:0.1,dex:0.3,agi:0.3,cha:0, int:0.1}, decays:{hack:0.7,str:0.8,def:0.8,dex:0.8,agi:0.8,cha:0, int:0.9}, isStealth:true, isKill:true @@ -832,8 +832,8 @@ Bladeburner.prototype.create = function() { "important, high-profile social and political leaders " + "in the Synthoid communities.", baseDifficulty:1500, difficultyFac:1.06, rewardFac:1.14, reqdRank:50e3, - rankGain:40, rankLoss:4, hpLoss:5, - count:getRandomInt(25, 200), countGrowth:0.1, + rankGain:44, rankLoss:4, hpLoss:5, + count:getRandomInt(25, 200), countGrowth:getRandomInt(1, 20)/10, weights:{hack:0.1,str:0.1,def:0.1,dex:0.3,agi:0.3,cha:0, int:0.1}, decays:{hack:0.6,str:0.8,def:0.8,dex:0.8,agi:0.8,cha:0, int:0.8}, isStealth:true, isKill:true @@ -853,8 +853,12 @@ Bladeburner.prototype.process = function() { //If the Player starts doing some other actions, set action to idle and alert if (Augmentations[AugmentationNames.BladesSimulacrum].owned === false && Player.isWorking) { if (this.action.type !== ActionTypes["Idle"]) { - dialogBoxCreate("Your Bladeburner action was cancelled because you started " + - "doing something else"); + let msg = "Your Bladeburner action was cancelled because you started doing something else."; + if (this.automateEnabled) { + msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console` + this.automateEnabled = false; + } + dialogBoxCreate(msg); } this.resetAction(); } @@ -1339,7 +1343,7 @@ Bladeburner.prototype.completeAction = function() { Player.gainHackingExp(hackingExpGain); Player.gainIntelligenceExp(BaseIntGain); Player.gainCharismaExp(charismaExpGain); - this.changeRank(0.1); + this.changeRank(0.1 * BitNodeMultipliers.BladeburnerRank); console.log("DEBUG: Field Analysis effectiveness is " + (eff * this.skillMultipliers.successChanceEstimate)); this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate); if (this.logging.general) { @@ -1528,7 +1532,7 @@ Bladeburner.prototype.randomEvent = function() { var destCity = this.cities[destCityName]; if (!(sourceCity instanceof City) || !(destCity instanceof City)) { - throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()"); + throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()"); } if (chance <= 0.05) { @@ -3466,6 +3470,27 @@ Bladeburner.prototype.getSkillLevelNetscriptFn = function(skillName, workerScrip } } +Bladeburner.prototype.getSkillUpgradeCostNetscriptFn = function(skillName, workerScript) { + var errorLogText = "ERROR: bladeburner.getSkillUpgradeCostNetscriptFn() failed due to an invalid skill specified: " + + skillName + ". Note that the name of the skill is case-sensitive"; + + if (skillName === "") { + return -1; + } + + if (!Skills.hasOwnProperty(skillName)) { + workerScript.log(errorLogText); + return -1; + } + + var skill = Skills[skillName]; + if (this.skills[skillName] == null) { + return skill.calculateCost(0); + } else { + return skill.calculateCost(this.skills[skillName]); + } +} + Bladeburner.prototype.upgradeSkillNetscriptFn = function(skillName, workerScript) { var errorLogText = "ERROR: bladeburner.upgradeSkill() failed due to an invalid skill specified: " + skillName + ". Note that the name of the skill is case-sensitive"; diff --git a/src/Constants.js b/src/Constants.js index 6f6103869..1490848cd 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -492,9 +492,21 @@ let CONSTANTS = { LatestUpdate: "v0.40.2
" + + "* Bladeburner Changes:
" + + "*** Added getSkillUpgradeCost() Netscript function to the API
" + + "*** Added getBonusTime() Netscript function to the API
" + + "*** Buffed the effects of many Bladeburner Augmentations
" + + "*** The Blade's Simulacrum Augmentation requires significantly less reputation but slightly more money
" + + "*** Slightly increased the amount of successes needed for a Contract/Operation in order to increase its max level
" + + "*** Increased the amount of money gained from Contracts by ~25%
" + + "*** Increased the base amount of rank gained from Operations by 10%
" + + "*** Significantly increased the 'randomness' in determining a Contract/Operation's initial count and rate of count increase
" + + "*** The number (count) of Operations should now increase significantly faster
" + + "*** There are now, on average, more Synthoid communities in a city
" + + "*** If automation is enabled (the feature in Bladeburner console), then switching to another action such as working for a company will now disable the automation
" + "* Bug Fix: Stock market should now be correctly initialized in BitNode-8 (by Kline-)
" + "* Bug Fix: bladeburner.getCurrentAction() should now properly an 'Idle' object rather than null (by Kline-)
" + - "* Bug Fix: Bladeburner skill cost multiplier should now properly increase in BitNode-12 (by hydroflame)
"; + "* Bug Fix: Bladeburner skill cost multiplier should now properly increase in BitNode-12 (by hydroflame)
" } diff --git a/src/NetscriptFunctions.js b/src/NetscriptFunctions.js index f780f2302..f4b7d305c 100644 --- a/src/NetscriptFunctions.js +++ b/src/NetscriptFunctions.js @@ -5,7 +5,7 @@ import {updateActiveScriptsItems} from "./ActiveScriptsUI"; import {Augmentations, Augmentation, augmentationExists, installAugmentations, AugmentationNames} from "./Augmentations"; -import {BitNodeMultipliers} from "./BitNode"; +import {BitNodeMultipliers} from "./BitNodeMultipliers"; import {determineCrimeSuccess, findCrime} from "./Crimes"; import {Bladeburner} from "./Bladeburner"; import {Companies, Company, CompanyPosition, @@ -3639,6 +3639,21 @@ function NetscriptFunctions(workerScript) { throw makeRuntimeRejectMsg(workerScript, "getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " + "at the Bladeburner division or because you do not have Source-File 7"); }, + getSkillUpgradeCost : function(skillName="") { + if (workerScript.checkingRam) { + return updateStaticRam("getSkillUpgradeCost", CONSTANTS.ScriptBladeburnerApiBaseRamCost); + } + updateDynamicRam("getSkillUpgradeCost", CONSTANTS.ScriptBladeburnerApiBaseRamCost); + if (Player.bladeburner instanceof Bladeburner && (Player.bitNodeN === 7 || hasBladeburner2079SF)) { + try { + return Player.bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript); + } catch(e) { + throw makeRuntimeRejectMsg(workerScript, "Bladeburner.getSkillUpgradeCost() failed with exception: " + e); + } + } + throw makeRuntimeRejectMsg(workerScript, "getSkillUpgradeCost() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " + + "at the Bladeburner division or because you do not have Source-File 7"); + }, upgradeSkill : function(skillName) { if (workerScript.checkingRam) { return updateStaticRam("upgradeSkill", CONSTANTS.ScriptBladeburnerApiBaseRamCost); @@ -3786,6 +3801,14 @@ function NetscriptFunctions(workerScript) { } throw makeRuntimeRejectMsg(workerScript, "joinBladeburnerDivision() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " + "at the Bladeburner division or because you do not have Source-File 7"); + }, + getBonusTime : function() { + if (workerScript.checkingRam) {return 0;} + if ((Player.bitNodeN === 7 || hasBladeburner2079SF)) { + return Math.round(Player.bladeburner.storedCycles / 5); + } + throw makeRuntimeRejectMsg(workerScript, "getBonusTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " + + "at the Bladeburner division or because you do not have Source-File 7"); } } } //End return diff --git a/src/engine.js b/src/engine.js index 202c0ca51..8ea543dcd 100644 --- a/src/engine.js +++ b/src/engine.js @@ -153,6 +153,7 @@ $(document).keydown(function(e) { let Engine = { version: "", Debug: true, + overview: new CharacterOverview(), //Clickable objects Clickables: {