1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2025-01-18 03:31:30 +00:00
This commit is contained in:
Acamaeda 2020-12-12 21:43:22 -05:00
parent 139e10efa4
commit c885114791
17 changed files with 46 additions and 3799 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,188 +0,0 @@
<div v-if="layer=='g'">
<table>
<tr v-if="milestoneShown(player.g.best.gte(8)||player.h.best.gte(1)||player.q.best.gte(1))"><td v-bind:class="{ milestone: player.g.best.lt(8)&&player.h.best.lt(1)&&player.q.best.lt(1), milestoneDone: player.g.best.gte(8)||player.h.best.gte(1)||player.q.best.gte(1) }"><h3>8 Generators</h3><br>Keep Prestige Upgrades on reset</td></tr>
<tr v-if="milestoneShown(player.g.best.gte(10))"><td v-bind:class="{ milestone: player.g.best.lt(10), milestoneDone: player.g.best.gte(10) }"><h3>10 Generators</h3><br>Gain 100% of Prestige Point gain every second</td></tr>
<tr v-if="milestoneShown(player.g.best.gte(15))"><td v-bind:class="{ milestone: player.g.best.lt(15), milestoneDone: player.g.best.gte(15) }"><h3>15 Generators</h3><br>You can buy max Generators</td></tr>
</table><br><br>
You have {{format(player.g.power)}} Generator Power, which multiplies Point gain by {{format(tmp.genPowEff)}}
</div>
<div v-if="layer=='e'">
<table>
<tr v-if="milestoneShown(player.e.best.gte(2))"><td v-bind:class="{ milestone: player.e.best.lt(2), milestoneDone: player.e.best.gte(2) }"><h3>2 enhance points</h3><br>Keep Booster/Generator milestones on reset</td></tr>
<tr v-if="milestoneShown(player.e.best.gte(10)||player.h.best.gte(1)||player.q.best.gte(1))"><td v-bind:class="{ milestone: player.e.best.lt(10)&&player.h.best.lt(1)&&player.q.best.lt(1), milestoneDone: player.e.best.gte(10)||player.h.best.gte(1)||player.q.best.gte(1) }"><h3>10 enhance points</h3><br>Keep Prestige Upgrades on reset</td></tr>
</table><br><br>
<button v-bind:class="{ upgBig: true, can: player.e.points.gte(getEnhancerCost()), locked: player.e.points.lt(getEnhancerCost()), e: true }" onclick="buyEnhancer()">Buy an Enhancer<br>Cost: {{formatWhole(getEnhancerCost())}} Enhance Points<br>Amount: {{formatWhole(player.e.enhancers.sub(tmp.subbedEnh))}}<br>Multiplies Prestige Point gain by {{format(tmp.enhEff)}}<br>Adds<span v-if="player.q.upgrades.includes(53)"> and multiplies</span> to base of Booster/Generator effects by {{format(tmp.enhEff2)}}</button>
</div>
<div v-if="layer=='t'">
<table>
<tr v-if="milestoneShown(player.t.best.gte(2))"><td v-bind:class="{ milestone: player.t.best.lt(2), milestoneDone: player.t.best.gte(2) }"><h3>2 time capsules</h3><br>Keep Booster/Generator milestones on reset</td></tr>
<tr v-if="milestoneShown(player.t.best.gte(3)||player.h.best.gte(1)||player.q.best.gte(1))"><td v-bind:class="{ milestone: player.t.best.lt(3)&&player.h.best.lt(1)&&player.q.best.lt(1), milestoneDone: player.t.best.gte(3)||player.h.best.gte(1)||player.q.best.gte(1) }"><h3>3 time capsules</h3><br>Keep Prestige Upgrades on reset</td></tr>
<tr v-if="milestoneShown(player.t.best.gte(4))"><td v-bind:class="{ milestone: player.t.best.lt(4), milestoneDone: player.t.best.gte(4) }"><h3>4 time capsules</h3><br>Keep Booster Upgrades on all row 3 resets</td></tr>
<tr v-if="milestoneShown(player.t.best.gte(5), true)"><td v-bind:class="{ milestone: player.t.best.lt(5), milestoneDone: player.t.best.gte(5) }"><h3>5 time capsules</h3><br>Automatically purchase Boosters&nbsp;&nbsp;&nbsp;<button v-if="player.t.best.gte(5)" class="smallUpg can b" onclick="toggleAuto('b')">{{player.b.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.t.best.gte(12))"><td v-bind:class="{ milestone: player.t.best.lt(12), milestoneDone: player.t.best.gte(12) }"><h3>12 time capsules</h3><br>Boosters reset nothing</td></tr>
</table><br><br>
You have {{format(player.t.energy)}} Time Energy, which multiplies Point gain & Prestige Point gain by {{format(tmp.timeEff)}}<br>
You have {{ format(player.b.points) }} Boosters<br><br>
<button v-bind:class="{ upgBig: true, can: (player.b.points.gte(getExtCapsuleCost())&&player.t.unl), locked: (player.b.points.lt(getExtCapsuleCost())||!player.t.unl), t: true }" onclick="buyExtCapsule()">Buy an extra Time Capsule<br>Cost: {{formatWhole(getExtCapsuleCost())}} Boosters<br>Amount: {{formatWhole(player.t.extCapsules)}}</button>
</div>
<div v-if="layer=='s'">
<table>
<tr v-if="milestoneShown(player.s.best.gte(2))"><td v-bind:class="{ milestone: player.s.best.lt(2), milestoneDone: player.s.best.gte(2) }"><h3>2 space energy</h3><br>Keep Booster/Generator milestones on reset</td></tr>
<tr v-if="milestoneShown(player.s.best.gte(3)||player.h.best.gte(1)||player.h.best.gte(1))"><td v-bind:class="{ milestone: player.s.best.lt(3)&&player.h.best.lt(1)&&player.q.best.lt(1), milestoneDone: player.s.best.gte(3)||player.h.best.gte(1)||player.q.best.gte(1) }"><h3>3 space energy</h3><br>Keep Prestige Upgrades on reset</td></tr>
<tr v-if="milestoneShown(player.s.best.gte(4))"><td v-bind:class="{ milestone: player.s.best.lt(4), milestoneDone: player.s.best.gte(4) }"><h3>4 space energy</h3><br>Keep Generator Upgrades on all row 3 resets</td></tr>
<tr v-if="milestoneShown(player.s.best.gte(5), true)"><td v-bind:class="{ milestone: player.s.best.lt(5), milestoneDone: player.s.best.gte(5) }"><h3>5 space energy</h3><br>Automatically purchase Generators&nbsp;&nbsp;&nbsp;<button v-if="player.s.best.gte(5)" class="smallUpg can g" onclick="toggleAuto('g')">{{player.g.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.s.best.gte(12))"><td v-bind:class="{ milestone: player.s.best.lt(12), milestoneDone: player.s.best.gte(12) }"><h3>12 space energy</h3><br>Generators reset nothing</td></tr>
</table><br><br>
You have {{formatWhole(getSpace())}} Space remaining for Space Buildings.<br>
You have {{ format(player.g.power) }} Generator Power<br><br>
<button onclick="respecSpaceBuildings()" v-bind:class="{ longUpg: true, s: true, can: player.s.unl, locked: !player.s.unl }">Respec Space Buildings</button><br>
<div class="upgRow">
<div v-for="id in tmp.s.trueSbUnl">
<button v-bind:class="{ upg: true, can: (player.g.power.gte(getSpaceBuildingCost(id))&&player.s.unl&&getSpace().gte(1)), locked: (!(player.g.power.gte(getSpaceBuildingCost(id))&&player.s.unl&&getSpace().gte(1))), s: true }" v-on:click="buyBuilding(id)"><h3>Building {{id}}</h3><br>{{getSpaceBuildingEffDesc(id)}}<br><br>Level: {{formatWhole(tmp.s.sb[id])}}<br>Cost: {{format(getSpaceBuildingCost(id))}} Generator Power</button><br><br>
<button v-if="player.q.best.gte(2500)" v-bind:class="{ longUpg: true, s: true, can: tmp.s.sb[id].gte(1), locked: tmp.s.sb[id].lt(1) }" v-on:click="destroyBuilding(id)">Destroy One</button><br>
<button v-if="player.q.best.gte(2500)" v-bind:class="{ longUpg: true, s: true, can: tmp.s.sb[id].gte(1), locked: tmp.s.sb[id].lt(1) }" v-on:click="destroyBuilding(id, true)">Destroy All</button>
</div>
</div>
</div>
<div v-if="layer=='sb'">
<table><tr v-if="milestoneShown(player.sb.best.gte(3)||player.h.best.gte(1)||player.q.best.gte(1))"><td v-bind:class="{ milestone: player.sb.best.lt(3)&&player.h.best.lt(1)&&player.q.best.lt(1), milestoneDone: player.sb.best.gte(3)||player.h.best.gte(1)||player.q.best.gte(1) }"><h3>3 Super-Boosters</h3><br>Keep Prestige Upgrades on reset</td></tr>
<tr v-if="milestoneShown(player.sb.best.gte(4))"><td v-bind:class="{ milestone: player.sb.best.lt(4), milestoneDone: player.sb.best.gte(4) }"><h3>4 Super-Boosters</h3><br>Keep Booster/Generator milestones on reset</td></tr></table>
</div>
<div v-if="layer=='sg'">
<table>
<tr v-if="milestoneShown(player.sg.best.gte(1))"><td v-bind:class="{ milestone: player.sg.best.lt(1), milestoneDone: player.sg.best.gte(1) }"><h3>1 Super-Generator</h3><br>You can buy max Super-Generators, and Super-Generators reset nothing</td></tr>
<tr v-if="milestoneShown(player.sg.best.gte(2), true)"><td v-bind:class="{ milestone: player.sg.best.lt(2), milestoneDone: player.sg.best.gte(2) }"><h3>2 Super-Generators</h3><br>Automatically purchase Super-Generators&nbsp;&nbsp;&nbsp;<button v-if="player.sg.best.gte(2)" class="smallUpg can sg" onclick="toggleAuto('sg')">{{player.sg.auto?"ON":"OFF"}}</button></td></tr>
</table><br><br>
You have {{format(player.sg.power)}} Super-Generator Power, which multiplies the Generator base by {{format(tmp.sGenPowEff)}}
</div>
<div v-if="layer=='h'">
<table><tr v-if="milestoneShown(player.h.best.gte(1))"><td v-bind:class="{ milestone: player.h.best.lt(1), milestoneDone: player.h.best.gte(1) }"><h3>1 Hindrance Spirit</h3><br>Keep Prestige Upgrades on all previous resets, and gain 100x more Enhance Points</td></tr>
<tr v-if="milestoneShown(player.h.best.gte(2))"><td v-bind:class="{ milestone: player.h.best.lt(2), milestoneDone: player.h.best.gte(2) }"><h3>2 Hindrance Spirit</h3><br>Keep all third row milestones on all fourth row resets, and start with your best-ever Space</td></tr>
<tr v-if="milestoneShown(player.h.best.gte(4))"><td v-bind:class="{ milestone: player.h.best.lt(4), milestoneDone: player.h.best.gte(4) }"><h3>4 Hindrance Spirit</h3><br>Keep Time, Enhance, and Space Upgrades on all fourth row resets</td></tr>
<tr v-if="milestoneShown(player.h.best.gte(5), true)"><td v-bind:class="{ milestone: player.h.best.lt(5), milestoneDone: player.h.best.gte(5) }"><h3>5 Hindrance Spirit</h3><br>Automatically purchase Extra Time Capsules&nbsp;&nbsp;&nbsp;<button v-if="player.h.best.gte(5)" class="smallUpg can t" onclick="toggleAuto('t', 'Cap')">{{player.t.autoCap?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.h.best.gte(10))"><td v-bind:class="{ milestone: player.h.best.lt(10), milestoneDone: player.h.best.gte(10) }"><h3>10 Hindrance Spirit</h3><br>Keep Prestige & Super-Booster Upgrades on all fourth row resets</td></tr>
<tr v-if="milestoneShown(player.h.best.gte(15), true)"><td v-bind:class="{ milestone: player.h.best.lt(15), milestoneDone: player.h.best.gte(15) }"><h3>15 Hindrance Spirit</h3><br>Automatically purchase Super-Boosters&nbsp;&nbsp;&nbsp;<button v-if="player.h.best.gte(15)" class="smallUpg can sb" onclick="toggleAuto('sb')">{{player.sb.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.h.best.gte(25))"><td v-bind:class="{ milestone: player.h.best.lt(25), milestoneDone: player.h.best.gte(25) }"><h3>25 Hindrance Spirit</h3><br>Time resets reset nothing</td></tr>
<tr v-if="milestoneShown(player.h.best.gte(2500))"><td v-bind:class="{ milestone: player.h.best.lt(2500), milestoneDone: player.h.best.gte(2500) }"><h3>2,500 Hindrance Spirit</h3><br>Super-Boosters reset nothing</td></tr>
</table>
</div>
<div v-if="layer=='q'">
<table><tr v-if="milestoneShown(player.q.best.gte(1))"><td v-bind:class="{ milestone: player.q.best.lt(1), milestoneDone: player.q.best.gte(1) }"><h3>1 Quirk</h3><br>Keep Prestige Upgrades on all previous resets, and gain 100x more Enhance Points</td></tr>
<tr v-if="milestoneShown(player.q.best.gte(2))"><td v-bind:class="{ milestone: player.q.best.lt(2), milestoneDone: player.q.best.gte(2) }"><h3>2 Quirks</h3><br>You can buy max Time Capsules & Space Energy</td></tr>
<tr v-if="milestoneShown(player.q.best.gte(4))"><td v-bind:class="{ milestone: player.q.best.lt(4), milestoneDone: player.q.best.gte(4) }"><h3>4 Quirks</h3><br>Keep Space Buildings on all fourth row resets</td></tr>
<tr v-if="milestoneShown(player.q.best.gte(5), true)"><td v-bind:class="{ milestone: player.q.best.lt(5), milestoneDone: player.q.best.gte(5) }"><h3>5 Quirks</h3><br>Automatically purchase Enhancers&nbsp;&nbsp;&nbsp;<button v-if="player.q.best.gte(5)" class="smallUpg can e" onclick="toggleAuto('e')">{{player.e.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.q.best.gte(10), true)"><td v-bind:class="{ milestone: player.q.best.lt(10), milestoneDone: player.q.best.gte(10) }"><h3>10 Quirks</h3><br>Automatically purchase Time Capsules & Space Energy<br><button v-if="player.q.best.gte(10)" class="smallUpg can t" onclick="toggleAuto('t')">{{player.t.auto?"ON":"OFF"}}</button>&nbsp;<button v-if="player.q.best.gte(10)" class="smallUpg can s" onclick="toggleAuto('s')">{{player.s.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.q.best.gte(15))"><td v-bind:class="{ milestone: player.q.best.lt(15), milestoneDone: player.q.best.gte(15) }"><h3>15 Quirks</h3><br>Gain 100% of Enhance Point gain every second</td></tr>
<tr v-if="milestoneShown(player.q.best.gte(25))"><td v-bind:class="{ milestone: player.q.best.lt(25), milestoneDone: player.q.best.gte(25) }"><h3>25 Quirks</h3><br>Space resets reset nothing</td></tr>
<tr v-if="milestoneShown(player.q.best.gte(2500))"><td v-bind:class="{ milestone: player.q.best.lt(2500), milestoneDone: player.q.best.gte(2500) }"><h3>2,500 Quirks</h3><br>You can destroy individual Space Buildings</td></tr>
</table><br><br>
You have {{format(player.q.energy)}} Quirk Energy (generated by Quirk Layers), which multiplies Point & Generator Power gain by {{format(tmp.quirkEff)}}<br>
<button v-bind:class="{ upgBig: true, can: player.q.points.gte(getQuirkLayerCost()), locked: player.q.points.lt(getQuirkLayerCost()), q: true }" onclick="buyQuirkLayer()">Increment your Quirk Layer<br>Cost: {{formatWhole(getQuirkLayerCost())}} Quirks<br>Layers: {{formatWhole(player.q.layers)}}</button>
</div>
<div v-if="layer=='hb'">
<table>
<tr v-if="milestoneShown(player.hb.best.gte(1))"><td v-bind:class="{ milestone: player.hb.best.lt(1), milestoneDone: player.hb.best.gte(1) }"><h3>1 Hyper-Booster</h3><br>You can buy max Super-Boosters</td></tr>
</table>
</div>
<div v-if="layer=='ss'">
<table>
<tr v-if="milestoneShown(player.ss.best.gte(1), true)"><td v-bind:class="{ milestone: player.ss.best.lt(1), milestoneDone: player.ss.best.gte(1) }"><h3>1 Subspace Energy</h3><br>Automatically purchase Space Buildings&nbsp;&nbsp;&nbsp;<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><br><br>
You have {{format(player.ss.subspace)}} Subspace, which provides you with {{formatWhole(tmp.ssEff1)}} extra Space, makes all Space Buildings {{format(tmp.ssEff2)}}x cheaper, and makes all Space Buildings {{format(tmp.ssEff3.sub(1).times(100))}}% stronger
</div>
<div v-if="layer=='m'">
<table>
<tr v-if="milestoneShown(player.m.total.gte(1))"><td v-bind:class="{ milestone: player.m.total.lt(1), milestoneDone: player.m.total.gte(1) }"><h3>1 total Magic</h3><br>Keep row 4 milestones on all resets</td></tr>
<tr v-if="milestoneShown(player.m.total.gte(2))"><td v-bind:class="{ milestone: player.m.total.lt(2), milestoneDone: player.m.total.gte(2) }"><h3>2 total Magic</h3><br>Keep Hindrance completions on all resets</td></tr>
<tr v-if="milestoneShown(player.m.total.gte(3))"><td v-bind:class="{ milestone: player.m.total.lt(3), milestoneDone: player.m.total.gte(3) }"><h3>3 total Magic</h3><br>Gain 100% of Hindrance Spirit & Quirk gain every second</td></tr>
<tr v-if="milestoneShown(player.m.total.gte(4), true)"><td v-bind:class="{ milestone: player.m.total.lt(4), milestoneDone: player.m.total.gte(4) }"><h3>4 total Magic</h3><br>Automatically purchase Hyper-Boosters & Subspace&nbsp;&nbsp;&nbsp;<button v-if="player.m.total.gte(4)" class="smallUpg can hb" onclick="toggleAuto('hb')">{{player.hb.auto?"ON":"OFF"}}</button>&nbsp;&nbsp;&nbsp;<button v-if="player.m.total.gte(4)" class="smallUpg can ss" onclick="toggleAuto('ss')">{{player.ss.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.m.total.gte(50), true)"><td v-bind:class="{ milestone: player.m.total.lt(50), milestoneDone: player.m.total.gte(50) }"><h3>50 total Magic</h3><br>Automatically cast Spells&nbsp;&nbsp;&nbsp;<button v-if="player.m.total.gte(50)" class="smallUpg can m" onclick="toggleAuto('m')">{{player.m.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.m.total.gte(2.5e9))"><td v-bind:class="{ milestone: player.m.total.lt(2.5e9), milestoneDone: player.m.total.gte(2.5e9) }"><h3>2.5e9 total Magic</h3><br>Gain 100% of Hex gain every second, and Spells last 4x longer</td></tr>
</table><br><br>
<span v-if="player.sp.total.lt(2)">Note: Activating a Spell costs Magic.<br></span>
<div class="upgRow">
<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:focus="focused(true)" v-on:blur="focused(false)" v-on:change="updateToCast(id)"></input><br><br>
</div>
</div>
</div>
You have {{formatWhole(player.m.hexes)}} Hexes, which are multiplying Hindrance Spirit & Quirk gain by {{format(tmp.hexEff)}}
</div>
<div v-if="layer=='ba'">
<table>
<tr v-if="milestoneShown(player.ba.best.gte(1))"><td v-bind:class="{ milestone: player.ba.best.lt(1), milestoneDone: player.ba.best.gte(1) }"><h3>1 Balance Energy</h3><br>Keep row 4 milestones on all resets</td></tr>
<tr v-if="milestoneShown(player.ba.best.gte(2))"><td v-bind:class="{ milestone: player.ba.best.lt(2), milestoneDone: player.ba.best.gte(2) }"><h3>2 Balance Energy</h3><br>Keep Quirk Upgrades on all resets</td></tr>
<tr v-if="milestoneShown(player.ba.best.gte(3), true)"><td v-bind:class="{ milestone: player.ba.best.lt(3), milestoneDone: player.ba.best.gte(3) }"><h3>3 Balance Energy</h3><br>Automatically purchase Quirk Layers&nbsp;&nbsp;&nbsp;<button v-if="player.ba.best.gte(3)" class="smallUpg can q" onclick="toggleAuto('q')">{{player.q.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.ba.best.gte(5))"><td v-bind:class="{ milestone: player.ba.best.lt(5), milestoneDone: player.ba.best.gte(5) }"><h3>5 Balance Energy</h3><br>Keep Hyper-Booster & Subspace Upgrades on all resets</td></tr>
<tr v-if="milestoneShown(player.ba.best.gte(8))"><td 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><br><br>
You have {{format(player.ba.power)}} Balance Power, which is multiplying Hindrance Spirit & Quirk gain by {{format(tmp.balEff)}}<br>
You have {{format(player.ba.positivity)}} Positivity and {{format(player.ba.negativity)}} Negativity, which are multiplying Balance Power gain by {{format(tmp.balEff2)}}
</div>
<div v-if="layer=='ps'">
<table>
<tr v-if="milestoneShown(player.ps.best.gte(2), true)"><td v-bind:class="{ milestone: player.ps.best.lt(5), milestoneDone: player.ps.best.gte(2) }"><h3>2 Phantom Souls</h3><br>Automatically purchase Phantom Souls&nbsp;&nbsp;&nbsp;<button v-if="player.ps.best.gte(2)" class="smallUpg can ps" onclick="toggleAuto('ps')">{{player.ps.auto?"ON":"OFF"}}</button></td></tr>
<tr v-if="milestoneShown(player.ps.best.gte(5))"><td v-bind:class="{ milestone: player.ps.best.lt(5), milestoneDone: player.ps.best.gte(5) }"><h3>5 Phantom Souls</h3><br>You can buy max Phantom Souls, and Phantom Souls reset nothing</td></tr>
</table><br><br>
</div>
<div v-if="layer=='sp'">
<table>
<tr v-if="milestoneShown(player.sp.total.gte(1))"><td 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 v-if="milestoneShown(player.sp.total.gte(2), true)"><td 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 v-if="milestoneShown(player.sp.total.gte(5))"><td 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 v-if="milestoneShown(player.sp.total.gte(10))"><td 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>
<div v-if="layer=='l'">
<br><br>
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 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>
</div>
</div>
You have {{formatWhole(player.ps.points)}} Phantom Souls, {{getLayerEffDesc("ps")}}
</div>
<div v-if="layer=='hs'">
<table>
<tr v-if="milestoneShown(player.hs.best.gte(2e4))"><td v-bind:class="{ milestone: player.hs.best.lt(2e4), milestoneDone: player.hs.best.gte(2e4) }"><h3>20,000 Hyperspace Energy</h3><br>Gain 1% of Super-Prestige Points gain every second</td></tr>
</table>
<br><br>
You have {{formatWhole(player.ba.points)}} Balance Energy
<br>
<button v-on:click="HYPERSPACE.buy()" v-bind:class="{ upgBig: true, hs: true, can: HYPERSPACE.canBuy(), locked: !HYPERSPACE.canBuy() }">Buy a Hyperspace<br>Amount: {{formatWhole(player.hs.space.sub(player.hs.spent))}}<br><br>Cost: {{formatWhole(HYPERSPACE.cost().hs)}} Hyperspace Energy & {{formatWhole(HYPERSPACE.cost().ba)}} Balance Energy</button>
<br><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 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].sub(1).times(100))}}% stronger)<br>Cost: 1 Hyperspace</button>
</div>
</div>
<br>
Get {{formatWhole(player.g.points)}} / {{formatWhole(HYPERSPACE.nextCapReq())}} Generators to increase the cap of Super-Upgrades
</div>
<div v-if="layer=='i'">
<table>
<tr v-if="milestoneShown(player.i.best.gte(3))"><td v-bind:class="{ milestone: player.i.best.lt(3), milestoneDone: player.i.best.gte(3) }"><h3>3 Imperium Bricks</h3><br>You can max out Imperium Bricks</td></tr>
</table>
<br><br>
You have {{formatWhole(player.i.lifeBricks)}} Life Bricks<br>
Next Life Brick is at {{format(player.l.power)}} / {{format(IMPERIUM.lifeReq())}} Life Power
<br><br>
<button v-on:click="IMPERIUM.build()" v-bind:class="{ upgBig: true, i: true, can: IMPERIUM.canBuild(), locked: !IMPERIUM.canBuild() }">
<h3>Imperium Buildings</h3><br>
<span v-if="tmp.s.sbUnl.lt(SPACE_BUILDINGS.max)">Build Space Building {{formatWhole(tmp.s.sbUnl.add(1))}}</span>
<span v-if="tmp.s.sbUnl.gte(SPACE_BUILDINGS.max)">Enhance<sup v-if="tmp.s.sbUnl.div(SPACE_BUILDINGS.max).gte(2)">{{formatWhole(tmp.s.sbUnl.div(SPACE_BUILDINGS.max).floor())}}</sup> Space Building {{formatWhole(tmp.s.sbUnl.sub(tmp.s.sbUnl.div(SPACE_BUILDINGS.max).floor().times(SPACE_BUILDINGS.max)).add(1))}}</span>
<br>
Built Buildings: {{formatWhole(player.i.extraBuildings)}}
<br><br>
<span v-if="!player.i.building">Cost: {{IMPERIUM.cost().i}} Imperium Bricks & {{IMPERIUM.cost().l}} Life Bricks</span>
<span v-if="player.i.building">Progress: {{format(player.i.progress * 100)}}%<br>Your {{formatWhole(player.sg.points)}} Super-Generators speed up your progress by {{format(IMPERIUM.sgSpeedBoost())}}x<br><br>Click to cancel building</span>
</button>
<br>
Your Work is currently {{format(tmp.i.work)}}, which reduces the gain power of rows 1 - 5 by {{format(tmp.i.workEff)}}x
<span v-for="i in IMPERIUM.maxCollapseRows"><span v-if="IMPERIUM.collapsed(i)"><br>Your Work also collapses row {{i}} layers by {{format(tmp.i.collapse[i].times(100))}}%</span></span>
</div>

View file

@ -1,494 +0,0 @@
var player;
var needCanvasUpdate = true;
var NaNalert = false;
var gameEnded = false;
let modInfo = {
name: "The Modding Tree",
id: "modbase",
pointsName: "points",
discordName: "",
discordLink: "",
offlineLimit: 1 // In hours
}
let VERSION = {
num: "1.3.5 maybe",
name: "Tabception... ception!",
tmtNum: "1.3.5 maybe",
tmtName: "Tabception... ception!"
}
// Determines if it should show points/sec
function showPointGen(){
return (tmp.pointGen.neq(new Decimal(0)))
}
// Calculate points/sec!
function getPointGen() {
if(!hasUpg("p", 11)) return new Decimal(0)
let gain = new Decimal(1)
if (hasUpg("p", 12)) gain = gain.times(upgEffect("p", 12))
if (hasUpg("p", 13)) gain = gain.times(upgEffect("p", 13))
if (hasUpg("p", 22)) gain = gain.times(upgEffect("p", 22))
if (player.b.unl) gain = gain.times(layers.b.effect())
if (player.g.unl) gain = gain.times(layers.g.effect().powerBoost)
if (hasUpg("e", 11)) gain = gain.times(layers.e.upgrades[11].effect())
if (player.e.unl && tmp.e.buyables) gain = gain.times(tmp.e.buyables[11].effect.second)
if (player.r.upgrades.includes(11)) gain = gain.times(layers.r.upgrades[11].effect())
if (player.d.buyables[12].gt(0)) gain = gain.times(layers.d.buyables[12].effect(player.d.buyables[12]).first)
if (!player.s.active) if (player.pr.buyables[13].gt(0)) gain = gain.times(layers.pr.buyables[13].effect().first)
if (player.d.banking == 1) gain = gain.sqrt()
if (player.d.banking == 2) gain = gain.add(1).log10()
return gain
}
// Function to determine if the player is in a challenge
function inChallenge(layer, id){
let challenge = player[layer].active
if (challenge==toNumber(id)) return true
if (layers[layer].challenges[challenge].countsAs)
return layers[layer].challenges[id].countsAs.includes(id)
}
function getResetGain(layer, useType = null) {
let type = useType
if (!useType) type = layers[layer].type
if (tmp[layer].gainExp.eq(0)) return new Decimal(0)
if (type=="static") {
if ((!layers[layer].canBuyMax()) || tmp[layer].baseAmount.lt(tmp[layer].requires)) return new Decimal(1)
let gain = tmp[layer].baseAmount.div(tmp[layer].requires).div(tmp[layer].gainMult).max(1).log(layers[layer].base).times(tmp[layer].gainExp).pow(Decimal.pow(layers[layer].exponent, -1))
return gain.floor().sub(player[layer].points).add(1).max(1);
} else if (type=="normal"){
if (tmp[layer].baseAmount.lt(tmp[layer].requires)) return new Decimal(0)
let gain = tmp[layer].baseAmount.div(tmp[layer].requires).pow(layers[layer].exponent).times(tmp[layer].gainMult).pow(tmp[layer].gainExp)
if (gain.gte("e1e7")) gain = gain.sqrt().times("e5e6")
return gain.floor().max(0);
} else if (type=="custom"){
return layers[layer].getResetGain()
} else {
return new Decimal(0)
}
}
function getNextAt(layer, canMax=false, useType = null) {
let type = useType
if (!useType) type = layers[layer].type
if (tmp[layer].gainExp.eq(0)) return new Decimal(1/0)
if (type=="static")
{
if (!layers[layer].canBuyMax()) canMax = false
let amt = player[layer].points.plus((canMax&&tmp[layer].baseAmount.gte(tmp[layer].nextAt))?tmp[layer].resetGain:0)
let extraCost = Decimal.pow(layers[layer].base, amt.pow(layers[layer].exponent).div(tmp[layer].gainExp)).times(tmp[layer].gainMult)
let cost = extraCost.times(tmp[layer].requires).max(tmp[layer].requires)
if (layers[layer].resCeil) cost = cost.ceil()
return cost;
} else if (type=="normal"){
let next = tmp[layer].resetGain.add(1)
if (next.gte("e1e7")) next = next.div("e5e6").pow(2)
next = next.root(tmp[layer].gainExp.div(tmp[layer].gainMult).root(layers[layer].exponent).times(tmp[layer].requires).max(tmp[layer].requires))
if (layers[layer].resCeil) next = next.ceil()
return next;
} else if (type=="custom"){
return layers[layer].getNextAt(canMax)
} else {
return new Decimal(0)
}}
// Return true if the layer should be highlighted. By default checks for upgrades only.
function shouldNotify(layer){
for (id in layers[layer].upgrades){
if (!isNaN(id)){
if (canAffordUpg(layer, id) && !hasUpg(layer, id) && tmp[layer].upgrades[id].unl){
return true
}
}
}
if (layers[layer].shouldNotify){
return layers[layer].shouldNotify()
}
else
return false
}
function canReset(layer)
{
if(tmp[layer].type == "normal")
return tmp[layer].baseAmount.gte(tmp[layer].requires)
else if(tmp[layer].type== "static")
return tmp[layer].baseAmount.gte(tmp[layer].nextAt)
else
return layers[layer].canReset()
}
function rowReset(row, layer) {
for (lr in ROW_LAYERS[row]){
if(layers[lr].doReset) {
player[lr].active = null // Exit challenges on any row reset on an equal or higher row
layers[lr].doReset(layer)
}
else
if(layers[layer].row > layers[lr].row) fullLayerReset(lr)
}
}
function fullLayerReset(layer) {
player[layer] = layers[layer].startData();
player[layer].upgrades = []
player[layer].milestones = []
player[layer].challenges = []
if (layers[layer].tabFormat && !Array.isArray(layers[layer].tabFormat)) {
if (player.subtabs[layer] == undefined) player.subtabs[layer] = {}
if (player.subtabs[layer].mainTabs == undefined) player.subtabs[layer].mainTabs = Object.keys(layers[layer].tabFormat)[0]
}
if (layers[layer].microtabs) {
if (player.subtabs[layer] == undefined) player.subtabs[layer] = {}
for (item in layers[layer].microtabs)
if (player.subtabs[layer][item] == undefined) player.subtabs[layer][item] = Object.keys(layers[layer].microtabs[item])[0]
}
resetBuyables(layer)
}
function resetBuyables(layer){
if (layers[layer].buyables)
player[layer].buyables = getStartBuyables(layer)
player[layer].spentOnBuyables = new Decimal(0)
}
function getStartBuyables(layer){
let data = {}
if (layers[layer].buyables) {
for (id in layers[layer].buyables)
if (!isNaN(id))
data[id] = new Decimal(0)
}
return data
}
function addPoints(layer, gain) {
player[layer].points = player[layer].points.add(gain).max(0)
if (player[layer].best) player[layer].best = player[layer].best.max(player[layer].points)
if (player[layer].total) player[layer].total = player[layer].total.add(gain)
}
function generatePoints(layer, diff) {
addPoints(layer, tmp[layer].resetGain.times(diff))
}
var prevOnReset
function doReset(layer, force=false) {
let row = layers[layer].row
if (!force) {
if (!tmp[layer].canReset) return
let gain = tmp[layer].resetGain
if (layers[layer].type=="static") {
gain =(layers[layer].canBuyMax() ? gain : 1)
}
if (layers[layer].onPrestige)
layers[layer].onPrestige(gain)
addPoints(layer, gain)
updateMilestones(layer)
if (!player[layer].unl) {
player[layer].unl = true;
needCanvasUpdate = true;
if (layers[layer].incr_order){
lrs = layers[layer].incr_order
for (lr in lrs)
if (!player[lrs[lr]].unl) player[lrs[lr]].order++
}
}
tmp[layer].baseAmount = new Decimal(0) // quick fix
}
if (tmp[layer].resetsNothing) return
for (layerResetting in layers) {
if (row >= layers[layerResetting].row && (!force || layerResetting != layer)) completeChallenge(layerResetting)
}
prevOnReset = {...player} //Deep Copy
player.points = (row == 0 ? new Decimal(0) : new Decimal(10))
for (let x = row; x >= 0; x--) rowReset(x, layer)
prevOnReset = undefined
updateTemp()
updateTemp()
}
function respecBuyables(layer) {
if (!layers[layer].buyables) return
if (!layers[layer].buyables.respec) return
if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (layers[layer].name ? layers[layer].name : layer) + "\" reset as well!")) return
layers[layer].buyables.respec()
updateBuyableTemp(layer)
}
function canAffordUpg(layer, id) {
if (!layers[layer].upgrades) return false
let upg = layers[layer].upgrades[id]
let cost = tmp[layer].upgrades[id].cost
return canAffordPurchase(layer, upg, cost)
}
function hasUpg(layer, id){
if (!layers[layer].upgrades) return false
return (player[layer].upgrades.includes(toNumber(id)) || player[layer].upgrades.includes(id.toString()))
}
function hasMilestone(layer, id) {
if (!layers[layer].milestones) return false
return (player[layer].milestones.includes(toNumber(id)) || player[layer].milestones.includes(id.toString()))
}
function hasChallenge(layer, id){
if (!layers[layer].challenges) return false
return (player[layer].challenges.includes(toNumber(id)) || player[layer].challenges.includes(id.toString()))
}
function buyablesOwned(layer, id){
return (player[layer].buyables[id])
}
function clickableState(layer, id){
return (player[layer].clickables[id])
}
function upgEffect(layer, id){
if (!layers[layer].upgrades) return {}
return (tmp[layer].upgrades[id].effect)
}
function challengeEffect(layer, id){
if (!layers[layer].challenge) return false
return (tmp[layer].challenges[id].effect)
}
function buyableEffect(layer, id){
if (!layers[layer].buyables) return false
return (tmp[layer].buyables[id].effect)
}
function canAffordPurchase(layer, thing, cost) {
if (thing.currencyInternalName){
let name = thing.currencyInternalName
if (thing.currencyLayer){
let lr = thing.currencyLayer
return !(player[lr][name].lt(cost))
}
else {
return !(player[name].lt(cost))
}
}
else {
return !(player[layer].points.lt(cost))
}
}
function buyUpg(layer, id) {
if (!player[layer].unl) return
if (!layers[layer].upgrades[id].unl()) return
if (player[layer].upgrades.includes(id)) return
let upg = layers[layer].upgrades[id]
let cost = tmp[layer].upgrades[id].cost
if (upg.currencyInternalName){
let name = upg.currencyInternalName
if (upg.currencyLayer){
let lr = upg.currencyLayer
if (player[lr][name].lt(cost)) return
player[lr][name] = player[lr][name].sub(cost)
}
else {
if (player[name].lt(cost)) return
player[name] = player[name].sub(cost)
}
}
else {
if (player[layer].points.lt(cost)) return
player[layer].points = player[layer].points.sub(cost)
}
player[layer].upgrades.push(id);
if (upg.onPurchase != undefined)
upg.onPurchase()
}
function buyMaxBuyable(layer, id) {
if (!player[layer].unl) return
if (!tmp[layer].buyables[id].unl) return
if (!tmp[layer].buyables[id].canAfford) return
if (!layers[layer].buyables[id].buyMax) return
layers[layer].buyables[id].buyMax()
updateBuyableTemp(layer)
}
function buyBuyable(layer, id) {
if (!player[layer].unl) return
if (!tmp[layer].buyables[id].unl) return
if (!tmp[layer].buyables[id].canAfford) return
layers[layer].buyables[id].buy()
updateBuyableTemp(layer)
}
function resetRow(row) {
if (prompt('Are you sure you want to reset this row? It is highly recommended that you wait until the end of your current run before doing this! Type "I WANT TO RESET THIS" to confirm')!="I WANT TO RESET THIS") return
let pre_layers = ROW_LAYERS[row-1]
let layers = ROW_LAYERS[row]
let post_layers = ROW_LAYERS[row+1]
rowReset(row+1, post_layers[0])
doReset(pre_layers[0], true)
for (let layer in layers) {
player[layers[layer]].unl = false
if (player[layers[layer]].order) player[layers[layer]].order = 0
}
player.points = new Decimal(10)
updateTemp();
resizeCanvas();
}
function startChallenge(layer, x) {
let enter = false
if (!player[layer].unl) return
if (player[layer].active == x) {
completeChallenge(layer, x)
delete player[layer].active
} else {
enter = true
}
doReset(layer, true)
if(enter) player[layer].active = x
updateChallengeTemp(layer)
}
function canCompleteChallenge(layer, x)
{
if (x != player[layer].active) return
let challenge = layers[layer].challenges[x]
if (challenge.currencyInternalName){
let name = challenge.currencyInternalName
if (challenge.currencyLayer){
let lr = challenge.currencyLayer
return !(player[lr][name].lt(readData(challenge.goal)))
}
else {
return !(player[name].lt(challenge.cost))
}
}
else {
return !(player[layer].points.lt(challenge.cost))
}
}
function completeChallenge(layer, x) {
var x = player[layer].active
if (!x) return
if (! canCompleteChallenge(layer, x)) return
if (!player[layer].challenges.includes(x)) {
needCanvasUpdate = true
player[layer].challenges.push(x);
if (layers[layer].challenges[x].onComplete) layers[layer].challenges[x].onComplete()
}
delete player[layer].active
updateChallengeTemp(layer)
}
VERSION.withoutName = "v" + VERSION.num + (VERSION.pre ? " Pre-Release " + VERSION.pre : VERSION.pre ? " Beta " + VERSION.beta : "")
VERSION.withName = VERSION.withoutName + (VERSION.name ? ": " + VERSION.name : "")
const ENDGAME = new Decimal("e280000000");
function gameLoop(diff) {
if (player.points.gte(ENDGAME) || gameEnded) gameEnded = 1
if (isNaN(diff)) diff = 0
if (gameEnded && !player.keepGoing) {
diff = 0
player.tab = "gameEnded"
}
if (player.devSpeed) diff *= player.devSpeed
addTime(diff)
for (layer in layers){
if (layers[layer].update) layers[layer].update(diff);
}
for (layer in layers){
if (layers[layer].automate) layers[layer].automate();
}
for (layer in layers){
if (layers[layer].milestones) updateMilestones(layer);
}
if (player.hasNaN&&!NaNalert) {
clearInterval(interval);
player.autosave = false;
NaNalert = true;
alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.")
}
}
function hardReset() {
if (!confirm("Are you sure you want to do this? You will lose all your progress!")) return
player = getStartPlayer()
save();
window.location.reload();
}
var ticking = false
var interval = setInterval(function() {
if (player===undefined||tmp===undefined) return;
if (ticking) return;
if (gameEnded&&!player.keepGoing) return;
ticking = true
let now = Date.now()
let diff = (now - player.time) / 1e3
if (player.offTime !== undefined) {
if (player.offTime.remain > modInfo.offlineLimit * 3600000) player.offlineTime.remain = modInfo.offlineLimit * 3600000
if (player.offTime.remain > 0) {
let offlineDiff = Math.max(player.offTime.remain / 10, diff)
player.offTime.remain -= offlineDiff
diff += offlineDiff
}
if (!player.offlineProd || player.offTime.remain <= 0) delete player.offTime
}
if (player.devSpeed) diff *= player.devSpeed
player.time = now
if (needCanvasUpdate) resizeCanvas();
updateTemp();
gameLoop(diff)
ticking = false
}, 50)

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,12 @@
# The Modding Tree changelog:
## v2.3.1 - 12/12/20
- Another attempt to fix flickering tooltips.
- The "this" keyword should work everywhere except tabFormat arrays (although I may have missed some things).
- Fixed tree branches not updating when scrolling on the right-side tab.
- Fixed a spacing issue when a node's symbol is ""
- Removed some old, unneeded files.
## v2.3: Cooler and Newer Edition - 12/10/20
- Added achievement/milestone popups (thank you to Jacorb for this contribution!)
- The changelog tab is back, and can be set in mod.js.

