mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-02 05:47:28 +00:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
b2b62039bb
3 changed files with 68 additions and 10 deletions
22
index.html
22
index.html
|
@ -2,7 +2,7 @@
|
||||||
<head>
|
<head>
|
||||||
<title>The Prestige Tree</title>
|
<title>The Prestige Tree</title>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
|
||||||
<script type="text/javascript" src="js/break_eternity.js"></script>
|
<script type="text/javascript" src="js/break_eternity.js"></script>
|
||||||
<script type="text/javascript" src="js/temp.js"></script>
|
<script type="text/javascript" src="js/temp.js"></script>
|
||||||
<script type="text/javascript" src="js/saves.js"></script>
|
<script type="text/javascript" src="js/saves.js"></script>
|
||||||
|
@ -12,9 +12,25 @@
|
||||||
</head>
|
</head>
|
||||||
<body onload="load()">
|
<body onload="load()">
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<div class="vl"></div>
|
<div class="vl" v-if="player.tab!='gameEnded'"></div>
|
||||||
|
<div v-if="player.tab=='gameEnded'" class="fullWidth">
|
||||||
|
<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>
|
||||||
|
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>
|
||||||
|
</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 Full Release</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Converted Vue to production mode</li>
|
||||||
|
<li>Added an end screen at 1e40,000,000 Points</li>
|
||||||
|
</ul><br>
|
||||||
|
<h3>v1.0 Beta 4</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Balanced up to 1e40,000,000 Points & 500,000 Super-Prestige Points</li>
|
||||||
|
</ul><br>
|
||||||
<h3>v1.0 Beta 3</h3>
|
<h3>v1.0 Beta 3</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added a hotkey for the fourth Spell</li>
|
<li>Added a hotkey for the fourth Spell</li>
|
||||||
|
@ -327,7 +343,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div id="treeTab" onscroll="resizeCanvas()" class="col left">
|
<div id="treeTab" v-if="player.tab!='gameEnded'" onscroll="resizeCanvas()" class="col left">
|
||||||
<img id="optionWheel" v-if="player.tab!='options'" src="options_wheel.png" onclick="showTab('options')"></img>
|
<img id="optionWheel" v-if="player.tab!='options'" src="options_wheel.png" onclick="showTab('options')"></img>
|
||||||
<div id="info" v-if="player.tab!='info'" onclick="showTab('info')"><br>i</div>
|
<div id="info" v-if="player.tab!='info'" onclick="showTab('info')"><br>i</div>
|
||||||
<span v-if="offTime.remain>0">
|
<span v-if="offTime.remain>0">
|
||||||
|
|
34
js/game.js
34
js/game.js
|
@ -6,6 +6,7 @@ var offTime = {
|
||||||
};
|
};
|
||||||
var needCanvasUpdate = true;
|
var needCanvasUpdate = true;
|
||||||
var NaNalert = false;
|
var NaNalert = false;
|
||||||
|
var gameEnded = false;
|
||||||
|
|
||||||
function getStartPlayer() {
|
function getStartPlayer() {
|
||||||
return {
|
return {
|
||||||
|
@ -1422,7 +1423,11 @@ const LAYER_UPGS = {
|
||||||
desc: "Super-Prestige Points boost Super-Prestige Point gain.",
|
desc: "Super-Prestige Points boost Super-Prestige Point gain.",
|
||||||
cost: new Decimal(40),
|
cost: new Decimal(40),
|
||||||
unl: function() { return player.sp.upgrades.includes(14)||player.sp.upgrades.includes(23) },
|
unl: function() { return player.sp.upgrades.includes(14)||player.sp.upgrades.includes(23) },
|
||||||
currently: function() { return player.sp.points.plus(1).sqrt() },
|
currently: function() {
|
||||||
|
let sp = player.sp.points
|
||||||
|
if (sp.gte(2e4)) sp = sp.cbrt().times(Math.pow(2e4, 2/3));
|
||||||
|
return sp.plus(1).sqrt()
|
||||||
|
},
|
||||||
effDisp: function(x) { return format(x)+"x" },
|
effDisp: function(x) { return format(x)+"x" },
|
||||||
},
|
},
|
||||||
31: {
|
31: {
|
||||||
|
@ -1438,14 +1443,16 @@ const LAYER_UPGS = {
|
||||||
effDisp: function(x) { return format(x.pow(player.sp.upgrades.includes(11)?100:1))+"x later" },
|
effDisp: function(x) { return format(x.pow(player.sp.upgrades.includes(11)?100:1))+"x later" },
|
||||||
},
|
},
|
||||||
33: {
|
33: {
|
||||||
desc: "???",
|
desc: "Points boost Super-Prestige Point gain.",
|
||||||
cost: new Decimal(1/0),
|
cost: new Decimal(1e4),
|
||||||
unl: function() { return false },
|
unl: function() { return player.sp.upgrades.includes(24)&&player.sp.upgrades.includes(32) },
|
||||||
|
currently: function() { return player.points.plus(1).log10().pow(0.1) },
|
||||||
|
effDisp: function(x) { return format(x)+"x" },
|
||||||
},
|
},
|
||||||
34: {
|
34: {
|
||||||
desc: "???",
|
desc: "Boosters & Generators are 25% stronger.",
|
||||||
cost: new Decimal(1/0),
|
cost: new Decimal(1.5e5),
|
||||||
unl: function() { return false },
|
unl: function() { return player.sp.upgrades.includes(33) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1901,6 +1908,7 @@ function getLayerGainMult(layer) {
|
||||||
break;
|
break;
|
||||||
case "sp":
|
case "sp":
|
||||||
if (player.sp.upgrades.includes(24)) mult = mult.times(LAYER_UPGS.sp[24].currently())
|
if (player.sp.upgrades.includes(24)) mult = mult.times(LAYER_UPGS.sp[24].currently())
|
||||||
|
if (player.sp.upgrades.includes(33)) mult = mult.times(LAYER_UPGS.sp[33].currently())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return mult
|
return mult
|
||||||
|
@ -2264,6 +2272,7 @@ function getFreeBoosters() {
|
||||||
function getBoosterPower() {
|
function getBoosterPower() {
|
||||||
let power = new Decimal(1)
|
let power = new Decimal(1)
|
||||||
if (spellActive(1)) power = power.times(tmp.spellEffs[1])
|
if (spellActive(1)) power = power.times(tmp.spellEffs[1])
|
||||||
|
if (player.sp.upgrades.includes(34)) power = power.times(1.25)
|
||||||
return power
|
return power
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2284,6 +2293,7 @@ function addToGenBase() {
|
||||||
function getGenPow() {
|
function getGenPow() {
|
||||||
let pow = new Decimal(1)
|
let pow = new Decimal(1)
|
||||||
if (player.g.upgrades.includes(34)) pow = pow.times(LAYER_UPGS.g[34].currently())
|
if (player.g.upgrades.includes(34)) pow = pow.times(LAYER_UPGS.g[34].currently())
|
||||||
|
if (player.sp.upgrades.includes(34)) pow = pow.times(1.25)
|
||||||
return pow
|
return pow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3118,9 +3128,16 @@ function addToSGBase() {
|
||||||
return toAdd
|
return toAdd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 (gameEnded) {
|
||||||
|
diff = new Decimal(0);
|
||||||
|
player.tab = "gameEnded";
|
||||||
|
}
|
||||||
player.h.time += diff.toNumber()
|
player.h.time += diff.toNumber()
|
||||||
if (tmp.hcActive ? tmp.hcActive[42] : true) {
|
if (tmp.hcActive ? tmp.hcActive[42] : true) {
|
||||||
if (player.h.time>=10) diff = new Decimal(0)
|
if (player.h.time>=10) diff = new Decimal(0)
|
||||||
|
@ -3204,11 +3221,13 @@ function hardReset() {
|
||||||
|
|
||||||
var saveInterval = setInterval(function() {
|
var saveInterval = setInterval(function() {
|
||||||
if (player===undefined) return;
|
if (player===undefined) return;
|
||||||
|
if (gameEnded) 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;
|
||||||
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) {
|
||||||
|
@ -3224,6 +3243,7 @@ var interval = setInterval(function() {
|
||||||
|
|
||||||
document.onkeydown = function(e) {
|
document.onkeydown = function(e) {
|
||||||
if (player===undefined) return;
|
if (player===undefined) return;
|
||||||
|
if (gameEnded) 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
|
||||||
|
|
22
style.css
22
style.css
|
@ -324,6 +324,22 @@ h1, h2 {
|
||||||
-3px 0px 12px #02f2f2;
|
-3px 0px 12px #02f2f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
-webkit-text-stroke-width: 1px;
|
||||||
|
-webkit-text-stroke-color: #02f2f2;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link:hover {
|
||||||
|
transform: scale(1.2, 1.2);
|
||||||
|
text-shadow: 5px 0px 10px #02f2f2,
|
||||||
|
-3px 0px 12px #02f2f2;
|
||||||
|
}
|
||||||
|
|
||||||
.opt {
|
.opt {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
@ -435,6 +451,12 @@ ul {
|
||||||
color: #03858f;
|
color: #03858f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fullWidth {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
min-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
[tooltip] {
|
[tooltip] {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue