mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
Beta 3 Patch 1
This commit is contained in:
parent
5a144c80db
commit
31ac1bfb20
1 changed files with 93 additions and 72 deletions
165
js/game.js
165
js/game.js
|
@ -298,7 +298,7 @@ const LAYER_EXP = {
|
||||||
ba: new Decimal(0.00667),
|
ba: new Decimal(0.00667),
|
||||||
ps: new Decimal(1),
|
ps: new Decimal(1),
|
||||||
sp: new Decimal(2e-7),
|
sp: new Decimal(2e-7),
|
||||||
l: new Decimal(1e-9),
|
l: new Decimal(0.001),
|
||||||
hs: new Decimal(1e-9),
|
hs: new Decimal(1e-9),
|
||||||
i: new Decimal(1),
|
i: new Decimal(1),
|
||||||
}
|
}
|
||||||
|
@ -1578,26 +1578,26 @@ const LAYER_UPGS = {
|
||||||
41: {
|
41: {
|
||||||
desc: "Gain more Life Essence based on total SP.",
|
desc: "Gain more Life Essence based on total SP.",
|
||||||
cost: new Decimal(1/0),
|
cost: new Decimal(1/0),
|
||||||
unl: function() { return player.ps.unl || player.hs.unl },
|
unl: function() { return player.l.unl },
|
||||||
currently: function() { return new Decimal(1) },
|
currently: function() { return new Decimal(1) },
|
||||||
effDisp: function(x) { return format(x)+"x" },
|
effDisp: function(x) { return format(x)+"x" },
|
||||||
},
|
},
|
||||||
42: {
|
42: {
|
||||||
desc: "You produce Life Power 2x faster.",
|
desc: "You produce Life Power 2x faster.",
|
||||||
cost: new Decimal(1/0),
|
cost: new Decimal(1/0),
|
||||||
unl: function() { return player.ps.unl || player.hs.unl },
|
unl: function() { return player.l.unl },
|
||||||
},
|
},
|
||||||
43: {
|
43: {
|
||||||
desc: "Gain more Hyperspace based on best SP.",
|
desc: "Gain more Hyperspace based on best SP.",
|
||||||
cost: new Decimal(1/0),
|
cost: new Decimal(1/0),
|
||||||
unl: function() { return player.ps.unl || player.hs.unl },
|
unl: function() { return player.hs.unl },
|
||||||
currently: function() { return new Decimal(1) },
|
currently: function() { return new Decimal(1) },
|
||||||
effDisp: function(x) { return format(x)+"x" },
|
effDisp: function(x) { return format(x)+"x" },
|
||||||
},
|
},
|
||||||
44: {
|
44: {
|
||||||
desc: "SP divides the Phantom Souls requirement.",
|
desc: "SP divides the Phantom Souls requirement.",
|
||||||
cost: new Decimal(1/0),
|
cost: new Decimal(1/0),
|
||||||
unl: function() { return player.ps.unl || player.hs.unl },
|
unl: function() { return player.ps.unl },
|
||||||
currently: function() { return new Decimal(1) },
|
currently: function() { return new Decimal(1) },
|
||||||
effDisp: function(x) { return format(x)+"x" },
|
effDisp: function(x) { return format(x)+"x" },
|
||||||
},
|
},
|
||||||
|
@ -2179,74 +2179,74 @@ function layerShown(layer) {
|
||||||
if (layerUnl(layer)) return true
|
if (layerUnl(layer)) return true
|
||||||
switch(layer) {
|
switch(layer) {
|
||||||
case "p":
|
case "p":
|
||||||
return true;
|
return true
|
||||||
break;
|
break
|
||||||
case "b":
|
case "b":
|
||||||
return player.p.unl;
|
return player.p.unl
|
||||||
break;
|
break
|
||||||
case "g":
|
case "g":
|
||||||
return player.p.unl;
|
return player.p.unl
|
||||||
break;
|
break
|
||||||
case "e":
|
case "e":
|
||||||
return player.b.unl&&player.g.unl;
|
return player.b.unl && player.g.unl
|
||||||
break;
|
break
|
||||||
case "t":
|
case "t":
|
||||||
return player.b.unl;
|
return player.b.unl
|
||||||
break;
|
break
|
||||||
case "s":
|
case "s":
|
||||||
return player.g.unl;
|
return player.g.unl
|
||||||
break;
|
break
|
||||||
case "sb":
|
case "sb":
|
||||||
return player.e.unl&&player.t.unl&&player.s.unl;
|
return player.e.unl && player.t.unl && player.s.unl
|
||||||
break;
|
break
|
||||||
case "sg":
|
case "sg":
|
||||||
return player.g.unl&&player.h.challs.includes(62);
|
return player.h.challs.includes(62)
|
||||||
break;
|
break
|
||||||
case "h":
|
case "h":
|
||||||
return player.t.unl&&player.sb.unl
|
return player.t.unl && player.sb.unl
|
||||||
break;
|
break
|
||||||
case "q":
|
case "q":
|
||||||
return player.e.unl&&player.sb.unl
|
return player.e.unl && player.sb.unl
|
||||||
break;
|
break
|
||||||
case "hb":
|
case "hb":
|
||||||
return player.sb.unl&&player.h.unl&&player.q.unl
|
return player.sb.unl && player.h.unl && player.q.unl
|
||||||
break;
|
break
|
||||||
case "ss":
|
case "ss":
|
||||||
return player.s.unl&&player.h.unl&&player.q.unl
|
return player.s.unl && player.h.unl && player.q.unl
|
||||||
break;
|
break
|
||||||
case "hg":
|
case "hg":
|
||||||
return false //player.sp.unl
|
return false
|
||||||
break;
|
break
|
||||||
case "m":
|
case "m":
|
||||||
return player.h.unl&&player.hb.unl
|
return player.h.unl && player.hb.unl
|
||||||
break;
|
break
|
||||||
case "ba":
|
case "ba":
|
||||||
return player.q.unl&&player.ss.unl
|
return player.q.unl && player.ss.unl
|
||||||
break;
|
break
|
||||||
case "sp":
|
case "sp":
|
||||||
return player.m.unl&&player.ba.unl
|
return player.m.unl && player.ba.unl
|
||||||
break;
|
break
|
||||||
case "l":
|
case "l":
|
||||||
return player.sp.unl
|
return player.sp.unl
|
||||||
break;
|
break
|
||||||
case "ps":
|
case "ps":
|
||||||
return player.l.unl
|
return player.l.unl
|
||||||
break;
|
break
|
||||||
case "hs":
|
case "hs":
|
||||||
return player.sp.unl
|
return player.sp.unl
|
||||||
break;
|
break
|
||||||
case "i":
|
case "i":
|
||||||
return player.ps.unl && player.hs.unl
|
return player.ps.unl && player.hs.unl
|
||||||
break;
|
break
|
||||||
case "mb":
|
case "mb":
|
||||||
return false //player.ps.unl && player.hs.unl
|
return false //player.ps.unl && player.hs.unl
|
||||||
break;
|
break
|
||||||
case "ge":
|
case "ge":
|
||||||
return false //player.ps.unl && player.hs.unl
|
return false //player.ps.unl && player.hs.unl
|
||||||
break;
|
break
|
||||||
case "ma":
|
case "ma":
|
||||||
return false //player.ps.unl && player.hs.unl
|
return false //player.ps.unl && player.hs.unl
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2275,24 +2275,25 @@ function rowReset(row, layer) {
|
||||||
player.g.power = new Decimal(0);
|
player.g.power = new Decimal(0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
player.b.points = new Decimal(0);
|
var keepMilestones = 0
|
||||||
player.b.best = player.m.total.gte(1)?player.b.best:new Decimal(0);
|
if (player.h.best.gte(2)) keepMilestones = 1
|
||||||
if (!player.t.best.gte(4)&&!player.sp.total.gte(1)) player.b.upgrades = [];
|
else if (layer=="sb" && player.sb.best.gte(4)) keepMilestones = 1
|
||||||
player.g.points = new Decimal(0);
|
else if ((layer=="t" || layer=="e" || layer=="s") && player[layer].best.gte(2)) keepMilestones = 1
|
||||||
player.g.power = new Decimal(0);
|
|
||||||
player.g.best = player.m.total.gte(1)?player.g.best:new Decimal(0);
|
var keepUpgrades = 0
|
||||||
if (!player.s.best.gte(4)&&!player.sp.total.gte(1)) player.g.upgrades = [];
|
if (player.sp.total.gte(1)) keepUpgrades = 1
|
||||||
player.t.energy = new Decimal(0);
|
|
||||||
if (layer=="t"||layer=="e"||layer=="s") {
|
player.b.points = new Decimal(0)
|
||||||
if (player[layer].best.gte(2)) {
|
if (!keepMilestones) player.b.best = new Decimal(0)
|
||||||
player.b.best = new Decimal(prevOnReset.b.best)
|
if (!keepUpgrades && !player.t.best.gte(4)) player.b.upgrades = []
|
||||||
player.g.best = new Decimal(prevOnReset.g.best)
|
|
||||||
}
|
player.g.points = new Decimal(0)
|
||||||
} else if (player.sb.best.gte(4)&&layer=="sb") {
|
player.g.power = new Decimal(0)
|
||||||
player.b.best = new Decimal(prevOnReset.b.best)
|
if (!keepMilestones) player.g.best = new Decimal(0)
|
||||||
player.g.best = new Decimal(prevOnReset.g.best)
|
if (!keepUpgrades && !player.s.best.gte(4)) player.g.upgrades = []
|
||||||
}
|
|
||||||
break;
|
player.t.energy = new Decimal(0)
|
||||||
|
break
|
||||||
case 3:
|
case 3:
|
||||||
player.t.points = new Decimal(0);
|
player.t.points = new Decimal(0);
|
||||||
player.t.order = 0
|
player.t.order = 0
|
||||||
|
@ -2442,17 +2443,17 @@ function doReset(layer, force=false) {
|
||||||
let gain = tmp.resetGain[layer]
|
let gain = tmp.resetGain[layer]
|
||||||
if (LAYER_TYPE[layer]=="static") {
|
if (LAYER_TYPE[layer]=="static") {
|
||||||
if (tmp.layerAmt[layer].lt(tmp.nextAt[layer])) return;
|
if (tmp.layerAmt[layer].lt(tmp.nextAt[layer])) return;
|
||||||
addPoints(layer, canBuyMax(layer)?gain:1)
|
addPoints(layer, canBuyMax(layer) ? gain : 1)
|
||||||
} else addPoints(layer, gain)
|
} else addPoints(layer, gain)
|
||||||
|
|
||||||
if (!player[layer].unl) {
|
if (!player[layer].unl) {
|
||||||
player[layer].unl = true;
|
player[layer].unl = true;
|
||||||
needCanvasUpdate = true;
|
needCanvasUpdate = true;
|
||||||
|
|
||||||
let layers = ROW_LAYERS[LAYER_ROW[layer]]
|
let layers = ROW_LAYERS[LAYER_ROW[layer]]
|
||||||
for (let i in layers) if (!player[layers[i]].unl && player[layers[i]]!==undefined) player[layers[i]].order += ORDER_UP[LAYER_ROW[layer]].includes(layer)?1:0
|
for (let i in layers) if (!player[layers[i]].unl && player[layers[i]]!==undefined) player[layers[i]].order += ORDER_UP[LAYER_ROW[layer]].includes(layer)?1:0
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp.layerAmt[layer] = new Decimal(0) // quick fix
|
tmp.layerAmt[layer] = new Decimal(0) // quick fix
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3400,7 +3401,6 @@ function updateToCast(id) {
|
||||||
|
|
||||||
function getSGenPowEff() {
|
function getSGenPowEff() {
|
||||||
if (!player.sg.unl) return new Decimal(1)
|
if (!player.sg.unl) return new Decimal(1)
|
||||||
if (!player.h.challs.includes(62)) return new Decimal(1)
|
|
||||||
let eff = player.sg.power.plus(1).pow(3)
|
let eff = player.sg.power.plus(1).pow(3)
|
||||||
return eff
|
return eff
|
||||||
}
|
}
|
||||||
|
@ -3418,6 +3418,28 @@ function addToSGBase() {
|
||||||
return toAdd
|
return toAdd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getLifePowerMult() {
|
||||||
|
let x = tmp.layerEffs.ps.mult.div(10)
|
||||||
|
if (player.sp.upgrades.includes(42)) x = x.times(2)
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLifePowerExp() {
|
||||||
|
let x = tmp.layerEffs.ps.exp
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLifePowerSoftcapStart() {
|
||||||
|
let x = player.l.points.times(10).max(1).log10()
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLifePowerSoftcapExp() {
|
||||||
|
let x = 1/3
|
||||||
|
if (player.sp.upgrades.includes(52)) x = 0.5
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
let LIFE_BOOSTERS = {
|
let LIFE_BOOSTERS = {
|
||||||
max: 5,
|
max: 5,
|
||||||
unl: function() {
|
unl: function() {
|
||||||
|
@ -3538,15 +3560,14 @@ function gameLoop(diff) {
|
||||||
generatePoints("ba", diff)
|
generatePoints("ba", diff)
|
||||||
}
|
}
|
||||||
if (player.l.unl) {
|
if (player.l.unl) {
|
||||||
let exp = tmp.layerEffs.ps.exp
|
let exp = getLifePowerExp()
|
||||||
let mult = tmp.layerEffs.ps.mult.div(player.sp.upgrades.includes(42) ? 5 : 10)
|
let cap = getLifePowerSoftcapStart()
|
||||||
let cap = player.l.points.times(10).max(1).log10()
|
let capExp = getLifePowerSoftcapExp()
|
||||||
let capExp = player.sp.upgrades.includes(52) ? 0.5 : 1/3
|
|
||||||
|
|
||||||
let power = player.l.power
|
let power = player.l.power
|
||||||
power = power.pow(exp.pow(-1))
|
power = power.pow(exp.pow(-1))
|
||||||
if (power.gt(cap)) power = power.div(cap).pow(1/capExp).times(cap)
|
if (power.gt(cap)) power = power.div(cap).pow(1/capExp).times(cap)
|
||||||
power = power.add(mult.times(diff))
|
power = power.add(getLifePowerMult().times(diff))
|
||||||
if (power.gt(cap)) power = power.div(cap).pow(capExp).times(cap)
|
if (power.gt(cap)) power = power.div(cap).pow(capExp).times(cap)
|
||||||
power = power.pow(exp)
|
power = power.pow(exp)
|
||||||
player.l.power = power
|
player.l.power = power
|
||||||
|
|
Loading…
Reference in a new issue