View file

@ -80,7 +80,7 @@
</transition-group>
</div>
<div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
<div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
<div v-for="layer in LAYERS" >
<div v-if="player.tab==layer" >
<layer-tab :layer="layer" :back="'none'" :spacing="'50px'" :key="'left'"></layer-tab>

View file

@ -5,8 +5,8 @@ Milestones are awarded to the player when they meet a certain goal, and give som
```js
milestones: {
0: {
requirementDesc: "123 waffles",
effectDesc: "blah",
requirementDescription: "123 waffles",
effectDescription: "blah",
done() { return player.w.points.gte(123) }
}
etc

View file

@ -78,7 +78,7 @@
</transition-group>
</div>
<div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
<div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
<div v-for="layer in LAYERS" >
<div v-if="player.tab==layer" >
<layer-tab :layer="layer" :back="'none'" :spacing="'50px'" :key="'left'"></layer-tab>

View file

@ -195,7 +195,7 @@ addLayer("c", {
let amount = getBuyableAmount(this.layer, this.id)
if (amount.lte(0)) return // Only sell one if there is at least one
setBuyableAmount(this.layer, this.id, amount.sub(1))
player[this.layer].points = player[this.layer].points.add(this.cost())
player[this.layer].points = player[this.layer].points.add(this.cost)
},
},
},

View file

@ -11,7 +11,7 @@ let modInfo = {
// Set your version in num and name
let VERSION = {
num: "2.3",
num: "2.3.1",
name: "Cooler and Newer Edition",
}

View file

@ -25,7 +25,8 @@ addNode("g", {
canClick() {return player.points.gte(10)},
tooltip: "Thanos your points",
tooltipLocked: "Thanos your points",
onClick() {player.points = player.points.div(2)}
onClick() {player.points = player.points.div(2)
console.log(this.layer)}
},
)

View file

@ -311,7 +311,8 @@ function loadVue() {
Vue.component('master-button', {
props: ['layer', 'data'],
template: `
<button v-if="tmp[layer].clickables && tmp[layer].clickables.masterButtonPress && !(tmp[layer].clickables.showMasterButton !== undefined && tmp[layer].clickables.showMasterButton == false)" v-on:click="tmp[layer].clickables.masterButtonPress()" v-bind:class="{ longUpg: true, can: player[layer].unlocked, locked: !player[layer].unlocked }">{{tmp[layer].clickables.masterButtonText ? tmp[layer].clickables.masterButtonText : "Click me!"}}</button>
<button v-if="tmp[layer].clickables && tmp[layer].clickables.masterButtonPress && !(tmp[layer].clickables.showMasterButton !== undefined && tmp[layer].clickables.showMasterButton == false)"
v-on:click="run(tmp[layer].clickables.masterButtonPress, tmp[layer].clickables)" v-bind:class="{ longUpg: true, can: player[layer].unlocked, locked: !player[layer].unlocked }">{{tmp[layer].clickables.masterButtonText ? tmp[layer].clickables.masterButtonText : "Click me!"}}</button>
`
})
@ -401,13 +402,15 @@ function loadVue() {
Vue.component('sell-one', {
props: ['layer', 'data'],
template: `
<button v-if="tmp[layer].buyables && tmp[layer].buyables[data].sellOne && !(tmp[layer].buyables[data].canSellOne !== undefined && tmp[layer].buyables[data].canSellOne == false)" v-on:click="tmp[layer].buyables[data].sellOne()" v-bind:class="{ longUpg: true, can: player[layer].unlocked, locked: !player[layer].unlocked }">{{tmp[layer].buyables.sellOneText ? tmp[layer].buyables.sellOneText : "Sell One"}}</button>
<button v-if="tmp[layer].buyables && tmp[layer].buyables[data].sellOne && !(tmp[layer].buyables[data].canSellOne !== undefined && tmp[layer].buyables[data].canSellOne == false)" v-on:click="run(tmp[layer].buyables[data].sellOne, tmp[layer].buyables[data])"
v-bind:class="{ longUpg: true, can: player[layer].unlocked, locked: !player[layer].unlocked }">{{tmp[layer].buyables.sellOneText ? tmp[layer].buyables.sellOneText : "Sell One"}}</button>
`
})
Vue.component('sell-all', {
props: ['layer', 'data'],
template: `
<button v-if="tmp[layer].buyables && tmp[layer].buyables[data].sellAll && !(tmp[layer].buyables[data].canSellAll !== undefined && tmp[layer].buyables[data].canSellAll == false)" v-on:click="tmp[layer].buyables[data].sellAll()" v-bind:class="{ longUpg: true, can: player[layer].unlocked, locked: !player[layer].unlocked }">{{tmp[layer].buyables.sellAllText ? tmp[layer].buyables.sellAllText : "Sell All"}}</button>
<button v-if="tmp[layer].buyables && tmp[layer].buyables[data].sellAll && !(tmp[layer].buyables[data].canSellAll !== undefined && tmp[layer].buyables[data].canSellAll == false)" v-on:click="run(tmp[layer].buyables[data].sellAll, tmp[layer].buyables[data])"
v-bind:class="{ longUpg: true, can: player[layer].unlocked, locked: !player[layer].unlocked }">{{tmp[layer].buyables.sellAllText ? tmp[layer].buyables.sellAllText : "Sell All"}}</button>
`
})

View file

@ -4,8 +4,8 @@ var gameEnded = false;
// Don't change this
const TMT_VERSION = {
tmtNum: "2.3",
tmtName: "Cooler and Newer"
tmtNum: "2.3.1",
tmtName: "Cooler and Newer Edition"
}
function getResetGain(layer, useType = null) {
@ -94,7 +94,7 @@ function canReset(layer)
if(tmp[layer].type == "none")
return false
else
return layers[layer].canReset()
return run(layers[layer].canReset, tmp[layer])
}
function rowReset(row, layer) {
@ -102,7 +102,7 @@ function rowReset(row, layer) {
if(layers[lr].doReset) {
player[lr].activeChallenge = null // Exit challenges on any row reset on an equal or higher row
layers[lr].doReset(layer)
run(layers[lr].doReset, tmp[lr], layer)
}
else
if(tmp[layer].row > tmp[lr].row && row !== "side" && !isNaN(row)) layerDataReset(lr)
@ -164,7 +164,7 @@ function doReset(layer, force=false) {
}
if (layers[layer].onPrestige)
layers[layer].onPrestige(gain)
run(layers[layer].onPrestige, tmp[layer], gain)
addPoints(layer, gain)
updateMilestones(layer)
@ -246,7 +246,7 @@ function canCompleteChallenge(layer, x)
}
else if (challenge.currencyLayer){
let lr = challenge.currencyLayer
return !(player[lr][name].lt(readData(challenge.goal)))
return !(player[lr][name].lt(challenge.goal))
}
else {
return !(player[name].lt(challenge.goal))
@ -268,7 +268,7 @@ function completeChallenge(layer, x) {
if (player[layer].challenges[x] < tmp[layer].challenges[x].completionLimit) {
needCanvasUpdate = true
player[layer].challenges[x] += 1
if (layers[layer].challenges[x].onComplete) layers[layer].challenges[x].onComplete()
if (layers[layer].challenges[x].onComplete) run(layers[layer].challenges[x].onComplete, tmp[layer].challenges[x])
}
player[layer].activeChallenge = null
updateChallengeTemp(layer)

View file

@ -17,7 +17,7 @@ var systemComponents = {
v-bind:id="layer"
v-on:click="function() {
if(tmp[layer].isLayer) {showTab(layer)}
else {layers[layer].onClick()}
else {run(layers[layer].onClick, tmp[layer])}
}"
v-bind:tooltip="(tmp[layer].tooltip == '') ? false : (tmp[layer].isLayer) ? (
@ -44,7 +44,7 @@ var systemComponents = {
v-bind:style="[(tmp[layer].isLayer && layerunlocked(layer)) || (!tmp[layer].isLayer && tmp[layer].canClick) ? {
'background-color': tmp[layer].color,
} : {}, tmp[layer].nodeStyle]">
{{abb}}
{{(abb !== '' ? abb : '&nbsp;')}}
</button>
`
},

