Skip to content

Commit

Permalink
Updated version to v0.41.0. Bug fixes for Gang API. Some Gang API fun…
Browse files Browse the repository at this point in the history
…ctions now log. Final rebalancing for gang rework
  • Loading branch information
danielyxie committed Oct 29, 2018
1 parent 23494a1 commit ea3b13b
Show file tree
Hide file tree
Showing 8 changed files with 622 additions and 168,238 deletions.
56,961 changes: 1 addition & 56,960 deletions dist/engine.bundle.js

Large diffs are not rendered by default.

111,744 changes: 505 additions & 111,239 deletions dist/vendor.bundle.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,40 @@
Changelog
=========

v0.41.0 - 10/29/2018
--------------------
* WARNING: In NetscriptJS, defining a function called print() is no longer possible
* Gang Mechanic Changes (BitNode-2):
* Added a Gang Netscript API
* Added new 'ascension' mechanic for Gang Members
* The first three gang members are now 'free' (can be recruited instantly)
* Maximum number of increased Gang Members increased from 20 to 30
* Changed the formula for calculating respect needed to recruit the next gang member
* Added a new category of upgrades for Gang Members: Augmentations
* Non-Augmentation Gang member upgrades are now significantly weaker
* Reputation for your Gang faction can no longer be gained through Infiltration
* Re-worked the territory 'warfare' mechanic so that player can choose when to engage in it
* Gang Members can now be killed during territory 'warfare'
* Changed BitNode-2 Multipliers to make hacking slightly less profitable
* Gang Member Equipment + Upgrades now get cheaper as your gang grows in power and respect
* The effects of Source-File 2 are now slightly more powerful
* RAM Cost of accessing the global document object lowered from 100 GB to 25 GB
* RAM Cost to use Singularity Functions outside of BitNode-4 lowered by 75%. They now only cost twice as much as they do in BitNode-4
* b1t_flum3.exe now takes significantly less time to create
* Crimes commited through Singularity function no longer give half money/exp
* Improved number formatting for Player 'work' actions (including crimes, etc.). These numbers should also adhere to locale settings now (by Kline-)
* The order that Augmentations are listed in (when purchasing from Faction and viewing your Augmentations) is now saved and persists when choosing different orders
* getCharacterInformation() Singularity function now returns multiplier information (from Augmentations/Source Files)
* Bug Fix: Calling print() in NetscriptJS no longer brings up the print dialog
* Bug Fix: Fixed a bug that sometimes caused a blank black screen when destroying/resetting/switching BitNodes
* Bug Fix: Netscript calls that throw errors will now no longer cause the 'concurrent calls' error if they are caught in the script. i.e. try/catch should now work properly in scripts
* Bug Fix: Fixed a bug where sometimes the NeuroFlux Governor Augmentation level would be incorrectly calculated when the game was loaded
* Bug Fix: Fixed a bug where calling the scp() Netscript function with invalid hostname/ips would throw an unclear error message
* Bug Fix: Bladeburner API function getActionCountRemaining() should now work properly for BlackOps
* Bug Fix: Black Ops can no longer be attempted out-of-order or without the required rank via Bladeburner API
* Bug Fix: Dynamic RAM Calculation now properly accounts for number of threads
* RAM cost for basic Netscript functions added to documentation (by CBJamo)

v0.40.5 - 10/09/2018
--------------------
* Added codingcontract.getContractType() Netscript function
Expand Down
54 changes: 26 additions & 28 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bitburner - development</title>
<title>Bitburner</title>
<link rel="apple-touch-icon" sizes="180x180" href="dist/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="dist/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="dist/favicon-16x16.png">
Expand Down Expand Up @@ -109,7 +109,7 @@

<div id="script-editor-filename-wrapper">
<p id="script-editor-filename-tag"> <strong style="background-color:#555;">Script name: </strong></p>
<input id="script-editor-filename" type="text" maxlength="30" tabindex="1" />
<input id="script-editor-filename" type="text" maxlength="30" tabindex="1"/>
</div>

<div id="javascript-editor"></div>
Expand Down Expand Up @@ -159,7 +159,7 @@ <h1 style="color:white;"> Script Editor Options </h1>

