mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
v1.0 Patch 1
This commit is contained in:
parent
3e50c314ca
commit
3dc7f3cef0
3 changed files with 20 additions and 7 deletions
|
@ -18,10 +18,14 @@
|
|||
<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>
|
||||
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> <button class="longUpg can" onclick="keepGoing()">Keep Going</button>
|
||||
</div>
|
||||
<div v-if="player.tab=='changelog'" class="col right">
|
||||
<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>
|
||||
<ul>
|
||||
<li>Converted Vue to production mode</li>
|
||||
|
|
20
js/game.js
20
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
|
||||
|
|
1
js/v.js
1
js/v.js
|
@ -32,6 +32,7 @@ function loadVue() {
|
|||
activateSpell,
|
||||
spellActive,
|
||||
updateToCast,
|
||||
keepGoing,
|
||||
LAYERS,
|
||||
LAYER_RES,
|
||||
LAYER_TYPE,
|
||||
|
|
Loading…
Reference in a new issue