View file

@ -454,7 +454,7 @@ function respecBuyables(layer) {
if (!layers[layer].buyables) return
if (!layers[layer].buyables.respec) return
if (!confirm("Are you sure you want to respec? This will force you to do a \"" + (tmp[layer].name ? tmp[layer].name : layer) + "\" reset as well!")) return
layers[layer].buyables.respec()
run(layers[layer].buyables.respec, tmp[layer].buyables)
updateBuyableTemp(layer)
document.activeElement.blur()
}
@ -559,7 +559,7 @@ function buyUpg(layer, id) {
if (upg.canAfford === false) return
let pay = layers[layer].upgrades[id].pay
if (pay !== undefined)
pay()
run(pay, upg)
else
{
let cost = tmp[layer].upgrades[id].cost
@ -587,7 +587,7 @@ function buyUpg(layer, id) {
}
player[layer].upgrades.push(id);
if (upg.onPurchase != undefined)
upg.onPurchase()
run(upg.onPurchase, upg)
}
function buyMaxBuyable(layer, id) {
@ -596,7 +596,7 @@ function buyMaxBuyable(layer, id) {
if (!tmp[layer].buyables[id].canAfford) return
if (!layers[layer].buyables[id].buyMax) return
layers[layer].buyables[id].buyMax()
run(layers[layer].buyables[id].buyMax, tmp[layer].buyables[id])
updateBuyableTemp(layer)
}
@ -605,7 +605,7 @@ function buyBuyable(layer, id) {
if (!tmp[layer].buyables[id].unlocked) return
if (!tmp[layer].buyables[id].canAfford) return
layers[layer].buyables[id].buy()
run(layers[layer].buyables[id].buy, tmp[layer].buyables[id])
updateBuyableTemp(layer)
}
@ -614,7 +614,7 @@ function clickClickable(layer, id) {
if (!tmp[layer].clickables[id].unlocked) return
if (!tmp[layer].clickables[id].canClick) return
layers[layer].clickables[id].onClick()
run(layers[layer].clickables[id].onClick, tmp[layer].clickables[id])
updateClickableTemp(layer)
}
@ -849,3 +849,12 @@ function adjustPopupTime(diff) {
}
}
}
function run(func, target, args=null){
if (!!(func && func.constructor && func.call && func.apply)){
let bound = func.bind(target)
return bound(args)
}
else
return func;
}

View file

@ -551,8 +551,6 @@ ul {
[tooltip]:before,
[tooltip]:after {
visibility: hidden;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=0);
opacity: 0;
pointer-events: none;
white-space: pre-wrap;
@ -598,7 +596,6 @@ ul {
[tooltip]:hover:before,
[tooltip]:hover:after {
visibility: visible;
filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=100);
opacity: 1;
white-space: pre-wrap;
}