mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-04-01 21:41:03 +00:00
Pre-Release 3
This commit is contained in:
parent
af5b649f92
commit
01d23159be
2 changed files with 33 additions and 24 deletions
|
@ -613,7 +613,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-if="layer=='l'">
|
<div v-if="layer=='l'">
|
||||||
<br><br>
|
<br><br>
|
||||||
You have {{format(player.l.power)}} Life Power, which is translating to:
|
You have {{format(player.l.power)}} Life Power (+{{format(LIFE_BOOSTERS.calcNewPower(1).sub(player.l.power))}}/s),<br>
|
||||||
|
which is translating to:
|
||||||
<div class="upgRow">
|
<div class="upgRow">
|
||||||
<div v-for="i in tmp.l.lbUnl">
|
<div v-for="i in tmp.l.lbUnl">
|
||||||
<button v-bind:class="{ upgBig: true, l: true }"><h3>Life Booster {{i}}</h3><br>{{LIFE_BOOSTERS[i].effDesc(tmp.l.lbEff[i])}}<br><br>Boosters: {{formatWhole(tmp.l.lb[i])}}<br>Next at: {{formatWhole(LIFE_BOOSTERS.req(i).ceil())}} Phantom Souls</button>
|
<button v-bind:class="{ upgBig: true, l: true }"><h3>Life Booster {{i}}</h3><br>{{LIFE_BOOSTERS[i].effDesc(tmp.l.lbEff[i])}}<br><br>Boosters: {{formatWhole(tmp.l.lb[i])}}<br>Next at: {{formatWhole(LIFE_BOOSTERS.req(i).ceil())}} Phantom Souls</button>
|
||||||
|
|
54
js/game.js
54
js/game.js
|
@ -1450,7 +1450,7 @@ const LAYER_UPGS = {
|
||||||
},
|
},
|
||||||
35: {
|
35: {
|
||||||
desc: "Super-Upgrades are 25% stronger.",
|
desc: "Super-Upgrades are 25% stronger.",
|
||||||
cost: new Decimal(1e270),
|
cost: new Decimal(1e260),
|
||||||
unl() { return player.sp.upgrades.includes(44) },
|
unl() { return player.sp.upgrades.includes(44) },
|
||||||
},
|
},
|
||||||
45: {
|
45: {
|
||||||
|
@ -1650,7 +1650,7 @@ const LAYER_UPGS = {
|
||||||
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 10x faster.",
|
desc: "Subtract the cost of Imperium Buildings by 3 and you build 4x faster.",
|
||||||
cost: new Decimal(1e23),
|
cost: new Decimal(1e23),
|
||||||
unl() { return player.ps.upgrades.includes(23) },
|
unl() { return player.ps.upgrades.includes(23) },
|
||||||
},
|
},
|
||||||
|
@ -3623,6 +3623,20 @@ let LIFE_BOOSTERS = {
|
||||||
if (player.ps.upgrades.includes(21)) return 5
|
if (player.ps.upgrades.includes(21)) return 5
|
||||||
return 4
|
return 4
|
||||||
},
|
},
|
||||||
|
calcNewPower(diff) {
|
||||||
|
let exp = getLifePowerExp()
|
||||||
|
let cap = getLifePowerSoftcapStart()
|
||||||
|
let capExp = getLifePowerSoftcapExp()
|
||||||
|
|
||||||
|
let power = player.l.power
|
||||||
|
if (power.gt(1)) power = power.root(exp)
|
||||||
|
if (power.gt(cap)) power = power.div(cap).pow(1/capExp).times(cap)
|
||||||
|
power = power.add(getLifePowerMult().times(diff))
|
||||||
|
if (power.gt(cap)) power = power.div(cap).pow(capExp).times(cap)
|
||||||
|
if (power.gt(1)) power = power.pow(exp)
|
||||||
|
|
||||||
|
return power
|
||||||
|
},
|
||||||
eff() {
|
eff() {
|
||||||
return player.l.power.add(1).log10()
|
return player.l.power.add(1).log10()
|
||||||
},
|
},
|
||||||
|
@ -3818,9 +3832,9 @@ let IMPERIUM = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
speed() {
|
speed() {
|
||||||
let x = Decimal.pow(4, 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(10)
|
if (player.sp.upgrades.includes(45)) x = x.times(4)
|
||||||
return x
|
return x
|
||||||
},
|
},
|
||||||
sgSpeedBoost() {
|
sgSpeedBoost() {
|
||||||
|
@ -3916,18 +3930,7 @@ function gameLoop(diff) {
|
||||||
}
|
}
|
||||||
if (player.hs.best.gte(2e4)) generatePoints("sp", Decimal.div(diff, 100))
|
if (player.hs.best.gte(2e4)) generatePoints("sp", Decimal.div(diff, 100))
|
||||||
if (player.l.unl) {
|
if (player.l.unl) {
|
||||||
let exp = getLifePowerExp()
|
player.l.power = LIFE_BOOSTERS.calcNewPower(diff)
|
||||||
let cap = getLifePowerSoftcapStart()
|
|
||||||
let capExp = getLifePowerSoftcapExp()
|
|
||||||
|
|
||||||
let power = player.l.power
|
|
||||||
if (power.gt(1)) power = power.root(exp)
|
|
||||||
if (power.gt(cap)) power = power.div(cap).pow(1/capExp).times(cap)
|
|
||||||
power = power.add(getLifePowerMult().times(diff))
|
|
||||||
if (power.gt(cap)) power = power.div(cap).pow(capExp).times(cap)
|
|
||||||
if (power.gt(1)) power = power.pow(exp)
|
|
||||||
player.l.power = power
|
|
||||||
|
|
||||||
for (var i=1; i<=tmp.l.lbUnl; i++) player.l.boosters[i] = LIFE_BOOSTERS.reqTarget(i).max(player.l.boosters[i])
|
for (var i=1; i<=tmp.l.lbUnl; i++) player.l.boosters[i] = LIFE_BOOSTERS.reqTarget(i).max(player.l.boosters[i])
|
||||||
}
|
}
|
||||||
if (player.hs.unl) player.hs.superUpgradeCap = player.hs.superUpgradeCap.max(HYPERSPACE.nextCapTarget())
|
if (player.hs.unl) player.hs.superUpgradeCap = player.hs.superUpgradeCap.max(HYPERSPACE.nextCapTarget())
|
||||||
|
@ -3982,20 +3985,25 @@ var saveInterval = setInterval(function() {
|
||||||
if (player.autosave) save();
|
if (player.autosave) save();
|
||||||
}, 5000)
|
}, 5000)
|
||||||
|
|
||||||
|
var ticking = false
|
||||||
var interval = setInterval(function() {
|
var interval = setInterval(function() {
|
||||||
if (player===undefined||tmp===undefined) return;
|
if (player===undefined||tmp===undefined) return;
|
||||||
|
if (ticking) return;
|
||||||
if (gameEnded&&!player.keepGoing) return;
|
if (gameEnded&&!player.keepGoing) return;
|
||||||
let diff = (Date.now()-player.time)/1000
|
ticking = true
|
||||||
|
let now = Date.now()
|
||||||
|
let diff = (now - player.time) / 1000
|
||||||
if (!player.offlineProd) offTime.remain = 0
|
if (!player.offlineProd) offTime.remain = 0
|
||||||
if (offTime.remain>0) {
|
if (offTime.remain > 0) {
|
||||||
offTime.speed = offTime.remain/5+1
|
offTime.speed = offTime.remain / 5 + 1
|
||||||
diff += offTime.speed/50
|
diff += offTime.speed / 50
|
||||||
offTime.remain = Math.max(offTime.remain-offTime.speed/50, 0)
|
offTime.remain = Math.max(offTime.remain - offTime.speed / 50, 0)
|
||||||
}
|
}
|
||||||
player.time = Date.now()
|
player.time = now
|
||||||
if (needCanvasUpdate) resizeCanvas();
|
if (needCanvasUpdate) resizeCanvas();
|
||||||
updateTemp();
|
updateTemp();
|
||||||
gameLoop(diff)
|
gameLoop(diff)
|
||||||
|
ticking = false
|
||||||
}, 50)
|
}, 50)
|
||||||
|
|
||||||
const themes = {
|
const themes = {
|
||||||
|
@ -4035,7 +4043,7 @@ document.onkeydown = function(e) {
|
||||||
let ctrlDown = e.ctrlKey
|
let ctrlDown = e.ctrlKey
|
||||||
let key = e.key
|
let key = e.key
|
||||||
if (onFocused) return
|
if (onFocused) return
|
||||||
if (ctrlDown) e.preventDefault()
|
if (ctrlDown && key != "-" && key != "_" && key != "+" && key != "=" && key != "r" && key != "R" && key != "F5") e.preventDefault()
|
||||||
if (player.m.unl && key >= 0 && key <= 9) {
|
if (player.m.unl && key >= 0 && key <= 9) {
|
||||||
if (key == 0) activateSpell(10)
|
if (key == 0) activateSpell(10)
|
||||||
else activateSpell(key)
|
else activateSpell(key)
|
||||||
|
|
Loading…
Add table
Reference in a new issue