mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-01-18 03:31:30 +00:00
v1.1 Pre-Release 4
This commit is contained in:
parent
7ac6bf8cd4
commit
c82872eac6
4 changed files with 31 additions and 24 deletions
|
@ -394,8 +394,8 @@
|
||||||
<span v-if="player.devSpeed && player.devSpeed != 1">
|
<span v-if="player.devSpeed && player.devSpeed != 1">
|
||||||
<br>Dev Speed: {{format(player.devSpeed)}}x<br>
|
<br>Dev Speed: {{format(player.devSpeed)}}x<br>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="offTime.remain>0">
|
<span v-if="player.offTime !== undefined">
|
||||||
<br>Offline Time: {{formatTime(offTime.remain)}} ({{format(offTime.speed)}}x speed)<br>
|
<br>Offline Time: {{formatTime(player.offTime.remain)}}<br>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="player.sp.unl && !player.keepGoing">
|
<span v-if="player.sp.unl && !player.keepGoing">
|
||||||
<br>Reach {{formatWhole(ENDGAME)}} to beat the game!<br>
|
<br>Reach {{formatWhole(ENDGAME)}} to beat the game!<br>
|
||||||
|
@ -634,7 +634,7 @@
|
||||||
<button v-on:click="HYPERSPACE.respec()" v-bind:class="{ longUpg: true, hs: true, can: player.hs.unl, locked: !player.hs.unl }">Respec Super-Upgrades</button><br>
|
<button v-on:click="HYPERSPACE.respec()" v-bind:class="{ longUpg: true, hs: true, can: player.hs.unl, locked: !player.hs.unl }">Respec Super-Upgrades</button><br>
|
||||||
<div class="upgRow">
|
<div class="upgRow">
|
||||||
<div v-for="i in tmp.s.trueSbUnl">
|
<div v-for="i in tmp.s.trueSbUnl">
|
||||||
<button v-on:click="HYPERSPACE.superUpg(i)" v-bind:class="{ upg: true, hs: true, can: HYPERSPACE.canSuperUpg(i), locked: !HYPERSPACE.canSuperUpg(i) }"><h3>Building {{i}}</h3><br>{{getSpaceBuildingEffDesc(i)}}<br><br>Super-Level: {{formatWhole(tmp.hs.su[i])}} / {{formatWhole(player.hs.superUpgradeCap)}}<br>({{format(tmp.hs.suEff[i])}}x strength)</button>
|
<button v-on:click="HYPERSPACE.superUpg(i)" v-bind:class="{ upg: true, hs: true, can: HYPERSPACE.canSuperUpg(i), locked: !HYPERSPACE.canSuperUpg(i) }"><h3>Building {{i}}</h3><br>{{getSpaceBuildingEffDesc(i)}}<br><br>Super-Level: {{formatWhole(tmp.hs.su[i])}} / {{formatWhole(player.hs.superUpgradeCap)}}<br>({{format(tmp.hs.suEff[i].sub(1).times(100))}}% stronger)<br>Cost: 1 Hyperspace</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
48
js/game.js
48
js/game.js
|
@ -1,9 +1,5 @@
|
||||||
var player;
|
var player;
|
||||||
var tmp = {};
|
var tmp = {};
|
||||||
var offTime = {
|
|
||||||
remain: 0,
|
|
||||||
speed: 1,
|
|
||||||
};
|
|
||||||
var needCanvasUpdate = true;
|
var needCanvasUpdate = true;
|
||||||
var NaNalert = false;
|
var NaNalert = false;
|
||||||
var gameEnded = false;
|
var gameEnded = false;
|
||||||
|
@ -395,6 +391,9 @@ const LAYER_EFFS = {
|
||||||
mult: x.div(3).add(1).sqrt()
|
mult: x.div(3).add(1).sqrt()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
l() {
|
||||||
|
return player.l.points.times(5).max(1).log10()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_UPGS = {
|
const LAYER_UPGS = {
|
||||||
|
@ -1616,7 +1615,7 @@ const LAYER_UPGS = {
|
||||||
unl() { return player.l.unl },
|
unl() { return player.l.unl },
|
||||||
currently() {
|
currently() {
|
||||||
if (player.sp.upgrades.includes(15)) return Decimal.pow(6, player.l.points.max(1).log10().cbrt())
|
if (player.sp.upgrades.includes(15)) return Decimal.pow(6, player.l.points.max(1).log10().cbrt())
|
||||||
return player.l.points.add(1).log10().times(100).add(1).cbrt()
|
return player.l.points.add(1).log10().add(1).pow(0.75)
|
||||||
},
|
},
|
||||||
effDisp(x) { return format(x)+"x" },
|
effDisp(x) { return format(x)+"x" },
|
||||||
},
|
},
|
||||||
|
@ -1639,19 +1638,19 @@ const LAYER_UPGS = {
|
||||||
},
|
},
|
||||||
25: {
|
25: {
|
||||||
desc: "Super-Prestige Points strength all Subspace effects.",
|
desc: "Super-Prestige Points strength all Subspace effects.",
|
||||||
cost: new Decimal(1.5e21),
|
cost: new Decimal(5e20),
|
||||||
unl() { return player.ps.upgrades.includes(23) },
|
unl() { return player.ps.upgrades.includes(23) },
|
||||||
currently() { return player.sp.points.log10().div(15).sqrt().max(1) },
|
currently() { return player.sp.points.log10().div(15).sqrt().max(1) },
|
||||||
effDisp(x) { return format(x.sub(1).times(100))+"%" },
|
effDisp(x) { return format(x.sub(1).times(100))+"%" },
|
||||||
},
|
},
|
||||||
35: {
|
35: {
|
||||||
desc: "Reduce the cost scaling of Hyperspace by 20%.",
|
desc: "Reduce the cost scaling of Hyperspace by 20%.",
|
||||||
cost: new Decimal(2.222e22),
|
cost: new Decimal(1e21),
|
||||||
unl() { return player.ps.upgrades.includes(23) },
|
unl() { return player.ps.upgrades.includes(23) },
|
||||||
},
|
},
|
||||||
45: {
|
45: {
|
||||||
desc: "Subtract the cost of Imperium Buildings by 3 and you build 4x faster.",
|
desc: "Subtract the cost of Imperium Buildings by 3 and you build 5x faster.",
|
||||||
cost: new Decimal(1e23),
|
cost: new Decimal(2.222e22),
|
||||||
unl() { return player.ps.upgrades.includes(23) },
|
unl() { return player.ps.upgrades.includes(23) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1759,6 +1758,9 @@ function getLayerEffDesc(layer) {
|
||||||
case "ps":
|
case "ps":
|
||||||
return "which are speeding up the Life Power production by " + format(eff.mult) + "x and raising the Life Power amount to the power of " + format(eff.exp)
|
return "which are speeding up the Life Power production by " + format(eff.mult) + "x and raising the Life Power amount to the power of " + format(eff.exp)
|
||||||
break;
|
break;
|
||||||
|
case "l":
|
||||||
|
return "which are making that Life Power softcap starts at " + format(eff.pow(tmp.layerEffs.ps.exp))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1771,8 +1773,10 @@ function load() {
|
||||||
if (get===null||get===undefined) player = getStartPlayer()
|
if (get===null||get===undefined) player = getStartPlayer()
|
||||||
else player = JSON.parse(atob(get))
|
else player = JSON.parse(atob(get))
|
||||||
player.tab = "tree"
|
player.tab = "tree"
|
||||||
offTime.remain = (Date.now()-player.time)/10000
|
if (player.offlineProd) {
|
||||||
if (!player.offlineProd) offTime.remain = 0
|
if (player.offTime === undefined) player.offTime = { remain: 0 }
|
||||||
|
player.offTime.remain += (Date.now() - player.time) / 1000
|
||||||
|
}
|
||||||
player.time = Date.now()
|
player.time = Date.now()
|
||||||
checkForVars();
|
checkForVars();
|
||||||
convertToDecimal();
|
convertToDecimal();
|
||||||
|
@ -3608,7 +3612,7 @@ function getLifePowerExp() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLifePowerSoftcapStart() {
|
function getLifePowerSoftcapStart() {
|
||||||
let x = player.l.points.times(5).max(1).log10()
|
let x = tmp.layerEffs.l
|
||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3794,10 +3798,11 @@ let HYPERSPACE = {
|
||||||
|
|
||||||
let VERSION = {
|
let VERSION = {
|
||||||
num: 1.1,
|
num: 1.1,
|
||||||
|
pre: 4,
|
||||||
name: "The Life Update"
|
name: "The Life Update"
|
||||||
}
|
}
|
||||||
|
|
||||||
VERSION.withoutName = "v" + VERSION.num + (VERSION.beta ? " Beta " + VERSION.beta : "")
|
VERSION.withoutName = "v" + VERSION.num + (VERSION.pre ? " Pre-Release " + VERSION.pre : VERSION.pre ? " Beta " + VERSION.beta : "")
|
||||||
VERSION.withName = VERSION.withoutName + (VERSION.name ? ": " + VERSION.name : "")
|
VERSION.withName = VERSION.withoutName + (VERSION.name ? ": " + VERSION.name : "")
|
||||||
|
|
||||||
let IMPERIUM = {
|
let IMPERIUM = {
|
||||||
|
@ -3836,7 +3841,7 @@ let IMPERIUM = {
|
||||||
speed() {
|
speed() {
|
||||||
let x = Decimal.pow(3.75, player.i.extraBuildings.add(5)).recip()
|
let x = Decimal.pow(3.75, player.i.extraBuildings.add(5)).recip()
|
||||||
x = x.times(IMPERIUM.sgSpeedBoost())
|
x = x.times(IMPERIUM.sgSpeedBoost())
|
||||||
if (player.sp.upgrades.includes(45)) x = x.times(4)
|
if (player.sp.upgrades.includes(45)) x = x.times(5)
|
||||||
return x
|
return x
|
||||||
},
|
},
|
||||||
sgSpeedBoost() {
|
sgSpeedBoost() {
|
||||||
|
@ -3999,13 +4004,16 @@ var interval = setInterval(function() {
|
||||||
if (gameEnded&&!player.keepGoing) return;
|
if (gameEnded&&!player.keepGoing) return;
|
||||||
ticking = true
|
ticking = true
|
||||||
let now = Date.now()
|
let now = Date.now()
|
||||||
let diff = (now - player.time) / 1000
|
let diff = (now - player.time) / 1e3
|
||||||
if (!player.offlineProd) offTime.remain = 0
|
if (player.offTime !== undefined) {
|
||||||
if (offTime.remain > 0) {
|
if (player.offTime.remain > 0) {
|
||||||
offTime.speed = offTime.remain / 5 + 1
|
let offlineDiff = Math.max(player.offTime.remain / 10, diff)
|
||||||
diff += offTime.speed / 50
|
player.offTime.remain -= offlineDiff
|
||||||
offTime.remain = Math.max(offTime.remain - offTime.speed / 50, 0)
|
diff += offlineDiff
|
||||||
|
}
|
||||||
|
if (!player.offlineProd || player.offTime.remain <= 0) delete player.offTime
|
||||||
}
|
}
|
||||||
|
if (player.devSpeed) diff *= player.devSpeed
|
||||||
player.time = now
|
player.time = now
|
||||||
if (needCanvasUpdate) resizeCanvas();
|
if (needCanvasUpdate) resizeCanvas();
|
||||||
updateTemp();
|
updateTemp();
|
||||||
|
|
1
js/v.js
1
js/v.js
|
@ -29,7 +29,6 @@ function loadVue() {
|
||||||
data: {
|
data: {
|
||||||
player,
|
player,
|
||||||
tmp,
|
tmp,
|
||||||
offTime,
|
|
||||||
Decimal,
|
Decimal,
|
||||||
format,
|
format,
|
||||||
formatWhole,
|
formatWhole,
|
||||||
|
|
BIN
remove.png
BIN
remove.png
Binary file not shown.
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 5.9 KiB |
Loading…
Add table
Reference in a new issue