<fieldset>
<label for="script-editor-option-maxerr" class="tooltip">Max Error Count</label>
<input type="range" max="1000" min="50" value="200" step="1" name="script-editor-option-maxerr" id="script-editor-option-maxerr" />
<input type="range" max="1000" min="50" value="200" step="1" name="script-editor-option-maxerr" id="script-editor-option-maxerr"/>
<em id="script-editor-option-maxerror-value-label" style="font-style: normal;"></em>
</fieldset>
</div> <!-- End script editor options panel -->
Expand All @@ -170,7 +170,7 @@ <h1 style="color:white;"> Script Editor Options </h1>
<table id="terminal">
<tr id="terminal-input">
<td id="terminal-input-td" tabindex="2">$
<input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" onfocus="this.value = this.value;" />
<input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" onfocus="this.value = this.value;"/>
</td>
</tr>
</table>
Expand All @@ -187,7 +187,7 @@ <h1 style="color:white;"> Script Editor Options </h1>
provides information about each script's production. The scripts are categorized by the hostname of the servers on which
they are running. </p>
<p id="active-scripts-total-prod">Total online production of
Active scripts: <span class="money-gold"><span id="active-scripts-total-production-active">$0.000</span> / sec</span><br />
Active scripts: <span class="money-gold"><span id="active-scripts-total-production-active">$0.000</span> / sec</span><br/>
Total online production since last Aug installation: <span id="active-scripts-total-prod-aug-total" class="money-gold">$0.000</span>
(<span class="money-gold"><span id="active-scripts-total-prod-aug-avg" class="money-gold">$0.000</span> / sec</span>)</p>
<ul class="active-scripts-list" id="active-scripts-list" style="list-style: none;">
Expand All @@ -201,19 +201,19 @@ <h1 id="hacknet-nodes-title"> Hacknet Nodes </h1>
The Hacknet is a global, decentralized network of machines. It is used by hackers all around
the world to anonymously share computing power and perform distributed cyberattacks without the
fear of being traced.
<br /><br />
<br/><br/>
Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its
resources to the Hacknet network. This allows you to take a small percentage of profits
from hacks performed on the network. Essentially, you are renting out your Node's computing power.
<br /><br />
<br/><br/>
Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded
in order to increase its computing power and thereby increase the profit you earn from it.
</p>
<a id="hacknet-nodes-purchase-button" class="a-link-button"> Purchase Hacknet Node </a>
<br />
<br/>
<div id="hacknet-nodes-money-multipliers-div">
<p id="hacknet-nodes-money">
<span>Money:</span><span id="hacknet-nodes-player-money" class="money-gold"></span><br />
<span>Money:</span><span id="hacknet-nodes-player-money" class="money-gold"></span><br/>
<span>Total Hacknet Node Production:</span><span id="hacknet-nodes-total-production" class="money-gold"></span>
</p>
<span id="hacknet-nodes-multipliers">
Expand Down Expand Up @@ -471,8 +471,7 @@ <h2 id="world-city-name"> </h2>

<!-- Tutorial content -->
<div id="tutorial-container" class="generic-menupage-container">
<a id="tutorial-getting-started-link" class="a-link-button"
href="http://bitburner.wikia.com/wiki/Chapt3rs_Guide_to_Getting_Started_with_Bitburner" target="_blank"> Getting Started </a>
<a id="tutorial-getting-started-link" class="a-link-button" href="http://bitburner.wikia.com/wiki/Chapt3rs_Guide_to_Getting_Started_with_Bitburner" target="_blank"> Getting Started </a>
<a id="tutorial-networking-link" class="a-link-button"> Servers & Networking </a>
<a id="tutorial-hacking-link" class="a-link-button"> Hacking </a>
<a id="tutorial-scripts-link" class="a-link-button"> Scripts </a>
Expand All @@ -481,8 +480,7 @@ <h2 id="world-city-name"> </h2>
<a id="tutorial-jobs-link" class="a-link-button"> Companies and Infiltration </a>
<a id="tutorial-factions-link" class="a-link-button"> Factions </a>
<a id="tutorial-augmentations-link" class="a-link-button"> Augmentations </a>
<a id="tutorial-shortcuts-link" class="a-link-button"
href="https://bitburner.wikia.com/wiki/Shortcuts" target="_blank"> Keyboard Shortcuts </a>
<a id="tutorial-shortcuts-link" class="a-link-button" href="https://bitburner.wikia.com/wiki/Shortcuts" target="_blank"> Keyboard Shortcuts </a>

