1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-22 00:21:32 +00:00

Merge / Build 5.1

This commit is contained in:
Aarex Tiaokhiao 2020-09-09 11:20:39 -04:00
commit ac0f69c5f2
5 changed files with 239 additions and 39 deletions

View file

@ -24,7 +24,12 @@
</div>
<div v-if="player.tab=='changelog_beta'" class="col right">
<button class="back" onclick="showTab('changelog')"></button><br>
<h3>Beta v1.2 Alpha 14</h3>
<h3>v1.0 Beta 1</h3>
<ul>
<li>Implemented the Super-Prestige layer (unfinished)</li>
<li>Balanced up to 1e18,000,000 Points & 10 Super-Prestige Points</li>
</ul><br>
<h3>Beta v1.2</h3>
<ul>
<li>Balanced up to 1e15,000,000 Points</li>
</ul><br>
@ -303,6 +308,7 @@
3: Cast spell 3
</span><br>
<span v-if="player.ba.unl">A: Balance reset</span><br>
<span v-if="player.sp.unl">Shift+P: Super-Prestige reset</span><br>
</div>
<div v-if="player.tab=='options'" class="col right">
<button class="back" onclick="showTab('tree')"></button><br>
@ -356,23 +362,23 @@
<td id="h" v-if="layerUnl('h')"><button onclick="showTab('h')" v-bind:tooltip="((player.t.energy.gte(tmp.layerReqs.h)||player.h.unl)&&layerUnl('h')) ? (formatWhole(player.h.points)+' hindrance spirit') : ('Reach '+format(tmp.layerReqs.h)+' time energy to unlock')" v-bind:class="{ treeNode: true, h: true, locked: (player.t.energy.lt(tmp.layerReqs.h)&&!player.h.unl), notify: player.notify.h, can: (player.t.energy.gte(tmp.layerReqs.h)||player.h.unl) }">H</button></td>
<td id="q" v-if="layerUnl('q')"><button onclick="showTab('q')" v-bind:tooltip="((player.g.power.gte(tmp.layerReqs.q)||player.q.unl)&&layerUnl('q')) ? (formatWhole(player.q.points)+' quirks') : ('Reach '+format(tmp.layerReqs.q)+' generator power to unlock')" v-bind:class="{ treeNode: true, q: true, locked: (player.g.power.lt(tmp.layerReqs.q)&&!player.q.unl), notify: player.notify.q, can: (player.g.power.gte(tmp.layerReqs.q)||player.q.unl) }">Q</button></td>
<td id="ss" v-if="layerUnl('ss')"><button onclick="showTab('ss')" v-bind:tooltip="((player.s.points.gte(tmp.layerReqs.ss)||player.ss.unl)&&layerUnl('ss')) ? (formatWhole(player.ss.points)+' subspace energy') : ('Reach '+format(tmp.layerReqs.ss)+' space energy to unlock')" v-bind:class="{ treeNode: true, ss: true, locked: (player.s.points.lt(tmp.layerReqs.ss)&&!player.ss.unl), notify: player.notify.ss, can: (player.s.points.gte(tmp.layerReqs.ss)||player.ss.unl) }">SS</button></td>
<td id="hg" v-if="layerUnl('hg')"><button class="treeNode hg">HG</button></td>
</table><table>
<td><button class="treeNode hidden"></button></td>
</table><table>
<td v-if="player.tab=='tree'&&(player.m.unl||player.ba.unl)" class="left"><br><br><img class="remove" src="remove.png" onclick="resetRow(4)"></img></td>
<td id="m" v-if="layerUnl('m')"><button onclick="showTab('m')" v-bind:tooltip="((player.h.points.gte(tmp.layerReqs.m)||player.m.unl)&&layerUnl('m')) ? (formatWhole(player.m.points)+' magic') : ('Reach '+format(tmp.layerReqs.m)+' hindrance spirit to unlock')" v-bind:class="{ treeNode: true, m: true, locked: (player.h.points.lt(tmp.layerReqs.m)&&!player.m.unl), notify: player.notify.m, can: (player.h.points.gte(tmp.layerReqs.m)||player.m.unl) }">M</button></td>
<td id="ps" v-if="layerUnl('ps')"><button class="treeNode ps can">PS</button></td>
<td id="ps" v-if="layerUnl('ps')"><button class="treeNode ps">PS</button></td>
<td id="ba" v-if="layerUnl('ba')"><button onclick="showTab('ba')" v-bind:tooltip="((player.q.points.gte(tmp.layerReqs.ba)||player.ba.unl)&&layerUnl('ba')) ? (formatWhole(player.ba.points)+' balance energy') : ('Reach '+format(tmp.layerReqs.ba)+' quirks to unlock')" v-bind:class="{ treeNode: true, ba: true, locked: (player.q.points.lt(tmp.layerReqs.ba)&&!player.ba.unl), notify: player.notify.ba, can: (player.q.points.gte(tmp.layerReqs.ba)||player.ba.unl) }">BA</button></td>
</table><table>
<td><button class="treeNode hidden"></button></td>
</table><table>
<td v-if="player.tab=='tree'&&layerUnl('sp')" class="left"><br><br><img class="remove" src="remove.png" onclick="resetRow(5)"></img></td>
<td id="l" v-if="layerUnl('l')"><button class="treeNode l can">L</button></td>
<td><button class="treeNode hidden"></button></td>
<td id="sp" v-if="layerUnl('sp')"><button class="treeNode sp can">SP</button></td>
<td><button class="treeNode hidden"></button></td>
<td id="hs" v-if="layerUnl('hs')"><button class="treeNode hs can">HS</button></td>
<td id="i" v-if="layerUnl('i')"><button class="treeNode i can">I</button></td>
<td v-if="player.tab=='tree'&&player.sp.unl" class="left"><br><br><img class="remove" src="remove.png" onclick="resetRow(5)"></img></td>
<td id="l" v-if="layerUnl('l')"><button class="treeNode l">L</button></td>
<td id="sp" v-if="layerUnl('sp')"><button onclick="showTab('sp')" v-bind:tooltip="(player.p.points.gte(tmp.layerReqs.sp)||player.sp.unl) ? (formatWhole(player.sp.points)+' super-prestige points') : ('Reach '+format(tmp.layerReqs.sp)+' prestige points to unlock')" v-bind:class="{ treeNode: true, sp: true, locked: (player.p.points.lt(tmp.layerReqs.sp)&&!player.sp.unl), can: (player.p.points.gte(tmp.layerReqs.sp)||player.sp.unl) }">SP</button></td>
<td v-if="layerUnl('ps')&&layerUnl('i')"><button class="treeNode hidden"></button></td>
<td id="hs" v-if="layerUnl('hs')"><button class="treeNode hs">HS</button></td>
<td id="i" v-if="layerUnl('i')"><button class="treeNode i">I</button></td>
</table>
<canvas id="treeCanvas" class="canvas"></canvas>
</div>
@ -472,9 +478,9 @@
</div>
<div v-if="layer=='m'">
<br>
Note: Activating a Spell costs Magic.<br><br>
<span v-if="player.sp.total.lt(2)">Note: Activating a Spell costs Magic.</span><br><br>
<div class="upgRow">
<div v-for="id in 3">
<div v-for="id in tmp.spellsUnl">
<button v-bind:class="{ upg: true, bought: spellActive(id), can: ((player.m.points.gte(player.m.toCast[id]))&&player.m.unl&&!spellActive(id)), locked: (!(player.m.points.gte(player.m.toCast[id])||spellActive(id))), m: true }" v-on:click="activateSpell(id)"><h3>{{SPELL_NAMES[id]}}</h3><br>{{getSpellDesc(id)}}<br><br>Time: {{formatTime(player.m.spellTimes[id])}}</button><br><br>
<div v-if="player.m.upgrades.includes(41)">
<input v-model="player.m.toCast[id]" v-on:change="updateToCast(id)"></input><br><br>
@ -502,6 +508,15 @@
<tr><td v-if="milestoneShown(player.ba.best.gte(8))" v-bind:class="{ milestone: player.ba.best.lt(8), milestoneDone: player.ba.best.gte(8) }"><h3>8 Balance Energy</h3><br>You can buy max Hyper-Boosters & Subspace Energy, and Hyper-Boosters/Subspace Energy reset nothing</td></tr>
</table>
</div>
<div v-if="layer=='sp'">
You have made a total of {{formatWhole(player.sp.total)}} super-prestige points<br><br>
<table>
<tr><td v-if="milestoneShown(player.sp.total.gte(1))" v-bind:class="{ milestone: player.sp.total.lt(1), milestoneDone: player.sp.total.gte(1) }"><h3>1 total Super-Prestige Point</h3><br>Upgrades of Rows 1-5 and Hindrances are kept on all resets</td></tr>
<tr><td v-if="milestoneShown(player.sp.total.gte(2), true)" v-bind:class="{ milestone: player.sp.total.lt(2), milestoneDone: player.sp.total.gte(2) }"><h3>2 total Super-Prestige Points</h3><br>Keep Magic Milestones on reset, Spells do not cost Magic, and Magic Upgrade 13's effect can be auto-set to your current Magic&nbsp;&nbsp;&nbsp;<button v-if="player.sp.total.gte(2)" class="smallUpg can m" onclick="toggleAuto('m', 'Ins')">{{player.m.autoIns?"ON":"OFF"}}</button></td></tr>
<tr><td v-if="milestoneShown(player.sp.total.gte(5))" v-bind:class="{ milestone: player.sp.total.lt(5), milestoneDone: player.sp.total.gte(5) }"><h3>5 total Super-Prestige Points</h3><br>Keep Balance Milestones on reset</td></tr>
<tr><td v-if="milestoneShown(player.sp.total.gte(10))" v-bind:class="{ milestone: player.sp.total.lt(10), milestoneDone: player.sp.total.gte(10) }"><h3>10 total Super-Prestige Points</h3><br>Gain 100% of Magic & Balance Power gain every second</td></tr>
</table>
</div>
<br><br><br>
<button v-if="LAYER_TYPE[layer]=='normal'" v-bind:class="{ [layer]: true, reset: true, locked: tmp.layerAmt[layer].lt(tmp.layerReqs[layer]), can: tmp.layerAmt[layer].gte(tmp.layerReqs[layer]) }" v-on:click="doReset(layer)">Reset for +<b>{{formatWhole(tmp.resetGain[layer])}}</b> {{LAYER_RES[layer]}}<br>Next at {{ (LAYER_RES_CEIL.includes(layer) ? formatWhole(tmp.nextAt[layer]) : format(tmp.nextAt[layer])) }} {{ LAYER_AMT_NAMES[layer] }}</button>
<button v-if="LAYER_TYPE[layer]=='static'" v-bind:class="{ [layer]: true, reset: true, locked: tmp.layerAmt[layer].lt(tmp.nextAt[layer]), can: tmp.layerAmt[layer].gte(tmp.nextAt[layer]) }" v-on:click="doReset(layer)">Reset for +<b>{{formatWhole(tmp.resetGain[layer])}}</b> {{LAYER_RES[layer]}}<br>Req: {{(LAYER_RES_CEIL.includes(layer) ? formatWhole(tmp.nextAt[layer]) : format(tmp.nextAt[layer]))}} {{ LAYER_AMT_NAMES[layer] }}</button>

