Rebalanced the Super-Booster era (now up to 1e9,250 points)
Implemented a game version variable
+
Beta v1.0
+
+
Made sure any built-in saves had Auto-Save turned on
+
Fixed a visual bug for mobile users
+
Added a "time played" display in the info tab
+
Implemented a NaN check system
+
+ Time Played: {{ formatTime(player.timePlayed) }}
Changelog
Hotkeys
P: Prestige reset
@@ -161,25 +169,25 @@
12 space energy Generators reset nothing
-
-
+
+
-
-
+
+
-
3 Super-Boosters Keep Prestige Upgrades on reset
-
4 Super-Boosters Keep Booster/Generator milestones on reset
+
3 Super-Boosters Keep Prestige Upgrades on reset
+
4 Super-Boosters Keep Booster/Generator milestones on reset
-
-
-
-
-
+
+
+
+
+
diff --git a/js/game.js b/js/game.js
index 36e5217..e195824 100644
--- a/js/game.js
+++ b/js/game.js
@@ -1,15 +1,17 @@
var player;
var tmp = {};
var needCanvasUpdate = true;
+var NaNalert = false;
function getStartPlayer() {
return {
tab: "tree",
time: Date.now(),
autosave: true,
- versionType: "alpha",
- version: 10,
+ versionType: "beta",
+ version: 1.0,
timePlayed: 0,
+ hasNaN: false,
points: new Decimal(10),
p: {
unl: false,
@@ -718,7 +720,7 @@ function versionCheck() {
}
if (player.versionType=="alpha") {
if (player.version<10&&player.sb.unl) {
- if (confirm("The Super-Booster era has been rebalanced since the last time you were here, so... would you like to import a built-in save for where you should start at?")) importSave(SAVES.PRE_SUPER_BOOSTERS)
+ if (confirm("Since the last time you played, several changes to Super-Booster effects have been made. Would you like to roll back your save to that point in the progression, in order for you to experience the new features properly?")) importSave(SAVES.PRE_SUPER_BOOSTERS)
setVersion = false;
}
}
@@ -746,6 +748,7 @@ function checkForVars() {
if (player.s.buildings[5] === undefined) player.s.buildings[5] = new Decimal(0);
if (player.sb === undefined) player.sb = getStartPlayer().sb
if (player.timePlayed === undefined) player.timePlayed = 0
+ if (player.hasNaN === undefined) player.hasNaN = false
}
function convertToDecimal() {
@@ -789,6 +792,10 @@ function commaFormat(num, precision) {
function format(decimal, precision=3) {
decimal = new Decimal(decimal)
+ if (isNaN(decimal.sign)||isNaN(decimal.layer)||isNaN(decimal.mag)) {
+ player.hasNaN = true;
+ return "NaN"
+ }
if (decimal.eq(1/0)) return "Infinity"
if (decimal.gte("eee1000")) return exponentialFormat(decimal, precision)
else if (decimal.gte("ee1000")) return "ee"+format(decimal.log10().log10())
@@ -802,6 +809,12 @@ function formatWhole(decimal) {
return format(decimal, 0)
}
+function formatTime(s) {
+ if (s<60) return format(s)+"s"
+ else if (s<3600) return formatWhole(Math.floor(s/60))+"m "+format(s%60)+"s"
+ else return formatWhole(Math.floor(s/3600))+"h "+formatWhole(Math.floor(s/60)%60)+"m "+format(s%60)+"s"
+}
+
function showTab(name) {
if (!TAB_REQS[name]()) return
player.tab = name
@@ -1323,6 +1336,7 @@ function getSuperBoosterPow() {
}
function gameLoop(diff) {
+ if (isNaN(diff)) diff = 0;
player.timePlayed += diff
if (player.p.upgrades.includes(11)) player.points = player.points.plus(tmp.pointGen.times(diff))
if (player.g.unl) player.g.power = player.g.power.plus(tmp.layerEffs.g.times(diff))
@@ -1333,6 +1347,11 @@ function gameLoop(diff) {
}
if (player.b.auto&&player.t.best.gte(5)) doReset("b")
if (player.g.auto&&player.s.best.gte(5)) doReset("g")
+
+ if (player.hasNaN&&!NaNalert) {
+ alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.")
+ NaNalert = true;
+ }
}
function hardReset() {
diff --git a/js/saves.js b/js/saves.js
index f233a43..021a823 100644
--- a/js/saves.js
+++ b/js/saves.js
@@ -1,3 +1,3 @@
const SAVES = {
- PRE_SUPER_BOOSTERS: "eyJ0YWIiOiJvcHRpb25zIiwidGltZSI6MTU5ODE5ODI4NjQ4OCwiYXV0b3NhdmUiOmZhbHNlLCJwb2ludHMiOiIzLjM2MDE5MjY3OTg3MzQ4M2U0MTQzIiwicCI6eyJ1bmwiOnRydWUsInBvaW50cyI6IjIuMTIyNTcyOTgwNzY0MzE0NmUyNzYzIiwidXBncmFkZXMiOlsxMSwxMiwyMS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RzIjoiMTYiLCJiZXN0IjoiMTYiLCJzcGVudCI6IjY4IiwiYnVpbGRpbmdzIjp7IjEiOiIxNyIsIjIiOiIyNiIsIjMiOiIxMyIsIjQiOiI4IiwiNSI6IjQifSwidXBncmFkZXMiOlsxMSwxMiwxMywxNCwyMSwyMywyNCwzMSwyMiwzMiwzMywzNF19LCJzYiI6eyJ1bmwiOmZhbHNlLCJvcmRlciI6MCwicG9pbnRzIjoiMCIsImJlc3QiOiIwIiwidXBncmFkZXMiOltdfSwidmVyc2lvblR5cGUiOiJhbHBoYSIsInZlcnNpb24iOjEwfQ==",
}
\ No newline at end of file
diff --git a/js/v.js b/js/v.js
index c743068..c3c3195 100644
--- a/js/v.js
+++ b/js/v.js
@@ -8,6 +8,7 @@ function loadVue() {
tmp,
format,
formatWhole,
+ formatTime,
layerUnl,
getLayerEffDesc,
doReset,
diff --git a/style.css b/style.css
index b257c12..e40a630 100644
--- a/style.css
+++ b/style.css
@@ -23,6 +23,24 @@ html, body {
height: 100%;
}
+.upgTable {
+ display: flex !important;
+ flex-flow: column wrap;
+ justify-content: center;
+ align-items: center;
+ max-width: 100%;
+ margin: 0 auto;
+}
+
+.upgRow {
+ display: flex !important;
+ flex-flow: row wrap;
+ justify-content: center;
+ align-items: center;
+ max-width: 100%;
+ margin: 0 auto;
+}
+
h1, h2 {
display: inline;
}