<a id="tutorial-back-button" class="a-link-button"> Back </a>
<p id="tutorial-text"> </p>
Expand Down Expand Up @@ -573,7 +571,7 @@ <h1 id="location-name"></h1>
<p id="location-slums-description">
You have entered the Slums, a poverty-ridden district filled with gangs, criminals, and
other shadowy entities. The city's government and police have neglected this area for years...
<br /><br /><br />
<br/><br/><br/>
In the Slums, you can commit crimes to earn money and experience. Crime attempts are not always
successful. Your chance at successfully committing a crime is determined by your stats.
</p>
Expand Down Expand Up @@ -620,7 +618,7 @@ <h1 id="location-name"></h1>

<div id="stock-market-container" class="generic-menupage-container">
<p>
Welcome to the World Stock Exchange (WSE)! <br /><br />
Welcome to the World Stock Exchange (WSE)! <br/><br/>

To begin trading, you must first purchase an account. WSE accounts will persist
after you 'reset' by installing Augmentations.
Expand All @@ -633,7 +631,7 @@ <h2> Trade Information eXchange (TIX) API </h2>
TIX, short for Trade Information eXchange, is the communications protocol supported by the WSE.
Purchasing access to the TIX API lets you write code to create your own algorithmic/automated
trading strategies.
<br /><br />
<br/><br/>
If you purchase access to the TIX API, you will retain that access even after
you 'reset' by installing Augmentations.
</p>
Expand All @@ -643,7 +641,7 @@ <h2> Four Sigma (4S) Market Data Feed </h2>
<p>
Four Sigma's (4S) Market Data Feed provides information about stocks
that will help your trading strategies.
<br /><br />
<br/><br/>
If you purchase access to 4S Market Data and/or the 4S TIX API, you will
retain that access even after you 'reset' by installing Augmentations.
</p>
Expand All @@ -661,7 +659,7 @@ <h2> Four Sigma (4S) Market Data Feed </h2>
<a id="stock-market-mode" class="a-link-button tooltip"></a>
<a id="stock-market-expand-tickers" class="a-link-button tooltip">Expand tickers</a>
<a id="stock-market-collapse-tickers" class="a-link-button tooltip">Collapse tickers</a>
<br /><br />
<br/><br/>
<input id="stock-market-watchlist-filter" type="text" placeholder="Filter Stocks by symbol (comma-separated list)"/>
<a id="stock-market-watchlist-filter-update" class="a-link-button"> Update Watchlist </a>
<ul id="stock-market-list" style="list-style:none;">
Expand Down Expand Up @@ -691,7 +689,7 @@ <h2> Four Sigma (4S) Market Data Feed </h2>
<div id="yes-no-text-input-box-container" class="popup-box-container">
<div id="yes-no-text-input-box-content" class="popup-box-content">
<p id="yes-no-text-input-box-text"> </p>
<input type="text" id="yes-no-text-input-box-input" pattern="[a-zA-Z0-9-_]" maxlength="30" />
<input type="text" id="yes-no-text-input-box-input" pattern="[a-zA-Z0-9-_]" maxlength="30"/>
<button id="yes-no-text-input-box-yes" class="popup-box-button"> Yes </button>
<button id="yes-no-text-input-box-no" class="popup-box-button"> No </button>
</div>
Expand All @@ -703,7 +701,7 @@ <h2> Four Sigma (4S) Market Data Feed </h2>
<p id="faction-invitation-box-text"> </p>
<p id="faction-invitation-box-message"> </p>
<p id="faction-invitation-box-warning">
Would you like to join? <br /> <br />
Would you like to join? <br/> <br/>
Warning: Joining this faction may prevent you from joining other factions during this run!
</p>
<button id="faction-invitation-box-yes" class="popup-box-button"> Yes </button>
Expand All @@ -716,8 +714,8 @@ <h2> Four Sigma (4S) Market Data Feed </h2>
<div id="infiltration-box-content" class="popup-box-content">
<p id="infiltration-box-text"> </p>

<button id="infiltration-box-sell" class="a-link-button"> Sell on Black Market </button> <br /><br />
<select id="infiltration-faction-select"> </select> <br />
<button id="infiltration-box-sell" class="a-link-button"> Sell on Black Market </button> <br/><br/>
<select id="infiltration-faction-select"> </select> <br/>
<button id="infiltration-box-faction" class="a-link-button"> Give to Faction for Reputation </button>

