mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
Beta v1.2 Alpha 1
This commit is contained in:
parent
3822d4d5ab
commit
127dba1fb2
6 changed files with 317 additions and 33 deletions
40
index.html
40
index.html
|
@ -15,6 +15,13 @@
|
||||||
<div class="vl"></div>
|
<div class="vl"></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>Beta v1.2 Alpha 1</h3>
|
||||||
|
<ul>
|
||||||
|
<li>Implemented the two Row 5 layers</li>
|
||||||
|
<li>Added a new option</li>
|
||||||
|
<li>Rebalanced a few things at the end of row 4</li>
|
||||||
|
<li>Balanced up to 1 of each Row 5 reset</li>
|
||||||
|
</ul><br>
|
||||||
<h3>Beta v1.1</h3>
|
<h3>Beta v1.1</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Cleaned up a few things</li>
|
<li>Cleaned up a few things</li>
|
||||||
|
@ -211,6 +218,8 @@
|
||||||
<span v-if="player.q.unl">Q: Quirk reset</span><br>
|
<span v-if="player.q.unl">Q: Quirk reset</span><br>
|
||||||
<span v-if="player.hb.unl">Ctrl+B: Hyper-Booster reset</span><br>
|
<span v-if="player.hb.unl">Ctrl+B: Hyper-Booster reset</span><br>
|
||||||
<span v-if="player.ss.unl">Shift+S: Subspace reset</span><br>
|
<span v-if="player.ss.unl">Shift+S: Subspace reset</span><br>
|
||||||
|
<span v-if="player.m.unl">M: Magic reset</span><br>
|
||||||
|
<span v-if="player.ba.unl">A: Balance reset</span><br>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="player.tab=='options'" class="col right">
|
<div v-if="player.tab=='options'" class="col right">
|
||||||
<button class="back" onclick="showTab('tree')">←</button><br><br><br><br><br>
|
<button class="back" onclick="showTab('tree')">←</button><br><br><br><br><br>
|
||||||
|
@ -220,12 +229,13 @@
|
||||||
<td><button class="opt" onclick="hardReset()">HARD RESET</button></td>
|
<td><button class="opt" onclick="hardReset()">HARD RESET</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button class="opt" onclick="exportSave()">Export</button></td>
|
<td><button class="opt" onclick="exportSave()">Export to clipboard</button></td>
|
||||||
<td><button class="opt" onclick="importSave()">Import</button></td>
|
<td><button class="opt" onclick="importSave()">Import</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><button class="opt" onclick="toggleOpt('autosave')">Autosave: {{ player.autosave?"ON":"OFF" }}</button></td>
|
<td><button class="opt" onclick="toggleOpt('autosave')">Autosave: {{ player.autosave?"ON":"OFF" }}</button></td>
|
||||||
<td><button class="opt" onclick="adjustMSDisp()">Show Milestones: {{ player.msDisplay.toUpperCase() }}</button></td>
|
<td><button class="opt" onclick="adjustMSDisp()">Show Milestones: {{ player.msDisplay.toUpperCase() }}</button></td>
|
||||||
|
<td><button class="opt" onclick="toggleOpt('offlineProd')">Offline Prod: {{ player.offlineProd?"ON":"OFF" }}</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -275,6 +285,13 @@
|
||||||
<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), can: (player.g.power.gte(tmp.layerReqs.q)||player.q.unl) }">Q</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), 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), can: (player.s.points.gte(tmp.layerReqs.ss)||player.ss.unl) }">SS</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), can: (player.s.points.gte(tmp.layerReqs.ss)||player.ss.unl) }">SS</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</table><table>
|
||||||
|
<tr>
|
||||||
|
<td><button class="treeNode hidden"></button></td>
|
||||||
|
</tr>
|
||||||
|
</table><table>
|
||||||
|
<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), can: (player.h.points.gte(tmp.layerReqs.m)||player.m.unl) }">M</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), can: (player.q.points.gte(tmp.layerReqs.ba)||player.ba.unl) }">BA</button></td>
|
||||||
</table>
|
</table>
|
||||||
<canvas id="treeCanvas" class="canvas"></canvas>
|
<canvas id="treeCanvas" class="canvas"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
@ -365,6 +382,27 @@
|
||||||
<tr><td v-if="milestoneShown(player.ss.best.gte(1), true)" v-bind:class="{ milestone: player.ss.best.lt(1), milestoneDone: player.ss.best.gte(1) }">1 Subspace Energy<br>Automatically purchase Space Buildings <button v-if="player.ss.best.gte(1)" class="smallUpg can s" onclick="toggleAuto('s', 'Build')">{{player.s.autoBuild?"ON":"OFF"}}</button></td></tr>
|
<tr><td v-if="milestoneShown(player.ss.best.gte(1), true)" v-bind:class="{ milestone: player.ss.best.lt(1), milestoneDone: player.ss.best.gte(1) }">1 Subspace Energy<br>Automatically purchase Space Buildings <button v-if="player.ss.best.gte(1)" class="smallUpg can s" onclick="toggleAuto('s', 'Build')">{{player.s.autoBuild?"ON":"OFF"}}</button></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="layer=='m'">
|
||||||
|
<br>
|
||||||
|
<div class="upgRow">
|
||||||
|
<div v-for="id in 3">
|
||||||
|
<button v-bind:class="{ upg: true, bought: spellActive(id), can: ((player.m.points.gte(1))&&player.m.unl&&!spellActive(id)), locked: (!(player.m.points.gte(1)||spellActive(id))), m: true }" v-on:click="activateSpell(id)">{{SPELL_NAMES[id]}}<br>Time Left: {{format(player.m.spellTimes[id])}}<br>Effect: {{getSpellDesc(id)}}</button>
|
||||||
|
</div>
|
||||||
|
</div><br><br>
|
||||||
|
You have {{formatWhole(player.m.hexes)}} Hexes, which are multiplying Hindrance Spirit & Quirk gain by {{format(tmp.hexEff)}}<br><br>
|
||||||
|
<table>
|
||||||
|
<tr><td v-if="milestoneShown(player.m.best.gte(1))" v-bind:class="{ milestone: player.m.best.lt(1), milestoneDone: player.m.best.gte(1) }">1 Magic<br>Keep row 4 milestones on reset</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div v-if="layer=='ba'">
|
||||||
|
<br>You have {{format(player.ba.power)}} Balance Power, which is multiplying Hindrance Spirit & Quirk gain by {{format(tmp.balEff)}}<br><br>
|
||||||
|
You have {{format(player.ba.positivity)}} Positivity<br>
|
||||||
|
You have {{format(player.ba.negativity)}} Negativity<br>
|
||||||
|
Your Positivity & Negativity are multiplying Balance Power gain by {{format(tmp.balEff2)}}<br><br>
|
||||||
|
<table>
|
||||||
|
<tr><td v-if="milestoneShown(player.ba.best.gte(1))" v-bind:class="{ milestone: player.ba.best.lt(1), milestoneDone: player.ba.best.gte(1) }">1 Balance Energy<br>Keep row 4 milestones on reset</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
<br><br><br>
|
<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)">+{{formatWhole(tmp.resetGain[layer])}} {{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]=='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)">+{{formatWhole(tmp.resetGain[layer])}} {{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)">+{{formatWhole(tmp.resetGain[layer])}} {{LAYER_RES[layer]}}<br>Req: {{(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)">+{{formatWhole(tmp.resetGain[layer])}} {{LAYER_RES[layer]}}<br>Req: {{(LAYER_RES_CEIL.includes(layer) ? formatWhole(tmp.nextAt[layer]) : format(tmp.nextAt[layer]))}} {{ LAYER_AMT_NAMES[layer] }}</button>
|
||||||
|
|
|
@ -44,6 +44,14 @@ function drawTree() {
|
||||||
drawTreeBranch("e", "ss")
|
drawTreeBranch("e", "ss")
|
||||||
drawTreeBranch("s", "ss")
|
drawTreeBranch("s", "ss")
|
||||||
}
|
}
|
||||||
|
if (layerUnl('m')) {
|
||||||
|
drawTreeBranch("hb", "m")
|
||||||
|
drawTreeBranch("h", "m")
|
||||||
|
}
|
||||||
|
if (layerUnl('ba')) {
|
||||||
|
drawTreeBranch("q", "ba")
|
||||||
|
drawTreeBranch("ss", "ba")
|
||||||
|
}
|
||||||
|
|
||||||
needCanvasUpdate = false;
|
needCanvasUpdate = false;
|
||||||
}
|
}
|
||||||
|
|
269
js/game.js
269
js/game.js
|
@ -13,8 +13,9 @@ function getStartPlayer() {
|
||||||
time: Date.now(),
|
time: Date.now(),
|
||||||
autosave: true,
|
autosave: true,
|
||||||
msDisplay: "always",
|
msDisplay: "always",
|
||||||
|
offlineProd: true,
|
||||||
versionType: "beta",
|
versionType: "beta",
|
||||||
version: 1.1,
|
version: 1.2,
|
||||||
timePlayed: 0,
|
timePlayed: 0,
|
||||||
hasNaN: false,
|
hasNaN: false,
|
||||||
points: new Decimal(10),
|
points: new Decimal(10),
|
||||||
|
@ -117,10 +118,31 @@ function getStartPlayer() {
|
||||||
subspace: new Decimal(0),
|
subspace: new Decimal(0),
|
||||||
upgrades: [],
|
upgrades: [],
|
||||||
},
|
},
|
||||||
|
m: {
|
||||||
|
unl: false,
|
||||||
|
points: new Decimal(0),
|
||||||
|
best: new Decimal(0),
|
||||||
|
spellTimes: {
|
||||||
|
1: 0,
|
||||||
|
2: 0,
|
||||||
|
3: 0,
|
||||||
|
},
|
||||||
|
hexes: new Decimal(0),
|
||||||
|
upgrades: [],
|
||||||
|
},
|
||||||
|
ba: {
|
||||||
|
unl: false,
|
||||||
|
points: new Decimal(0),
|
||||||
|
best: new Decimal(0),
|
||||||
|
power: new Decimal(0),
|
||||||
|
positivity: new Decimal(0),
|
||||||
|
negativity: new Decimal(0),
|
||||||
|
upgrades: [],
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "h", "q", "hb", "ss"]
|
const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "h", "q", "hb", "ss", "m", "ba"]
|
||||||
|
|
||||||
const LAYER_REQS = {
|
const LAYER_REQS = {
|
||||||
p: new Decimal(10),
|
p: new Decimal(10),
|
||||||
|
@ -134,6 +156,8 @@ const LAYER_REQS = {
|
||||||
q: new Decimal("1e512"),
|
q: new Decimal("1e512"),
|
||||||
hb: new Decimal(12),
|
hb: new Decimal(12),
|
||||||
ss: new Decimal(36),
|
ss: new Decimal(36),
|
||||||
|
m: new Decimal(1e80),
|
||||||
|
ba: new Decimal(1e130),
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_RES = {
|
const LAYER_RES = {
|
||||||
|
@ -148,6 +172,8 @@ const LAYER_RES = {
|
||||||
q: "quirks",
|
q: "quirks",
|
||||||
hb: "hyper-boosters",
|
hb: "hyper-boosters",
|
||||||
ss: "subspace energy",
|
ss: "subspace energy",
|
||||||
|
m: "magic",
|
||||||
|
ba: "balance energy",
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_RES_CEIL = ["sb", "hb", "ss"]
|
const LAYER_RES_CEIL = ["sb", "hb", "ss"]
|
||||||
|
@ -164,6 +190,8 @@ const LAYER_TYPE = {
|
||||||
q: "normal",
|
q: "normal",
|
||||||
hb: "static",
|
hb: "static",
|
||||||
ss: "static",
|
ss: "static",
|
||||||
|
m: "normal",
|
||||||
|
ba: "normal",
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_EXP = {
|
const LAYER_EXP = {
|
||||||
|
@ -178,6 +206,8 @@ const LAYER_EXP = {
|
||||||
q: new Decimal(0.0075),
|
q: new Decimal(0.0075),
|
||||||
hb: new Decimal(2.5),
|
hb: new Decimal(2.5),
|
||||||
ss: new Decimal(1.1),
|
ss: new Decimal(1.1),
|
||||||
|
m: new Decimal(0.01),
|
||||||
|
ba: new Decimal(0.00667),
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_BASE = {
|
const LAYER_BASE = {
|
||||||
|
@ -202,7 +232,9 @@ const LAYER_ROW = {
|
||||||
q: 3,
|
q: 3,
|
||||||
hb: 3,
|
hb: 3,
|
||||||
ss: 3,
|
ss: 3,
|
||||||
future_layer: 4,
|
m: 4,
|
||||||
|
ba: 4,
|
||||||
|
future_layer: 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
const ROW_LAYERS = [
|
const ROW_LAYERS = [
|
||||||
|
@ -210,6 +242,7 @@ const ROW_LAYERS = [
|
||||||
["b","g"],
|
["b","g"],
|
||||||
["e","t","s","sb"],
|
["e","t","s","sb"],
|
||||||
["h","q","hb","ss"],
|
["h","q","hb","ss"],
|
||||||
|
["m","ba"],
|
||||||
["future_layer"],
|
["future_layer"],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -224,7 +257,7 @@ const ORDER_UP = [
|
||||||
const LAYER_EFFS = {
|
const LAYER_EFFS = {
|
||||||
b: function() {
|
b: function() {
|
||||||
if (tmp.hcActive ? tmp.hcActive[11] : true) return new Decimal(1);
|
if (tmp.hcActive ? tmp.hcActive[11] : true) return new Decimal(1);
|
||||||
return Decimal.pow(Decimal.add(2, tmp.atbb).max(0), player.b.points.plus(getFreeBoosters())).max(0)
|
return Decimal.pow(Decimal.add(2, tmp.atbb).max(0), player.b.points.plus(getFreeBoosters()).times(getBoosterPower())).max(0)
|
||||||
},
|
},
|
||||||
g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb).max(0), player.g.points.times(getGenPow())).sub(1).times(getGenPowerGainMult()).max(0) },
|
g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb).max(0), player.g.points.times(getGenPow())).sub(1).times(getGenPowerGainMult()).max(0) },
|
||||||
t: function() { return {
|
t: function() { return {
|
||||||
|
@ -239,6 +272,11 @@ const LAYER_EFFS = {
|
||||||
},
|
},
|
||||||
hb: function() { return Decimal.pow(1.6, player.hb.points.pow(getHyperBoosterExp()).times(getHyperBoosterPow())) },
|
hb: function() { return Decimal.pow(1.6, player.hb.points.pow(getHyperBoosterExp()).times(getHyperBoosterPow())) },
|
||||||
ss: function() { return player.ss.points.pow(2.5).times(getSubspaceGainMult()) },
|
ss: function() { return player.ss.points.pow(2.5).times(getSubspaceGainMult()) },
|
||||||
|
ba: function() { return {
|
||||||
|
power: player.ba.points.pow(0.2),
|
||||||
|
pos: player.ba.points.pow(0.7),
|
||||||
|
neg: player.ba.points.pow(0.65).times(0.4),
|
||||||
|
}},
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_UPGS = {
|
const LAYER_UPGS = {
|
||||||
|
@ -369,14 +407,14 @@ const LAYER_UPGS = {
|
||||||
},
|
},
|
||||||
32: {
|
32: {
|
||||||
desc: "Add free Boosters based on your Generator Power.",
|
desc: "Add free Boosters based on your Generator Power.",
|
||||||
cost: new Decimal(1263),
|
cost: new Decimal(1261),
|
||||||
unl: function() { return player.hb.upgrades.includes(14) },
|
unl: function() { return player.hb.upgrades.includes(14) },
|
||||||
currently: function() { return player.g.power.plus(1).log10().sqrt().floor() },
|
currently: function() { return player.g.power.plus(1).log10().sqrt().floor() },
|
||||||
effDisp: function(x) { return "+"+formatWhole(x) },
|
effDisp: function(x) { return "+"+formatWhole(x) },
|
||||||
},
|
},
|
||||||
33: {
|
33: {
|
||||||
desc: "Add 100 free Boosters.",
|
desc: "Add 100 free Boosters.",
|
||||||
cost: new Decimal(1270),
|
cost: new Decimal(1269),
|
||||||
unl: function() { return player.hb.upgrades.includes(14) },
|
unl: function() { return player.hb.upgrades.includes(14) },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -910,7 +948,7 @@ const LAYER_UPGS = {
|
||||||
13: {
|
13: {
|
||||||
desc: "This layer behaves as if you chose it first.",
|
desc: "This layer behaves as if you chose it first.",
|
||||||
cost: new Decimal(2),
|
cost: new Decimal(2),
|
||||||
unl: function() { return player.hb.order>0||(player.ss.upgrades.includes(15))||player.hb.upgrades.includes(13) },
|
unl: function() { return player.hb.order>0||(player.ss.upgrades.includes(15))||player.hb.upgrades.includes(13)||(player.m.unl||player.ba.unl) },
|
||||||
},
|
},
|
||||||
14: {
|
14: {
|
||||||
desc: "Unlock 3 new Booster Upgrades.",
|
desc: "Unlock 3 new Booster Upgrades.",
|
||||||
|
@ -948,7 +986,7 @@ const LAYER_UPGS = {
|
||||||
15: {
|
15: {
|
||||||
desc: "This layer behaves as if you chose it first.",
|
desc: "This layer behaves as if you chose it first.",
|
||||||
cost: new Decimal(3),
|
cost: new Decimal(3),
|
||||||
unl: function() { return player.ss.order>0||(player.hb.upgrades.includes(13))||player.ss.upgrades.includes(15) },
|
unl: function() { return player.ss.order>0||(player.hb.upgrades.includes(13))||player.ss.upgrades.includes(15)||(player.m.unl||player.ba.unl) },
|
||||||
},
|
},
|
||||||
21: {
|
21: {
|
||||||
desc: "Unlock 5 new Generator Upgrades.",
|
desc: "Unlock 5 new Generator Upgrades.",
|
||||||
|
@ -978,6 +1016,14 @@ const LAYER_UPGS = {
|
||||||
unl: function() { return false },
|
unl: function() { return false },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
m: {
|
||||||
|
rows: 0,
|
||||||
|
cols: 0,
|
||||||
|
},
|
||||||
|
ba: {
|
||||||
|
rows: 0,
|
||||||
|
cols: 0,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const TAB_REQS = {
|
const TAB_REQS = {
|
||||||
|
@ -997,6 +1043,8 @@ const TAB_REQS = {
|
||||||
q: function() { return (player.q.unl||player.g.power.gte(tmp.layerReqs.q))&&layerUnl('q') },
|
q: function() { return (player.q.unl||player.g.power.gte(tmp.layerReqs.q))&&layerUnl('q') },
|
||||||
hb: function() { return (player.hb.unl||player.sb.points.gte(tmp.layerReqs.hb))&&layerUnl('hb') },
|
hb: function() { return (player.hb.unl||player.sb.points.gte(tmp.layerReqs.hb))&&layerUnl('hb') },
|
||||||
ss: function() { return (player.ss.unl||player.s.points.gte(tmp.layerReqs.ss))&&layerUnl('ss') },
|
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') },
|
||||||
}
|
}
|
||||||
|
|
||||||
const LAYER_AMT_NAMES = {
|
const LAYER_AMT_NAMES = {
|
||||||
|
@ -1011,6 +1059,8 @@ const LAYER_AMT_NAMES = {
|
||||||
q: "generator power",
|
q: "generator power",
|
||||||
hb: "super-boosters",
|
hb: "super-boosters",
|
||||||
ss: "space energy",
|
ss: "space energy",
|
||||||
|
m: "hindrance spirit",
|
||||||
|
ba: "quirks",
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLayerAmt(layer) {
|
function getLayerAmt(layer) {
|
||||||
|
@ -1031,6 +1081,12 @@ function getLayerAmt(layer) {
|
||||||
case "ss":
|
case "ss":
|
||||||
return player.s.points;
|
return player.s.points;
|
||||||
break;
|
break;
|
||||||
|
case "m":
|
||||||
|
return player.h.points;
|
||||||
|
break;
|
||||||
|
case "ba":
|
||||||
|
return player.q.points;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return amt
|
return amt
|
||||||
}
|
}
|
||||||
|
@ -1060,6 +1116,9 @@ function getLayerEffDesc(layer) {
|
||||||
case "ss":
|
case "ss":
|
||||||
return "which are generating "+format(eff)+" Subspace/sec"
|
return "which are generating "+format(eff)+" Subspace/sec"
|
||||||
break;
|
break;
|
||||||
|
case "ba":
|
||||||
|
return "which are generating "+format(eff.power)+" Balance Power, "+format(eff.pos)+" Positivity, and "+format(eff.neg)+" Negativity every second"
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1073,6 +1132,7 @@ function load() {
|
||||||
else player = JSON.parse(atob(get))
|
else player = JSON.parse(atob(get))
|
||||||
player.tab = "tree"
|
player.tab = "tree"
|
||||||
offTime.remain = (Date.now()-player.time)/1000
|
offTime.remain = (Date.now()-player.time)/1000
|
||||||
|
if (!player.offlineProd) offTime.remain = 0
|
||||||
player.time = Date.now()
|
player.time = Date.now()
|
||||||
checkForVars();
|
checkForVars();
|
||||||
convertToDecimal();
|
convertToDecimal();
|
||||||
|
@ -1132,36 +1192,40 @@ function versionCheck() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkForVars() {
|
function checkForVars() {
|
||||||
|
let start = getStartPlayer()
|
||||||
if (player.autosave===undefined) player.autosave = true;
|
if (player.autosave===undefined) player.autosave = true;
|
||||||
if (player.b===undefined) player.b = getStartPlayer().b
|
if (player.b===undefined) player.b = start.b
|
||||||
if (player.g===undefined) player.g = getStartPlayer().g
|
if (player.g===undefined) player.g = start.g
|
||||||
if (player.p.best===undefined) player.p.best = player.p.points
|
if (player.p.best===undefined) player.p.best = player.p.points
|
||||||
if (player.b.best===undefined) player.b.best = player.b.points
|
if (player.b.best===undefined) player.b.best = player.b.points
|
||||||
if (player.b.auto===undefined) player.b.auto = false
|
if (player.b.auto===undefined) player.b.auto = false
|
||||||
if (player.g.best===undefined) player.g.best = player.g.points
|
if (player.g.best===undefined) player.g.best = player.g.points
|
||||||
if (player.g.auto===undefined) player.g.auto = false
|
if (player.g.auto===undefined) player.g.auto = false
|
||||||
if (player.e === undefined) player.e = getStartPlayer().e
|
if (player.e === undefined) player.e = start.e
|
||||||
if (player.e.order === undefined) player.e.order = 0
|
if (player.e.order === undefined) player.e.order = 0
|
||||||
if (player.e.auto===undefined) player.e.auto = false
|
if (player.e.auto===undefined) player.e.auto = false
|
||||||
if (player.t === undefined) player.t = getStartPlayer().t
|
if (player.t === undefined) player.t = start.t
|
||||||
if (player.t.auto===undefined) player.t.auto = false
|
if (player.t.auto===undefined) player.t.auto = false
|
||||||
if (player.t.autoCap===undefined) player.t.autoCap = false
|
if (player.t.autoCap===undefined) player.t.autoCap = false
|
||||||
if (player.s === undefined) player.s = getStartPlayer().s
|
if (player.s === undefined) player.s = start.s
|
||||||
if (player.s.buildings[4] === undefined) player.s.buildings[4] = new Decimal(0);
|
if (player.s.buildings[4] === undefined) player.s.buildings[4] = new Decimal(0);
|
||||||
if (player.s.buildings[5] === undefined) player.s.buildings[5] = new Decimal(0);
|
if (player.s.buildings[5] === undefined) player.s.buildings[5] = new Decimal(0);
|
||||||
if (player.s.auto === undefined) player.s.auto = false
|
if (player.s.auto === undefined) player.s.auto = false
|
||||||
if (player.s.autoBuild === undefined) player.s.autoBuild = false
|
if (player.s.autoBuild === undefined) player.s.autoBuild = false
|
||||||
if (player.sb === undefined) player.sb = getStartPlayer().sb
|
if (player.sb === undefined) player.sb = start.sb
|
||||||
if (player.sb.auto === undefined) player.sb.auto = false
|
if (player.sb.auto === undefined) player.sb.auto = false
|
||||||
if (player.timePlayed === undefined) player.timePlayed = 0
|
if (player.timePlayed === undefined) player.timePlayed = 0
|
||||||
if (player.hasNaN === undefined) player.hasNaN = false
|
if (player.hasNaN === undefined) player.hasNaN = false
|
||||||
if (player.h === undefined) player.h = getStartPlayer().h
|
if (player.h === undefined) player.h = start.h
|
||||||
if (player.h.active === undefined) player.h.active = 0
|
if (player.h.active === undefined) player.h.active = 0
|
||||||
if (player.h.time === undefined) player.h.time = 0
|
if (player.h.time === undefined) player.h.time = 0
|
||||||
if (player.q === undefined) player.q = getStartPlayer().q
|
if (player.q === undefined) player.q = start.q
|
||||||
if (player.msDisplay === undefined) player.msDisplay = "always"
|
if (player.msDisplay === undefined) player.msDisplay = "always"
|
||||||
if (player.hb === undefined) player.hb = getStartPlayer().hb
|
if (player.hb === undefined) player.hb = start.hb
|
||||||
if (player.ss === undefined) player.ss = getStartPlayer().ss
|
if (player.ss === undefined) player.ss = start.ss
|
||||||
|
if (player.m === undefined) player.m = start.m
|
||||||
|
if (player.ba === undefined) player.ba = start.ba
|
||||||
|
if (player.offlineProd === undefined) player.offlineProd = true
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertToDecimal() {
|
function convertToDecimal() {
|
||||||
|
@ -1198,6 +1262,14 @@ function convertToDecimal() {
|
||||||
player.ss.points = new Decimal(player.ss.points)
|
player.ss.points = new Decimal(player.ss.points)
|
||||||
player.ss.best = new Decimal(player.ss.best)
|
player.ss.best = new Decimal(player.ss.best)
|
||||||
player.ss.subspace = new Decimal(player.ss.subspace)
|
player.ss.subspace = new Decimal(player.ss.subspace)
|
||||||
|
player.m.points = new Decimal(player.m.points)
|
||||||
|
player.m.best = new Decimal(player.m.best)
|
||||||
|
player.m.hexes = new Decimal(player.m.hexes)
|
||||||
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleOpt(name) {
|
function toggleOpt(name) {
|
||||||
|
@ -1339,11 +1411,15 @@ function getLayerGainMult(layer) {
|
||||||
if (player.q.upgrades.includes(22)) mult = mult.times(LAYER_UPGS.q[22].currently().h)
|
if (player.q.upgrades.includes(22)) mult = mult.times(LAYER_UPGS.q[22].currently().h)
|
||||||
if (player.q.upgrades.includes(34)) mult = mult.times(LAYER_UPGS.q[34].currently())
|
if (player.q.upgrades.includes(34)) mult = mult.times(LAYER_UPGS.q[34].currently())
|
||||||
if (player.q.upgrades.includes(44)) mult = mult.times(LAYER_UPGS.q[44].currently())
|
if (player.q.upgrades.includes(44)) mult = mult.times(LAYER_UPGS.q[44].currently())
|
||||||
|
if (player.ba.unl) mult = mult.times(tmp.balEff)
|
||||||
|
if (player.m.unl) mult = mult.times(tmp.hexEff)
|
||||||
break;
|
break;
|
||||||
case "q":
|
case "q":
|
||||||
if (player.h.challs.includes(12)) mult = mult.times(H_CHALLS[12].currently())
|
if (player.h.challs.includes(12)) mult = mult.times(H_CHALLS[12].currently())
|
||||||
if (player.q.upgrades.includes(22)) mult = mult.times(LAYER_UPGS.q[22].currently().q)
|
if (player.q.upgrades.includes(22)) mult = mult.times(LAYER_UPGS.q[22].currently().q)
|
||||||
if (player.q.upgrades.includes(34)) mult = mult.times(LAYER_UPGS.q[34].currently())
|
if (player.q.upgrades.includes(34)) mult = mult.times(LAYER_UPGS.q[34].currently())
|
||||||
|
if (player.ba.unl) mult = mult.times(tmp.balEff)
|
||||||
|
if (player.m.unl) mult = mult.times(tmp.hexEff)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return mult
|
return mult
|
||||||
|
@ -1423,6 +1499,12 @@ function layerUnl(layer) {
|
||||||
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 "m":
|
||||||
|
return player.h.unl&&player.hb.unl
|
||||||
|
break;
|
||||||
|
case "ba":
|
||||||
|
return player.q.unl&&player.ss.unl
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1450,11 +1532,11 @@ function rowReset(row, layer) {
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
player.b.points = new Decimal(0);
|
player.b.points = new Decimal(0);
|
||||||
player.b.best = 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.b.upgrades = [];
|
||||||
player.g.points = new Decimal(0);
|
player.g.points = new Decimal(0);
|
||||||
player.g.power = new Decimal(0);
|
player.g.power = new Decimal(0);
|
||||||
player.g.best = 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.g.upgrades = [];
|
||||||
player.t.energy = new Decimal(0);
|
player.t.energy = new Decimal(0);
|
||||||
if (layer=="t"||layer=="e"||layer=="s") {
|
if (layer=="t"||layer=="e"||layer=="s") {
|
||||||
|
@ -1470,21 +1552,21 @@ function rowReset(row, layer) {
|
||||||
case 3:
|
case 3:
|
||||||
player.t.points = new Decimal(0);
|
player.t.points = new Decimal(0);
|
||||||
player.t.order = 0
|
player.t.order = 0
|
||||||
if (player.h.best.lt(2)) player.t.best = new Decimal(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.t.upgrades = [];
|
||||||
player.t.extCapsules = new Decimal(0);
|
player.t.extCapsules = new Decimal(0);
|
||||||
player.e.order = 0
|
player.e.order = 0
|
||||||
player.e.points = new Decimal(0);
|
player.e.points = new Decimal(0);
|
||||||
if (player.h.best.lt(2)) player.e.best = 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);
|
player.e.enhancers = new Decimal(0);
|
||||||
if (player.h.best.lt(4)) player.e.upgrades = [];
|
if (player.h.best.lt(4)) player.e.upgrades = [];
|
||||||
player.s = {
|
player.s = {
|
||||||
unl: player.s.unl,
|
unl: player.s.unl,
|
||||||
order: 0,
|
order: 0,
|
||||||
points: new Decimal(0),
|
points: new Decimal(0),
|
||||||
best: player.h.best.gte(2) ? player.s.best : new Decimal(0),
|
best: (player.h.best.gte(2)||player.m.best.gte(1)) ? player.s.best : new Decimal(0),
|
||||||
spent: player.q.best.gte(4) ? player.s.spent : new Decimal(0),
|
spent: (player.q.best.gte(4)&&(layer=="h"||layer=="q"||layer=="ss"||layer=="hb")) ? player.s.spent : new Decimal(0),
|
||||||
buildings: player.q.best.gte(4) ? player.s.buildings : ({
|
buildings: (player.q.best.gte(4)&&(layer=="h"||layer=="q"||layer=="ss"||layer=="hb")) ? player.s.buildings : ({
|
||||||
1: new Decimal(0),
|
1: new Decimal(0),
|
||||||
2: new Decimal(0),
|
2: new Decimal(0),
|
||||||
3: new Decimal(0),
|
3: new Decimal(0),
|
||||||
|
@ -1500,7 +1582,7 @@ function rowReset(row, layer) {
|
||||||
auto: player.sb.auto,
|
auto: player.sb.auto,
|
||||||
order: 0,
|
order: 0,
|
||||||
points: new Decimal(0),
|
points: new Decimal(0),
|
||||||
best: player.h.best.gte(2) ? player.sb.best : 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.sb.upgrades : [],
|
||||||
}
|
}
|
||||||
player.h.time = 0
|
player.h.time = 0
|
||||||
|
@ -1508,10 +1590,43 @@ function rowReset(row, layer) {
|
||||||
player.q.energy = new Decimal(0);
|
player.q.energy = new Decimal(0);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
player.h = start.h
|
player.h = {
|
||||||
player.q = start.q
|
unl: player.h.unl,
|
||||||
player.hb = start.hb
|
time: 0,
|
||||||
player.ss = start.ss
|
points: new Decimal(0),
|
||||||
|
best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.h.best:new Decimal(0),
|
||||||
|
active: 0,
|
||||||
|
challs: [],
|
||||||
|
upgrades: [],
|
||||||
|
}
|
||||||
|
player.q = {
|
||||||
|
unl: player.q.unl,
|
||||||
|
points: new Decimal(0),
|
||||||
|
best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.q.best:new Decimal(0),
|
||||||
|
layers: new Decimal(0),
|
||||||
|
energy: new Decimal(0),
|
||||||
|
time: new Decimal(0),
|
||||||
|
upgrades: [],
|
||||||
|
}
|
||||||
|
player.hb = {
|
||||||
|
unl: player.hb.unl,
|
||||||
|
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.ss = {
|
||||||
|
unl: player.ss.unl,
|
||||||
|
order: player.ss.order,
|
||||||
|
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: [],
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
player.m = start.m
|
||||||
|
player.ba = start.ba
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1605,6 +1720,12 @@ function getFreeBoosters() {
|
||||||
return free
|
return free
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBoosterPower() {
|
||||||
|
let power = new Decimal(1)
|
||||||
|
if (spellActive(1)) power = power.times(tmp.spellEffs[1])
|
||||||
|
return power
|
||||||
|
}
|
||||||
|
|
||||||
function addToGenBase() {
|
function addToGenBase() {
|
||||||
let toAdd = new Decimal(0)
|
let toAdd = new Decimal(0)
|
||||||
if (player.g.upgrades.includes(12)) toAdd = toAdd.plus(LAYER_UPGS.g[12].currently())
|
if (player.g.upgrades.includes(12)) toAdd = toAdd.plus(LAYER_UPGS.g[12].currently())
|
||||||
|
@ -1729,6 +1850,7 @@ function getCapPow() {
|
||||||
if (tmp.hcActive ? tmp.hcActive[41] : true) return new Decimal(0)
|
if (tmp.hcActive ? tmp.hcActive[41] : true) return new Decimal(0)
|
||||||
let pow = new Decimal(1)
|
let pow = new Decimal(1)
|
||||||
if (player.q.upgrades.includes(33)) pow = pow.times(LAYER_UPGS.q[33].currently())
|
if (player.q.upgrades.includes(33)) pow = pow.times(LAYER_UPGS.q[33].currently())
|
||||||
|
if (spellActive(2)) pow = pow.times(tmp.spellEffs[2])
|
||||||
return pow
|
return pow
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1980,7 +2102,9 @@ function getQuirkLayerMult() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQuirkEnergyGainExp() {
|
function getQuirkEnergyGainExp() {
|
||||||
return player.q.layers.sub(1)
|
let mult = new Decimal(1)
|
||||||
|
if (spellActive(3)) mult = mult.times(tmp.spellEffs[3])
|
||||||
|
return player.q.layers.sub(1).times(mult)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQuirkEnergyEff() {
|
function getQuirkEnergyEff() {
|
||||||
|
@ -2172,6 +2296,79 @@ function getHyperBoosterPow() {
|
||||||
return pow;
|
return pow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getBalancePowerEff() {
|
||||||
|
let eff = player.ba.power.plus(1).sqrt()
|
||||||
|
return eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBalanceTypesEff() {
|
||||||
|
let mod = player.ba.positivity.plus(1).log10().plus(1).div(player.ba.negativity.plus(1).log10().plus(1)).log10().abs().plus(1).pow(-1)
|
||||||
|
let pos = player.ba.positivity.plus(1).log10().plus(1)
|
||||||
|
let neg = player.ba.negativity.plus(1).log10().plus(1)
|
||||||
|
let eff = pos.times(neg).pow(mod)
|
||||||
|
return eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
const SPELL_NAMES = {
|
||||||
|
1: "Spell 1",
|
||||||
|
2: "Spell 2",
|
||||||
|
3: "Spell 3",
|
||||||
|
}
|
||||||
|
|
||||||
|
const SPELL_DESCS = {
|
||||||
|
1: "Boosters are X% stronger",
|
||||||
|
2: "Time Capsules are X% stronger",
|
||||||
|
3: "Quirk Layers are X% more efficient",
|
||||||
|
}
|
||||||
|
|
||||||
|
const SPELL_BASE = {
|
||||||
|
1: 1.25,
|
||||||
|
2: 1.1,
|
||||||
|
3: 1.04,
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSpellPower(x) {
|
||||||
|
let power = new Decimal(1);
|
||||||
|
return power;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSpellEff(x) {
|
||||||
|
let base = SPELL_BASE[x]
|
||||||
|
let power = getSpellPower(x)
|
||||||
|
let eff = Decimal.pow(base, power)
|
||||||
|
return eff
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSpellDesc(x) {
|
||||||
|
let desc = SPELL_DESCS[x]
|
||||||
|
let eff = tmp.spellEffs[x]
|
||||||
|
return desc.replace("X", format(eff.sub(1).times(100)))
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSpellTime() {
|
||||||
|
let time = 20
|
||||||
|
return time
|
||||||
|
}
|
||||||
|
|
||||||
|
function spellActive(x) {
|
||||||
|
if (!player.m.unl) return false
|
||||||
|
return player.m.spellTimes[x]>0
|
||||||
|
}
|
||||||
|
|
||||||
|
function activateSpell(x) {
|
||||||
|
if (!player.m.unl) return
|
||||||
|
if (spellActive(x)) return
|
||||||
|
if (player.m.points.lt(1)) return
|
||||||
|
player.m.points = player.m.points.sub(1)
|
||||||
|
player.m.spellTimes[x] = getSpellTime()
|
||||||
|
player.m.hexes = player.m.hexes.plus(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getHexEff() {
|
||||||
|
let eff = player.m.hexes.plus(1).pow(5)
|
||||||
|
return eff;
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
@ -2196,6 +2393,12 @@ function gameLoop(diff) {
|
||||||
}
|
}
|
||||||
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)
|
||||||
if (player.ss.unl) player.ss.subspace = player.ss.subspace.plus(tmp.layerEffs.ss.times(diff)).max(0)
|
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.positivity = player.ba.positivity.plus(tmp.layerEffs.ba.pos.times(diff)).max(0)
|
||||||
|
player.ba.negativity = player.ba.negativity.plus(tmp.layerEffs.ba.neg.times(diff)).max(0)
|
||||||
|
}
|
||||||
|
if (player.m.unl) for (let i=1;i<=3;i++) player.m.spellTimes[i] = Decimal.sub(player.m.spellTimes[i], diff).max(0).toNumber()
|
||||||
|
|
||||||
if (player.b.auto&&player.t.best.gte(5)) doReset("b")
|
if (player.b.auto&&player.t.best.gte(5)) doReset("b")
|
||||||
if (player.g.auto&&player.s.best.gte(5)) doReset("g")
|
if (player.g.auto&&player.s.best.gte(5)) doReset("g")
|
||||||
|
@ -2229,6 +2432,7 @@ var saveInterval = setInterval(function() {
|
||||||
var interval = setInterval(function() {
|
var interval = setInterval(function() {
|
||||||
if (player===undefined||tmp===undefined) return;
|
if (player===undefined||tmp===undefined) return;
|
||||||
let diff = (Date.now()-player.time)/1000
|
let diff = (Date.now()-player.time)/1000
|
||||||
|
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
|
||||||
|
@ -2247,6 +2451,9 @@ document.onkeydown = function(e) {
|
||||||
let key = e.key
|
let key = e.key
|
||||||
if ((!LAYERS.includes(key))||ctrlDown||shiftDown) {
|
if ((!LAYERS.includes(key))||ctrlDown||shiftDown) {
|
||||||
switch(key) {
|
switch(key) {
|
||||||
|
case "a":
|
||||||
|
if (player.ba.unl) doReset("ba")
|
||||||
|
break;
|
||||||
case "b":
|
case "b":
|
||||||
if (ctrlDown && player.hb.unl) doReset("hb")
|
if (ctrlDown && player.hb.unl) doReset("hb")
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -51,4 +51,10 @@ function updateTemp() {
|
||||||
tmp.ssEff1 = getSubspaceEff1()
|
tmp.ssEff1 = getSubspaceEff1()
|
||||||
tmp.ssEff2 = getSubspaceEff2()
|
tmp.ssEff2 = getSubspaceEff2()
|
||||||
tmp.ssEff3 = getSubspaceEff3()
|
tmp.ssEff3 = getSubspaceEff3()
|
||||||
|
|
||||||
|
tmp.balEff = getBalancePowerEff()
|
||||||
|
tmp.balEff2 = getBalanceTypesEff()
|
||||||
|
tmp.hexEff = getHexEff()
|
||||||
|
if (!tmp.spellEffs) tmp.spellEffs = {}
|
||||||
|
for (let i=1;i<=3;i++) tmp.spellEffs[i] = getSpellEff(i)
|
||||||
}
|
}
|
7
js/v.js
7
js/v.js
|
@ -7,6 +7,7 @@ function loadVue() {
|
||||||
player,
|
player,
|
||||||
tmp,
|
tmp,
|
||||||
offTime,
|
offTime,
|
||||||
|
Decimal,
|
||||||
format,
|
format,
|
||||||
formatWhole,
|
formatWhole,
|
||||||
formatTime,
|
formatTime,
|
||||||
|
@ -27,6 +28,9 @@ function loadVue() {
|
||||||
HCActive,
|
HCActive,
|
||||||
milestoneShown,
|
milestoneShown,
|
||||||
destroyBuilding,
|
destroyBuilding,
|
||||||
|
getSpellDesc,
|
||||||
|
activateSpell,
|
||||||
|
spellActive,
|
||||||
LAYERS,
|
LAYERS,
|
||||||
LAYER_RES,
|
LAYER_RES,
|
||||||
LAYER_TYPE,
|
LAYER_TYPE,
|
||||||
|
@ -34,7 +38,8 @@ function loadVue() {
|
||||||
LAYER_EFFS,
|
LAYER_EFFS,
|
||||||
LAYER_AMT_NAMES,
|
LAYER_AMT_NAMES,
|
||||||
LAYER_RES_CEIL,
|
LAYER_RES_CEIL,
|
||||||
H_CHALLS
|
H_CHALLS,
|
||||||
|
SPELL_NAMES
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
20
style.css
20
style.css
|
@ -235,6 +235,26 @@ h1, h2 {
|
||||||
text-shadow: 0px 0px 10px white;
|
text-shadow: 0px 0px 10px white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.m {
|
||||||
|
background-color: #eb34c0;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.m_txt {
|
||||||
|
color: #eb34c0;
|
||||||
|
text-shadow: 0px 0px 10px #eb34c0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ba {
|
||||||
|
background-color: #ebc88f;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ba_txt {
|
||||||
|
color: #ebc88f;
|
||||||
|
text-shadow: 0px 0px 10px #ebc88f;
|
||||||
|
}
|
||||||
|
|
||||||
#optionWheel {
|
#optionWheel {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
|
|
Loading…
Reference in a new issue