1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-25 01:41:45 +00:00

v1.0 Patch 1

This commit is contained in:
Jacorb90 2020-09-09 21:39:08 -04:00
parent 3e50c314ca
commit 3dc7f3cef0
3 changed files with 20 additions and 7 deletions

View file

@ -18,10 +18,14 @@
<h2>Thank you for playing The Prestige Tree v1.0!</h2><br><br> <h2>Thank you for playing The Prestige Tree v1.0!</h2><br><br>
<h4>It took you {{formatTime(player.timePlayed)}}</h4><br><br><br><br><br> <h4>It took you {{formatTime(player.timePlayed)}}</h4><br><br><br><br><br>
If you would like to speedrun this, play again from the beginning and record the whole thing as fast as possible, then submit in <span class="link" onclick="window.open('https://discord.gg/wwQfgPa','mywindow')" target="_blank">my discord</span><br><br><br><br><br> If you would like to speedrun this, play again from the beginning and record the whole thing as fast as possible, then submit in <span class="link" onclick="window.open('https://discord.gg/wwQfgPa','mywindow')" target="_blank">my discord</span><br><br><br><br><br>
<button class="longUpg can" onclick="hardReset(true)">Play Again</button> <button class="longUpg can" onclick="hardReset(true)">Play Again</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="longUpg can" onclick="keepGoing()">Keep Going</button>
</div> </div>
<div v-if="player.tab=='changelog'" class="col right"> <div v-if="player.tab=='changelog'" class="col right">
<button class="back" onclick="showTab('tree')"></button><br><br> <button class="back" onclick="showTab('tree')"></button><br><br>
<h3>v1.0 Patch 1</h3>
<ul>
<li>Added an option to keep going at endgame</li>
</ul><br>
<h3>v1.0 Full Release</h3> <h3>v1.0 Full Release</h3>
<ul> <ul>
<li>Converted Vue to production mode</li> <li>Converted Vue to production mode</li>

View file

@ -15,9 +15,10 @@ function getStartPlayer() {
autosave: true, autosave: true,
msDisplay: "always", msDisplay: "always",
offlineProd: true, offlineProd: true,
versionType: "beta", versionType: "real",
version: 1.3, version: 1.0,
timePlayed: 0, timePlayed: 0,
keepGoing: false,
hasNaN: false, hasNaN: false,
points: new Decimal(10), points: new Decimal(10),
p: { p: {
@ -1684,6 +1685,7 @@ function checkForVars() {
if (player.ba === undefined) player.ba = start.ba if (player.ba === undefined) player.ba = start.ba
if (player.offlineProd === undefined) player.offlineProd = true if (player.offlineProd === undefined) player.offlineProd = true
if (player.sp === undefined) player.sp = start.sp if (player.sp === undefined) player.sp = start.sp
if (player.keepGoing === undefined) player.keepGoing = false
} }
function convertToDecimal() { function convertToDecimal() {
@ -3128,13 +3130,19 @@ function addToSGBase() {
return toAdd return toAdd
} }
function keepGoing() {
player.keepGoing = true;
player.tab = "tree"
needCanvasUpdate = true;
}
const ENDGAME = new Decimal("1e40000000"); const ENDGAME = new Decimal("1e40000000");
function gameLoop(diff) { function gameLoop(diff) {
diff = new Decimal(diff) diff = new Decimal(diff)
if (isNaN(diff.toNumber())) diff = new Decimal(0); if (isNaN(diff.toNumber())) diff = new Decimal(0);
if (player.points.gte(ENDGAME)) gameEnded = true; if (player.points.gte(ENDGAME)) gameEnded = true;
if (gameEnded) { if (gameEnded&&!player.keepGoing) {
diff = new Decimal(0); diff = new Decimal(0);
player.tab = "gameEnded"; player.tab = "gameEnded";
} }
@ -3221,13 +3229,13 @@ function hardReset() {
var saveInterval = setInterval(function() { var saveInterval = setInterval(function() {
if (player===undefined) return; if (player===undefined) return;
if (gameEnded) return; if (gameEnded&&!player.keepGoing) return;
if (player.autosave) save(); if (player.autosave) save();
}, 5000) }, 5000)
var interval = setInterval(function() { var interval = setInterval(function() {
if (player===undefined||tmp===undefined) return; if (player===undefined||tmp===undefined) return;
if (gameEnded) return; if (gameEnded&&!player.keepGoing) return;
let diff = (Date.now()-player.time)/1000 let diff = (Date.now()-player.time)/1000
if (!player.offlineProd) offTime.remain = 0 if (!player.offlineProd) offTime.remain = 0
if (offTime.remain>0) { if (offTime.remain>0) {
@ -3243,7 +3251,7 @@ var interval = setInterval(function() {
document.onkeydown = function(e) { document.onkeydown = function(e) {
if (player===undefined) return; if (player===undefined) return;
if (gameEnded) return; if (gameEnded&&!player.keepGoing) return;
let shiftDown = e.shiftKey let shiftDown = e.shiftKey
let ctrlDown = e.ctrlKey let ctrlDown = e.ctrlKey
let key = e.key let key = e.key

View file

@ -32,6 +32,7 @@ function loadVue() {
activateSpell, activateSpell,
spellActive, spellActive,
updateToCast, updateToCast,
keepGoing,
LAYERS, LAYERS,
LAYER_RES, LAYER_RES,
LAYER_TYPE, LAYER_TYPE,