From 3dc7f3cef05c7a8363f22dc20133ae4ed5775a62 Mon Sep 17 00:00:00 2001
From: Jacorb90 <39597610+Jacorb90@users.noreply.github.com>
Date: Wed, 9 Sep 2020 21:39:08 -0400
Subject: [PATCH] v1.0 Patch 1
---
index.html | 6 +++++-
js/game.js | 20 ++++++++++++++------
js/v.js | 1 +
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/index.html b/index.html
index 4c06ba2..0e225c7 100644
--- a/index.html
+++ b/index.html
@@ -18,10 +18,14 @@
Thank you for playing The Prestige Tree v1.0!
It took you {{formatTime(player.timePlayed)}}
If you would like to speedrun this, play again from the beginning and record the whole thing as fast as possible, then submit in my discord
-
+
+
v1.0 Patch 1
+
+ - Added an option to keep going at endgame
+
v1.0 Full Release
- Converted Vue to production mode
diff --git a/js/game.js b/js/game.js
index 8b74897..16e100e 100644
--- a/js/game.js
+++ b/js/game.js
@@ -15,9 +15,10 @@ function getStartPlayer() {
autosave: true,
msDisplay: "always",
offlineProd: true,
- versionType: "beta",
- version: 1.3,
+ versionType: "real",
+ version: 1.0,
timePlayed: 0,
+ keepGoing: false,
hasNaN: false,
points: new Decimal(10),
p: {
@@ -1684,6 +1685,7 @@ function checkForVars() {
if (player.ba === undefined) player.ba = start.ba
if (player.offlineProd === undefined) player.offlineProd = true
if (player.sp === undefined) player.sp = start.sp
+ if (player.keepGoing === undefined) player.keepGoing = false
}
function convertToDecimal() {
@@ -3128,13 +3130,19 @@ function addToSGBase() {
return toAdd
}
+function keepGoing() {
+ player.keepGoing = true;
+ player.tab = "tree"
+ needCanvasUpdate = true;
+}
+
const ENDGAME = new Decimal("1e40000000");
function gameLoop(diff) {
diff = new Decimal(diff)
if (isNaN(diff.toNumber())) diff = new Decimal(0);
if (player.points.gte(ENDGAME)) gameEnded = true;
- if (gameEnded) {
+ if (gameEnded&&!player.keepGoing) {
diff = new Decimal(0);
player.tab = "gameEnded";
}
@@ -3221,13 +3229,13 @@ function hardReset() {
var saveInterval = setInterval(function() {
if (player===undefined) return;
- if (gameEnded) return;
+ if (gameEnded&&!player.keepGoing) return;
if (player.autosave) save();
}, 5000)
var interval = setInterval(function() {
if (player===undefined||tmp===undefined) return;
- if (gameEnded) return;
+ if (gameEnded&&!player.keepGoing) return;
let diff = (Date.now()-player.time)/1000
if (!player.offlineProd) offTime.remain = 0
if (offTime.remain>0) {
@@ -3243,7 +3251,7 @@ var interval = setInterval(function() {
document.onkeydown = function(e) {
if (player===undefined) return;
- if (gameEnded) return;
+ if (gameEnded&&!player.keepGoing) return;
let shiftDown = e.shiftKey
let ctrlDown = e.ctrlKey
let key = e.key
diff --git a/js/v.js b/js/v.js
index 458d8ac..a990872 100644
--- a/js/v.js
+++ b/js/v.js
@@ -32,6 +32,7 @@ function loadVue() {
activateSpell,
spellActive,
updateToCast,
+ keepGoing,
LAYERS,
LAYER_RES,
LAYER_TYPE,