Changed confirm to prompt, updated version, more stock market balancing

This commit is contained in:
danielyxie
2017-11-02 22:11:14 -05:00
parent bc6f0da677
commit 03fdaeaba4
6 changed files with 80 additions and 40 deletions
+15 -9
View File
@@ -282,6 +282,7 @@ function PlayerObject() {
this.scriptProdSinceLastAug = 0;
this.stockProdSinceLastAug = 0;
this.crimeProdSinceLastAug = 0;
this.jobProdSinceLastAug = 0;
};
PlayerObject.prototype.init = function() {
@@ -2581,7 +2582,7 @@ function powerOfTwo(n) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return CONSTANTS; });
let CONSTANTS = {
Version: "0.32.0",
Version: "0.32.1",
//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
@@ -3289,6 +3290,11 @@ let CONSTANTS = {
"Returns the amount of time in milliseconds that have passed since you last installed Augmentations (or destroyed a BitNode).<br><br>" +
"<i><u>sprintf()/vsprintf()</u></i><br>" +
"<a href='https://github.com/alexei/sprintf.js' target='_blank'>See this link for details</a><br><br>" +
"<i><u>prompt(message)</u></i><br>" +
"Prompts the player with a dialog box with two options: 'Yes' and 'No'. This function will returns true if " +
"the player clicks 'Yes' and false if the player click's 'No'. The script's execution is halted until the " +
"player selects 'Yes' or 'No'. The function takes a single string as an argument which specifies the text " +
"that appears on the dialog box.<br><br>" +
"<u><h1>Hacknet Nodes API</h1></u><br>" +
"Netscript provides the following API for accessing and upgrading your Hacknet Nodes through scripts. This API does NOT work offline.<br><br>" +
"<i><u>hacknetnodes</u></i><br>A special variable. This is an array that maps to the Player's Hacknet Nodes. The Hacknet Nodes are accessed through " +
@@ -3692,11 +3698,11 @@ let CONSTANTS = {
"v0.32.1<br>" +
"-Updated Netscript's 'interpreter/engine' to use the Bluebird promise library instead of native promises. " +
"It should now be faster and more memory-efficient. If this has broken any Netscript features please report it through Github or the subreddit (reddit.com/r/bitburner)<br>" +
"-Rebalanced stock market (adjusted parameters such as the volatility/trends/starting price of certain stocks)<br>" +
"-Added confirm() Netscript function<br>" +
"-Rebalanced stock market (adjusted parameters such as the volatility/trends/starting price of certain stocks)<br>" +
"-Added prompt() Netscript function<br>" +
"-Added 'Buy Max' and 'Sell All' functions to Stock Market UI<br>" +
"-Added 'Portfolio' Mode to Stock Market UI so you can only view stocks you have a position/order in<br>" +
"-Added a button to kill a script from its log display box<br>" +
"-Added a button to kill a script from its log display box<br><br>" +
"v0.32.0<br>" +
"-Released BitNode-8: Ghost of Wall Street<br>" +
"-Re-designed Stock Market UI<br>" +
@@ -22921,7 +22927,7 @@ function NetscriptFunctions(workerScript) {
getTimeSinceLastAug : function() {
return __WEBPACK_IMPORTED_MODULE_14__Player_js__["a" /* Player */].playtimeSinceLastAug;
},
confirm : function(txt) {
prompt : function(txt) {
if (__WEBPACK_IMPORTED_MODULE_30__utils_YesNoBox_js__["e" /* yesNoBoxOpen */]) {
workerScript.scriptRef.log("ERROR: confirm() failed because a pop-up dialog box is already open");
return false;
@@ -36736,11 +36742,11 @@ function initStockMarket() {
}
var ecorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].AevumECorp;
var ecorpStk = new Stock(ecorp, StockSymbols[ecorp], 0.5, true, 16, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(20000, 25000));
var ecorpStk = new Stock(ecorp, StockSymbols[ecorp], 0.45, true, 19, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(20000, 25000));
StockMarket[ecorp] = ecorpStk;
var megacorp = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12MegaCorp;
var megacorpStk = new Stock(megacorp, StockSymbols[megacorp], 0.5, true, 16, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(25000, 33000));
var megacorpStk = new Stock(megacorp, StockSymbols[megacorp], 0.45, true, 19, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(25000, 33000));
StockMarket[megacorp] = megacorpStk;
var blade = __WEBPACK_IMPORTED_MODULE_2__Location_js__["a" /* Locations */].Sector12BladeIndustries;
@@ -36852,11 +36858,11 @@ function initStockMarket() {
StockMarket[sigmacosm] = sigmacosmStk;
var joesguns = "Joes Guns";
var joesgunsStk = new Stock(joesguns, StockSymbols[joesguns], 3.7, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
var joesgunsStk = new Stock(joesguns, StockSymbols[joesguns], 3.8, true, 1, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
StockMarket[joesguns] = joesgunsStk;
var catalyst = "Catalyst Ventures";
var catalystStk = new Stock(catalyst, StockSymbols[catalyst], 1.5, true, 13, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
var catalystStk = new Stock(catalyst, StockSymbols[catalyst], 1.5, true, 14, Object(__WEBPACK_IMPORTED_MODULE_7__utils_HelperFunctions_js__["d" /* getRandomInt */])(500, 1000));
StockMarket[catalyst] = catalystStk;
var microdyne = "Microdyne Technologies";