</div>
Expand Down Expand Up @@ -803,7 +801,7 @@ <h2> Four Sigma (4S) Market Data Feed </h2>
<div id="game-options-content" class="game-options-box">
<button id="game-options-close-button">&times;</button>
<h1> Game Options </h1>
<br />
<br/>
<div id="game-options-left-panel">
<!-- Netscript execution time -->
<fieldset>
Expand All @@ -815,7 +813,7 @@ <h1> Game Options </h1>
</span>
</label>

<input type ="range" max="100" min="10" step="1" name="settingsNSExecTimeRangeVal" id="settingsNSExecTimeRangeVal" value="25" />
<input type="range" max="100" min="10" step="1" name="settingsNSExecTimeRangeVal" id="settingsNSExecTimeRangeVal" value="25"/>
<em id="settingsNSExecTimeRangeValLabel" style="font-style: normal;"></em>
</fieldset>

Expand All @@ -829,7 +827,7 @@ <h1> Game Options </h1>
</span>
</label>

<input type="range" max="100" min="20" step="1" name="settingsNSLogRangeVal" id="settingsNSLogRangeVal" value="50" />
<input type="range" max="100" min="20" step="1" name="settingsNSLogRangeVal" id="settingsNSLogRangeVal" value="50"/>
<em id="settingsNSLogRangeValLabel" style="font-style: normal;"></em>
</fieldset>

Expand All @@ -843,7 +841,7 @@ <h1> Game Options </h1>
</span>
</label>

<input type="range" max="100" min="20" step="1" name="settingsNSPortRangeVal" id="settingsNSPortRangeVal" value="50" />
<input type="range" max="100" min="20" step="1" name="settingsNSPortRangeVal" id="settingsNSPortRangeVal" value="50"/>
<em id="settingsNSPortRangeValLabel" style="font-style: normal;"></em>
</fieldset>

Expand All @@ -855,7 +853,7 @@ <h1> Game Options </h1>
</span>
</label>

<input type="range" max="600" min="0" step="1" name="settingsAutosaveIntervalVal" id="settingsAutosaveIntervalVal" value="60" />
<input type="range" max="600" min="0" step="1" name="settingsAutosaveIntervalVal" id="settingsAutosaveIntervalVal" value="60"/>
<em id="settingsAutosaveIntervalValLabel" style="font-style: normal;"></em>
</fieldset>

Expand Down Expand Up @@ -967,7 +965,7 @@ <h1> Game Options </h1>
<a id="save-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Save Game </a>
<a id="delete-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Delete Game </a>
<a id="export-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Export Game </a>
<input type="file" id="import-game-file-selector" name="file" />
<input type="file" id="import-game-file-selector" name="file"/>
<a id="import-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Import Game </a>
<a id="debug-delete-scripts-link" class="a-link-button tooltip" style="display:block;width:46%;">
(DEBUG) Delete Active Scripts
Expand Down
2 changes: 1 addition & 1 deletion src/Constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
let CONSTANTS = {
Version: "0.40.5",
Version: "0.41.0",

//Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience
//and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then
Expand Down
5 changes: 3 additions & 2 deletions src/Gang.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
yesNoTxtInpBoxClose, yesNoBoxOpen} from "../utils/YesNoBox";

// Constants
const GangRespectToReputationRatio = 2; // Respect is divided by this to get rep gain
const GangRespectToReputationRatio = 5; // Respect is divided by this to get rep gain
const MaximumGangMembers = 30;
const GangRecruitCostMultiplier = 2;
const CyclesPerTerritoryAndPowerUpdate = 100;
Expand Down Expand Up @@ -273,7 +273,7 @@ Gang.prototype.processTerritoryAndPowerGains = function(numCycles=1) {
// Multiplicative gain (50% chance)
// This is capped per cycle, to prevent it from getting out of control
const multiplicativeGain = AllGangs[name].power * 0.008;
AllGangs[name].power += Math.min(1, multiplicativeGain);
AllGangs[name].power += Math.min(0.9, multiplicativeGain);
} else {
// Additive gain (50% chance)
const additiveGain = 0.5 * gainRoll * AllGangs[name].territory;
Expand Down Expand Up @@ -357,6 +357,7 @@ Gang.prototype.getRespectNeededToRecruitMember = function() {
}

Gang.prototype.recruitMember = function(name) {
name = String(name);
if (name === "" || !this.canRecruitMember()) { return false; }

// Check for already-existing names
Expand Down
Loading

0 comments on commit ea3b13b

Please sign in to comment.