View file

@ -51,6 +51,9 @@ function drawTree() {
drawTreeBranch("e", "ss")
drawTreeBranch("s", "ss")
}
if (layerUnl('hg')) {
drawTreeBranch("sg", "hg")
}
if (layerUnl('m')) {
drawTreeBranch("hb", "m")
drawTreeBranch("h", "m")

View file

@ -133,23 +133,27 @@ function getStartPlayer() {
m: {
unl: false,
auto: false,
autoIns: false,
points: new Decimal(0),
best: new Decimal(0),
spellTimes: {
1: 0,
2: 0,
3: 0,
4: 0,
},
hexes: new Decimal(0),
toCast: {
1: "1",
2: "1",
3: "1",
4: "1",
},
casted: {
1: new Decimal(1),
2: new Decimal(1),
3: new Decimal(1),
4: new Decimal(1),
},
upgrades: [],
},
@ -162,10 +166,17 @@ function getStartPlayer() {
negativity: new Decimal(0),
upgrades: [],
},
sp: {
unl: false,
points: new Decimal(0),
best: new Decimal(0),
total: new Decimal(0),
upgrades: [],
},
}
}
const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "sg", "h", "q", "hb", "ss", "m", "ba"]
const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "sg", "h", "q", "hb", "ss", "m", "ba", "sp"]
const LAYER_REQS = {
p: new Decimal(10),
@ -182,6 +193,7 @@ const LAYER_REQS = {
ss: new Decimal(36),
m: new Decimal(1e80),
ba: new Decimal(1e130),
sp: new Decimal("1e8500000"),
}
const LAYER_RES = {
@ -199,6 +211,7 @@ const LAYER_RES = {
ss: "subspace energy",
m: "magic",
ba: "balance energy",
sp: "super-prestige points",
}
const LAYER_RES_CEIL = ["sb", "sg", "hb", "ss"]
@ -218,6 +231,7 @@ const LAYER_TYPE = {
ss: "static",
m: "normal",
ba: "normal",
sp: "normal",
}
const LAYER_EXP = {
@ -235,6 +249,7 @@ const LAYER_EXP = {
ss: new Decimal(1.1),
m: new Decimal(0.01),
ba: new Decimal(0.00667),
sp: new Decimal(2e-7),
}
const LAYER_BASE = {
@ -263,7 +278,8 @@ const LAYER_ROW = {
ss: 3,
m: 4,
ba: 4,
future_layer: 5,
sp: 5,
future_layer: 6,
}
const ROW_LAYERS = [
@ -272,6 +288,7 @@ const ROW_LAYERS = [
["e","t","s","sb","sg"],
["h","q","hb","ss"],
["m","ba"],
["sp"],
["future_layer"],
]
@ -280,6 +297,7 @@ const ORDER_UP = [
[],
["e","t","s","sb"],
["hb","ss"],
["sp"],
[],
]
@ -340,6 +358,7 @@ const LAYER_UPGS = {
currently: function() {
let ret = player.points.plus(1).log10().pow(0.75).plus(1)
if (player.g.upgrades.includes(15)) ret = ret.pow(LAYER_UPGS.g[15].currently())
if (player.sp.upgrades.includes(11)) ret = ret.pow(100)
return ret;
},
effDisp: function(x) { return format(x)+"x" },
@ -364,6 +383,7 @@ const LAYER_UPGS = {
let ret = player.points.plus(1).log10().cbrt().plus(1)
if (player.g.upgrades.includes(23)) ret = ret.pow(LAYER_UPGS.g[23].currently())
if (player.p.upgrades.includes(33)) ret = ret.pow(1.25)
if (player.sp.upgrades.includes(11)) ret = ret.pow(100)
return ret;
},
effDisp: function(x) { return format(x)+"x" },
@ -375,6 +395,7 @@ const LAYER_UPGS = {
currently: function() {
let ret = player.p.points.plus(1).log10().plus(1).pow(player.p.points.plus(1).log10().div(200).plus(1)).pow(player.p.upgrades.includes(32) ? LAYER_UPGS.p[32].currently() : 1)
if (ret.gte("1e1000")) ret = ret.log10().times("1e997")
if (player.sp.upgrades.includes(11)) ret = ret.pow(100)
return ret;
},
effDisp: function(x) { return format(x)+"x" },
@ -1333,6 +1354,34 @@ const LAYER_UPGS = {
effDisp: function(x) { return format(x)+"x" },
},
},
sp: {
rows: 1,
cols: 4,
11: {
desc: "The Prestige Upgrade 3, 6, & 7 effects are raised to the power of 100.",
cost: new Decimal(1),
unl: function() { return player.sp.unl },
},
12: {
desc: "Total Super-Prestige Points boost Magic & Balance Power gain.",
cost: new Decimal(2),
unl: function() { return player.sp.upgrades.includes(11) },
currently: function() { return player.sp.total.plus(1).pow(2.5) },
effDisp: function(x) { return format(x)+"x" },
},
13: {
desc: "Unlock a new Spell.",
cost: new Decimal(3),
unl: function() { return player.sp.upgrades.includes(12) },
},
14: {
desc: "Your Best Super-Prestige Points boost Hex & Balance Energy gain.",
cost: new Decimal(8),
unl: function() { return player.sp.upgrades.includes(13) },
currently: function() { return player.sp.best.plus(1).pow(1.9) },
effDisp: function(x) { return format(x)+"x" },
},
},
}
const TAB_REQS = {
@ -1355,6 +1404,7 @@ const TAB_REQS = {
ss: function() { return (player.ss.unl||player.s.points.gte(tmp.layerReqs.ss))&&layerUnl('ss') },
m: function() { return (player.m.unl||player.h.points.gte(tmp.layerReqs.m))&&layerUnl('m') },
ba: function() { return (player.ba.unl||player.q.points.gte(tmp.layerReqs.ba))&&layerUnl('ba') },
sp: function() { return (player.sp.unl||player.p.points.gte(tmp.layerReqs.sp))&&layerUnl('sp') },
}
const LAYER_AMT_NAMES = {
@ -1372,6 +1422,7 @@ const LAYER_AMT_NAMES = {
ss: "space energy",
m: "hindrance spirit",
ba: "quirks",
sp: "prestige points",
}
function getLayerAmt(layer) {
@ -1401,6 +1452,9 @@ function getLayerAmt(layer) {
case "ba":
return player.q.points;
break;
case "sp":
return player.p.points;
break;
}
return amt
}
@ -1549,9 +1603,16 @@ function checkForVars() {
if (player.m.auto === undefined) player.m.auto = false
if (player.m.toCast === undefined) player.m.toCast = start.m.toCast
if (player.m.casted === undefined) player.m.casted = start.m.casted
if (player.m.autoIns === undefined) {
player.m.autoIns = false
player.m.spellTimes[4] = 0
player.m.toCast[4] = "1"
player.m.casted[4] = new Decimal(1)
}
if (player.ba === undefined) player.ba = start.ba
if (player.offlineProd === undefined) player.offlineProd = true
if (player.notify === undefined) player.notify = {}
if (player.sp === undefined) player.sp = start.sp
}
function convertToDecimal() {
@ -1594,12 +1655,15 @@ function convertToDecimal() {
player.m.points = new Decimal(player.m.points)
player.m.best = new Decimal(player.m.best)
player.m.hexes = new Decimal(player.m.hexes)
for (let i=1;i<=3;i++) player.m.casted[i] = new Decimal(player.m.casted[i])
for (let i=1;i<=4;i++) player.m.casted[i] = new Decimal(player.m.casted[i])
player.ba.points = new Decimal(player.ba.points)
player.ba.best = new Decimal(player.ba.best)
player.ba.power = new Decimal(player.ba.power)
player.ba.positivity = new Decimal(player.ba.positivity)
player.ba.negativity = new Decimal(player.ba.negativity)
player.sp.points = new Decimal(player.sp.points)
player.sp.best = new Decimal(player.sp.best)
player.sp.total = new Decimal(player.sp.total)
}
function toggleOpt(name) {
@ -1786,6 +1850,12 @@ function getLayerGainMult(layer) {
if (player.ba.unl) mult = mult.times(tmp.balEff)
if (player.m.unl) mult = mult.times(tmp.hexEff)
break;
case "m":
if (player.sp.upgrades.includes(12)) mult = mult.times(LAYER_UPGS.sp[12].currently())
break;
case "ba":
if (player.sp.upgrades.includes(12)) mult = mult.times(LAYER_UPGS.sp[12].currently())
break;
}
return mult
}
@ -1870,6 +1940,9 @@ function layerUnl(layer) {
case "ss":
return player.s.unl&&player.h.unl&&player.q.unl
break;
case "hg":
return false //player.sp.unl
break;
case "m":
return player.h.unl&&player.hb.unl
break;
@ -1877,7 +1950,7 @@ function layerUnl(layer) {
return player.q.unl&&player.ss.unl
break;
case "sp":
return false //player.m.unl && player.ba.unl
return player.m.unl&&player.ba.unl
break;
case "l":
return false //player.sp.unl
@ -1904,7 +1977,7 @@ function rowReset(row, layer) {
case 1:
player.points = new Decimal(10);
player.p.points = new Decimal(0);
if (LAYER_ROW[layer]>=3 && player.h.best.gte(10)) player.p.upgrades = prev.p.upgrades;
if ((LAYER_ROW[layer]>=3 && player.h.best.gte(10))||player.sp.total.gte(1)) player.p.upgrades = prev.p.upgrades;
else if ((player.h.best.lt(1)&&player.q.best.lt(1))||LAYER_ROW[layer]>=3) {
if (layer=="b"||layer=="g") {
if (player[layer].best.lt(8)) player.p.upgrades = [];
@ -1919,11 +1992,11 @@ function rowReset(row, layer) {
case 2:
player.b.points = new Decimal(0);
player.b.best = player.m.best.gte(1)?player.b.best:new Decimal(0);
if (!player.t.best.gte(4)) player.b.upgrades = [];
if (!player.t.best.gte(4)&&!player.sp.total.gte(1)) player.b.upgrades = [];
player.g.points = new Decimal(0);
player.g.power = new Decimal(0);
player.g.best = player.m.best.gte(1)?player.g.best:new Decimal(0);
if (!player.s.best.gte(4)) player.g.upgrades = [];
if (!player.s.best.gte(4)&&!player.sp.total.gte(1)) player.g.upgrades = [];
player.t.energy = new Decimal(0);
if (layer=="t"||layer=="e"||layer=="s") {
if (player[layer].best.gte(2)) {
@ -1939,13 +2012,13 @@ function rowReset(row, layer) {
player.t.points = new Decimal(0);
player.t.order = 0
if (player.h.best.lt(2)&&player.m.best.lt(1)) player.t.best = new Decimal(0);
if (player.h.best.lt(4)) player.t.upgrades = [];
if (player.h.best.lt(4)&&!player.sp.total.gte(1)) player.t.upgrades = [];
player.t.extCapsules = new Decimal(0);
player.e.order = 0
player.e.points = new Decimal(0);
if (player.h.best.lt(2)&&player.m.best.lt(1)) player.e.best = new Decimal(0);
player.e.enhancers = new Decimal(0);
if (player.h.best.lt(4)) player.e.upgrades = [];
if (player.h.best.lt(4)&&!player.sp.total.gte(1)) player.e.upgrades = [];
player.s = {
unl: player.s.unl,
order: 0,
@ -1959,7 +2032,7 @@ function rowReset(row, layer) {
4: new Decimal(0),
5: new Decimal(0)
}),
upgrades: player.h.best.gte(4) ? player.s.upgrades : [],
upgrades: (player.h.best.gte(4)||player.sp.total.gte(1)) ? player.s.upgrades : [],
auto: player.s.auto,
autoBuild: player.s.autoBuild,
}
@ -1969,7 +2042,7 @@ function rowReset(row, layer) {
order: 0,
points: new Decimal(0),
best: (player.h.best.gte(2)||player.m.best.gte(1)) ? player.sb.best : new Decimal(0),
upgrades: player.h.best.gte(10) ? player.sb.upgrades : [],
upgrades: (player.h.best.gte(10)||player.sp.total.gte(1)) ? player.sb.upgrades : [],
}
player.sg = {
unl: player.sg.unl,
@ -1990,7 +2063,7 @@ function rowReset(row, layer) {
points: new Decimal(0),
best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.h.best:new Decimal(0),
active: 0,
challs: player.m.best.gte(2)?player.h.challs:[],
challs: (player.m.best.gte(2)||player.sp.total.gte(1))?player.h.challs:[],
upgrades: [],
}
player.q = {
@ -2001,7 +2074,7 @@ function rowReset(row, layer) {
layers: new Decimal(0),
energy: new Decimal(0),
time: new Decimal(0),
upgrades: player.ba.best.gte(2)?player.q.upgrades:[],
upgrades: (player.ba.best.gte(2)||player.sp.total.gte(1))?player.q.upgrades:[],
}
player.hb = {
unl: player.hb.unl,
@ -2009,7 +2082,7 @@ function rowReset(row, layer) {
order: player.hb.order,
points: new Decimal(0),
best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.hb.best:new Decimal(0),
upgrades: player.ba.best.gte(5)?player.hb.upgrades:[],
upgrades: (player.ba.best.gte(5)||player.sp.total.gte(1))?player.hb.upgrades:[],
}
player.ss = {
unl: player.ss.unl,
@ -2018,12 +2091,44 @@ function rowReset(row, layer) {
points: new Decimal(0),
best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.ss.best:new Decimal(0),
subspace: new Decimal(0),
upgrades: player.ba.best.gte(5)?player.ss.upgrades:[],
upgrades: (player.ba.best.gte(5)||player.sp.total.gte(1))?player.ss.upgrades:[],
}
break;
case 5:
player.m = start.m
player.ba = start.ba
player.m = {
unl: player.m.unl,
auto: player.m.auto,
autoIns: player.m.autoIns,
points: new Decimal(0),
best: player.sp.total.gte(2) ? player.m.best : new Decimal(0),
spellTimes: {
1: 0,
2: 0,
3: 0,
4: 0,
},
hexes: new Decimal(0),
toCast: player.m.toCast,
casted: {
1: new Decimal(1),
2: new Decimal(1),
3: new Decimal(1),
4: new Decimal(1),
},
upgrades: player.sp.total.gte(1) ? player.m.upgrades : [],
}
player.ba = {
unl: player.ba.unl,
points: new Decimal(0),
best: player.sp.total.gte(5) ? player.ba.best : new Decimal(0),
power: new Decimal(0),
positivity: new Decimal(0),
negativity: new Decimal(0),
upgrades: player.sp.total.gte(1) ? player.ba.upgrades : [],
}
break;
case 6:
player.sp = start.sp
break;
}
}
@ -2035,7 +2140,11 @@ function doReset(layer, force=false) {
if (LAYER_TYPE[layer]=="static") {
if (tmp.layerAmt[layer].lt(tmp.nextAt[layer])) return;
player[layer].points = player[layer].points.plus(canBuyMax(layer)?gain:1)
} else player[layer].points = player[layer].points.plus(gain)
if (player[layer].total) player[layer].total = player[layer].total.plus(canBuyMax(layer)?gain:1)
} else {
player[layer].points = player[layer].points.plus(gain)
if (player[layer].total) player[layer].total = player[layer].total.plus(gain)
}
player[layer].best = player[layer].best.max(player[layer].points)
if (!player[layer].unl) {
@ -2057,6 +2166,7 @@ function doReset(layer, force=false) {
else for (let x=row;x>=1;x--) rowReset(x, layer)
updateTemp()
updateTemp()
}
function buyUpg(layer, id) {
@ -2336,6 +2446,7 @@ function getSpaceBuildingCostMod() {
let mod = new Decimal(1)
if (player.s.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mod = mod.times(0.5)
if (player.s.upgrades.includes(42)) mod = mod.times(0.6)
if (spellActive(4)) mod = mod.times(Decimal.sub(1, tmp.spellEffs[4].sub(1)))
return mod;
}
@ -2834,22 +2945,31 @@ function getNegGainMult() {
return mult;
}
function getBalPowGainMult() {
let mult = new Decimal(1)
if (player.sp.upgrades.includes(14)) mult = mult.times(LAYER_UPGS.sp[14].currently())
return mult;
}
const SPELL_NAMES = {
1: "Booster Launch",
2: "Time Warp",
3: "Quirk Amplification",
4: "Spacial Compression",
}
const SPELL_DESCS = {
1: "Boosters are X% stronger",
2: "Time Capsules are X% stronger",
3: "Quirk Layers are X% more efficient",
4: "Space Buildings cost scale X% slower",
}
const SPELL_BASE = {
1: 1.25,
2: 1.1,
3: 1.04,
4: 1.01,
}
function getSpellPower(x) {
@ -2865,6 +2985,7 @@ function getSpellEff(x) {
let base = SPELL_BASE[x]
let power = getSpellPower(x)
let eff = Decimal.pow(base, power)
if (x==4) eff = Decimal.sub(2, Decimal.div(base, power.log2().plus(1)))
return eff
}
@ -2884,17 +3005,19 @@ function getSpellTime() {
function spellActive(x) {
if (!player.m.unl) return false
if (!tmp.spellEffs) return false
if (tmp.spellsUnl<x) return false
return player.m.spellTimes[x]>0
}
function activateSpell(x, force=false) {
let toCast = setToCast(player.m.toCast[x])
if (tmp.spellsUnl<x) return;
let toCast = setToCast(player.m.toCast[x]).max(1)
if (!force) {
if (!player.m.unl) return
if (spellActive(x)) return
if (player.m.points.lt(toCast)) return
}
player.m.points = player.m.points.sub(toCast)
if (player.sp.total.lt(2)) player.m.points = player.m.points.sub(toCast).max(0)
player.m.casted[x] = toCast
player.m.spellTimes[x] = getSpellTime()
if (!force) player.m.hexes = player.m.hexes.plus(getHexGain())
@ -2903,6 +3026,7 @@ function activateSpell(x, force=false) {
function getHexGain() {
let gain = new Decimal(1)
if (player.m.upgrades.includes(14)) gain = gain.times(LAYER_UPGS.m[14].currently())
if (player.sp.upgrades.includes(14)) gain = gain.times(LAYER_UPGS.sp[14].currently())
return gain.floor()
}
@ -2964,7 +3088,10 @@ function gameLoop(diff) {
player.timePlayed += diff.toNumber()
if (player.p.upgrades.includes(11)) player.points = player.points.plus(tmp.pointGen.times(diff)).max(0)
if (player.g.unl) player.g.power = player.g.power.plus(tmp.layerEffs.g.times(diff)).max(0)
if (player.g.best.gte(10)) player.p.points = player.p.points.plus(tmp.resetGain.p.times(diff)).max(0)
if (player.g.best.gte(10)) {
player.p.points = player.p.points.plus(tmp.resetGain.p.times(diff)).max(0)
player.p.best = player.p.best.max(player.p.points)
}
if (player.t.unl) {
let data = tmp.layerEffs.t
player.t.energy = player.t.energy.plus(data.gain.times(diff)).min(data.limit).max(0)
@ -2976,10 +3103,13 @@ function gameLoop(diff) {
let exp = getQuirkEnergyGainExp()
if (exp.gte(0)) player.q.energy = player.q.energy.plus(player.q.time.pow(exp).times(mult).times(diff)).max(0)
}
if (player.q.best.gte(15)) player.e.points = player.e.points.plus(tmp.resetGain.e.times(diff)).max(0)
if (player.q.best.gte(15)) {
player.e.points = player.e.points.plus(tmp.resetGain.e.times(diff)).max(0)
player.e.best = player.e.best.max(player.e.points)
}
if (player.ss.unl) player.ss.subspace = player.ss.subspace.plus(tmp.layerEffs.ss.times(diff)).max(0)
if (player.ba.unl) {
player.ba.power = player.ba.power.plus(tmp.layerEffs.ba.power.times(tmp.balEff2).times(diff)).max(0)
player.ba.power = player.ba.power.plus(tmp.layerEffs.ba.power.times(tmp.balEff2).times(getBalPowGainMult()).times(diff)).max(0)
player.ba.positivity = player.ba.positivity.plus(tmp.layerEffs.ba.pos.times(getPosGainMult()).times(diff)).max(0)
player.ba.negativity = player.ba.negativity.plus(tmp.layerEffs.ba.neg.times(getNegGainMult()).times(diff)).max(0)
}
@ -2987,8 +3117,16 @@ function gameLoop(diff) {
if (player.m.best.gte(3)) {
player.h.points = player.h.points.plus(tmp.resetGain.h.times(diff)).max(0)
player.q.points = player.q.points.plus(tmp.resetGain.q.times(diff)).max(0)
player.h.best = player.h.best.max(player.h.points)
player.q.best = player.q.best.max(player.q.points)
}
if (player.m.best.gte(2.5e9)) player.m.hexes = player.m.hexes.plus(getHexGain().times(diff)).max(0)
if (player.sp.total.gte(10)) {
player.m.points = player.m.points.plus(tmp.resetGain.m.times(diff)).max(0)
player.ba.points = player.ba.points.plus(tmp.resetGain.ba.times(diff)).max(0)
player.m.best = player.m.best.max(player.m.points)
player.ba.best = player.ba.best.max(player.ba.points)
}
if (player.b.auto&&player.t.best.gte(5)) doReset("b")
if (player.g.auto&&player.s.best.gte(5)) doReset("g")
@ -3002,7 +3140,11 @@ function gameLoop(diff) {
if (player.q.auto&&player.ba.best.gte(3)) maxQuirkLayers()
if (player.hb.auto&&player.m.best.gte(4)) doReset("hb")
if (player.ss.auto&&player.m.best.gte(4)) doReset("ss")
if (player.m.auto&&player.m.best.gte(1000)) for (let i=1;i<=3;i++) activateSpell(i)
if (player.m.autoIns&&player.sp.total.gte(2)) for (let i=1;i<=tmp.spellsUnl;i++) {
player.m.casted[i] = player.m.points
player.m.toCast[i] = player.m.points
}
if (player.m.auto&&player.m.best.gte(1000)) for (let i=1;i<=tmp.spellsUnl;i++) activateSpell(i)
if (player.hasNaN&&!NaNalert) {
alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.")
@ -3071,6 +3213,9 @@ document.onkeydown = function(e) {
case "3":
if (player.ba.unl) activateSpell(3)
break;
case "P":
if (player.sp.unl) doReset("sp")
break;
}
} else if (player[key].unl) doReset(key)
}

View file

@ -57,9 +57,11 @@ function updateTemp() {
tmp.balEff = getBalancePowerEff()
tmp.balEff2 = getBalanceTypesEff()
tmp.baExp = getBalanceEnergyExp()
tmp.hexEff = getHexEff()
tmp.spellsUnl = player.sp.upgrades.includes(13)?4:3
if (!tmp.spellEffs) tmp.spellEffs = {}
for (let i=1;i<=3;i++) tmp.spellEffs[i] = getSpellEff(i)
for (let i=1;i<=4;i++) tmp.spellEffs[i] = getSpellEff(i)
tmp.sGenPowEff = getSGenPowEff()
}

View file

@ -269,6 +269,16 @@ h1, h2, h3, b, input {
text-shadow: 0px 0px 10px #eff7ff;
}
.hg {
background-color: #3d9989;
color: rgba(0, 0, 0, 0.5);
}
.hg_txt {
color: #3d9989;
text-shadow: 0px 0px 10px #3d9989;
}
.m {
background-color: #eb34c0;
color: rgba(0, 0, 0, 0.5);
@ -300,30 +310,55 @@ h1, h2, h3, b, input {
}
.sp {
background-color: #007fff;
background-color: #4295a5;
color: rgba(0, 0, 0, 0.5);
}
.sp_txt {
color: #4295a5;
text-shadow: 0px 0px 10px #4295a5;
}
.l {
background-color: #7fbf7f;
color: rgba(0, 0, 0, 0.5);
}
.l_txt {
color: #7fbf7f;
text-shadow: 0px 0px 10px #7fbf7f;
}
.ps {
background-color: #b38fbf;
color: rgba(0, 0, 0, 0.5);
}
.ps_txt {
color: #b38fbf;
text-shadow: 0px 0px 10px #b38fbf;
}
.hs {
background-color: #dfdfff;
color: rgba(0, 0, 0, 0.5);
}
.hs_txt {
color: #dfdfff;
text-shadow: 0px 0px 10px #dfdfff;
}
.i {
background-color: #e5dab7;
color: rgba(0, 0, 0, 0.5);
}
.i_txt {
color: #e5dab7;
text-shadow: 0px 0px 10px #e5dab7;
}
#optionWheel {
position: absolute;
top: 0px;
@ -453,7 +488,7 @@ a {
column-span: 1;
position: absolute;
overflow-y: auto;
overflow-x: hidden;
overflow-x: auto;
transition-duration: 0s
}