diff --git a/discord.png b/discord.png new file mode 100644 index 0000000..14fc577 Binary files /dev/null and b/discord.png differ diff --git a/index.html b/index.html index 0e225c7..9745d53 100644 --- a/index.html +++ b/index.html @@ -2,6 +2,7 @@ The Prestige Tree + @@ -12,20 +13,49 @@
-
+
-

-

Thank you for playing The Prestige Tree v1.0!



-

It took you {{formatTime(player.timePlayed)}}






- If you would like to speedrun this, play again from the beginning and record the whole thing as fast as possible, then submit in my discord




+
+

Prestige Tree {{VERSION.withoutName}}



+

Congratulations! You have reached the end and beaten this game, but for now...


+

Please check the Discord to see there are new content updates!



+
It took you {{formatTime(player.timePlayed)}} to beat the game.
+
Make sure that you record the time in your stream or else your speedrun won't count!
+
     +


+ Jacorb's Discord
+ Aarex's Home +

+ If you would like to speedrun this, press Play Again and record your attempt, then submit on the Discord Server in the channel #speedrun-submissions. +


+

Oh, you are still reading this?

+
+ Yeah. You also can test the next update whether you want to.
+ Test server (Coming soon!) +

+ For this next update, there will be 3 new layers which come after row 6! Stay tuned.
-

+
+

v1.1: The Life Update

+

v1.0 Patch 1


+
+
+
+

v1.0 Full Release



-
-




- This game uses break_eternity.js by Patashu.
- Made by Jacorb
- Idea by papyrus (on discord)
- Note: If anyone wishes to make a mod of this game, that is perfectly fine with me, just make sure to name it something different (ex: Prestige Tree NG+) and to let me know on my discord. -
-




- Time Played: {{ formatTime(player.timePlayed) }}


-
Credits

-
Changelog

-
My Discord


-

Hotkeys



- P: Prestige reset
- B: Booster reset
- G: Generator reset
- T: Time reset
- E: Enhance reset
- S: Space reset
- Shift+B: Super-Booster reset
- Shift+G: Super-Generator reset
- H: Hindrance reset
- Q: Quirk reset
- Ctrl+B: Hyper-Booster reset
- Shift+S: Subspace reset
+
+

Prestige Tree

+
+

{{VERSION.withName}}

+
+ Made by Jacorb and Aarex +
+ Idea by papyrus (on discord) +

+
+ Test server (Coming soon!)

+ Jacorb's Discord
+ Aarex's Home +
+ Note by Jacorb: If anyone wishes to make a mod of this game, that is perfectly fine with me, just make sure to name it something different (ex: Prestige Tree NG+) and to let me know on my discord. +

+ Time Played: {{ formatTime(player.timePlayed) }}

+

Hotkeys


+
P: Prestige reset
+
B: Booster reset
+
G: Generator reset
+
T: Time reset
+
E: Enhance reset
+
S: Space reset
+
Shift+B: Super-Booster reset
+
Shift+G: Super-Generator reset
+
H: Hindrance reset
+
Q: Quirk reset
+
Ctrl+B: Hyper-Booster reset
+
Shift+S: Subspace reset
+
M: Magic reset
+
A: Balance reset
+
Ctrl+P: Phantom Soul reset
+
Shift+P: Super-Prestige reset
+
L: Life Essence reset
+
Ctrl+S: Hyperspace reset
+
I: Imperium Brick reset
- M: Magic reset
- 1: Cast spell 1
- 2: Cast spell 2
- 3: Cast spell 3
- 4: Cast spell 4
+
+
{{i}}: Cast spell {{i}}
- A: Balance reset
- Shift+P: Super-Prestige reset
-




+
+ + - + - +
-
+
+
{{VERSION.withoutName}}

i
- -
Offline Time: {{formatTime(offTime.remain)}} ({{format(offTime.speed)}}x speed)
+ + +
Dev Speed: {{format(player.devSpeed)}}x
-
You have

{{format(player.points)}}

Points + +
Offline Time: {{formatTime(player.offTime.remain)}}
+
+ +
Reach {{formatWhole(ENDGAME)}} to beat the game!
+
+
+ You have +

{{format(player.points)}}

+ points




- - - +
- - - +
- - - - - + + +




- - - +
- - - - - - - - + + + + + +




- - - +
- - - - - - - + + + + + + +






- - - +
- - + + + +


- - - +
- - - + + + + + +


+ +
+ + + +





- You have

{{formatWhole(player[layer].points)}}

{{LAYER_RES[layer]}}, {{getLayerEffDesc(layer)}} + You have

{{formatWhole(player[layer].points)}}

{{LAYER_RES[layer]}}, {{getLayerEffDesc(layer)}}

+ + +
You have {{formatWhole(tmp.layerAmt[layer])}} {{LAYER_AMT_NAMES[layer]}}
+

+ Your best {{LAYER_RES[layer]}} is {{formatWhole(player[layer].best)}}
+ You have made a total of {{formatWhole(player[layer].total)}} {{LAYER_RES[layer]}}
- -
8 Boosters
Keep Prestige Upgrades on reset
15 Boosters
You can buy max Boosters
+ + + +

8 Boosters


Keep Prestige Upgrades on reset

15 Boosters


You can buy max Boosters
- You have {{format(player.g.power)}} Generator Power, which multiplies Point gain by {{format(tmp.genPowEff)}}

- - -
8 Generators
Keep Prestige Upgrades on reset
10 Generators
Gain 100% of Prestige Point gain every second
15 Generators
You can buy max Generators
+ + + + +

8 Generators


Keep Prestige Upgrades on reset

10 Generators


Gain 100% of Prestige Point gain every second

15 Generators


You can buy max Generators


+ You have {{format(player.g.power)}} Generator Power, which multiplies Point gain by {{format(tmp.genPowEff)}}
- -
2 enhance points
Keep Booster/Generator milestones on reset
10 enhance points
Keep Prestige Upgrades on reset


+ + + +

2 enhance points


Keep Booster/Generator milestones on reset

10 enhance points


Keep Prestige Upgrades on reset


- You have {{format(player.t.energy)}} Time Energy, which multiplies Point gain & Prestige Point gain by {{format(tmp.timeEff)}}

- - - - - +
2 time capsules
Keep Booster/Generator milestones on reset
3 time capsules
Keep Prestige Upgrades on reset
4 time capsules
Keep Booster Upgrades on all row 3 resets
5 time capsules
Automatically purchase Boosters   
12 time capsules
Boosters reset nothing
+ + + + +

2 time capsules


Keep Booster/Generator milestones on reset

3 time capsules


Keep Prestige Upgrades on reset

4 time capsules


Keep Booster Upgrades on all row 3 resets

5 time capsules


Automatically purchase Boosters   

12 time capsules


Boosters reset nothing


+ You have {{format(player.t.energy)}} Time Energy, which multiplies Point gain & Prestige Point gain by {{format(tmp.timeEff)}}
+ You have {{ format(player.b.points) }} Boosters

- You have {{formatWhole(getSpace())}} Space remaining for Space Buildings.

- - - - - +
2 space energy
Keep Booster/Generator milestones on reset
3 space energy
Keep Prestige Upgrades on reset
4 space energy
Keep Generator Upgrades on all row 3 resets
5 space energy
Automatically purchase Generators   
12 space energy
Generators reset nothing
+ + + + +

2 space energy


Keep Booster/Generator milestones on reset

3 space energy


Keep Prestige Upgrades on reset

4 space energy


Keep Generator Upgrades on all row 3 resets

5 space energy


Automatically purchase Generators   

12 space energy


Generators reset nothing


+ You have {{formatWhole(getSpace())}} Space remaining for Space Buildings.
You have {{ format(player.g.power) }} Generator Power

-
+
-
-

-
- +
+

+
+
- -
3 Super-Boosters
Keep Prestige Upgrades on reset
4 Super-Boosters
Keep Booster/Generator milestones on reset
+ +

3 Super-Boosters


Keep Prestige Upgrades on reset

4 Super-Boosters


Keep Booster/Generator milestones on reset
- You have {{format(player.sg.power)}} Super-Generator Power, which multiplies the Generator base by {{format(tmp.sGenPowEff)}}

- - -
1 Super-Generator
You can buy max Super-Generators, and Super-Generators reset nothing
2 Super-Generators
Automatically purchase Super-Generators   
+

1 Super-Generator


You can buy max Super-Generators, and Super-Generators reset nothing +

2 Super-Generators


Automatically purchase Super-Generators    +

+ You have {{format(player.sg.power)}} Super-Generator Power, which multiplies the Generator base by {{format(tmp.sGenPowEff)}}
- - - - - - - - +
1 Hindrance Spirit
Keep Prestige Upgrades on all previous resets, and gain 100x more Enhance Points
2 Hindrance Spirit
Keep all third row milestones on all fourth row resets, and start with your best-ever Space
4 Hindrance Spirit
Keep Time, Enhance, and Space Upgrades on all fourth row resets
5 Hindrance Spirit
Automatically purchase Extra Time Capsules   
10 Hindrance Spirit
Keep Prestige & Super-Booster Upgrades on all fourth row resets
15 Hindrance Spirit
Automatically purchase Super-Boosters   
25 Hindrance Spirit
Time resets reset nothing
2,500 Hindrance Spirit
Super-Boosters reset nothing
+ + + + + + +

1 Hindrance Spirit


Keep Prestige Upgrades on all previous resets, and gain 100x more Enhance Points

2 Hindrance Spirit


Keep all third row milestones on all fourth row resets, and start with your best-ever Space

4 Hindrance Spirit


Keep Time, Enhance, and Space Upgrades on all fourth row resets

5 Hindrance Spirit


Automatically purchase Extra Time Capsules   

10 Hindrance Spirit


Keep Prestige & Super-Booster Upgrades on all fourth row resets

15 Hindrance Spirit


Automatically purchase Super-Boosters   

25 Hindrance Spirit


Time resets reset nothing

2,500 Hindrance Spirit


Super-Boosters reset nothing
- You have {{format(player.q.energy)}} Quirk Energy (generated by Quirk Layers), which multiplies Point & Generator Power gain by {{format(tmp.quirkEff)}}

- - - - - - - - +
1 Quirk
Keep Prestige Upgrades on all previous resets, and gain 100x more Enhance Points
2 Quirks
You can buy max Time Capsules & Space Energy
4 Quirks
Keep Space Buildings on all fourth row resets
5 Quirks
Automatically purchase Enhancers   
10 Quirks
Automatically purchase Time Capsules & Space Energy
 
15 Quirks
Gain 100% of Enhance Point gain every second
25 Quirks
Space resets reset nothing
2,500 Quirks
You can destroy individual Space Buildings
+ + + + + + +

1 Quirk


Keep Prestige Upgrades on all previous resets, and gain 100x more Enhance Points

2 Quirks


You can buy max Time Capsules & Space Energy

4 Quirks


Keep Space Buildings on all fourth row resets

5 Quirks


Automatically purchase Enhancers   

10 Quirks


Automatically purchase Time Capsules & Space Energy
 

15 Quirks


Gain 100% of Enhance Point gain every second

25 Quirks


Space resets reset nothing

2,500 Quirks


You can destroy individual Space Buildings


+ You have {{format(player.q.energy)}} Quirk Energy (generated by Quirk Layers), which multiplies Point & Generator Power gain by {{format(tmp.quirkEff)}}
- +
1 Hyper-Booster
You can buy max Super-Boosters

1 Hyper-Booster


You can buy max Super-Boosters
- 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

- -
1 Subspace Energy
Automatically purchase Space Buildings   
+

1 Subspace Energy


Automatically purchase Space Buildings    +

+ 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
-
- Note: Activating a Spell costs Magic.

+ + + + + + + +

1 total Magic


Keep row 4 milestones on all resets

2 total Magic


Keep Hindrance completions on all resets

3 total Magic


Gain 100% of Hindrance Spirit & Quirk gain every second

4 total Magic


Automatically purchase Hyper-Boosters & Subspace      

50 total Magic


Automatically cast Spells   

2.5e9 total Magic


Gain 100% of Hex gain every second, and Spells last 4x longer


+ Note: Activating a Spell costs Magic.
-

+

-

+

- You have {{formatWhole(player.m.hexes)}} Hexes, which are multiplying Hindrance Spirit & Quirk gain by {{format(tmp.hexEff)}}

- - - - - - - -
1 Magic
Keep row 4 milestones on all resets
2 Magic
Keep Hindrance completions on all resets
3 Magic
Gain 100% of Hindrance Spirit & Quirk gain every second
4 Magic
Automatically purchase Hyper-Boosters & Subspace      
1,000 Magic
Automatically cast Spells   
2.5e9 Magic
Gain 100% of Hex gain every second, and Spells last 10x longer
+ You have {{formatWhole(player.m.hexes)}} Hexes, which are multiplying Hindrance Spirit & Quirk gain by {{format(tmp.hexEff)}}
-
You have {{format(player.ba.power)}} Balance Power, which is multiplying Hindrance Spirit & Quirk gain by {{format(tmp.balEff)}}

- You have {{format(player.ba.positivity)}} Positivity
- You have {{format(player.ba.negativity)}} Negativity
- Your Positivity & Negativity are multiplying Balance Power gain by {{format(tmp.balEff2)}}

- - - - - -
1 Balance Energy
Keep row 4 milestones on all resets
2 Balance Energy
Keep Quirk Upgrades on all resets
3 Balance Energy
Automatically purchase Quirk Layers   
5 Balance Energy
Keep Hyper-Booster & Subspace Upgrades on all resets
8 Balance Energy
You can buy max Hyper-Boosters & Subspace Energy, and Hyper-Boosters/Subspace Energy reset nothing
+

1 Balance Energy


Keep row 4 milestones on all resets +

2 Balance Energy


Keep Quirk Upgrades on all resets +

3 Balance Energy


Automatically purchase Quirk Layers    +

5 Balance Energy


Keep Hyper-Booster & Subspace Upgrades on all resets +

8 Balance Energy


You can buy max Hyper-Boosters & Subspace Energy, and Hyper-Boosters/Subspace Energy reset nothing +

+ You have {{format(player.ba.power)}} Balance Power, which is multiplying Hindrance Spirit & Quirk gain by {{format(tmp.balEff)}}
+ You have {{format(player.ba.positivity)}} Positivity and {{format(player.ba.negativity)}} Negativity, which are multiplying Balance Power gain by {{format(tmp.balEff2)}} +
+
+ + + +

2 Phantom Souls


Automatically purchase Phantom Souls   

5 Phantom Souls


You can buy max Phantom Souls, and Phantom Souls reset nothing


- - - - + + + +
1 Total Super-Prestige Point
Upgrades of Rows 1-5 and Hindrances are kept on all resets
2 Total Super-Prestige Points
Keep Magic Milestones on reset, Spells do not cost Magic, and Magic Upgrade 13's effect can be auto-set to your current Magic   
5 Total Super-Prestige Point
Keep Balance Milestones on reset
10 Total Super-Prestige Point
Gain 100% of Magic & Balance Power gain every second

1 total Super-Prestige Point


Upgrades of Rows 1-5 and Hindrances are kept on all resets

2 total Super-Prestige Points


Keep Magic Milestones on reset, Spells do not cost Magic, and Magic Upgrade 13's effect can be auto-set to your current Magic   

5 total Super-Prestige Points


Keep Balance Milestones on reset

10 total Super-Prestige Points


Gain 100% of Magic & Balance Power gain every second
-


- - -


-
-
-
+
+

+ You have {{format(player.l.power)}} Life Power (+{{format(LIFE_BOOSTERS.calcNewPower(1).sub(player.l.power))}}/s),
+ which is translating to: +
+
+ +
+ You have {{formatWhole(player.ps.points)}} Phantom Souls, {{getLayerEffDesc("ps")}} +
+
+ + +

20,000 Hyperspace Energy


Gain 1% of Super-Prestige Points gain every second
+

+ You have {{formatWhole(player.ba.points)}} Balance Energy +
+ +

+
+
+
+ +
+
+
+ Get {{formatWhole(player.g.points)}} / {{formatWhole(HYPERSPACE.nextCapReq())}} Generators to increase the cap of Super-Upgrades +
+
+ + +

3 Imperium Bricks


You can max out Imperium Bricks
+

+ You have {{formatWhole(player.i.lifeBricks)}} Life Bricks
+ Next Life Brick is at {{format(player.l.power)}} / {{format(IMPERIUM.lifeReq())}} Life Power +

+ +
+ Your Work is currently {{format(tmp.i.work)}}, which reduces the gain power of rows 1 - 5 by {{format(tmp.i.workEff)}}x +
Your Work also collapses row {{i}} layers by {{format(tmp.i.collapse[i].times(100))}}%


-
-
-
-
-

{{H_CHALLS[row*10+col].name}}



-

- {{H_CHALLS[row*10+col].desc}}
- Goal: {{format(H_CHALLS[row*10+col].goal)}} Points
- Reward: {{H_CHALLS[row*10+col].reward}}
- Currently: {{H_CHALLS[row*10+col].effDisp(H_CHALLS[row*10+col].currently())}} +
+
+
+ +
+
+
+
+
+
+
+

{{LAYER_CHALLS[layer][row*10+col].name}}



+

+ {{LAYER_CHALLS[layer][row*10+col].desc}}
+ Goal: {{format(LAYER_CHALLS[layer][row*10+col].goal)}} Points
+ Reward: {{LAYER_CHALLS[layer][row*10+col].reward}}
+ Currently: {{LAYER_CHALLS[layer][row*10+col].effDisp(LAYER_CHALLS[layer][row*10+col].currently())}}
@@ -576,4 +688,11 @@
+ \ No newline at end of file diff --git a/js/break_eternity.js b/js/break_eternity.js index 1c87339..891d0d2 100644 --- a/js/break_eternity.js +++ b/js/break_eternity.js @@ -212,10 +212,6 @@ this.layer = 0; this.mag = 0; } - - if (isNaN(this.sign)) this.sign = 0 - if (isNaN(this.layer)) this.layer = 0 - if (isNaN(this.mag)) this.mag = 0 } Object.defineProperty(Decimal.prototype, "m", { @@ -2743,4 +2739,4 @@ for (var i = 0; i < 10; ++i) return Decimal; -})); +})); \ No newline at end of file diff --git a/js/canvas.js b/js/canvas.js index 8b8c9a0..7081a72 100644 --- a/js/canvas.js +++ b/js/canvas.js @@ -22,47 +22,91 @@ function resizeCanvas() { drawTree(); } +var colors = { + default: { + 1: "#ffffff", + 2: "#bfbfbf", + 3: "#7f7f7f", + }, + aqua: { + 1: "#bfdfff", + 2: "#8fa7bf", + 3: "#5f6f7f", + }, +} +var colors_theme + function drawTree() { if (!retrieveCanvasData()) return; ctx.clearRect(0, 0, canvas.width, canvas.height); - if (layerUnl('b')) drawTreeBranch("p", "b") - if (layerUnl('g')) drawTreeBranch("p", "g") - if (layerUnl('e')) { + if (layerShown('b')) drawTreeBranch("p", "b") + if (layerShown('g')) drawTreeBranch("p", "g") + if (layerShown('e')) { drawTreeBranch("b", "e") drawTreeBranch("g", "e") } - if (layerUnl('t')) drawTreeBranch("b", "t") - if (layerUnl('sb')) drawTreeBranch("b", "sb") - if (layerUnl('sg')) drawTreeBranch("g", "sg") - if (layerUnl('s')) drawTreeBranch("g", "s") - if (layerUnl('h')) drawTreeBranch("t", "h") - if (layerUnl('q')) drawTreeBranch("e", "q") - if (layerUnl('hb')) { + if (layerShown('t')) drawTreeBranch("b", "t") + if (layerShown('sb')) drawTreeBranch("b", "sb") + if (layerShown('sg')) drawTreeBranch("g", "sg") + if (layerShown('s')) drawTreeBranch("g", "s") + if (layerShown('h')) drawTreeBranch("t", "h") + if (layerShown('q')) drawTreeBranch("e", "q") + if (layerShown('hb')) { drawTreeBranch("sb", "hb") drawTreeBranch("t", "hb") } - if (layerUnl('ss')) { + if (layerShown('ss')) { drawTreeBranch("e", "ss") drawTreeBranch("s", "ss") } - if (layerUnl('m')) { + if (layerShown('hg')) { + drawTreeBranch("sg", "hg") + } + if (layerShown('m')) { drawTreeBranch("hb", "m") drawTreeBranch("h", "m") drawTreeBranch("q", "m") } - if (layerUnl('ba')) { + if (layerShown('ba')) { + drawTreeBranch("h", "ba", 2) drawTreeBranch("q", "ba") drawTreeBranch("ss", "ba") } - if (layerUnl('sp')) { + if (layerShown('sp')) { drawTreeBranch("m", "sp") drawTreeBranch("ba", "sp") } - + if (layerShown('l')) { + drawTreeBranch("hb", "l") + drawTreeBranch("m", "l") + } + if (layerShown('ps')) { + drawTreeBranch("h", "ps", 3) + drawTreeBranch("q", "ps", 3) + } + if (layerShown('hs')) { + drawTreeBranch("ss", "hs") + drawTreeBranch("ba", "hs") + } + if (layerShown('i')) { + drawTreeBranch("ss", "i") + drawTreeBranch("sg", "i") + } + if (layerShown('mb')) { + drawTreeBranch("l", "mb") + drawTreeBranch("ps", "mb", 2) + } + if (layerShown('ge')) { + drawTreeBranch("sp", "ge") + } + if (layerShown('ma')) { + drawTreeBranch("hs", "ma") + drawTreeBranch("i", "ma") + } needCanvasUpdate = false; } -function drawTreeBranch(num1, num2) { // taken from Antimatter Dimensions & adjusted slightly +function drawTreeBranch(num1, num2, color_id = 1) { // taken from Antimatter Dimensions & adjusted slightly let start = document.getElementById(num1).getBoundingClientRect(); let end = document.getElementById(num2).getBoundingClientRect(); let x1 = start.left + (start.width / 2) + (document.getElementById("treeTab").scrollLeft || document.body.scrollLeft); @@ -71,7 +115,7 @@ function drawTreeBranch(num1, num2) { // taken from Antimatter Dimensions & adju let y2 = end.top + (end.height / 2) + (document.getElementById("treeTab").scrollTop || document.body.scrollTop); ctx.lineWidth = 15; ctx.beginPath(); - ctx.strokeStyle = "white" + ctx.strokeStyle = colors_theme[color_id] ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); ctx.stroke(); diff --git a/js/game.js b/js/game.js index 16e100e..975256a 100644 --- a/js/game.js +++ b/js/game.js @@ -1,9 +1,5 @@ var player; var tmp = {}; -var offTime = { - remain: 0, - speed: 1, -}; var needCanvasUpdate = true; var NaNalert = false; var gameEnded = false; @@ -13,10 +9,12 @@ function getStartPlayer() { tab: "tree", time: Date.now(), autosave: true, + notify: {}, msDisplay: "always", offlineProd: true, versionType: "real", - version: 1.0, + version: VERSION.num, + beta: VERSION.beta, timePlayed: 0, keepGoing: false, hasNaN: false, @@ -93,16 +91,13 @@ function getStartPlayer() { points: new Decimal(0), best: new Decimal(0), power: new Decimal(0), - upgrades: [], }, h: { unl: false, time: 0, points: new Decimal(0), best: new Decimal(0), - active: 0, challs: [], - upgrades: [], }, q: { unl: false, @@ -137,6 +132,7 @@ function getStartPlayer() { autoIns: false, points: new Decimal(0), best: new Decimal(0), + total: new Decimal(0), spellTimes: { 1: 0, 2: 0, @@ -167,6 +163,12 @@ function getStartPlayer() { negativity: new Decimal(0), upgrades: [], }, + ps: { + unl: false, + points: new Decimal(0), + best: new Decimal(0), + upgrades: [], + }, sp: { unl: false, points: new Decimal(0), @@ -174,10 +176,36 @@ function getStartPlayer() { total: new Decimal(0), upgrades: [], }, + l: { + unl: false, + order: 0, + points: new Decimal(0), + best: new Decimal(0), + power: new Decimal(0), + boosters: {}, + }, + hs: { + unl: false, + order: 0, + points: new Decimal(0), + best: new Decimal(0), + space: new Decimal(0), + spent: new Decimal(0), + superUpgrades: {}, + superUpgradeCap: new Decimal(1), + }, + i: { + unl: false, + points: new Decimal(0), + best: new Decimal(0), + lifeBricks: new Decimal(0), + progress: 0, + extraBuildings: new Decimal(0) + }, } } -const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "sg", "h", "q", "hb", "ss", "m", "ba", "sp"] +const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "sg", "h", "q", "hb", "ss", "m", "ba", "ps", "sp", "l", "hs", "i"] const LAYER_REQS = { p: new Decimal(10), @@ -192,9 +220,13 @@ const LAYER_REQS = { q: new Decimal("1e512"), hb: new Decimal(12), ss: new Decimal(36), - m: new Decimal(1e80), - ba: new Decimal(1e130), + m: new Decimal(2e78), + ba: new Decimal(5e129), + ps: new Decimal("1e5000"), sp: new Decimal("1e8500000"), + l: new Decimal(1e195), + hs: new Decimal(725), + i: new Decimal("1e285"), } const LAYER_RES = { @@ -212,10 +244,14 @@ const LAYER_RES = { ss: "subspace energy", m: "magic", ba: "balance energy", + ps: "phantom souls", sp: "super-prestige points", + l: "life essence", + hs: "hyperspace energy", + i: "imperium bricks", } -const LAYER_RES_CEIL = ["sb", "sg", "hb", "ss"] +const LAYER_RES_CEIL = ["sb", "sg", "hb", "ss", "hs"] const LAYER_TYPE = { p: "normal", @@ -232,7 +268,11 @@ const LAYER_TYPE = { ss: "static", m: "normal", ba: "normal", + ps: "static", sp: "normal", + l: "normal", + hs: "normal", + i: "static", } const LAYER_EXP = { @@ -250,7 +290,11 @@ const LAYER_EXP = { ss: new Decimal(1.1), m: new Decimal(0.01), ba: new Decimal(0.00667), + ps: new Decimal(1.2), sp: new Decimal(2e-7), + l: new Decimal(0.012), + hs: new Decimal(40), + i: new Decimal(1), } const LAYER_BASE = { @@ -262,6 +306,8 @@ const LAYER_BASE = { sg: new Decimal(1.2), hb: new Decimal(1.05), ss: new Decimal(1.15), + ps: new Decimal("1e250"), + i: new Decimal("1e20"), } const LAYER_ROW = { @@ -279,7 +325,11 @@ const LAYER_ROW = { ss: 3, m: 4, ba: 4, + ps: 4, sp: 5, + l: 5, + hs: 5, + i: 5, future_layer: 6, } @@ -288,8 +338,8 @@ const ROW_LAYERS = [ ["b","g"], ["e","t","s","sb","sg"], ["h","q","hb","ss"], - ["m","ba"], - ["sp"], + ["m","ba","ps"], + ["sp","l","hs","i"], ["future_layer"], ] @@ -298,31 +348,33 @@ const ORDER_UP = [ [], ["e","t","s","sb"], ["hb","ss"], - ["sp"], [], + ["l","hs"], ] const LAYER_EFFS = { - b: function() { - 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()).times(getBoosterPower())).max(0) + b() { + if (tmp.challActive ? tmp.challActive.h[11] : true) return new Decimal(1); + return Decimal.pow(Decimal.add(2, tmp.atbb).max(0), player.b.points.add(getFreeBoosters()).times(getBoosterPower())).max(0) }, - g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb).times(tmp.sGenPowEff).times((player.ss.upgrades.includes(23) ? LAYER_UPGS.ss[23].currently() : 1)).max(0), player.g.points.times(getGenPow())).sub(1).times(getGenPowerGainMult()).max(0) }, - t: function() { return { - gain: Decimal.pow(Decimal.add(3, tmp.attb), player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(getTimeEnergyGainMult()), - limit: Decimal.pow(Decimal.add(2, tmp.attb), player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(100).times(getTimeEnergyLimitMult()), + g() { return Decimal.pow(Decimal.add(2, tmp.atgb).times(tmp.sGenPowEff).times((player.ss.upgrades.includes(23) ? LAYER_UPGS.ss[23].currently() : 1)).max(0), player.g.points.times(getGenPow())).sub(1).times(getGenPowerGainMult()).max(0) }, + t() { return { + gain: Decimal.pow(Decimal.add(3, tmp.attb).times(tmp.mttb), player.t.points.add(player.t.extCapsules.add(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(getTimeEnergyGainMult()), + limit: Decimal.pow(Decimal.add(2, tmp.attb).times(tmp.mttb), player.t.points.add(player.t.extCapsules.add(tmp.freeExtCap).times(getFreeExtPow())).times(getCapPow())).sub(1).times(100).times(getTimeEnergyLimitMult()), }}, - sb: function() { return Decimal.pow(Decimal.add(1.5, addToSBBase()), player.sb.points.times(getSuperBoosterPow())) }, - sg: function() { return Decimal.pow(Decimal.add(2, addToSGBase()), player.sg.points).sub(1).times(getSuperGenPowerGainMult()).max(0) }, - h: function() { - let ret = player.h.points.plus(1).times(player.points.times(player.h.points).plus(1).log10().plus(1).log10().plus(1)).log10().times(5).root(player.q.upgrades.includes(12)?1.25:2); + sb() { return Decimal.pow(Decimal.add(1.5, addToSBBase()), player.sb.points.times(getSuperBoosterPow())) }, + sg() { return Decimal.pow(Decimal.add(2, addToSGBase()), player.sg.points).sub(1).times(getSuperGenPowerGainMult()).max(0) }, + h() { + let ret = player.h.points.add(1).times(player.points.times(player.h.points).add(1).log10().add(1).log10().add(1)).log10().times(5).root(player.q.upgrades.includes(12)?1.25:2); if (player.h.challs.includes(61)) ret = ret.times(1.2); if (ret.gte(100)) ret = ret.log10().times(50).min(ret); return ret; }, - hb: function() { return Decimal.pow(Decimal.add(1.6, addToHBBase()), player.hb.points.pow(getHyperBoosterExp()).times(getHyperBoosterPow())) }, - ss: function() { return player.ss.points.pow(2.5).times(getSubspaceGainMult()) }, - ba: function() { + hb() { + return Decimal.pow(Decimal.add(1.6, addToHBBase()), player.hb.points.add(getExtraHyperBoosters()).pow(getHyperBoosterExp()).times(getHyperBoosterPow())) + }, + ss() { return player.ss.points.pow(2.5).times(getSubspaceGainMult()) }, + ba() { let points1 = player.ba.points if (points1.gte(1e12)) points1 = points1.log10().pow(2).times(1e12/144).min(points1) return { @@ -331,6 +383,17 @@ const LAYER_EFFS = { neg: player.ba.points.pow(0.65).times(0.4).pow(tmp.baExp ? tmp.baExp : 1), } }, + ps() { + let x = player.ps.points + if (player.ps.upgrades.includes(12)) x = x.times(1.2) + return { + exp: x.div(2).add(1), + mult: x.div(3).add(1).sqrt() + } + }, + l() { + return player.l.points.times(5).max(1).log10() + }, } const LAYER_UPGS = { @@ -340,85 +403,91 @@ const LAYER_UPGS = { 11: { desc: "Gain 1 Point every second.", cost: new Decimal(1), - unl: function() { return player.p.unl }, + unl() { return player.p.unl }, }, 12: { desc: "Point generation is faster based on your unspent Prestige Points.", cost: new Decimal(1), - unl: function() { return player.p.upgrades.includes(11) }, - currently: function() { - if (tmp.hcActive ? tmp.hcActive[32] : true) return new Decimal(1) - let ret = player.p.points.plus(1).pow(player.g.upgrades.includes(24)?1.1:(player.g.upgrades.includes(14)?0.75:0.5)) + unl() { return player.p.upgrades.includes(11) }, + currently() { + if (tmp.challActive ? tmp.challActive.h[32] : true) return new Decimal(1) + let ret = player.p.points.add(1).pow(player.g.upgrades.includes(24)?1.1:(player.g.upgrades.includes(14)?0.75:0.5)) if (ret.gte("1e20000000")) ret = ret.sqrt().times("1e10000000") + if (IMPERIUM.collapsed(1)) ret = ret.pow(Decimal.sub(1, tmp.i.collapse[1])) return ret; }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "Point generation is faster based on your Point amount.", cost: new Decimal(5), - unl: function() { return player.p.upgrades.includes(12) }, - currently: function() { - let ret = player.points.plus(1).log10().pow(0.75).plus(1) + unl() { return player.p.upgrades.includes(12) }, + currently() { + let ret = player.points.add(1).log10().pow(0.75).add(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) + if (IMPERIUM.collapsed(1)) ret = ret.pow(Decimal.sub(1, tmp.i.collapse[1])) return ret; }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 21: { desc: "Prestige Point gain is doubled.", cost: new Decimal(20), - unl: function() { return (player.b.unl||player.g.unl)&&player.p.upgrades.includes(11) }, + unl() { return (player.b.unl||player.g.unl)&&player.p.upgrades.includes(11) }, }, 22: { desc: "Point generation is faster based on your Prestige Upgrades bought.", cost: new Decimal(75), - unl: function() { return (player.b.unl||player.g.unl)&&player.p.upgrades.includes(12) }, - currently: function() { return Decimal.pow(1.4, player.p.upgrades.length) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return (player.b.unl||player.g.unl)&&player.p.upgrades.includes(12) }, + currently() { + let ret = Decimal.pow(1.4, player.p.upgrades.length) + if (IMPERIUM.collapsed(1)) ret = ret.pow(Decimal.sub(1, tmp.i.collapse[1])) + return ret + }, + effDisp(x) { return format(x)+"x" }, }, 23: { desc: "Prestige Point gain is boosted by your Point amount.", cost: new Decimal(5e3), - unl: function() { return (player.b.unl||player.g.unl)&&player.p.upgrades.includes(13) }, - currently: function() { - let ret = player.points.plus(1).log10().cbrt().plus(1) + unl() { return (player.b.unl||player.g.unl)&&player.p.upgrades.includes(13) }, + currently() { + let ret = player.points.add(1).log10().cbrt().add(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" }, + effDisp(x) { return format(x)+"x" }, }, 31: { desc: "Prestige Point gain is boosted by your Prestige Point amount.", cost: new Decimal("1e4450"), - unl: function() { return player.e.upgrades.includes(33) }, - 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) + unl() { return player.e.upgrades.includes(33) }, + currently() { + let ret = player.p.points.add(1).log10().add(1).pow(player.p.points.add(1).log10().div(200).add(1)).pow(player.p.upgrades.includes(32) ? LAYER_UPGS.p[32].currently() : 1) let capStart = new Decimal("1e1000") if (player.sp.upgrades.includes(32)) capStart = capStart.times(LAYER_UPGS.sp[32].currently()) if (ret.gte(capStart)) ret = ret.log10().times(capStart.div(1e3)) if (player.sp.upgrades.includes(11)) ret = ret.pow(100) return ret; }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 32: { desc: "The upgrade to the left is stronger based on your Points.", cost: new Decimal("1e5140"), - unl: function() { return player.e.upgrades.includes(33) }, - currently: function() { - let ret = player.points.plus(1).log10().plus(1).root(16); + unl() { return player.e.upgrades.includes(33) }, + currently() { + let ret = player.points.add(1).log10().add(1).root(16); return ret; }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 33: { desc: "The above upgrade is 25% stronger.", cost: new Decimal("1e5500"), - unl: function() { return player.e.upgrades.includes(33) }, + unl() { return player.e.upgrades.includes(33) }, }, }, b: { @@ -427,63 +496,63 @@ const LAYER_UPGS = { 11: { desc: "Boosters boost Prestige Point gain.", cost: new Decimal(3), - unl: function() { return player.b.unl }, - currently: function() { return player.b.points.sqrt().plus(1).max(1.5) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.b.unl }, + currently() { return player.b.points.sqrt().add(1).max(1.5) }, + effDisp(x) { return format(x)+"x" }, }, 12: { desc: "Generators add to the Booster effect.", cost: new Decimal(7), - unl: function() { return player.g.unl }, - currently: function() { return player.g.points.plus(1).log10().sqrt().div(3).times((player.t.upgrades.includes(14)&&!(tmp.hcActive?tmp.hcActive[12]:true))?8.5:1) }, - effDisp: function(x) { return "+"+format(x)+" to base" }, + unl() { return player.g.unl }, + currently() { return player.g.points.add(1).log10().sqrt().div(3).times((player.t.upgrades.includes(14)&&!(tmp.challActive?tmp.challActive.h[12]:true))?8.5:1) }, + effDisp(x) { return "+"+format(x)+" to base" }, }, 13: { desc: "Prestige Points add to the Booster effect.", cost: new Decimal(8), - unl: function() { return player.b.best.gte(8) }, - currently: function() { return player.p.points.plus(1).log10().plus(1).log10().div(3) }, - effDisp: function(x) { return "+"+format(x)+" to base" }, + unl() { return player.b.best.gte(8) }, + currently() { return player.p.points.add(1).log10().add(1).log10().div(3) }, + effDisp(x) { return "+"+format(x)+" to base" }, }, 21: { desc: "Square the Generator Power effect.", cost: new Decimal(10), - unl: function() { return player.b.upgrades.includes(11) && player.b.upgrades.includes(12) }, + unl() { return player.b.upgrades.includes(11) && player.b.upgrades.includes(12) }, }, 22: { desc: "The Generator Power effect is raised to the power of 1.2.", cost: new Decimal(15), - unl: function() { return player.b.upgrades.includes(12) && player.b.upgrades.includes(13) }, + unl() { return player.b.upgrades.includes(12) && player.b.upgrades.includes(13) }, }, 23: { desc: "Boosters are cheaper based on your points.", cost: new Decimal(18), - unl: function() { return player.b.upgrades.includes(21) || player.b.upgrades.includes(22) }, - currently: function() { return player.points.plus(1).log10().plus(1).pow(3.2).pow(tmp.spaceBuildEff?tmp.spaceBuildEff[4]:1) }, - effDisp: function(x) { return "/"+format(x) }, + unl() { return player.b.upgrades.includes(21) || player.b.upgrades.includes(22) }, + currently() { return player.points.add(1).log10().add(1).pow(3.2).pow(tmp.s !== undefined && tmp.s.trueSbUnl >= 4 ? tmp.s.sbEff[4] : 1) }, + effDisp(x) { return "/"+format(x) }, }, 31: { desc: "Hyper-Boosters multiply the Booster base.", cost: new Decimal(1250), - unl: function() { return player.hb.upgrades.includes(14) }, - currently: function() { return Decimal.pow(4, player.hb.points.pow(2)) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.hb.upgrades.includes(14) }, + currently() { return Decimal.pow(4, player.hb.points.pow(2)) }, + effDisp(x) { return format(x)+"x" }, }, 32: { desc: "Add free Boosters based on your Generator Power.", cost: new Decimal(1261), - unl: function() { return player.hb.upgrades.includes(14) }, - currently: function() { - let ret = player.g.power.plus(1).log10().sqrt().floor(); + unl() { return player.hb.upgrades.includes(14) }, + currently() { + let ret = player.g.power.add(1).log10().sqrt().floor(); if (ret.gte(1e3)) ret = ret.log10().times(1e3/3) return ret; }, - effDisp: function(x) { return "+"+formatWhole(x) }, + effDisp(x) { return "+"+formatWhole(x) }, }, 33: { desc: "Add 100 free Boosters.", cost: new Decimal(1269), - unl: function() { return player.hb.upgrades.includes(14) }, + unl() { return player.hb.upgrades.includes(14) }, }, }, g: { @@ -492,105 +561,105 @@ const LAYER_UPGS = { 11: { desc: "Generators boost Prestige Point gain.", cost: new Decimal(3), - unl: function() { return player.g.unl }, - currently: function() { return player.g.points.sqrt().plus(1).max(1.5) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.g.unl }, + currently() { return player.g.points.sqrt().add(1).max(1.5) }, + effDisp(x) { return format(x)+"x" }, }, 12: { desc: "Boosters boost Generator Power gain.", cost: new Decimal(7), - unl: function() { return player.b.unl }, - currently: function() { return player.b.points.plus(1).log10().sqrt().div(3).times((player.t.upgrades.includes(14)&&!(tmp.hcActive?tmp.hcActive[12]:true))?3.75:1) }, - effDisp: function(x) { return "+"+format(x)+" to base" }, + unl() { return player.b.unl }, + currently() { return player.b.points.add(1).log10().sqrt().div(3).times((player.t.upgrades.includes(14)&&!(tmp.challActive?tmp.challActive.h[12]:true))?3.75:1) }, + effDisp(x) { return "+"+format(x)+" to base" }, }, 13: { desc: "Prestige Points boost Generator Power gain.", cost: new Decimal(8), - unl: function() { return player.g.best.gte(8) }, - currently: function() { return player.p.points.plus(1).log10().plus(1).log10().div(3) }, - effDisp: function(x) { return "+"+format(x)+" to base" }, + unl() { return player.g.best.gte(8) }, + currently() { return player.p.points.add(1).log10().add(1).log10().div(3) }, + effDisp(x) { return "+"+format(x)+" to base" }, }, 14: { desc: "Prestige Upgrade 2 uses a better formula.", cost: new Decimal(13), - unl: function() { return player.g.best.gte(10) }, + unl() { return player.g.best.gte(10) }, }, 15: { desc: "Prestige Upgrade 3 is stronger based on your Generators.", cost: new Decimal(15), - unl: function() { return player.g.upgrades.includes(13) }, - currently: function() { - let ret = player.g.points.sqrt().plus(1).times((player.e.upgrades.includes(32)&&!(tmp.hcActive?tmp.hcActive[12]:true)) ? LAYER_UPGS.e[32].currently() : 1) + unl() { return player.g.upgrades.includes(13) }, + currently() { + let ret = player.g.points.sqrt().add(1).times((player.e.upgrades.includes(32)&&!(tmp.challActive?tmp.challActive.h[12]:true)) ? LAYER_UPGS.e[32].currently() : 1) if (ret.gte(400)) ret = ret.cbrt().times(Math.pow(400, 2/3)) return ret; }, - effDisp: function(x) { return "^"+format(x) }, + effDisp(x) { return "^"+format(x) }, }, 21: { desc: "Generator Power generates faster based on its amount.", cost: new Decimal(18), - unl: function() { return player.g.upgrades.includes(15) }, - currently: function() { return player.g.power.plus(1).log10().plus(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.g.upgrades.includes(15) }, + currently() { return player.g.power.add(1).log10().add(1) }, + effDisp(x) { return format(x)+"x" }, }, 22: { desc: "Generators are cheaper based on your Prestige Points.", cost: new Decimal(19), - unl: function() { return player.g.upgrades.includes(15) }, - currently: function() { return player.p.points.plus(1).pow(0.25).pow(player.g.upgrades.includes(32)?2.5:1) }, - effDisp: function(x) { return "/"+format(x) }, + unl() { return player.g.upgrades.includes(15) }, + currently() { return player.p.points.add(1).pow(0.25).pow(player.g.upgrades.includes(32)?2.5:1) }, + effDisp(x) { return "/"+format(x) }, }, 23: { desc: "Prestige Upgrade 6 is stronger based on your Boosters.", cost: new Decimal(20), - unl: function() { return player.b.unl && player.g.upgrades.includes(15) }, - currently: function() { return player.b.points.pow(0.75).plus(1) }, - effDisp: function(x) { return "^"+format(x) }, + unl() { return player.b.unl && player.g.upgrades.includes(15) }, + currently() { return player.b.points.pow(0.75).add(1) }, + effDisp(x) { return "^"+format(x) }, }, 24: { desc: "Prestige Upgrade 2 uses an even better formula.", cost: new Decimal(22), - unl: function() { return player.g.upgrades.includes(14) && (player.g.upgrades.includes(21)||player.g.upgrades.includes(22)) }, + unl() { return player.g.upgrades.includes(14) && (player.g.upgrades.includes(21)||player.g.upgrades.includes(22)) }, }, 25: { desc: "Prestige Points boost Generator Power gain.", cost: new Decimal(28), - unl: function() { return player.g.upgrades.includes(23) && player.g.upgrades.includes(24) }, - currently: function() { return player.p.points.plus(1).log10().sqrt().plus(1).pow((player.t.upgrades.includes(14)&&!(tmp.hcActive?tmp.hcActive[12]:true))?2.75:1).pow(player.g.upgrades.includes(31) ? LAYER_UPGS.g[31].currently() : 1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.g.upgrades.includes(23) && player.g.upgrades.includes(24) }, + currently() { return player.p.points.add(1).log10().sqrt().add(1).pow((player.t.upgrades.includes(14)&&!(tmp.challActive?tmp.challActive.h[12]:true))?2.75:1).pow(player.g.upgrades.includes(31) ? LAYER_UPGS.g[31].currently() : 1) }, + effDisp(x) { return format(x)+"x" }, }, 31: { desc: "Generator Upgrade 10 is stronger based on your Generators.", cost: new Decimal(950), - unl: function() { return player.ss.upgrades.includes(21) }, - currently: function() { return player.g.points.plus(1).log10().pow(3.6).plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.ss.upgrades.includes(21) }, + currently() { return player.g.points.add(1).log10().pow(3.6).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 32: { desc: "Generator Upgrade 7 is 150% stronger.", cost: new Decimal(960), - unl: function() { return player.ss.upgrades.includes(21) }, + unl() { return player.ss.upgrades.includes(21) }, }, 33: { desc: "Generator Power adds to the Generator base.", cost: new Decimal(1025), - unl: function() { return player.ss.upgrades.includes(21) }, - currently: function() { return player.g.power.plus(1).log10().div(15).plus(1) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.ss.upgrades.includes(21) }, + currently() { return player.g.power.add(1).log10().div(15).add(1) }, + effDisp(x) { return "+"+format(x) }, }, 34: { desc: "Generators are stronger based on their amount.", cost: new Decimal(1068), - unl: function() { return player.ss.upgrades.includes(21) }, - currently: function() { return player.g.points.plus(1).log10().plus(1).log10().plus(1).sqrt() }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.ss.upgrades.includes(21) }, + currently() { return player.g.points.add(1).log10().add(1).log10().add(1).sqrt() }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 35: { desc: "Subspace boosts Generator Power gain.", cost: new Decimal(1130), - unl: function() { return player.ss.upgrades.includes(21) }, - currently: function() { return player.ss.subspace.plus(1).pow(40).pow(player.q.upgrades.includes(54)?20:1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ss.upgrades.includes(21) }, + currently() { return player.ss.subspace.add(1).pow(40).pow(player.q.upgrades.includes(54)?20:1) }, + effDisp(x) { return format(x)+"x" }, }, }, e: { @@ -599,106 +668,106 @@ const LAYER_UPGS = { 11: { desc: "Boosters & Generators boost each other.", cost: new Decimal(40), - unl: function() { return player.e.unl }, - currently: function() { + unl() { return player.e.unl }, + currently() { let exp = 1 - if (player.e.upgrades.includes(14)&&!(tmp.hcActive?tmp.hcActive[12]:true)) exp = 1.5 - return {g: player.b.points.plus(1).log10().pow(exp), b: player.g.points.plus(1).log10().pow(exp)} + if (player.e.upgrades.includes(14)&&!(tmp.challActive?tmp.challActive.h[12]:true)) exp = 1.5 + return {g: player.b.points.add(1).log10().pow(exp), b: player.g.points.add(1).log10().pow(exp)} }, - effDisp: function(x) { return "+"+format(x.g)+" to Generator base, +"+format(x.b)+" to Booster base" }, + effDisp(x) { return "+"+format(x.g)+" to Generator base, +"+format(x.b)+" to Booster base" }, }, 12: { desc: "Unspent Enhance Points boost Prestige Point gain.", cost: new Decimal(150), - unl: function() { return player.e.unl&&player.e.best.gte(40) }, - currently: function() { - let ret = player.e.points.plus(1).pow((player.e.upgrades.includes(15)&&!(tmp.hcActive?tmp.hcActive[12]:true))?3.25:1.5) + unl() { return player.e.unl&&player.e.best.gte(40) }, + currently() { + let ret = player.e.points.add(1).pow((player.e.upgrades.includes(15)&&!(tmp.challActive?tmp.challActive.h[12]:true))?3.25:1.5) if (ret.gte("1e1500")) ret = ret.sqrt().times("1e750") return ret }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "You gain 1e10x as many Prestige Points.", cost: new Decimal(1000), - unl: function() { return player.e.upgrades.includes(11)||player.e.upgrades.includes(12) }, + unl() { return player.e.upgrades.includes(11)||player.e.upgrades.includes(12) }, }, 14: { desc: "Enhance Upgrade 1 uses a better formula.", cost: new Decimal(5e7), - unl: function() { return player.e.upgrades.includes(13)&&(player.t.unl||player.s.unl) }, + unl() { return player.e.upgrades.includes(13)&&(player.t.unl||player.s.unl) }, }, 15: { desc: "Enhance Upgrade 2 uses a better formula.", cost: new Decimal(2e10), - unl: function() { return player.e.upgrades.includes(14)&&(player.t.unl||player.s.unl)&&player.e.best.gte(1e9) }, + unl() { return player.e.upgrades.includes(14)&&(player.t.unl||player.s.unl)&&player.e.best.gte(1e9) }, }, 21: { desc: "The Generator Power effect is raised to the power of 1.15.", cost: new Decimal(1e15), - unl: function() { return player.t.unl&&(player.t.order==1||player.s.unl)&&player.e.upgrades.includes(14) }, + unl() { return player.t.unl&&(player.t.order==1||player.s.unl)&&player.e.upgrades.includes(14) }, }, 22: { desc: "This layer behaves as if you chose it first (base req is now 1e120 points)", cost: new Decimal(1e22), - unl: function() { return (player.t.unl&&player.s.unl&&player.e.order==2)||player.e.upgrades.includes(22)||player.e.upgrades.includes(23) }, + unl() { return (player.t.unl&&player.s.unl&&player.e.order==2)||player.e.upgrades.includes(22) }, }, 23: { desc: "This layer behaves as if you chose it first (base req is now 1e120 points)", cost: new Decimal(1e40), - unl: function() { return (player.t.unl&&player.s.unl)||player.e.upgrades.includes(22)||player.e.upgrades.includes(23) }, + unl() { return (player.t.unl&&player.s.unl&&player.e.order==1)||player.e.upgrades.includes(23) }, }, 24: { desc: "Prestige Points boost Enhance Point gain.", cost: new Decimal(1e65), - unl: function() { return player.t.unl&&player.s.unl&&player.e.best.gte(1e50) }, - currently: function() { return player.p.points.plus(1).pow(0.002) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.t.unl&&player.s.unl&&player.e.best.gte(1e50) }, + currently() { return player.p.points.add(1).pow(0.002) }, + effDisp(x) { return format(x)+"x" }, }, 25: { desc: "Enhancers are stronger based on your Space Energy & Time Capsules.", cost: new Decimal(7.777e77), - unl: function() { return player.t.unl&&player.s.unl&&player.e.best.gte(1e60) }, - currently: function() { - let ret = player.s.points.plus(player.t.points).div(32).plus(1); - if (ret.gte(2)) ret = ret.log(2).plus(1).times(2).sqrt(); + unl() { return player.t.unl&&player.s.unl&&player.e.best.gte(1e60) }, + currently() { + let ret = player.s.points.add(player.t.points).div(32).add(1); + if (ret.gte(2)) ret = ret.log(2).add(1).times(2).sqrt(); return ret; }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 31: { desc: "Enhancers are stronger based on your Super-Boosters.", cost: new Decimal(1e90), - unl: function() { return player.e.upgrades.includes(25)&&player.sb.unl }, - currently: function() { return player.sb.points.pow(0.75).div(4).plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.e.upgrades.includes(25)&&player.sb.unl }, + currently() { return player.sb.points.pow(0.75).div(4).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 32: { desc: "Generator Upgrade 5 is stronger based on your Enhance Points.", cost: new Decimal(7.5e108), - unl: function() { return player.e.upgrades.includes(25)&&player.sb.unl }, - currently: function() { - let ret = Decimal.pow(10, player.e.points.plus(1).log10().pow(0.085)).div(10).max(1).min(10); + unl() { return player.e.upgrades.includes(25)&&player.sb.unl }, + currently() { + let ret = Decimal.pow(10, player.e.points.add(1).log10().pow(0.085)).div(10).max(1).min(10); return ret; }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 33: { desc: "Unlock 3 new Prestige Upgrades.", cost: new Decimal(2.5e139), - unl: function() { return player.e.upgrades.includes(31)||player.e.upgrades.includes(32) }, + unl() { return player.e.upgrades.includes(31)||player.e.upgrades.includes(32) }, }, 34: { desc: "You gain 1e40x as many Prestige Points.", cost: new Decimal(1e152), - unl: function() { return player.e.upgrades.includes(31)&&player.e.upgrades.includes(32) }, + unl() { return player.e.upgrades.includes(31)&&player.e.upgrades.includes(32) }, }, 35: { desc: "Points boost Generator Power gain.", cost: new Decimal(2e189), - unl: function() { return player.e.upgrades.includes(33)||player.e.upgrades.includes(34) }, - currently: function() { return player.points.plus(1).pow(0.004) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.e.upgrades.includes(33)||player.e.upgrades.includes(34) }, + currently() { return player.points.add(1).pow(0.004) }, + effDisp(x) { return format(x)+"x" }, }, }, t: { @@ -707,80 +776,80 @@ const LAYER_UPGS = { 11: { desc: "Non-extra Time Capsules boost the Booster effect.", cost: new Decimal(2), - unl: function() { return player.t.unl }, - currently: function() { return player.t.points.pow(0.9).plus(0.5).plus((player.t.upgrades.includes(13)&&!(tmp.hcActive?tmp.hcActive[12]:true))?LAYER_UPGS.t[13].currently():0) }, - effDisp: function(x) { return "+"+format(x)+" to base" }, + unl() { return player.t.unl }, + currently() { return player.t.points.pow(0.9).add(0.5).add((player.t.upgrades.includes(13)&&!(tmp.challActive?tmp.challActive.h[12]:true))?LAYER_UPGS.t[13].currently():0) }, + effDisp(x) { return "+"+format(x)+" to base" }, }, 12: { desc: "The Time Energy cap starts later based on your Boosters, and you get a free Extra Time Capsule.", cost: new Decimal(3), - unl: function() { return player.t.best.gte(2)&&player.t.unl }, - currently: function() { return player.b.points.pow(0.95).plus(1).pow(player.q.upgrades.includes(43)?16:1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.t.best.gte(2)&&player.t.unl }, + currently() { return player.b.points.pow(0.95).add(1).pow(player.q.upgrades.includes(43)?16:1) }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "Extra Time Capsules are added to the first Time Upgrade's effect formula, but at a reduced amount.", cost: new Decimal(3), - unl: function() { return player.t.upgrades.includes(11) }, - currently: function() { return player.t.extCapsules.plus(tmp.freeExtCap).pow(0.95) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.t.upgrades.includes(11) }, + currently() { return player.t.extCapsules.add(tmp.freeExtCap).pow(0.95) }, + effDisp(x) { return "+"+format(x) }, }, 14: { desc: "Generator Upgrades 2 & 10 are 275% stronger, and Booster Upgrade 2 is 750% stronger.", cost: new Decimal(4), - unl: function() { return player.t.upgrades.includes(12)||player.t.upgrades.includes(13) }, + unl() { return player.t.upgrades.includes(12)||player.t.upgrades.includes(13) }, }, 21: { desc: "Time Energy boosts its own production & limit, and the Time Energy effect uses a better formula.", cost: new Decimal(4), - unl: function() { return player.t.upgrades.includes(14) }, - currently: function() { return player.t.energy.plus(1).log10().pow(1.1).plus(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.t.upgrades.includes(14) }, + currently() { return player.t.energy.add(1).log10().pow(1.1).add(1) }, + effDisp(x) { return format(x)+"x" }, }, 22: { desc: "Time Energy production & limit are boosted by your Enhance Points.", cost: new Decimal(5), - unl: function() { return player.t.upgrades.includes(14)&&player.e.unl }, - currently: function() { - let ret = player.e.points.plus(1).pow(0.8/(1+player.t.order)) + unl() { return player.t.upgrades.includes(14)&&player.e.unl }, + currently() { + let ret = player.e.points.add(1).pow(0.8/(1+player.t.order)) if (ret.gte("1e400")) ret = ret.log10().times(Decimal.div("1e400", 400)).min(ret) return ret; }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 23: { desc: "Time Energy production & limit are boosted by your Space Energy.", cost: new Decimal(5), - unl: function() { return player.t.upgrades.includes(14)&&player.s.unl }, - currently: function() { return Decimal.pow(3, player.s.points.pow(0.9)) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.t.upgrades.includes(14)&&player.s.unl }, + currently() { return Decimal.pow(3, player.s.points.pow(0.9)) }, + effDisp(x) { return format(x)+"x" }, }, 24: { desc: "Get 18 free boosters added to their effect.", cost: new Decimal(7), - unl: function() { return player.t.upgrades.includes(21)&&player.t.best.gte(5) }, + unl() { return player.t.upgrades.includes(21)&&player.t.best.gte(5) }, }, 31: { desc: "Add 25 to the booster effect base.", cost: new Decimal(8), - unl: function() { return (player.t.upgrades.includes(22)&&(player.e.order==1||player.s.unl))||(player.t.upgrades.includes(23)&&(player.s.order==1||player.e.unl)) }, + unl() { return (player.t.upgrades.includes(22)&&(player.e.order==1||player.s.unl))||(player.t.upgrades.includes(23)&&(player.s.order==1||player.e.unl)) }, }, 32: { desc: "This layer behaves as if you chose it first (base req is now 1e120 points)", cost: new Decimal(12), - unl: function() { return (player.s.unl&&player.e.unl)||player.t.upgrades.includes(32) }, + unl() { return (player.s.unl&&player.e.unl)||player.t.upgrades.includes(32) }, }, 33: { desc: "Add 40 to the booster effect base.", cost: new Decimal(16), - unl: function() { return player.s.unl&&player.e.unl&&player.t.upgrades.includes(32) }, + unl() { return player.s.unl&&player.e.unl&&player.t.upgrades.includes(32) }, }, 34: { desc: "Time Energy caps later and generates faster based on your non-free Time Capsules.", cost: new Decimal(18), - unl: function() { return player.t.upgrades.includes(33)&&player.sb.unl }, - currently: function() { return Decimal.pow(10, player.t.points.pow(1.2)) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.t.upgrades.includes(33)&&player.sb.unl }, + currently() { return Decimal.pow(10, player.t.points.pow(1.2)) }, + effDisp(x) { return format(x)+"x" }, }, }, s: { @@ -789,96 +858,96 @@ const LAYER_UPGS = { 11: { desc: "Add a free level to all Space Buildings.", cost: new Decimal(2), - unl: function() { return player.s.unl }, + unl() { return player.s.unl }, }, 12: { desc: "Generator Power boosts its own generation.", cost: new Decimal(3), - unl: function() { return player.s.best.gte(2)&&player.s.unl }, - currently: function() { return player.g.power.plus(1).log10().plus(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.s.best.gte(2)&&player.s.unl }, + currently() { return player.g.power.add(1).log10().add(1) }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "Space Building Levels boost Generator Power gain, and get 2 extra Space.", cost: new Decimal(3), - unl: function() { return player.s.upgrades.includes(11) }, - currently: function() { return Decimal.pow(20, Object.values(player.s.buildings).reduce((a,b) => Decimal.add(a,b))) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.s.upgrades.includes(11) }, + currently() { return Decimal.pow(20, tmp.s !== undefined ? tmp.s.sbSum : 0) }, + effDisp(x) { return format(x)+"x" }, }, 14: { desc: "Unlock a 4th Space Building, and add a free level to all Space Buildings.", cost: new Decimal(4), - unl: function() { return player.s.upgrades.includes(12)&&player.s.upgrades.includes(13) }, + unl() { return player.s.upgrades.includes(12)&&player.s.upgrades.includes(13) }, }, 21: { desc: "All Space Buildings are stronger based on your Generators.", cost: new Decimal(4), - unl: function() { return player.s.upgrades.includes(14) }, - currently: function() { return player.g.points.plus(1).log10().div(1.5).plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.s.upgrades.includes(14) }, + currently() { return player.g.points.add(1).log10().div(1.5).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 22: { desc: "Space Buildings are stronger based on your Time Energy.", cost: new Decimal(6), - unl: function() { return player.s.upgrades.includes(14)&&player.t.unl }, - currently: function() { return player.t.energy.plus(1).log10().plus(1).log10().div(5).plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.s.upgrades.includes(14)&&player.t.unl }, + currently() { return player.t.energy.add(1).log10().add(1).log10().div(5).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 23: { desc: "Space Buildings are stronger based on your Enhancers.", cost: new Decimal(5), - unl: function() { return player.s.upgrades.includes(14)&&player.e.unl }, - currently: function() { return player.e.enhancers.sqrt().div((player.s.order==0)?5:7).plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.s.upgrades.includes(14)&&player.e.unl }, + currently() { return player.e.enhancers.sqrt().div((player.s.order==0)?5:7).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 24: { desc: "Space Building costs scale half as fast, and you have 3 more Space.", cost: new Decimal(7), - unl: function() { return player.s.upgrades.includes(21)&&(player.t.unl||player.e.unl) }, + unl() { return player.s.upgrades.includes(21)&&(player.t.unl||player.e.unl) }, }, 31: { desc: "Space Building 1 uses a better formula.", cost: new Decimal(7), - unl: function() { return (player.s.upgrades.includes(22)&&(player.t.order==0||player.e.unl))||(player.s.upgrades.includes(23)&&(player.e.order==0||player.t.unl)) }, + unl() { return (player.s.upgrades.includes(22)&&(player.t.order==0||player.e.unl))||(player.s.upgrades.includes(23)&&(player.e.order==0||player.t.unl)) }, }, 32: { desc: "Unlock a 5th Space Building.", cost: new Decimal(8), - unl: function() { return (player.s.upgrades.includes(22)&&(player.t.order==1||player.e.unl))||(player.s.upgrades.includes(23)&&(player.e.order==1||player.t.unl)) }, + unl() { return (player.s.upgrades.includes(22)&&(player.t.order==1||player.e.unl))||(player.s.upgrades.includes(23)&&(player.e.order==1||player.t.unl)) }, }, 33: { desc: "This layer behaves as if you chose it first (base req is now 1e120 points)", cost: new Decimal(12), - unl: function() { return (player.t.unl&&player.e.unl)||player.s.upgrades.includes(33) }, + unl() { return (player.t.unl&&player.e.unl)||player.s.upgrades.includes(33) }, }, 34: { desc: "Space Buildings boost the Generator Power effect (before all other boosts).", cost: new Decimal(15), - unl: function() { return player.t.unl&&player.e.unl&&player.t.order==0&&player.e.order==0&&player.s.order==0 }, - currently: function() { return Decimal.pow(Object.values(player.s.buildings).reduce((a,b) => Decimal.add(a,b)), 0.2).div(17.5) }, - effDisp: function(x) { return "Add "+format(x)+" to exponent" }, + unl() { return player.t.unl&&player.e.unl&&player.t.order==0&&player.e.order==0&&player.s.order==0 }, + currently() { return Decimal.pow(tmp.s !== undefined ? tmp.s.sbSum : 0, 0.2).div(17.5) }, + effDisp(x) { return "Add "+format(x)+" to exponent" }, }, 41: { desc: "Total Space cheapens Space Buildings.", cost: new Decimal(128), - unl: function() { return player.ba.upgrades.includes(51) }, - currently: function() { return Decimal.pow("1e4000", getSpace().plus(player.s.spent).sqrt()) }, - effDisp: function(x) { return "/"+format(x) }, + unl() { return player.ba.upgrades.includes(51) }, + currently() { return Decimal.pow("1e4000", getSpace().add(player.s.spent).sqrt()) }, + effDisp(x) { return "/"+format(x) }, }, 42: { desc: "The Space Building cost formula is 40% weaker.", cost: new Decimal(131), - unl: function() { return player.ba.upgrades.includes(51) }, + unl() { return player.ba.upgrades.includes(51) }, }, 43: { desc: "Space Building 2 uses a better formula.", cost: new Decimal(133), - unl: function() { return player.ba.upgrades.includes(51) }, + unl() { return player.ba.upgrades.includes(51) }, }, 44: { desc: "All Space Buildings are 25% stronger.", cost: new Decimal(140), - unl: function() { return player.ba.upgrades.includes(51) }, + unl() { return player.ba.upgrades.includes(51) }, }, }, sb: { @@ -887,167 +956,160 @@ const LAYER_UPGS = { 11: { desc: "Super-Boosters are stronger based on your Prestige Points.", cost: new Decimal(2), - unl: function() { return player.sb.unl }, - currently: function() { - let ret = Decimal.pow(10, player.p.points.plus(1).log10().div(1e5).sqrt()); - if (ret.gte(2.5)) ret = ret.log(2.5).plus(1.5).min(ret); + unl() { return player.sb.unl }, + currently() { + let ret = Decimal.pow(10, player.p.points.add(1).log10().div(1e5).sqrt()); + if (ret.gte(2.5)) ret = ret.log(2.5).add(1.5).min(ret); + if (ret.gte(40)) ret = ret.log(40).times(40); return ret.max(1); }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 12: { desc: "Super-Boosters are stronger based on your Generators.", cost: new Decimal(4), - unl: function() { return player.sb.upgrades.includes(11) }, - currently: function() { return player.g.points.div(10).pow(0.04).max(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.sb.upgrades.includes(11) }, + currently() { return player.g.points.div(10).pow(0.04).max(1) }, + effDisp(x) { return format(x)+"x" }, }, 21: { desc: "Super-Boosters add to the Booster base.", cost: new Decimal(8), - unl: function() { return player.h.challs.includes(32) }, - currently: function() { return player.sb.points.pow(2.15) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.h.challs.includes(32) }, + currently() { return player.sb.points.pow(2.15) }, + effDisp(x) { return "+"+format(x) }, }, 22: { desc: "Super-Boosters add to the Super-Booster base.", cost: new Decimal(12), - unl: function() { return player.h.challs.includes(32) }, - currently: function() { return player.sb.points.plus(1).log10().div(3) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.h.challs.includes(32) }, + currently() { return player.sb.points.add(1).log10().div(3) }, + effDisp(x) { return "+"+format(x) }, }, }, - sg: { - rows: 0, - cols: 0, - }, - h: { - rows: 0, - cols: 0, - }, q: { rows: 5, cols: 4, 11: { desc: "Quirks & Hindrance Spirit boost Point, Prestige Point, and Enhance Point gain.", cost: new Decimal(1), - unl: function() { return player.q.unl&&player.q.layers.gt(0) }, - currently: function() { return player.q.points.plus(1).times(player.h.points.plus(1)).pow(0.75) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.q.unl&&player.q.layers.gt(0) }, + currently() { return player.q.points.add(1).times(player.h.points.add(1)).pow(0.75) }, + effDisp(x) { return format(x)+"x" }, }, 12: { desc: "The Quirk Energy and Hindrance Spirit effects use better formulas.", cost: new Decimal(5), - unl: function() { return player.q.upgrades.includes(11)&&player.h.best.gte(3) }, + unl() { return player.q.upgrades.includes(11)&&player.h.best.gte(3) }, }, 13: { desc: "Quirk Layers are twice as fast.", cost: new Decimal(50), - unl: function() { return player.q.upgrades.includes(11)&&player.h.challs.includes(11) }, + unl() { return player.q.upgrades.includes(11)&&player.h.challs.includes(11) }, }, 14: { desc: "Quirk Layers are thrice as fast.", cost: new Decimal(2e10), - unl: function() { return player.h.challs.includes(32) }, + unl() { return player.h.challs.includes(32) }, }, 21: { desc: "Quirk Layers are faster based on your Quirks.", cost: new Decimal(160), - unl: function() { return (player.q.upgrades.includes(12)||player.q.upgrades.includes(13))&&player.h.challs.includes(12) }, - currently: function() { return player.q.points.plus(1).log10().plus(1).pow(player.m.upgrades.includes(42)?1.5:1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return (player.q.upgrades.includes(12)||player.q.upgrades.includes(13))&&player.h.challs.includes(12) }, + currently() { return player.q.points.add(1).log10().add(1).pow(player.m.upgrades.includes(42)?1.5:1) }, + effDisp(x) { return format(x)+"x" }, }, 22: { desc: "Quirk & Hindrance Spirit gain boost each other.", cost: new Decimal(400), - unl: function() { return player.q.upgrades.includes(12)&&player.q.upgrades.includes(13)&&player.h.challs.includes(12) }, - currently: function() { return { - q: player.h.points.div(10).plus(1).sqrt(), - h: player.q.points.div(10).plus(1).sqrt(), + unl() { return player.q.upgrades.includes(12)&&player.q.upgrades.includes(13)&&player.h.challs.includes(12) }, + currently() { return { + q: player.h.points.div(10).add(1).sqrt(), + h: player.q.points.div(10).add(1).sqrt(), }}, - effDisp: function(x) { return format(x.q)+"x to Quirk gain, "+format(x.h)+"x to Hindrance Spirit gain" }, + effDisp(x) { return format(x.q)+"x to Quirk gain, "+format(x.h)+"x to Hindrance Spirit gain" }, }, 23: { desc: "The Time Energy limit is 1e10x higher.", cost: new Decimal(5000), - unl: function() { return player.q.upgrades.includes(21)||player.q.upgrades.includes(22) }, + unl() { return player.q.upgrades.includes(21)||player.q.upgrades.includes(22) }, }, 24: { desc: "The Time Energy limit is higher based on your Quirk Energy.", cost: new Decimal(5e10), - unl: function() { return player.h.challs.includes(32) }, - currently: function() { return player.q.energy.div(1e6).plus(1).pow(0.9) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.h.challs.includes(32) }, + currently() { return player.q.energy.div(1e6).add(1).pow(0.9) }, + effDisp(x) { return format(x)+"x" }, }, 31: { desc: "Get 1 of each Space Building for free.", cost: new Decimal(150000), - unl: function() { return player.q.upgrades.includes(21)&&player.q.upgrades.includes(22) }, + unl() { return player.q.upgrades.includes(21)&&player.q.upgrades.includes(22) }, }, 32: { desc: "The Quirk Energy effect is squared.", cost: new Decimal(500000), - unl: function() { return player.q.upgrades.includes(23)||player.q.upgrades.includes(31) }, + unl() { return player.q.upgrades.includes(23)||player.q.upgrades.includes(31) }, }, 33: { desc: "Time Capsules are stronger based on their amount.", cost: new Decimal(2e9), - unl: function() { return player.q.upgrades.includes(23)&&player.q.upgrades.includes(31) }, - currently: function() { return player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap)).plus(1).log10().plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.q.upgrades.includes(23)&&player.q.upgrades.includes(31) }, + currently() { return player.t.points.add(player.t.extCapsules.add(tmp.freeExtCap)).add(1).log10().add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 34: { desc: "Enhance Points boost Hindrance Spirit & Quirk gain.", cost: new Decimal(1e11), - unl: function() { return player.h.challs.includes(32) }, - currently: function() { return player.e.points.plus(1).log10().cbrt().plus(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.h.challs.includes(32) }, + currently() { return player.e.points.add(1).log10().cbrt().add(1) }, + effDisp(x) { return format(x)+"x" }, }, 41: { desc: "Space Buildings are 40% stronger.", cost: new Decimal(2.5e13), - unl: function() { return player.h.challs.includes(32) }, + unl() { return player.h.challs.includes(32) }, }, 42: { desc: "Enhancers are 40% stronger.", cost: new Decimal(2e14), - unl: function() { return player.h.challs.includes(32) }, + unl() { return player.h.challs.includes(32) }, }, 43: { desc: "Time Upgrade 2 is 1,500% stronger.", cost: new Decimal(1e16), - unl: function() { return player.h.challs.includes(32) }, + unl() { return player.h.challs.includes(32) }, }, 44: { desc: "You gain more Hindrance Spirit based on your Quirk Energy.", cost: new Decimal(4e16), - unl: function() { return player.h.challs.includes(32) }, - currently: function() { return player.q.energy.plus(1).log10().plus(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.h.challs.includes(32) }, + currently() { return player.q.energy.add(1).log10().add(1) }, + effDisp(x) { return format(x)+"x" }, }, 51: { desc: "Get free Quirk Layers based on your Quirk Energy.", cost: new Decimal("1e2100"), - unl: function() { return player.ba.upgrades.includes(52) }, - currently: function() { return player.q.energy.plus(1).log10().plus(1).log10() }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.ba.upgrades.includes(52) }, + currently() { return player.q.energy.add(1).log10().add(1).log10() }, + effDisp(x) { return "+"+format(x) }, }, 52: { desc: "Quirk Layers are faster based on your Quirk Layers.", cost: new Decimal("1e2400"), - unl: function() { return player.ba.upgrades.includes(52) }, - currently: function() { return Decimal.pow(10, player.q.layers) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(52) }, + currently() { return Decimal.pow(10, player.q.layers) }, + effDisp(x) { return format(x)+"x" }, }, 53: { desc: "The second Enhancer effect also multiplies the Booster/Generator base.", cost: new Decimal("1e2750"), - unl: function() { return player.ba.upgrades.includes(52) }, + unl() { return player.ba.upgrades.includes(52) }, }, 54: { desc: "Generator Upgrade 15's effect is raised to the power of 20.", cost: new Decimal("1e3125"), - unl: function() { return player.ba.upgrades.includes(52) }, + unl() { return player.ba.upgrades.includes(52) }, }, }, hb: { @@ -1056,26 +1118,26 @@ const LAYER_UPGS = { 11: { desc: "Super-Boosters are stronger based on your Hyper-Boosters.", cost: new Decimal(2), - unl: function() { return player.hb.unl }, - currently: function() { return player.hb.points.sqrt().div(4).plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.hb.unl }, + currently() { return player.hb.points.sqrt().div(4).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 12: { desc: "Hyper-Boosters are stronger based on your Super-Boosters.", cost: new Decimal(2), - unl: function() { return player.hb.unl }, - currently: function() { return player.sb.points.div(10).plus(1).log10().plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.hb.unl }, + currently() { return player.sb.points.div(10).add(1).log10().add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 13: { desc: "This layer behaves as if you chose it first.", cost: new Decimal(2), - unl: function() { return player.hb.order>0||(player.ss.upgrades.includes(15))||player.hb.upgrades.includes(13)||(player.m.unl||player.ba.unl) }, + unl() { return player.hb.order>0||(player.ss.upgrades.includes(15))||player.hb.upgrades.includes(13)||(player.m.unl||player.ba.unl) }, }, 14: { desc: "Unlock 3 new Booster Upgrades.", cost: new Decimal(3), - unl: function() { return player.hb.upgrades.includes(13)&&player.ss.upgrades.includes(15) }, + unl() { return player.hb.upgrades.includes(13)&&player.ss.upgrades.includes(15) }, }, }, ss: { @@ -1084,64 +1146,72 @@ const LAYER_UPGS = { 11: { desc: "You get more Space based on your Subspace Energy.", cost: new Decimal(1), - unl: function() { return player.ss.unl }, - currently: function() { return player.ss.points.sqrt().times(150).floor() }, - effDisp: function(x) { return formatWhole(x)+" more Space" }, + unl() { return player.ss.unl }, + currently() { return player.ss.points.sqrt().times(150).floor() }, + effDisp(x) { return formatWhole(x)+" more Space" }, }, 12: { desc: "You generate Subspace faster based on your Points.", cost: new Decimal(2), - unl: function() { return player.ss.unl }, - currently: function() { return player.points.plus(1).log10().div(1e4).plus(1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ss.unl }, + currently() { return player.points.add(1).log10().div(1e4).add(1) }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "Subspace's third effect is 50% stronger.", cost: new Decimal(2), - unl: function() { return player.ss.unl }, + unl() { return player.ss.unl }, }, 14: { desc: "Super-Boosters are 8.25% cheaper.", cost: new Decimal(2), - unl: function() { return player.hb.unl }, + unl() { return player.hb.unl }, }, 15: { desc: "This layer behaves as if you chose it first.", cost: new Decimal(3), - unl: function() { return player.ss.order>0||(player.hb.upgrades.includes(13))||player.ss.upgrades.includes(15)||(player.m.unl||player.ba.unl) }, + unl() { return player.ss.order>0||(player.hb.upgrades.includes(13))||player.ss.upgrades.includes(15)||(player.m.unl||player.ba.unl) }, }, 21: { desc: "Unlock 5 new Generator Upgrades.", cost: new Decimal(4), - unl: function() { return player.hb.upgrades.includes(13)&&player.ss.upgrades.includes(15) }, + unl() { return player.hb.upgrades.includes(13)&&player.ss.upgrades.includes(15) }, }, 22: { desc: "You generate Subspace faster based on its amount.", cost: new Decimal(5), - unl: function() { return player.ss.upgrades.includes(21)&&(player.h.challs.includes(51)||player.h.challs.includes(52)) }, - currently: function() { return player.ss.subspace.plus(1).root(2.25) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ss.upgrades.includes(21)&&(player.h.challs.includes(51)||player.h.challs.includes(52)) }, + currently() { return player.ss.subspace.add(1).root(2.25) }, + effDisp(x) { return format(x)+"x" }, }, 23: { desc: "Subspace beyond 1e20 multiplies the Generator Power base.", cost: new Decimal(6), - unl: function() { return player.ba.upgrades.includes(24) }, - currently: function() { return player.ss.subspace.sub(1e20).max(0).div(1e20).plus(1).sqrt() }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(24) }, + currently() { return player.ss.subspace.sub(1e20).max(0).div(1e20).add(1).sqrt() }, + effDisp(x) { return format(x)+"x" }, }, 24: { desc: "Subspace Energy boosts Subspace gain.", cost: new Decimal(7), - unl: function() { return player.ba.upgrades.includes(24) }, - currently: function() { return Decimal.pow(2, player.ss.points) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(24) }, + currently() { + let x = player.ss.points + if (player.ba.upgrades.includes(25)) x = x.times(LAYER_UPGS.ba[25].currently()) + return Decimal.pow(2, x) + }, + effDisp(x) { return format(x)+"x" }, }, 25: { desc: "Subspace is generated faster based on your Quirk Layers.", cost: new Decimal(8), - unl: function() { return player.ba.upgrades.includes(24) }, - currently: function() { return Decimal.pow(10, player.q.layers.sqrt()) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(24) }, + currently() { + let x = player.q.layers.sqrt() + if (player.ba.upgrades.includes(25)) x = x.times(LAYER_UPGS.ba[25].currently()) + return Decimal.pow(10, x) + }, + effDisp(x) { return format(x)+"x" }, }, }, m: { @@ -1149,338 +1219,455 @@ const LAYER_UPGS = { cols: 4, 11: { desc: "Hexes boost all Spells.", - cost: new Decimal(10), - unl: function() { return player.m.unl }, - currently: function() { return player.m.hexes.plus(1).log10().plus(1).log10().plus(1).log10().plus(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + cost: new Decimal(5), + unl() { return player.m.unl }, + currently() { return player.m.hexes.times(3).add(1).log10().add(1).log10().add(1).log10().add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 12: { desc: "Unlock 2 new Hindrances.", - cost: new Decimal(25), - unl: function() { return player.m.upgrades.includes(11) }, + cost: new Decimal(10), + unl() { return player.m.upgrades.includes(11) }, }, 13: { desc: "Hexes add to the Hyper-Booster base.", - cost: new Decimal(40), - unl: function() { return player.m.upgrades.includes(11) }, - currently: function() { return player.m.hexes.plus(1).log10().plus(1).log10().plus(1).log10().div(2.5) }, - effDisp: function(x) { return "+"+format(x)+" to base" }, + cost: new Decimal(15), + unl() { return player.m.upgrades.includes(11) }, + currently() { return player.m.hexes.add(1).log10().add(1).log10().add(1).log10().div(2.5) }, + effDisp(x) { return "+"+format(x)+" to base" }, }, 14: { desc: "You get more Hexes based on your best Magic.", - cost: new Decimal(100), - unl: function() { return player.m.upgrades.includes(12) }, - currently: function() { return player.m.best.div(3).plus(1).pow(0.8) }, - effDisp: function(x) { return format(x)+"x" }, + cost: new Decimal(20), + unl() { return player.m.upgrades.includes(12) }, + currently() { return player.m.best.times(1.2).add(1).pow(0.8) }, + effDisp(x) { return format(x)+"x" }, }, 21: { desc: "Spells 2 & 3 are stronger based on your Hindrance Spirit.", cost: new Decimal(1000), - unl: function() { return player.m.upgrades.includes(13) }, - currently: function() { return player.h.points.plus(1).log10().plus(1).log10().plus(1).log10().plus(1).sqrt() }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.m.upgrades.includes(13) }, + currently() { return player.h.points.add(1).log10().add(1).log10().add(1).log10().add(1).sqrt() }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 22: { desc: "Spell 2 is 900% stronger.", cost: new Decimal(2500), - unl: function() { return player.m.upgrades.includes(14) }, + unl() { return player.m.upgrades.includes(14) }, }, 23: { desc: "The Time Energy cap starts 1e500x later.", cost: new Decimal(6500), - unl: function() { return player.m.upgrades.includes(21) }, + unl() { return player.m.upgrades.includes(21) }, }, 24: { desc: "Add free Quirk Layers based on your Boosters.", cost: new Decimal(80000), - unl: function() { return player.m.upgrades.includes(22) }, - currently: function() { return player.b.points.plus(1).log10().times(0.9) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.m.upgrades.includes(22) }, + currently() { return player.b.points.add(1).log10().times(0.9) }, + effDisp(x) { return "+"+format(x) }, }, 31: { desc: "Unlock a new Hindrance.", cost: new Decimal(2.5e6), - unl: function() { return player.m.upgrades.includes(23)&&player.sg.unl }, + unl() { return player.m.upgrades.includes(23)&&player.sg.unl }, }, 32: { desc: "Hyper-Boosters add free Space Buildings.", cost: new Decimal(5e9), - unl: function() { return player.m.upgrades.includes(24) }, - currently: function() { return player.hb.points.plus(1).pow(3) }, - effDisp: function(x) { return "+"+formatWhole(x) }, + unl() { return player.m.upgrades.includes(24) }, + currently() { return player.hb.points.add(1).pow(3) }, + effDisp(x) { return "+"+formatWhole(x) }, }, 33: { desc: "Hindrance Spirit adds to the Hyper-Booster base.", cost: new Decimal(2e10), - unl: function() { return player.m.upgrades.includes(31) }, - currently: function() { return player.h.points.plus(1).log10().plus(1).log10().plus(1).log10().div(2) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.m.upgrades.includes(31) }, + currently() { return player.h.points.add(1).log10().add(1).log10().add(1).log10().div(2) }, + effDisp(x) { return "+"+format(x) }, }, 34: { desc: "Add 1 free Quirk Layer.", cost: new Decimal(4e10), - unl: function() { return player.m.upgrades.includes(32) }, + unl() { return player.m.upgrades.includes(32) }, }, 41: { desc: "You can insert more Magic into Spells, making them stronger.", cost: new Decimal(2.5e14), - unl: function() { return player.m.upgrades.includes(34) }, + unl() { return player.m.upgrades.includes(34) }, }, 42: { desc: "Quirk Upgrade 5 is 50% stronger.", cost: new Decimal(6e14), - unl: function() { return player.m.upgrades.includes(34) }, + unl() { return player.m.upgrades.includes(34) }, }, 43: { desc: "Spells last longer based on your Hexes.", cost: new Decimal(1e15), - unl: function() { return player.m.upgrades.includes(41) }, - currently: function() { return player.m.hexes.plus(1).log10().plus(1).sqrt().min(86400) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.m.upgrades.includes(41) }, + currently() { return player.m.hexes.add(1).log10().add(1).sqrt().min(86400) }, + effDisp(x) { return format(x)+"x" }, }, 44: { desc: "Magic adds to the Time Capsule base.", cost: new Decimal(1.5e15), - unl: function() { return player.m.upgrades.includes(41) }, - currently: function() { return player.m.points.plus(1).log10().div(10) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.m.upgrades.includes(41) }, + currently() { return player.m.points.add(1).log10().div(10) }, + effDisp(x) { return "+"+format(x) }, }, }, ba: { rows: 5, - cols: 4, + cols: 5, 11: { desc: "All Balance Energy effects use better formulas.", - cost: new Decimal(25), - unl: function() { return player.ba.unl }, + cost: new Decimal(5), + unl() { return player.ba.unl }, }, 12: { desc: "Subspace is generated faster based on your Positivity & Negativity.", - cost: new Decimal(40), - unl: function() { return player.ba.upgrades.includes(11) }, - currently: function() { return (tmp.balEff2?tmp.balEff2:new Decimal(1)).max(1).pow(4) }, - effDisp: function(x) { return format(x)+"x" }, + cost: new Decimal(10), + unl() { return player.ba.upgrades.includes(11) }, + currently() { return (tmp.balEff2?tmp.balEff2:new Decimal(1)).max(1).pow(4) }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "Multiply all Quirk Layers based on your Balance Power, and the Quirk Energy effect is cubed.", - cost: new Decimal(50), - unl: function() { return player.ba.upgrades.includes(11) }, - currently: function() { return player.ba.power.plus(1).pow(1.25) }, - effDisp: function(x) { return format(x)+"x" }, + cost: new Decimal(25), + unl() { return player.ba.upgrades.includes(11) }, + currently() { return player.ba.power.add(1).pow(1.25) }, + effDisp(x) { return format(x)+"x" }, }, 14: { desc: "The Balance Power effect uses a better formula.", cost: new Decimal(120), - unl: function() { return player.ba.upgrades.includes(12) }, + unl() { return player.ba.upgrades.includes(12) }, }, 21: { desc: "Negativity boosts Super-Generator Power gain.", cost: new Decimal(300), - unl: function() { return player.ba.upgrades.includes(13)&&player.sg.unl }, - currently: function() { return player.ba.negativity.plus(1).sqrt() }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(13)&&player.sg.unl }, + currently() { + let x = player.ba.negativity.add(1).sqrt() + if (x.gte("1e400")) x = Decimal.pow(10, x.log10().times(20).pow(2/3)) + return x + }, + effDisp(x) { return format(x)+"x" }, }, 22: { desc: "Balance Power boosts Positivity & Negativity gain.", cost: new Decimal(2000), - unl: function() { return player.ba.upgrades.includes(14) }, - currently: function() { return player.ba.power.plus(1).pow(0.15) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(14) }, + currently() { return player.ba.power.add(1).pow(0.15) }, + effDisp(x) { return format(x)+"x" }, }, 23: { desc: "Super-Generators add to their base.", cost: new Decimal(7500), - unl: function() { return player.ba.upgrades.includes(21) }, - currently: function() { return player.sg.points.pow(2).div(2) }, - effDisp: function(x) { return "+"+format(x) }, + unl() { return player.ba.upgrades.includes(21) }, + currently() { return player.sg.points.pow(2).div(2) }, + effDisp(x) { return "+"+format(x) }, }, 24: { desc: "Unlock 3 new Subspace Upgrades.", cost: new Decimal(2e4), - unl: function() { return player.ba.upgrades.includes(22) }, + unl() { return player.ba.upgrades.includes(22) }, }, 31: { desc: "The Quirk Layer cost is adjusted based on your Balance Upgrades bought.", cost: new Decimal(4e5), - unl: function() { return player.ba.upgrades.includes(23) }, - currently: function() { return Decimal.div(0.8, Math.pow(player.ba.upgrades.length+1, 0.1)).plus(1.2) }, - effDisp: function(x) { return "2 -> "+format(x) }, + unl() { return player.ba.upgrades.includes(23) }, + currently() { return Decimal.div(0.8, Math.pow(player.ba.upgrades.length+1, 0.1)).add(1.2) }, + effDisp(x) { return "2 -> "+format(x) }, }, 32: { desc: "Enhancers are stronger based on your Positivity.", cost: new Decimal(5e5), - unl: function() { return player.ba.upgrades.includes(24) }, - currently: function() { return player.ba.positivity.plus(1).log10().plus(1).log10().plus(1).pow(2) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + unl() { return player.ba.upgrades.includes(24) }, + currently() { return player.ba.positivity.add(1).log10().add(1).log10().add(1).pow(2) }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 33: { desc: "The Balance Power effect is squared.", cost: new Decimal(1e6), - unl: function() { return player.ba.upgrades.includes(31) }, + unl() { return player.ba.upgrades.includes(31) }, }, 34: { desc: "The Positivity & Negativity effect uses a better formula.", cost: new Decimal(2e6), - unl: function() { return player.ba.upgrades.includes(32) }, + unl() { return player.ba.upgrades.includes(32) }, }, 41: { desc: "The first Balance Energy effect is squared.", cost: new Decimal(2e10), - unl: function() { return player.ba.upgrades.includes(33)&&player.ba.upgrades.includes(34) }, + unl() { return player.ba.upgrades.includes(33)&&player.ba.upgrades.includes(34) }, }, 42: { desc: "The Space Building 1 effect is stronger based on your Space Building 1 amount.", cost: new Decimal(3e11), - unl: function() { return player.ba.upgrades.includes(33)&&player.ba.upgrades.includes(34) }, - currently: function() { return player.s.buildings[1].plus(1).pow(0.8) }, - effDisp: function(x) { return "^"+format(x) }, + unl() { return player.ba.upgrades.includes(33)&&player.ba.upgrades.includes(34) }, + currently() { return tmp.s.sb[1].add(1).pow(0.8) }, + effDisp(x) { return "^"+format(x) }, }, 43: { desc: "The post-25 Extra Time Capsule cost scaling is disabled.", cost: new Decimal(1e12), - unl: function() { return player.ba.upgrades.includes(41)||player.ba.upgrades.includes(42) }, + unl() { return player.ba.upgrades.includes(41)||player.ba.upgrades.includes(42) }, }, 44: { desc: "Space Buildings are 50% stronger.", cost: new Decimal(2e12), - unl: function() { return player.ba.upgrades.includes(42)||player.ba.upgrades.includes(43) }, + unl() { return player.ba.upgrades.includes(42)||player.ba.upgrades.includes(43) }, }, 51: { desc: "Unlock 4 new Space Upgrades.", cost: new Decimal(2e13), - unl: function() { return player.ba.upgrades.includes(43) }, + unl() { return player.ba.upgrades.includes(43) }, }, 52: { desc: "Unlock 4 new Quirk Upgrades.", cost: new Decimal(1e14), - unl: function() { return player.ba.upgrades.includes(51) }, + unl() { return player.ba.upgrades.includes(51) }, }, 53: { desc: "The Positivity & Negativity boost to Balance Power gain is stronger based on your Super-Generator Power.", cost: new Decimal(2e19), - unl: function() { return player.ba.upgrades.includes(51)&&player.sg.unl }, - currently: function() { return player.sg.power.plus(1).log10().div(25).plus(1).sqrt() }, - effDisp: function(x) { return "^"+format(x) }, + unl() { return player.ba.upgrades.includes(51)&&player.sg.unl }, + currently() { return player.sg.power.add(1).log10().div(25).add(1).sqrt() }, + effDisp(x) { return "^"+format(x) }, }, 54: { - desc: "Balance Power boosts the first Balance Energy effect (even stronger based on your Best Balance Power).", + desc: "Balance Power boosts the first Balance Energy effect. (stronger based on your Best Balance Power)", cost: new Decimal(5e25), - unl: function() { return player.ba.upgrades.includes(53) }, - currently: function() { return player.ba.power.plus(1).times(player.ba.best.plus(1).sqrt()).cbrt() }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.ba.upgrades.includes(53) }, + currently() { return player.ba.power.add(1).times(player.ba.best.add(1).sqrt()).cbrt() }, + effDisp(x) { return format(x)+"x" }, + }, + 15: { + desc: "Positivity and Negativity reduce the cost scaling of Space Buildings.", + cost: new Decimal(1e200), + unl() { return player.sp.upgrades.includes(44) }, + currently() { return player.ba.positivity.add(1).div(player.ba.negativity.add(1)).log10().div(20).add(0.5).max(1) }, + effDisp(x) { return format(Decimal.sub(1, x.recip()).times(100))+"%" }, + }, + 25: { + desc: "Balance Power boosts Subspace Upgrades 9 and 10.", + cost: new Decimal(1e245), + unl() { return player.sp.upgrades.includes(44) }, + currently() { return player.ba.power.add(1).log10().div(10).max(1).cbrt() }, + effDisp(x) { return "^"+format(x) }, + }, + 35: { + desc: "Super-Upgrades are 25% stronger.", + cost: new Decimal(1e260), + unl() { return player.sp.upgrades.includes(44) }, + }, + 45: { + desc: "Subspace reduces both Hyperspace costs.", + cost: new Decimal("6.66e666"), + unl() { return player.sp.upgrades.includes(44) }, + currently() { return player.ss.subspace.add(1).pow(0.02) }, + effDisp(x) { return format(x)+"x" }, + }, + 55: { + desc: "Super-Prestige Points cheapen Quirk Layers.", + cost: new Decimal("1e920"), + unl() { return player.sp.upgrades.includes(44) }, + currently() { return player.sp.points.max(1).log10().pow(0.75).div(2) }, + effDisp(x) { return "-"+format(x)+" layers" }, + }, + }, + ps: { + rows: 2, + cols: 4, + 11: { + desc: "Hindrance Spirits reduce the requirement of Phantom Souls.", + cost: new Decimal(2), + unl() { return true }, + currently() { return player.h.points.add(1).pow(0.01) }, + effDisp(x) { return format(x)+"x" }, + }, + 12: { + desc: "Phantom Souls are 20% stronger.", + cost: new Decimal(5), + unl() { return true }, + }, + 13: { + desc: "Phantom Souls strengthen all Spells.", + cost: new Decimal(7), + unl() { return true }, + currently() { return player.ps.points.div(2).max(1).log10().div(10).add(1) }, + effDisp(x) { return format(x.sub(1).times(100))+"%" }, + }, + 14: { + desc: "The Life Essence layer acts like you choose it first.", + cost: new Decimal(8), + unl() { return player.l.order > 0 || player.ps.upgrades.includes(14) }, + }, + 21: { + desc: "Unlock the fifth Life Booster.", + cost: new Decimal(5), + unl() { return player.hs.unl }, + }, + 22: { + desc: "Phantom Souls reduce the post-12 scaling of all row 1 - 4 layer requirements.", + cost: new Decimal(19), + unl() { return player.hs.unl }, + currently() { return player.ps.points.div(100).add(1) }, + effDisp(x) { return format(x) + "x" }, + }, + 23: { + desc: "Unlock 4 new Super-Prestige Upgrades.", + cost: new Decimal(21), + unl() { return player.hs.unl }, + }, + 24: { + desc: "The Hyperspace layer acts like you choose it first.", + cost: new Decimal(17), + unl() { return (player.hs.unl && player.hs.order > 0) || player.ps.upgrades.includes(24) }, }, }, sp: { - rows: 3, - cols: 4, + rows: 4, + cols: 5, 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 }, + unl() { 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" }, + unl() { return player.sp.upgrades.includes(11) }, + currently() { return player.sp.total.add(1).pow(2.5) }, + effDisp(x) { return format(x)+"x" }, }, 13: { desc: "Unlock a new Spell.", - cost: new Decimal(3), - unl: function() { return player.sp.upgrades.includes(12) }, + cost: new Decimal(2), + unl() { return player.sp.upgrades.includes(11) }, }, 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" }, + cost: new Decimal(3), + unl() { return player.sp.upgrades.includes(12) || player.sp.upgrades.includes(13) }, + currently() { return player.sp.best.add(1).pow(1.9) }, + effDisp(x) { return format(x)+"x" }, }, 21: { desc: "Super-Prestige Points add to the Super-Generator base.", - cost: new Decimal(15), - unl: function() { return player.sp.upgrades.includes(11) }, - currently: function() { return player.sp.points.plus(1).log10().plus(1).log10().times(1.5) }, - effDisp: function(x) { return "+"+format(x) }, + cost: new Decimal(4), + unl() { return player.sp.upgrades.includes(11) }, + currently() { return player.sp.points.add(1).log10().add(1).log10().times(1.5) }, + effDisp(x) { return "+"+format(x) }, }, 22: { desc: 'The effects of "Anti-Upgrades" & "Prestigeless" Hindrances are 24,900% stronger.', - cost: new Decimal(20), - unl: function() { return player.sp.upgrades.includes(12)||player.sp.upgrades.includes(21) }, + cost: new Decimal(6), + unl() { return player.sp.upgrades.includes(12) || player.sp.upgrades.includes(21) }, }, 23: { desc: "Spells are stronger based on your Total Super-Prestige Points.", - cost: new Decimal(30), - unl: function() { return player.sp.upgrades.includes(13)||player.sp.upgrades.includes(22) }, - currently: function() { + cost: new Decimal(8), + unl() { return player.sp.upgrades.includes(13) || player.sp.upgrades.includes(22) }, + currently() { let sp = player.sp.total if (sp.gte(250)) sp = sp.log10().times(250/Math.log10(250)).min(sp) - return sp.plus(1).log10().div(5).plus(1) + return sp.add(1).log10().div(5).add(1) }, - effDisp: function(x) { return format(x.sub(1).times(100))+"% stronger" }, + effDisp(x) { return format(x.sub(1).times(100))+"% stronger" }, }, 24: { desc: "Super-Prestige Points boost Super-Prestige Point gain.", - cost: new Decimal(40), - unl: function() { return player.sp.upgrades.includes(14)||player.sp.upgrades.includes(23) }, - currently: function() { + cost: new Decimal(15), + unl() { return player.sp.upgrades.includes(14) || player.sp.upgrades.includes(23) }, + currently() { let sp = player.sp.points if (sp.gte(2e4)) sp = sp.cbrt().times(Math.pow(2e4, 2/3)); - return sp.plus(1).sqrt() + return sp.times(2).add(1).sqrt() }, - effDisp: function(x) { return format(x)+"x" }, + effDisp(x) { return format(x)+"x" }, }, 31: { desc: "Super-Generators are 45% cheaper.", cost: new Decimal(1000), - unl: function() { return player.sp.upgrades.includes(22) }, + unl() { return player.sp.upgrades.includes(22) }, }, 32: { desc: "Prestige Upgrade 7 softcaps later based on your Super-Prestige Points.", cost: new Decimal(4000), - unl: function() { return player.sp.upgrades.includes(23)&&player.sp.upgrades.includes(31) }, - currently: function() { return player.sp.points.plus(1).log10().plus(1).pow(1e4) }, - effDisp: function(x) { return format(x.pow(player.sp.upgrades.includes(11)?100:1))+"x later" }, + unl() { return player.sp.upgrades.includes(23) && player.sp.upgrades.includes(31) }, + currently() { return player.sp.points.add(1).log10().add(1).pow(1e4) }, + effDisp(x) { return format(x.pow(player.sp.upgrades.includes(11)?100:1))+"x later" }, }, 33: { desc: "Points boost Super-Prestige Point gain.", cost: new Decimal(1e4), - unl: function() { return player.sp.upgrades.includes(24)&&player.sp.upgrades.includes(32) }, - currently: function() { return player.points.plus(1).log10().pow(0.1) }, - effDisp: function(x) { return format(x)+"x" }, + unl() { return player.sp.upgrades.includes(24) && player.sp.upgrades.includes(32) }, + currently() { return player.points.add(1).log10().pow(0.1) }, + effDisp(x) { return format(x)+"x" }, }, 34: { desc: "Boosters & Generators are 25% stronger.", cost: new Decimal(1.5e5), - unl: function() { return player.sp.upgrades.includes(33) }, + unl() { return player.sp.upgrades.includes(33) }, + }, + 41: { + desc: "Gain more Life Essence based on total SP.", + cost: new Decimal(1e6), + unl() { return player.l.unl }, + currently() { return player.sp.total.div(5e5).add(1).sqrt() }, + effDisp(x) { return format(x)+"x" }, + }, + 42: { + desc: "Life Essence speeds up the Life Power production.", + cost: new Decimal(1.5e6), + unl() { return player.l.unl }, + currently() { + if (player.sp.upgrades.includes(15)) return Decimal.pow(8, player.l.points.max(1).log10().pow(0.4)) + return player.l.points.add(1).log10().add(1).pow(0.75) + }, + effDisp(x) { return format(x)+"x" }, + }, + 43: { + desc: "Gain more Hyperspace Energy based on total SP.", + cost: new Decimal(8e5), + unl() { return player.hs.unl }, + currently() { return player.sp.total.div(7.5e5).add(1).sqr() }, + effDisp(x) { return format(x)+"x" }, + }, + 44: { + desc: "Unlock 5 new Balance Upgrades.", + cost: new Decimal(1.5e6), + unl() { return player.hs.unl }, + }, + 15: { + desc: "Life Essence speeds up the Life Power production more.", + cost: new Decimal(3e16), + unl() { return player.ps.upgrades.includes(23) }, + }, + 25: { + desc: "Super-Upgrades of Space Building 4 divides the Super-Generator requirement.", + cost: new Decimal(2e17), + unl() { return player.ps.upgrades.includes(23) }, + currently() { return fixValue(tmp.hs !== undefined && tmp.hs.su[4]).add(1).sqr() }, + effDisp(x) { return format(x)+"x" }, + }, + 35: { + desc: "Super-Prestige Points strengthen all Subspace effects.", + cost: new Decimal(6e17), + unl() { return player.ps.upgrades.includes(23) }, + currently() { return player.sp.points.log10().div(15).add(1).cbrt() }, + effDisp(x) { return format(x.sub(1).times(100))+"%" }, + }, + 45: { + desc: "Subtract the cost of Imperium Buildings by 3.", + cost: new Decimal(1e22), + unl() { return player.ps.upgrades.includes(23) }, }, }, } -const TAB_REQS = { - tree: function() { return true }, - options: function() { return true }, - info: function() { return true }, - changelog: function() { return true }, - credits: function() { return true }, - p: function() { return (player.p.unl||player.points.gte(tmp.layerReqs.p))&&layerUnl('p') }, - b: function() { return (player.b.unl||player.points.gte(tmp.layerReqs.b))&&layerUnl('b') }, - g: function() { return (player.g.unl||player.points.gte(tmp.layerReqs.g))&&layerUnl('g') }, - e: function() { return (player.e.unl||player.points.gte(tmp.layerReqs.e))&&layerUnl('e') }, - t: function() { return (player.t.unl||player.points.gte(tmp.layerReqs.t))&&layerUnl('t') }, - s: function() { return (player.s.unl||player.points.gte(tmp.layerReqs.s))&&layerUnl('s') }, - sb: function() { return (player.sb.unl||player.b.points.gte(tmp.layerReqs.sb))&&layerUnl('sb') }, - sg: function() { return (player.sg.unl||player.g.points.gte(tmp.layerReqs.sg))&&layerUnl('sg') }, - h: function() { return (player.h.unl||player.t.energy.gte(tmp.layerReqs.h))&&layerUnl('h') }, - 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') }, - 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 = { p: "points", b: "points", @@ -1496,7 +1683,11 @@ const LAYER_AMT_NAMES = { ss: "space energy", m: "hindrance spirit", ba: "quirks", + ps: "quirk energy", sp: "prestige points", + l: "hexes", + hs: "space energy", + i: "subspace", } function getLayerAmt(layer) { @@ -1526,9 +1717,21 @@ function getLayerAmt(layer) { case "ba": return player.q.points; break; + case "ps": + return player.q.energy; + break; case "sp": return player.p.points; break; + case "l": + return player.m.hexes; + break; + case "hs": + return player.s.points; + break; + case "i": + return player.ss.subspace; + break; } return amt } @@ -1564,6 +1767,12 @@ function getLayerEffDesc(layer) { case "ba": return "which are generating "+format(eff.power)+" Balance Power, "+format(eff.pos)+" Positivity, and "+format(eff.neg)+" Negativity every second" break; + case "ps": + return "which are speeding up the Life Power production by " + format(eff.mult) + "x and raising the Life Power amount to the power of " + format(eff.exp) + break; + case "l": + return "which makes the Life Power softcap starts at " + format(eff.pow(tmp.layerEffs.ps.exp)) + break; } } @@ -1576,12 +1785,16 @@ function load() { if (get===null||get===undefined) player = getStartPlayer() else player = JSON.parse(atob(get)) player.tab = "tree" - offTime.remain = (Date.now()-player.time)/10000 - if (!player.offlineProd) offTime.remain = 0 + if (player.offlineProd) { + if (player.offTime === undefined) player.offTime = { remain: 0 } + player.offTime.remain += (Date.now() - player.time) / 1000 + } player.time = Date.now() checkForVars(); convertToDecimal(); versionCheck(); + changeTheme(); + changeTreeQuality(); updateTemp(); updateTemp(); loadVue(); @@ -1631,48 +1844,48 @@ function versionCheck() { } if (setVersion) { + if (player.versionType == "real" && VERSION.num > player.version) player.keepGoing = false player.versionType = getStartPlayer().versionType - player.version = getStartPlayer().version + player.version = VERSION.num + player.beta = VERSION.beta } } function checkForVars() { let start = getStartPlayer() + for (var i=0; i Decimal.add(a, b)) +} + function format(decimal, precision=3) { decimal = new Decimal(decimal) if (isNaN(decimal.sign)||isNaN(decimal.layer)||isNaN(decimal.mag)) { player.hasNaN = true; return "NaN" } - if (decimal.eq(1/0)) return "Infinity" - if (decimal.gte("eee1000")) return exponentialFormat(decimal, precision) - else if (decimal.gte("ee1000")) return "ee"+format(decimal.log10().log10()) - else if (decimal.gte("1e1000")) return decimal.div(Decimal.pow(10, decimal.log10().floor())).toStringWithDecimalPlaces(3)+"e"+format(decimal.log10().floor()) + if (decimal.sign<0) return "-"+format(decimal.neg(), precision) + if (decimal.mag == Number.POSITIVE_INFINITY) return "Infinity" + if (decimal.gte("eeee1000")) { + var slog = decimal.slog() + if (slog.gte(1e6)) return "F" + format(slog.floor()) + else return Decimal.pow(10, slog.sub(slog.floor())).toStringWithDecimalPlaces(3) + "F" + commaFormat(slog.floor(), 0) + } else if (decimal.gte("1e1000")) return "e"+formatWhole(decimal.log10()) else if (decimal.gte(1e9)) return exponentialFormat(decimal, precision) else if (decimal.gte(1e3)) return commaFormat(decimal, 0) else return commaFormat(decimal, precision) @@ -1779,10 +2007,24 @@ function formatTime(s) { else return formatWhole(Math.floor(s/3600))+"h "+formatWhole(Math.floor(s/60)%60)+"m "+format(s%60)+"s" } +var onTreeTab = true function showTab(name) { - if (!TAB_REQS[name]()) return + if (LAYERS.includes(name) && !layerUnl(name)) return + + var toTreeTab = name == "tree" player.tab = name - if (name=="tree") needCanvasUpdate = true; + + if (toTreeTab != onTreeTab) { + document.getElementById("treeTab").className = toTreeTab ? "fullWidth" : "col left" + onTreeTab = toTreeTab + resizeCanvas() + } + delete player.notify[name] +} + +function notifyLayer(name) { + if (player.tab == name || !layerUnl(name)) return + player.notify[name] = 1 } function canBuyMax(layer) { @@ -1811,6 +2053,12 @@ function canBuyMax(layer) { case "ss": return player.ba.best.gte(8) break; + case "ps": + return player.ps.best.gte(5) + break; + case "i": + return player.i.best.gte(3) + break; } return false; } @@ -1839,6 +2087,12 @@ function getLayerReq(layer) { case "ss": if (player.ss.order>0) req = new Decimal(45) break; + case "l": + if (player.l.order>0) req = new Decimal("1e345") + break; + case "hs": + if (player.hs.order>0) req = new Decimal(910) + break; } return req } @@ -1853,42 +2107,48 @@ function getLayerGainMult(layer) { if (player.b.upgrades.includes(11)) mult = mult.times(LAYER_UPGS.b[11].currently()) if (player.g.upgrades.includes(11)) mult = mult.times(LAYER_UPGS.g[11].currently()) if (player.e.unl) mult = mult.times(tmp.enhEff) - if (player.e.upgrades.includes(12)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.e[12].currently()) - if (player.e.upgrades.includes(13)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(1e10) - if (player.e.upgrades.includes(34)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(1e40) + if (player.e.upgrades.includes(12)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.e[12].currently()) + if (player.e.upgrades.includes(13)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(1e10) + if (player.e.upgrades.includes(34)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(1e40) if (player.t.unl) mult = mult.times(tmp.timeEff) - if (player.s.unl && tmp.spaceBuildEff) mult = mult.times(tmp.spaceBuildEff[1]) + if (player.s.unl && tmp.s !== undefined) mult = mult.times(tmp.s.sbEff[1]) if (player.q.upgrades.includes(11)) mult = mult.times(LAYER_UPGS.q[11].currently()) - if (tmp.hcActive ? tmp.hcActive[62] : true) mult = mult.times(0) + if (tmp.challActive ? tmp.challActive.h[62] : true) mult = mult.times(0) break; case "b": if (player.b.upgrades.includes(23)) mult = mult.div(LAYER_UPGS.b[23].currently()) - if (player.s.unl && tmp.spaceBuildEff) mult = mult.div(tmp.spaceBuildEff[3]) + if (player.s.unl && tmp.s !== undefined) mult = mult.div(tmp.s.sbEff[3]) break; case "g": if (player.g.upgrades.includes(22)) mult = mult.div(LAYER_UPGS.g[22].currently()) - if (player.s.unl && tmp.spaceBuildEff) mult = mult.div(tmp.spaceBuildEff[3]) + if (player.s.unl && tmp.s !== undefined) mult = mult.div(tmp.s.sbEff[3]) break; case "e": - if (player.e.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.e[24].currently()) + if (player.e.upgrades.includes(24)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.e[24].currently()) if (player.h.best.gte(1)) mult = mult.times(100) if (player.q.best.gte(1)) mult = mult.times(100) if (player.q.upgrades.includes(11)) mult = mult.times(LAYER_UPGS.q[11].currently()) break; case "t": - if (player.h.challs.includes(21)) mult = mult.div(H_CHALLS[21].currently()) + if (player.h.challs.includes(21)) mult = mult.div(LAYER_CHALLS.h[21].currently()) break; case "s": - if (player.h.challs.includes(21)) mult = mult.div(H_CHALLS[21].currently()) + if (player.h.challs.includes(21)) mult = mult.div(LAYER_CHALLS.h[21].currently()) break; case "sb": if (player.ss.upgrades.includes(14)) mult = mult.div(1.0825) + if (player.l.unl && tmp.l !== undefined) mult = mult.div(tmp.l.lbEff[4]) break; case "sg": if (player.sp.upgrades.includes(31)) mult = mult.div(1.45) + if (player.sp.upgrades.includes(25)) mult = mult.div(LAYER_UPGS.sp[25].currently()) + if (player.l.unl && tmp.l !== undefined) mult = mult.div(tmp.l.lbEff[4]) + break; + case "hb": + if (player.l.unl && tmp.l !== undefined) mult = mult.div(tmp.l.lbEff[4]) break; case "h": - if (player.h.challs.includes(71)) mult = mult.times(H_CHALLS[71].currently()) + if (player.h.challs.includes(71)) mult = mult.times(LAYER_CHALLS.h[71].currently()) 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(44)) mult = mult.times(LAYER_UPGS.q[44].currently()) @@ -1896,7 +2156,7 @@ function getLayerGainMult(layer) { if (player.m.unl) mult = mult.times(tmp.hexEff) break; case "q": - if (player.h.challs.includes(12)) mult = mult.times(H_CHALLS[12].currently()) + if (player.h.challs.includes(12)) mult = mult.times(LAYER_CHALLS.h[12].currently()) 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.ba.unl) mult = mult.times(tmp.balEff) @@ -1908,171 +2168,236 @@ function getLayerGainMult(layer) { case "ba": if (player.sp.upgrades.includes(12)) mult = mult.times(LAYER_UPGS.sp[12].currently()) break; + case "ps": + if (player.ps.upgrades.includes(11)) mult = mult.div(LAYER_UPGS.ps[11].currently()) + if (tmp.s !== undefined && tmp.s.trueSbUnl >= 7) mult = mult.div(tmp.s.sbEff[7]) + break; case "sp": if (player.sp.upgrades.includes(24)) mult = mult.times(LAYER_UPGS.sp[24].currently()) if (player.sp.upgrades.includes(33)) mult = mult.times(LAYER_UPGS.sp[33].currently()) break; + case "l": + if (player.sp.upgrades.includes(41)) mult = mult.times(LAYER_UPGS.sp[41].currently()) + break; + case "hs": + if (player.sp.upgrades.includes(43)) mult = mult.times(LAYER_UPGS.sp[43].currently()) + if (player.l.unl && tmp.l !== undefined && tmp.l.lbUnl >= 5) mult = mult.times(tmp.l.lbEff[5]) + break; } return mult } -function getGainExp(layer) { - let exp = new Decimal(1); +function getLayerGainExp(layer) { + let exp = new Decimal(1) + let row = LAYER_ROW[layer] + 1 + if (LAYER_ROW[layer] < 5) exp = fixValue(tmp.i && tmp.i.workEff, 1).recip() + if (IMPERIUM.collapsed(row)) exp = exp.times(Decimal.sub(1, tmp.i.collapse[row])) switch(layer) { case "p": - if (tmp.hcActive ? tmp.hcActive[21] : true) exp = exp.div(100) + if (tmp.challActive ? tmp.challActive.h[21] : true) exp = exp.div(100) + break; + case "ps": + if (player.l.order > 0) exp = exp.div(2) + break; + case "l": + if (player.l.order > 0) exp = exp.div(2) + break; + case "hs": + if (player.hs.order > 0) exp = exp.div(2) break; } return exp; } function getResetGain(layer) { + if (tmp.gainExp[layer].eq(0)) return new Decimal(0) if (LAYER_TYPE[layer]=="static") { if ((!canBuyMax(layer)) || tmp.layerAmt[layer].lt(tmp.layerReqs[layer])) return new Decimal(1) - let gain = tmp.layerAmt[layer].div(tmp.layerReqs[layer]).div(tmp.gainMults[layer]).max(1).log(LAYER_BASE[layer]).pow(Decimal.pow(LAYER_EXP[layer], -1)) - if (gain.gte(12)) gain = gain.times(12).sqrt() - if (gain.gte(1225)) gain = gain.times(Decimal.pow(1225, 9)).pow(0.1) - return gain.floor().sub(player[layer].points).plus(1).max(1); + let gain = tmp.layerAmt[layer].div(tmp.layerReqs[layer]).div(tmp.gainMults[layer]).max(1).log(LAYER_BASE[layer]).times(tmp.gainExp[layer]).pow(Decimal.pow(LAYER_EXP[layer], -1)) + if ((LAYER_ROW[layer] < 4 && layer != "hb") || layer == "ps") { + if (gain.gte(12)) { + if (LAYER_ROW[layer] < 4 && fixValue(tmp.scaling12b).gt(1)) gain = gain.times(tmp.scaling12b).add(tmp.scaling12b.sub(1).times(12)) + gain = gain.times(12).sqrt() + } + if (gain.gte(1225)) gain = gain.times(Decimal.pow(1225, 9)).pow(0.1) + } + return gain.floor().sub(player[layer].points).add(1).max(1); + } else { + if (tmp.layerAmt[layer].lt(tmp.layerReqs[layer])) return new Decimal(0) + let gain = tmp.layerAmt[layer].div(tmp.layerReqs[layer]).pow(LAYER_EXP[layer]).times(tmp.gainMults[layer]).pow(tmp.gainExp[layer]) + if (gain.gte("e1e7")) gain = gain.sqrt().times("e5e6") + return gain.floor().max(0); } - if (tmp.layerAmt[layer].lt(tmp.layerReqs[layer])) return new Decimal(0) - let gain = tmp.layerAmt[layer].div(tmp.layerReqs[layer]).pow(LAYER_EXP[layer]).times(tmp.gainMults[layer]).pow(getGainExp(layer)) - if (gain.gte("e1e7")) gain = gain.sqrt().times("e5e6") - return gain.floor().max(0); } function getNextAt(layer) { + if (tmp.gainExp[layer].eq(0)) return new Decimal(1/0) if (LAYER_TYPE[layer]=="static") { let amt = player[layer].points - if (amt.gte(1225)) amt = amt.pow(10).div(Decimal.pow(1225, 9)) - if (amt.gte(12)) amt = amt.pow(2).div(12) - let extraCost = Decimal.pow(LAYER_BASE[layer], amt.pow(LAYER_EXP[layer])).times(tmp.gainMults[layer]) + if ((LAYER_ROW[layer] < 4 && layer != "hb") || layer == "ps") { + if (amt.gte(1225)) amt = amt.pow(10).div(Decimal.pow(1225, 9)) + if (amt.gte(12)) { + amt = amt.pow(2).div(12) + if (LAYER_ROW[layer] < 4 && fixValue(tmp.scaling12b).gt(1)) amt = amt.sub(tmp.scaling12b.sub(1).times(12)).div(tmp.scaling12b) + } + } + let extraCost = Decimal.pow(LAYER_BASE[layer], amt.pow(LAYER_EXP[layer]).div(tmp.gainExp[layer])).times(tmp.gainMults[layer]) let cost = extraCost.times(tmp.layerReqs[layer]).max(tmp.layerReqs[layer]) if (LAYER_RES_CEIL.includes(layer)) cost = cost.ceil() return cost; } else { - let next = tmp.resetGain[layer].plus(1) + let next = tmp.resetGain[layer].add(1) if (next.gte("e1e7")) next = next.div("e5e6").pow(2) - next = next.root(getGainExp(layer)).div(tmp.gainMults[layer]).root(LAYER_EXP[layer]).times(tmp.layerReqs[layer]).max(tmp.layerReqs[layer]) + next = next.root(tmp.gainExp[layer]).div(tmp.gainMults[layer]).root(LAYER_EXP[layer]).times(tmp.layerReqs[layer]).max(tmp.layerReqs[layer]) if (LAYER_RES_CEIL.includes(layer)) next = next.ceil() return next; } } -function layerUnl(layer) { +function nodeShown(layer) { + if (layerShown(layer)) return true switch(layer) { - case "p": - return true; - break; - case "b": - return player.p.unl; - break; - case "g": - return player.p.unl; - break; - case "e": - return player.b.unl&&player.g.unl; - break; - case "t": - return player.b.unl; - break; - case "s": - return player.g.unl; - break; - case "sb": - return player.e.unl&&player.t.unl&&player.s.unl; - break; - case "sg": - return player.g.unl&&player.h.challs.includes(62); - break; - case "h": - return player.t.unl&&player.sb.unl - break; - case "q": - return player.e.unl&&player.sb.unl - break; - case "hb": - return player.sb.unl&&player.h.unl&&player.q.unl - break; - case "ss": - return player.s.unl&&player.h.unl&&player.q.unl - break; - case "m": - return player.h.unl&&player.hb.unl - break; - case "ba": - return player.q.unl&&player.ss.unl - break; - case "sp": - return player.m.unl&&player.ba.unl + case "i": + return player.l.unl break; } + return false +} + +function layerShown(layer) { + switch(layer) { + case "p": + return true + break + case "b": + return player.p.unl + break + case "g": + return player.p.unl + break + case "e": + return player.b.unl && player.g.unl + break + case "t": + return player.b.unl + break + case "s": + return player.g.unl + break + case "sb": + return player.e.unl && player.t.unl && player.s.unl + break + case "sg": + return player.h.challs.includes(62) + break + case "h": + return player.t.unl && player.sb.unl + break + case "q": + return player.e.unl && player.sb.unl + break + case "hb": + return player.sb.unl && player.h.unl && player.q.unl + break + case "ss": + return player.s.unl && player.h.unl && player.q.unl + break + case "hg": + return false + break + case "m": + return player.h.unl && player.hb.unl + break + case "ba": + return player.q.unl && player.ss.unl + break + case "sp": + return player.m.unl && player.ba.unl + break + case "l": + return player.sp.unl + break + case "ps": + return player.l.unl + break + case "hs": + return player.sp.unl + break + case "i": + return player.ps.unl && player.hs.unl + break + /* + case "mb": + return player.i.unl + break + case "ge": + return player.i.unl + break + case "ma": + return player.i.unl + break + */ + } + return +} + +function layerUnl(layer) { + return LAYERS.includes(layer) && (player[layer].unl || (tmp.layerAmt[layer].gte(tmp.layerReqs[layer]) && layerShown(layer))) } function rowReset(row, layer) { - let prev = JSON.parse(JSON.stringify(player)) // Deep Copy - let start = getStartPlayer() switch(row) { case 0: player.points = new Decimal(0); break; case 1: - player.points = new Decimal(10); - player.p.points = new Decimal(0); - 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 = []; - } else if (layer=="t"||layer=="s"||layer=="sb") { - if (player[layer].best.lt(3)) player.p.upgrades = []; - } else if (layer=="e") { - if (player[layer].best.lt(10)) player.p.upgrades = []; - } else player.p.upgrades = []; - } - player.g.power = new Decimal(0); + var keepUpgrades = 0 + if (player.h.best.gte(1) || player.q.best.gte(1)) keepUpgrades = 1 + else if (LAYER_ROW[layer] == 2 && player[layer].best.gte(layer == "e" ? 10 : 3)) keepUpgrades = 1 + else if (LAYER_ROW[layer] == 1 && player[layer].best.gte(8)) keepUpgrades = 1 + + player.points = new Decimal(10) + player.p.points = new Decimal(0) + if (!keepUpgrades) player.p.upgrades = [] + player.g.power = new Decimal(0) break; 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.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.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)) { - player.b.best = new Decimal(prev.b.best) - player.g.best = new Decimal(prev.g.best) - } - } else if (player.sb.best.gte(4)&&layer=="sb") { - player.b.best = new Decimal(prev.b.best) - player.g.best = new Decimal(prev.g.best) - } - break; + var keepMilestones = 0 + if (player.h.best.gte(2) || player.q.best.gte(2)) keepMilestones = 1 + else if (LAYER_ROW[layer] == 2 && player[layer].best.gte(layer == "sb" ? 4 : 2)) keepMilestones = 1 + + var keepUpgrades = 0 + if (player.sp.total.gte(1)) keepUpgrades = 1 + + player.b.points = new Decimal(0) + if (!keepMilestones) player.b.best = new Decimal(0) + if (!keepUpgrades && !player.t.best.gte(4)) player.b.upgrades = [] + + player.g.points = new Decimal(0) + player.g.power = new Decimal(0) + if (!keepMilestones) player.g.best = new Decimal(0) + if (!keepUpgrades && !player.s.best.gte(4)) player.g.upgrades = [] + + player.t.energy = new Decimal(0) + break case 3: 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(2)&&player.m.total.lt(1)) player.t.best = new Decimal(0); 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); + if (player.h.best.lt(2)&&player.m.total.lt(1)) player.e.best = new Decimal(0); player.e.enhancers = new Decimal(0); if (player.h.best.lt(4)&&!player.sp.total.gte(1)) player.e.upgrades = []; player.s = { unl: player.s.unl, order: 0, points: new Decimal(0), - best: (player.h.best.gte(2)||player.m.best.gte(1)) ? player.s.best : new Decimal(0), + best: (player.h.best.gte(2)||player.m.total.gte(1)) ? player.s.best : 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)&&(layer=="h"||layer=="q"||layer=="ss"||layer=="hb")) ? player.s.buildings : ({ - 1: new Decimal(0), - 2: new Decimal(0), - 3: new Decimal(0), - 4: new Decimal(0), - 5: new Decimal(0) - }), + buildings: (player.q.best.gte(4)&&(layer=="h"||layer=="q"||layer=="ss"||layer=="hb")) ? player.s.buildings : ({}), upgrades: (player.h.best.gte(4)||player.sp.total.gte(1)) ? player.s.upgrades : [], auto: player.s.auto, autoBuild: player.s.autoBuild, @@ -2082,7 +2407,7 @@ function rowReset(row, layer) { auto: player.sb.auto, order: 0, points: new Decimal(0), - best: (player.h.best.gte(2)||player.m.best.gte(1)) ? player.sb.best : new Decimal(0), + best: (player.h.best.gte(2)||player.m.total.gte(1)) ? player.sb.best : new Decimal(0), upgrades: (player.h.best.gte(10)||player.sp.total.gte(1)) ? player.sb.upgrades : [], } player.sg = { @@ -2102,16 +2427,14 @@ function rowReset(row, layer) { unl: player.h.unl, time: 0, 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.sp.total.gte(1))?player.h.challs:[], - upgrades: [], + best: (player.ba.best.gte(1)||player.m.total.gte(1))?player.h.best:new Decimal(0), + challs: (player.m.total.gte(2)||player.sp.total.gte(1))?player.h.challs:[], } player.q = { unl: player.q.unl, auto: player.q.auto, points: new Decimal(0), - best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.q.best:new Decimal(0), + best: (player.ba.best.gte(1)||player.m.total.gte(1))?player.q.best:new Decimal(0), layers: new Decimal(0), energy: new Decimal(0), time: new Decimal(0), @@ -2122,7 +2445,7 @@ function rowReset(row, layer) { auto: player.hb.auto, 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), + best: (player.ba.best.gte(1)||player.m.total.gte(1))?player.hb.best:new Decimal(0), upgrades: (player.ba.best.gte(5)||player.sp.total.gte(1))?player.hb.upgrades:[], } player.ss = { @@ -2130,7 +2453,7 @@ function rowReset(row, layer) { auto: player.ss.auto, 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), + best: (player.ba.best.gte(1)||player.m.total.gte(1))?player.ss.best:new Decimal(0), subspace: new Decimal(0), upgrades: (player.ba.best.gte(5)||player.sp.total.gte(1))?player.ss.upgrades:[], } @@ -2141,7 +2464,8 @@ function rowReset(row, layer) { auto: player.m.auto, autoIns: player.m.autoIns, points: new Decimal(0), - best: player.sp.total.gte(2) ? player.m.best : new Decimal(0), + best: new Decimal(0), + total: player.sp.total.gte(2) ? player.m.total : new Decimal(0), spellTimes: { 1: 0, 2: 0, @@ -2167,45 +2491,73 @@ function rowReset(row, layer) { negativity: new Decimal(0), upgrades: player.sp.total.gte(1) ? player.ba.upgrades : [], } + player.ps = { + unl: player.ps.unl, + auto: player.ps.auto, + points: new Decimal(0), + best: player.ps.best, + upgrades: player.ps.upgrades, + } + player.l.power = new Decimal(0) break; - case 6: + case 6: + var start = getStartPlayer() player.sp = start.sp + player.l = start.l + player.hs = start.hs + player.i = start.i break; } } +function addPoints(layer, gain) { + player[layer].points = player[layer].points.add(gain).max(0) + 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.resetGain[layer].times(diff)) +} + +var prevOnReset function doReset(layer, force=false) { if (!force) { if (tmp.layerAmt[layer].lt(tmp.layerReqs[layer])) return; let gain = tmp.resetGain[layer] 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) - 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) - + addPoints(layer, canBuyMax(layer) ? gain : 1) + } else addPoints(layer, gain) + if (!player[layer].unl) { player[layer].unl = true; needCanvasUpdate = true; - + let layers = ROW_LAYERS[LAYER_ROW[layer]] for (let i in layers) if (!player[layers[i]].unl && player[layers[i]]!==undefined) player[layers[i]].order += ORDER_UP[LAYER_ROW[layer]].includes(layer)?1:0 } - + tmp.layerAmt[layer] = new Decimal(0) // quick fix } - + if ((layer=="b"&&player.t.best.gte(12))||(layer=="g"&&player.s.best.gte(12))) return; if ((layer=="t"&&player.h.best.gte(25))||(layer=="s"&&player.q.best.gte(25))||(layer=="sb"&&player.h.best.gte(2500))||(layer=="sg"&&player.sg.best.gte(1))) return; if ((layer=="hb"&&player.ba.best.gte(8))||(layer=="ss"&&player.ba.best.gte(8))) return; + if (layer=="ps"&&player.ps.best.gte(5)) return; let row = LAYER_ROW[layer] - if (row==0) rowReset(0, layer) - else for (let x=row;x>=1;x--) rowReset(x, layer) - + + var layersWithChalls = Object.keys(LAYER_CHALLS) + for (let y = 0; y < layersWithChalls.length; y++) { + var layerResetting = layersWithChalls[y] + if (row >= LAYER_ROW[layerResetting] && (!force || layerResetting != layer)) completeChall(layerResetting) + } + + prevOnReset = {...player} //Deep Copy + if (row == 0) rowReset(0, layer) + else for (let x = row; x >= 1; x--) rowReset(x, layer) + prevOnReset = undefined + updateTemp() updateTemp() } @@ -2227,6 +2579,8 @@ function buyUpg(layer, id) { if (layer=="hb"&&id==13) player.hb.order = 0; if (layer=="ss"&&id==15) player.ss.order = 0; if (layer=="m"&&id==43) for (let i=1;i<=3;i++) player.m.spellTimes[i] *= LAYER_UPGS.m[43].currently().toNumber() + if (layer=="ps"&&id==14) player.l.order = 0; + if (layer=="ps"&&id==24) player.hs.order = 0; } function getPointGen() { @@ -2237,25 +2591,31 @@ function getPointGen() { if (player.b.unl) gain = gain.times(tmp.layerEffs.b) if (player.g.unl) gain = gain.times(tmp.genPowEff) if (player.t.unl) gain = gain.times(tmp.timeEff) - if (player.s.unl && tmp.spaceBuildEff) gain = gain.times(tmp.spaceBuildEff[1]) + if (player.s.unl && tmp.s !== undefined) gain = gain.times(tmp.s.sbEff[1]) if (player.q.unl && tmp.quirkEff) gain = gain.times(tmp.quirkEff) if (player.q.upgrades.includes(11)) gain = gain.times(LAYER_UPGS.q[11].currently()) - if (tmp.hcActive ? tmp.hcActive[31] : true) gain = gain.tetrate(0.1) + if (tmp.challActive ? tmp.challActive.h[31] : true) gain = gain.tetrate(0.1) return gain } +function getScaling12Boosters() { + let x = new Decimal(1) + if (player.ps.upgrades.includes(22)) x = x.times(LAYER_UPGS.ps[22].currently()) + return x +} + function addToBoosterBase() { let toAdd = new Decimal(0) - if (player.b.upgrades.includes(12)) toAdd = toAdd.plus(LAYER_UPGS.b[12].currently()) - if (player.b.upgrades.includes(13)) toAdd = toAdd.plus(LAYER_UPGS.b[13].currently()) - if (player.t.upgrades.includes(11)&&!(tmp.hcActive?tmp.hcActive[12]:true)) toAdd = toAdd.plus(LAYER_UPGS.t[11].currently()) - if (player.t.upgrades.includes(31)&&!(tmp.hcActive?tmp.hcActive[12]:true)) toAdd = toAdd.plus(25) - if (player.t.upgrades.includes(33)&&!(tmp.hcActive?tmp.hcActive[12]:true)) toAdd = toAdd.plus(40) - if (player.e.unl) toAdd = toAdd.plus(tmp.enhEff2) - if (player.e.upgrades.includes(11)&&!(tmp.hcActive?tmp.hcActive[12]:true)) toAdd = toAdd.plus(LAYER_UPGS.e[11].currently().b) - if (player.s.unl && tmp.spaceBuildEff) toAdd = toAdd.plus(tmp.spaceBuildEff[2]) - if (player.sb.upgrades.includes(21)) toAdd = toAdd.plus(LAYER_UPGS.sb[21].currently()) + if (player.b.upgrades.includes(12)) toAdd = toAdd.add(LAYER_UPGS.b[12].currently()) + if (player.b.upgrades.includes(13)) toAdd = toAdd.add(LAYER_UPGS.b[13].currently()) + if (player.t.upgrades.includes(11)&&!(tmp.challActive?tmp.challActive.h[12]:true)) toAdd = toAdd.add(LAYER_UPGS.t[11].currently()) + if (player.t.upgrades.includes(31)&&!(tmp.challActive?tmp.challActive.h[12]:true)) toAdd = toAdd.add(25) + if (player.t.upgrades.includes(33)&&!(tmp.challActive?tmp.challActive.h[12]:true)) toAdd = toAdd.add(40) + if (player.e.unl) toAdd = toAdd.add(tmp.enhEff2) + if (player.e.upgrades.includes(11)&&!(tmp.challActive?tmp.challActive.h[12]:true)) toAdd = toAdd.add(LAYER_UPGS.e[11].currently().b) + if (player.s.unl && tmp.s !== undefined) toAdd = toAdd.add(tmp.s.sbEff[2]) + if (player.sb.upgrades.includes(21)) toAdd = toAdd.add(LAYER_UPGS.sb[21].currently()) if (player.b.upgrades.includes(31)) toAdd = toAdd.times(LAYER_UPGS.b[31].currently()) if (player.q.upgrades.includes(53)) toAdd = toAdd.times(tmp.enhEff2) @@ -2265,9 +2625,9 @@ function addToBoosterBase() { function getFreeBoosters() { let free = new Decimal(0) - if (player.t.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) free = free.plus(18) - if (player.b.upgrades.includes(32)) free = free.plus(LAYER_UPGS.b[32].currently()) - if (player.b.upgrades.includes(33)) free = free.plus(100) + if (player.t.upgrades.includes(24)&&!(tmp.challActive?tmp.challActive.h[12]:true)) free = free.add(18) + if (player.b.upgrades.includes(32)) free = free.add(LAYER_UPGS.b[32].currently()) + if (player.b.upgrades.includes(33)) free = free.add(100) return free } @@ -2280,14 +2640,14 @@ function getBoosterPower() { function addToGenBase() { let toAdd = new Decimal(0) - if (player.g.upgrades.includes(12)) toAdd = toAdd.plus(LAYER_UPGS.g[12].currently()) - if (player.g.upgrades.includes(13)) toAdd = toAdd.plus(LAYER_UPGS.g[13].currently()) - if (player.g.upgrades.includes(33)) toAdd = toAdd.plus(LAYER_UPGS.g[33].currently()) - if (player.e.unl) toAdd = toAdd.plus(tmp.enhEff2) - if (player.e.upgrades.includes(11)&&!(tmp.hcActive?tmp.hcActive[12]:true)) toAdd = toAdd.plus(LAYER_UPGS.e[11].currently().g) - if (player.s.unl && tmp.spaceBuildEff) toAdd = toAdd.plus(tmp.spaceBuildEff[2]) + if (player.g.upgrades.includes(12)) toAdd = toAdd.add(LAYER_UPGS.g[12].currently()) + if (player.g.upgrades.includes(13)) toAdd = toAdd.add(LAYER_UPGS.g[13].currently()) + if (player.g.upgrades.includes(33)) toAdd = toAdd.add(LAYER_UPGS.g[33].currently()) + if (player.e.unl) toAdd = toAdd.add(tmp.enhEff2) + if (player.e.upgrades.includes(11)&&!(tmp.challActive?tmp.challActive.h[12]:true)) toAdd = toAdd.add(LAYER_UPGS.e[11].currently().g) + if (player.s.unl && tmp.s !== undefined) toAdd = toAdd.add(tmp.s.sbEff[2]) - if (player.h.challs.includes(51)) toAdd = toAdd.times(H_CHALLS[51].currently()) + if (player.h.challs.includes(51)) toAdd = toAdd.times(LAYER_CHALLS.h[51].currently()) if (player.q.upgrades.includes(53)) toAdd = toAdd.times(tmp.enhEff2) return toAdd } @@ -2303,9 +2663,9 @@ function getGenPowerGainMult() { let mult = new Decimal(1) if (player.g.upgrades.includes(21)) mult = mult.times(LAYER_UPGS.g[21].currently()) if (player.g.upgrades.includes(25)) mult = mult.times(LAYER_UPGS.g[25].currently()) - if (player.e.upgrades.includes(35)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.e[35].currently()) - if (player.s.upgrades.includes(12)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.s[12].currently()) - if (player.s.upgrades.includes(13)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.s[13].currently()) + if (player.e.upgrades.includes(35)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.e[35].currently()) + if (player.s.upgrades.includes(12)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.s[12].currently()) + if (player.s.upgrades.includes(13)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.s[13].currently()) if (player.q.unl && tmp.quirkEff) mult = mult.times(tmp.quirkEff) if (player.g.upgrades.includes(35)) mult = mult.times(LAYER_UPGS.g[35].currently()) return mult @@ -2313,18 +2673,18 @@ function getGenPowerGainMult() { function getGenPowerEffExp() { let exp = new Decimal(1/3) - if (player.s.upgrades.includes(34)&&!(tmp.hcActive?tmp.hcActive[12]:true)) exp = exp.plus(LAYER_UPGS.s[34].currently()) + if (player.s.upgrades.includes(34)&&!(tmp.challActive?tmp.challActive.h[12]:true)) exp = exp.add(LAYER_UPGS.s[34].currently()) if (player.b.upgrades.includes(21)) exp = exp.times(2) if (player.b.upgrades.includes(22)) exp = exp.times(1.2) - if (player.e.upgrades.includes(21)&&!(tmp.hcActive?tmp.hcActive[12]:true)) exp = exp.times(1.15) + if (player.e.upgrades.includes(21)&&!(tmp.challActive?tmp.challActive.h[12]:true)) exp = exp.times(1.15) if (player.h.challs.includes(11)) exp = exp.times(1.25) if (player.h.challs.includes(42)) exp = exp.times(3) return exp; } function getGenPowerEff() { - if (tmp.hcActive ? tmp.hcActive[11] : true) return new Decimal(1) - let eff = player.g.power.plus(1).pow(getGenPowerEffExp()); + if (tmp.challActive ? tmp.challActive.h[11] : true) return new Decimal(1) + let eff = player.g.power.add(1).pow(getGenPowerEffExp()); return eff } @@ -2344,11 +2704,11 @@ function resetRow(row) { } function getEnhancerPow() { - if (tmp.hcActive ? tmp.hcActive[22] : true) return new Decimal(0); - if (tmp.hcActive ? tmp.hcActive[41] : true) return new Decimal(0); + if (tmp.challActive ? tmp.challActive.h[22] : true) return new Decimal(0); + if (tmp.challActive ? tmp.challActive.h[41] : true) return new Decimal(0); let pow = new Decimal(1) - if (player.e.upgrades.includes(25)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.e[25].currently()) - if (player.e.upgrades.includes(31)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.e[31].currently()) + if (player.e.upgrades.includes(25)&&!(tmp.challActive?tmp.challActive.h[12]:true)) pow = pow.times(LAYER_UPGS.e[25].currently()) + if (player.e.upgrades.includes(31)&&!(tmp.challActive?tmp.challActive.h[12]:true)) pow = pow.times(LAYER_UPGS.e[31].currently()) if (player.h.challs.includes(31)) pow = pow.times(2) if (player.q.upgrades.includes(42)) pow = pow.times(1.4) if (player.ba.upgrades.includes(32)) pow = pow.times(LAYER_UPGS.ba[32].currently()) @@ -2384,26 +2744,26 @@ function buyEnhancer() { let cost = getEnhancerCost() if (player.e.points.lt(cost)) return player.e.points = player.e.points.sub(cost) - player.e.enhancers = player.e.enhancers.plus(1) + player.e.enhancers = player.e.enhancers.add(1) } function maxEnhancers() { let target = player.e.points.max(1).log(2).root(1.5) if (target.gte(25)) target = target.times(25).sqrt() - target = target.plus(1).floor() + target = target.add(1).floor() if (target.lte(player.e.enhancers)) return player.e.enhancers = player.e.enhancers.max(target) } function getFreeExtCapsules() { let amt = new Decimal(0) - if (player.t.upgrades.includes(12)&&!(tmp.hcActive?tmp.hcActive[12]:true)) amt = amt.plus(1) - if (player.h.unl) amt = amt.plus(tmp.layerEffs.h) + if (player.t.upgrades.includes(12)&&!(tmp.challActive?tmp.challActive.h[12]:true)) amt = amt.add(1) + if (player.h.unl) amt = amt.add(tmp.layerEffs.h) return amt } function getCapPow() { - if (tmp.hcActive ? tmp.hcActive[41] : true) return new Decimal(0) + if (tmp.challActive ? tmp.challActive.h[41] : true) return new Decimal(0) let pow = new Decimal(1) if (player.q.upgrades.includes(33)) pow = pow.times(LAYER_UPGS.q[33].currently()) if (spellActive(2)) pow = pow.times(tmp.spellEffs[2]) @@ -2411,7 +2771,7 @@ function getCapPow() { } function getFreeExtPow() { - if (tmp.hcActive ? tmp.hcActive[22] : true) return new Decimal(0) + if (tmp.challActive ? tmp.challActive.h[22] : true) return new Decimal(0) let pow = new Decimal(1) return pow } @@ -2419,29 +2779,29 @@ function getFreeExtPow() { function getTimeEnergyEff() { if (!player.t.unl) return new Decimal(1) let exp = 1.2 - if (player.t.upgrades.includes(21)&&!(tmp.hcActive?tmp.hcActive[12]:true)) exp = 1.75 - let eff = player.t.energy.plus(1).pow(exp) + if (player.t.upgrades.includes(21)&&!(tmp.challActive?tmp.challActive.h[12]:true)) exp = 1.75 + let eff = player.t.energy.add(1).pow(exp) return eff; } function getTimeEnergyGainMult() { if (!player.t.unl) return new Decimal(1) let mult = new Decimal(1); - if (player.t.upgrades.includes(21)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[21].currently()) - if (player.t.upgrades.includes(22)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[22].currently()) - if (player.t.upgrades.includes(23)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[23].currently()) - if (player.t.upgrades.includes(34)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[34].currently()) + if (player.t.upgrades.includes(21)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[21].currently()) + if (player.t.upgrades.includes(22)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[22].currently()) + if (player.t.upgrades.includes(23)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[23].currently()) + if (player.t.upgrades.includes(34)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[34].currently()) return mult; } function getTimeEnergyLimitMult() { if (!player.t.unl) return new Decimal(1) let mult = new Decimal(1); - if (player.t.upgrades.includes(12)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[12].currently()) - if (player.t.upgrades.includes(21)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[21].currently()) - if (player.t.upgrades.includes(22)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[22].currently()) - if (player.t.upgrades.includes(23)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[23].currently()) - if (player.t.upgrades.includes(34)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mult = mult.times(LAYER_UPGS.t[34].currently()) + if (player.t.upgrades.includes(12)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[12].currently()) + if (player.t.upgrades.includes(21)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[21].currently()) + if (player.t.upgrades.includes(22)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[22].currently()) + if (player.t.upgrades.includes(23)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[23].currently()) + if (player.t.upgrades.includes(34)&&!(tmp.challActive?tmp.challActive.h[12]:true)) mult = mult.times(LAYER_UPGS.t[34].currently()) if (player.q.upgrades.includes(23)) mult = mult.times(1e10) if (player.q.upgrades.includes(24)) mult = mult.times(LAYER_UPGS.q[24].currently()) if (player.m.upgrades.includes(23)) mult = mult.times("1e500") @@ -2451,7 +2811,7 @@ function getTimeEnergyLimitMult() { function getExtCapsuleCost() { let amt = player.t.extCapsules if (amt.gte(25) && !player.ba.upgrades.includes(43)) amt = amt.pow(2).div(25) - let cost = amt.times(0.4).pow(1.2).plus(1).times(10) + let cost = amt.times(0.4).pow(1.2).add(1).times(10) return cost.floor() } @@ -2460,36 +2820,147 @@ function buyExtCapsule() { let cost = getExtCapsuleCost() if (player.b.points.lt(cost)) return player.b.points = player.b.points.sub(cost) - player.t.extCapsules = player.t.extCapsules.plus(1) + player.t.extCapsules = player.t.extCapsules.add(1) } function maxExtTimeCapsules() { - let target = player.b.points.plus(1).div(10).sub(1).root(1.2).div(0.4) + let target = player.b.points.add(1).div(10).sub(1).root(1.2).div(0.4) if (target.gte(25)&&!player.ba.upgrades.includes(43)) target = target.times(25).sqrt() - target = target.plus(1).floor().max(0) + target = target.add(1).floor().max(0) player.t.extCapsules = player.t.extCapsules.max(target) } function addToTimeBase() { let toAdd = new Decimal(0) - if (player.m.upgrades.includes(44)) toAdd = toAdd.plus(LAYER_UPGS.m[44].currently()) + if (player.m.upgrades.includes(44)) toAdd = toAdd.add(LAYER_UPGS.m[44].currently()) return toAdd } +function multiplyToTimeBase() { + let x = new Decimal(1) + if (player.l.unl && tmp.l !== undefined) x = x.times(tmp.l.lbEff[3]) + return x +} + function getSpace() { let baseSpace = player.s.best.pow(1.1).times(3).floor() - if (player.s.upgrades.includes(13)&&!(tmp.hcActive?tmp.hcActive[12]:true)) baseSpace = baseSpace.plus(2); - if (player.s.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) baseSpace = baseSpace.plus(3); - if (player.ss.unl) baseSpace = baseSpace.plus(tmp.ssEff1) - if (player.ss.upgrades.includes(11)) baseSpace = baseSpace.plus(LAYER_UPGS.ss[11].currently()) + if (player.s.upgrades.includes(13)&&!(tmp.challActive?tmp.challActive.h[12]:true)) baseSpace = baseSpace.add(2); + if (player.s.upgrades.includes(24)&&!(tmp.challActive?tmp.challActive.h[12]:true)) baseSpace = baseSpace.add(3); + if (player.ss.unl) baseSpace = baseSpace.add(tmp.ssEff1) + if (player.ss.upgrades.includes(11)) baseSpace = baseSpace.add(LAYER_UPGS.ss[11].currently()) return baseSpace.sub(player.s.spent).max(0) } +let SPACE_BUILDINGS = { + max: 10, + 1: { + cost: new Decimal(1e3), + eff(x) { + let ret = Decimal.pow(Decimal.add(1, x.pow((player.s.upgrades.includes(31)&&!(tmp.challActive?tmp.challActive.h[12]:true))?2.75:1)), player.s.points.sqrt()).times(Decimal.mul(4, x.pow((player.s.upgrades.includes(31)&&!(tmp.challActive?tmp.challActive.h[12]:true))?2.75:1))).max(1) + if (player.ba.upgrades.includes(42)) ret = ret.pow(LAYER_UPGS.ba[42].currently()) + return ret + }, + effDesc(x) { + return "Space Energy boosts Point gain & Prestige Point gain ("+format(x)+"x)" + } + }, + 2: { + cost: new Decimal(1e10), + eff(x) { + if (player.s.upgrades.includes(43)) { + x = Decimal.pow(1.0001, x).times(x.sqrt()) + if (x.gte("e600")) x = Decimal.pow(10, x.log10().times(600).sqrt()) + return x + } else return x.sqrt() + }, + effDesc(x) { + return "Adds to base of Booster/Generator effects by "+format(x) + } + }, + 3: { + cost: new Decimal(1e25), + eff(x) { + x = Decimal.pow(1e18, x.pow(0.9)) + if (x.gte("e3e9")) x = Decimal.pow(10, x.log10().times(9e18).cbrt()) + return x + }, + effDesc(x) { + return "Makes Boosters/Generators cheaper by "+format(x)+"x" + } + }, + 4: { + cost: new Decimal(1e48), + eff(x) { + let ret = x.add(1).pow(1.25) + if (ret.gte(1e6)) ret = ret.log10().times(1e6/6) + return ret; + }, + effDesc(x) { + return "Booster Upgrade 6's effect is raised to the power of "+format(x) + } + }, + 5: { + cost: new Decimal(1e100), + eff(x) { + return x.sqrt().times(2) + }, + effDesc(x) { + return "Add "+format(x)+" free levels to all previous Space Buildings" + } + }, + 6: { + cost: new Decimal("e6000000"), + eff(x) { + return x.div(1e3).add(1).sqrt() + }, + effDesc(x) { + return "You produce Life Power " + format(x) + "x faster" + } + }, + 7: { + cost: new Decimal("e6500000"), + eff(x) { + return Decimal.pow(1.05, x) + }, + effDesc(x) { + return "Reduce the requirement of Phantom Souls by " + format(x) + "x" + } + }, + 8: { + cost: new Decimal("e7000000"), + eff(x) { + return x.sqrt().div(100) + }, + effDesc(x) { + return "Gain " + format(x) + " free extra Quirk layers" + } + }, + 9: { + cost: new Decimal("e8000000"), + eff(x) { + return x.max(1).log10().div(3).max(1).cbrt() + }, + effDesc(x) { + return "Reduce the cost scaling of Hyperspace by " + format(Decimal.sub(1, x.recip()).times(100)) + "%" + } + }, + 10: { + cost: new Decimal("e9500000"), + eff(x) { + return x.max(1).log10().div(5).max(1) + }, + effDesc(x) { + return "Super-Upgrades are " + format(x.sub(1).times(100)) + "% stronger" + } + }, +} + 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(24)&&!(tmp.challActive?tmp.challActive.h[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))) + if (player.ba.upgrades.includes(15)) mod = mod.div(LAYER_UPGS.ba[15].currently()) return mod; } @@ -2501,163 +2972,141 @@ function getSpaceBuildingCostMult() { } function getSpaceBuildingCost(x) { - let inputVal = new Decimal([1e3,1e10,1e25,1e48,1e100][x-1]) - let bought = player.s.buildings[x] + let inputVal = SPACE_BUILDINGS[x].cost + let bought = tmp.s.sb[x] if (bought.gte(100)) bought = bought.pow(2).div(100) - let cost = Decimal.pow(inputVal, bought.times(getSpaceBuildingCostMod()).pow(1.35)).times(inputVal).times((bought.gt(0)||x>1)?1:0).times(getSpaceBuildingCostMult()) + let cost = Decimal.pow(inputVal, bought.times(tmp.s.sbCostMod).pow(1.35)).times(inputVal).times((bought.gt(0)||x>1)?1:0).times(tmp.s.sbCostMult) return cost } function getSpaceBuildingTarg(x) { - let inputVal = new Decimal([1e3,1e10,1e25,1e48,1e100][x-1]) - let target = player.g.power.div(getSpaceBuildingCostMult()).div(inputVal).max(1).log(inputVal).pow(1/1.35).div(getSpaceBuildingCostMod()) + let inputVal = SPACE_BUILDINGS[x].cost + let target = player.g.power.div(tmp.s.sbCostMult).div(inputVal).max(1).log(inputVal).pow(1/1.35).div(tmp.s.sbCostMod) if (target.gte(100)) target = target.times(100).sqrt() - return target.plus(1).floor() + return target.add(1).floor() } function getSpaceBuildingPow() { if (!player.s.unl) return new Decimal(0) - if (tmp.hcActive ? tmp.hcActive[22] : true) return new Decimal(0) - if (tmp.hcActive ? tmp.hcActive[41] : true) return new Decimal(0) + if (tmp.challActive ? tmp.challActive.h[22] : true) return new Decimal(0) + if (tmp.challActive ? tmp.challActive.h[41] : true) return new Decimal(0) let pow = new Decimal(1) - if (player.s.upgrades.includes(21)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.s[21].currently()) - if (player.s.upgrades.includes(22)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.s[22].currently()) - if (player.s.upgrades.includes(23)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(LAYER_UPGS.s[23].currently()) - if (player.s.upgrades.includes(44)&&!(tmp.hcActive?tmp.hcActive[12]:true)) pow = pow.times(1.25) + if (player.s.upgrades.includes(21)&&!(tmp.challActive?tmp.challActive.h[12]:true)) pow = pow.times(LAYER_UPGS.s[21].currently()) + if (player.s.upgrades.includes(22)&&!(tmp.challActive?tmp.challActive.h[12]:true)) pow = pow.times(LAYER_UPGS.s[22].currently()) + if (player.s.upgrades.includes(23)&&!(tmp.challActive?tmp.challActive.h[12]:true)) pow = pow.times(LAYER_UPGS.s[23].currently()) + if (player.s.upgrades.includes(44)&&!(tmp.challActive?tmp.challActive.h[12]:true)) pow = pow.times(1.25) if (player.q.upgrades.includes(41)) pow = pow.times(1.4) if (player.ss.unl) pow = pow.times(tmp.ssEff3) if (player.ba.upgrades.includes(44)) pow = pow.times(1.5) return pow } -function getExtraBuildingLevels(x) { +function getExtraBuildingLevels() { let lvl = new Decimal(0) - if (player.s.upgrades.includes(11)&&!(tmp.hcActive?tmp.hcActive[12]:true)) lvl = lvl.plus(1); - if (player.s.upgrades.includes(14)&&!(tmp.hcActive?tmp.hcActive[12]:true)) lvl = lvl.plus(1); - if (player.q.upgrades.includes(31)) lvl = lvl.plus(1); - if (x<5) lvl = lvl.plus(tmp.spaceBuildEff[5]) - if (player.m.upgrades.includes(32)) lvl = lvl.plus(LAYER_UPGS.m[32].currently()) + if (player.s.upgrades.includes(11)&&!(tmp.challActive?tmp.challActive.h[12]:true)) lvl = lvl.add(1); + if (player.s.upgrades.includes(14)&&!(tmp.challActive?tmp.challActive.h[12]:true)) lvl = lvl.add(1); + if (player.q.upgrades.includes(31)) lvl = lvl.add(1); + if (player.m.upgrades.includes(32)) lvl = lvl.add(LAYER_UPGS.m[32].currently()) return lvl } function getSpaceBuildingEff(x) { - let bought = player.s.buildings[x].plus(getExtraBuildingLevels(x)); - if (!player.s.unl) bought = new Decimal(0); - if (tmp.sbUnl= 5) bought = bought.add(tmp.s.sbEff[5]) + + var compressLvl = new Decimal(1) + if (tmp.i !== undefined && layerUnl("i") && tmp.i.compressed >= x) compressLvl = tmp.s.sbUnl.sub(x - SPACE_BUILDINGS.max - 1).div(SPACE_BUILDINGS.max).ceil().cbrt() + + bought = bought.times(tmp.s.sbPow).times(compressLvl) + if (tmp.hs !== undefined && layerUnl("hs")) { + tmp.hs.suEff[x] = HYPERSPACE.effs[x](bought, fixValue(tmp.hs.su[x]).times(tmp.hs.eff).times(compressLvl)) + bought = bought.times(tmp.hs.suEff[x]) + } } + return SPACE_BUILDINGS[x].eff(bought) } function getSpaceBuildingEffDesc(x) { - let eff = tmp.spaceBuildEff[x] - switch(x) { - case 1: - return "Space Energy boosts Point gain & Prestige Point gain ("+format(eff)+"x)" - break; - case 2: - return "Adds to base of Booster/Generator effects by "+format(eff) - break; - case 3: - return "Makes Boosters/Generators cheaper by "+format(eff)+"x" - break; - case 4: - return "Booster Upgrade 6's effect is raised to the power of "+format(eff) - break; - case 5: - return "Add "+format(eff)+" free levels to all previous Space Buildings." - break; - } + let eff = tmp.s.sbEff[x] + return SPACE_BUILDINGS[x].effDesc(eff) } function buyBuilding(x) { if (!player.s.unl) return - if (tmp.sbUnl= 8) layers = layers.add(tmp.s.sbEff[8]) return layers; } function getQuirkEnergyGainExp() { let mult = new Decimal(1) if (spellActive(3)) mult = mult.times(tmp.spellEffs[3]) - return player.q.layers.plus(getExtraQuirkLayers()).sub(1).times(mult) + return player.q.layers.add(getExtraQuirkLayers()).sub(1).times(mult) } function getQuirkEnergyEff() { - let eff = player.q.energy.plus(1).pow(2) + let eff = player.q.energy.add(1).pow(2) if (player.q.upgrades.includes(12)) { - let mod = player.q.energy.plus(1).log10().plus(1).log10().plus(1) + let mod = player.q.energy.add(1).log10().add(1).log10().add(1) if (mod.gte(2)) { eff = eff.times(mod.div(2).pow(10)) mod = new Decimal(2) @@ -2727,7 +3179,7 @@ function buyQuirkLayer() { let cost = getQuirkLayerCost() if (player.q.points.lt(cost)) return player.q.points = player.q.points.sub(cost) - player.q.layers = player.q.layers.plus(1) + player.q.layers = player.q.layers.add(1) } function maxQuirkLayers() { @@ -2740,148 +3192,170 @@ function maxQuirkLayers() { player.q.layers = player.q.layers.max(target) } -const H_CHALLS = { - rows: 7, - cols: 2, - 11: { - name: "Skip the Second", - desc: "Boosters and Generator Power do nothing", - unl: function() { return player.h.best.gt(0) }, - goal: new Decimal("1e2400"), - reward: "The generator power effect is raised to the power of 1.25", - }, - 12: { - name: "Anti-Upgrades", - desc: "Row 3 Upgrades do nothing", - unl: function() { return player.h.challs.includes(11) }, - goal: new Decimal("1e840"), - reward: "Quirk gain is boosted by your Quirk Layers", - currently: function() { return Decimal.pow(1.5, player.q.layers.times(player.sp.upgrades.includes(22)?250:1)) }, - effDisp: function(x) { return format(x)+"x" }, - }, - 21: { - name: "Prestigeless", - desc: "Prestige Point gain is raised to the power of 0.01", - unl: function() { return player.h.challs.includes(12) }, - goal: new Decimal("1e1200"), - reward: "Hindrance Spirit & Quirks make Time Capsules & Space Energy cheaper.", - currently: function() { return player.h.points.plus(player.q.points).div(2).plus(1).pow(1000).pow(player.sp.upgrades.includes(22)?250:1) }, - effDisp: function(x) { return format(x)+"x cheaper" }, - }, - 22: { - name: "Impaired Nodes", - desc: "Enhancers, Extra Time Capsules, and Space Buildings do nothing.", - unl: function() { return player.h.challs.includes(12) }, - goal: new Decimal("1e4600"), - reward: "Add 0.25 to the Super-Booster base.", - }, - 31: { - name: "Flattened Curve", - desc: "Point generation is tetrated by 0.1", - unl: function() { return player.h.challs.includes(21)||player.h.challs.includes(22) }, - goal: new Decimal(1e208), - reward: "Enhancers are twice as strong.", - }, - 32: { - name: "Surprise Junction", - desc: "Prestige Upgrade 2 does nothing", - unl: function() { return player.h.challs.includes(21)&&player.h.challs.includes(22) }, - goal: new Decimal("1e2580"), - reward: "Unlock 2 new Super-Booster Upgrades and 7 new Quirk Upgrades.", - }, - 41: { - name: "Skip the Third", - desc: "Enhancers, Time Capsules, Space Buildings, and Super-Boosters do nothing.", - unl: function() { return player.h.challs.includes(31)||player.h.challs.includes(32) }, - goal: new Decimal("4.444e4444"), - reward: "Add 0.25 to the Super-Booster base.", - }, - 42: { - name: "Slowed to a Halt", - desc: "Time slows down over time, halting to a stop after 10 seconds. Hint: This also impacts auto Enhance Point generation, so make sure to manually press E!", - unl: function() { return player.h.challs.includes(31)&&player.h.challs.includes(32) }, - goal: new Decimal("1e16500"), - reward: "Cube the Generator Power effect.", - }, - 51: { - name: "It's all Gone", - desc: '"Skip the Second" and "Skip the Third" are both applied at once.', - unl: function() { return player.h.challs.includes(41)&&player.h.challs.includes(42) }, - goal: new Decimal("1e2840"), - reward: "Super-Boosters multiply the Generator base.", - currently: function() { return player.sb.points.plus(1).sqrt() }, - effDisp: function(x) { return format(x)+"x" }, - }, - 52: { - name: "Anti-Enhancers", - desc: "You lose Enhancers over time, which can make your Enhancer amount get below 0. Hint: Maybe it's best to not have any Time Capsules or Space Energy?", - unl: function() { return player.h.challs.includes(41)&&player.h.challs.includes(42)&&player.h.challs.includes(51) }, - goal: new Decimal("1e440000"), - reward: "Quirk Layers are faster based on your Hindrance Spirit & Quirks.", - currently: function() { - let h = player.h.points.times(player.q.points).sqrt(); - if (h.gte(1e150)) h = h.log10().pow(50).times(1e150/Math.pow(150, 50)).min(h) - if (h.gte(1e100)) h = h.times(1e100).sqrt() - let ret = h.plus(1).pow(0.04); - return ret; +const LAYER_CHALLS = { + h: { + rows: 7, + cols: 2, + active(x) { + if (x<71&&x!=42&&x!=52) if (this.active(71)) return true + if (x==11||x==41) if (this.active(51)) return true + if (x==31||x==32) if (this.active(61)) return true + return player.h.active==x; }, - effDisp: function(x) { return format(x)+"x" }, - }, - 61: { - name: "Microanalysis", - desc: '"Flattened Curve" and "Surprised Junction" are both applied at once.', - unl: function() { return player.m.upgrades.includes(12) }, - goal: new Decimal("1e12300"), - reward: "Hindrance Spirit & Quirk Energy are 20% stronger.", - }, - 62: { - name: "Truly Prestigeless", - desc: "You cannot gain Prestige Points.", - unl: function() { return player.m.upgrades.includes(12) }, - goal: new Decimal("1e134000"), - reward: "Unlock Super-Generators.", - }, - 71: { - name: "The Final Stockade", - desc: 'All previous Hindrances (except "Slowed to a Halt" and "Anti-Enhancers") are applied at once.', - unl: function() { return player.m.upgrades.includes(31) }, - goal: new Decimal("1e1150"), - reward: "Gain more Hindrance Spirit based on your Quirk Energy.", - currently: function() { - let ret = player.q.energy.plus(1).sqrt() - if (ret.gte("1.8e308")) ret = ret.sqrt().times(Decimal.sqrt("1.8e308")) - return ret; + 11: { + name: "Skip the Second", + desc: "Boosters and Generator Power do nothing", + unl() { return player.h.best.gt(0) }, + goal: new Decimal("1e2400"), + reward: "The generator power effect is raised to the power of 1.25", + }, + 12: { + name: "Anti-Upgrades", + desc: "Row 3 Upgrades do nothing", + unl() { return player.h.challs.includes(11) }, + goal: new Decimal("1e840"), + reward: "Quirk gain is boosted by your Quirk Layers", + currently() { return Decimal.pow(1.5, player.q.layers.times(player.sp.upgrades.includes(22)?250:1)) }, + effDisp(x) { return format(x)+"x" }, + }, + 21: { + name: "Prestigeless", + desc: "Prestige Point gain is raised to the power of 0.01", + unl() { return player.h.challs.includes(12) }, + goal: new Decimal("1e1200"), + reward: "Hindrance Spirit & Quirks make Time Capsules & Space Energy cheaper.", + currently() { return player.h.points.add(player.q.points).div(2).add(1).pow(1000).pow(player.sp.upgrades.includes(22)?250:1) }, + effDisp(x) { return format(x)+"x cheaper" }, + }, + 22: { + name: "Impaired Nodes", + desc: "Enhancers, Extra Time Capsules, and Space Buildings do nothing.", + unl() { return player.h.challs.includes(12) }, + goal: new Decimal("1e4600"), + reward: "Add 0.25 to the Super-Booster base.", + }, + 31: { + name: "Flattened Curve", + desc: "Point generation is tetrated by 0.1", + unl() { return player.h.challs.includes(21)||player.h.challs.includes(22) }, + goal: new Decimal(1e208), + reward: "Enhancers are twice as strong.", + }, + 32: { + name: "Surprise Junction", + desc: "Prestige Upgrade 2 does nothing", + unl() { return player.h.challs.includes(21)&&player.h.challs.includes(22) }, + goal: new Decimal("1e2580"), + reward: "Unlock 2 new Super-Booster Upgrades and 7 new Quirk Upgrades.", + }, + 41: { + name: "Skip the Third", + desc: "Enhancers, Time Capsules, Space Buildings, and Super-Boosters do nothing.", + unl() { return player.h.challs.includes(31)||player.h.challs.includes(32) }, + goal: new Decimal("4.444e4444"), + reward: "Add 0.25 to the Super-Booster base.", + }, + 42: { + name: "Slowed to a Halt", + desc: "Time slows down over time, halting to a stop after 10 seconds. Hint: This also impacts auto Enhance Point generation, so make sure to manually press E!", + unl() { return player.h.challs.includes(31)&&player.h.challs.includes(32) }, + goal: new Decimal("1e16500"), + reward: "Cube the Generator Power effect.", + }, + 51: { + name: "It's all Gone", + desc: '"Skip the Second" and "Skip the Third" are both applied at once.', + unl() { return player.h.challs.includes(41)&&player.h.challs.includes(42) }, + goal: new Decimal("1e2840"), + reward: "Super-Boosters multiply the Generator base.", + currently() { return player.sb.points.add(1).sqrt() }, + effDisp(x) { return format(x)+"x" }, + }, + 52: { + name: "Anti-Enhancers", + desc: "You lose Enhancers over time, which can make your Enhancer amount get below 0. Hint: Maybe it's best to not have any Time Capsules or Space Energy?", + unl() { return player.h.challs.includes(41)&&player.h.challs.includes(42)&&player.h.challs.includes(51) }, + goal: new Decimal("1e440000"), + reward: "Quirk Layers are faster based on your Hindrance Spirit & Quirks.", + currently() { + let h = player.h.points.times(player.q.points).sqrt(); + if (h.gte(1e150)) h = h.log10().pow(50).times(1e150/Math.pow(150, 50)).min(h) + if (h.gte(1e100)) h = h.times(1e100).sqrt() + let ret = h.add(1).pow(0.04); + return ret; + }, + effDisp(x) { return format(x)+"x" }, + }, + 61: { + name: "Microanalysis", + desc: '"Flattened Curve" and "Surprised Junction" are both applied at once.', + unl() { return player.m.upgrades.includes(12) }, + goal: new Decimal("1e12300"), + reward: "Hindrance Spirit & Quirk Energy are 20% stronger.", + }, + 62: { + name: "Truly Prestigeless", + desc: "You cannot gain Prestige Points.", + unl() { return player.m.upgrades.includes(12) }, + goal: new Decimal("1e134000"), + reward: "Unlock Super-Generators.", + }, + 71: { + name: "The Final Stockade", + desc: 'All previous Hindrances (except "Slowed to a Halt" and "Anti-Enhancers") are applied at once.', + unl() { return player.m.upgrades.includes(31) }, + goal: new Decimal("1e1150"), + reward: "Gain more Hindrance Spirit based on your Quirk Energy.", + currently() { + let ret = player.q.energy.add(1).sqrt() + if (ret.gte("1.8e308")) ret = ret.sqrt().times(Decimal.sqrt("1.8e308")) + return ret; + }, + effDisp(x) { return format(x)+"x" }, + }, + 72: { + name: "You shouldn't be seeing this", + desc: "Never gonna give you up, never gonna let you down, never gonna run around and dessert you", + unl() { return false }, + goal: new Decimal(1/0), + reward: "???", }, - effDisp: function(x) { return format(x)+"x" }, }, - 72: { - name: "You shouldn't be seeing this", - desc: "Never gonna give you up, never gonna let you down, never gonna run around and dessert you", - unl: function() { return false }, - goal: new Decimal(1/0), - reward: "???", + test: { + rows: 1, + cols: 1, + 11: { + name: "You shouldn't be seeing this", + desc: "Never gonna give you up, never gonna let you down, never gonna run around and dessert you", + unl() { return true }, + goal: new Decimal(0), + reward: "???", + }, }, } -function HCActive(x) { - if (x<71&&x!=42&&x!=52) if (HCActive(71)) return true - if (x==11||x==41) if (HCActive(51)) return true - if (x==31||x==32) if (HCActive(61)) return true - return player.h.active==x; -} - -function startHindrance(x) { - if (!player.h.unl) return - if (player.h.active==x) { - if (player.points.gte(H_CHALLS[x].goal) && !player.h.challs.includes(x)) { - if (x==62) needCanvasUpdate = true; - player.h.challs.push(x); - } - player.h.active = 0 +function startChall(layer, x) { + if (!player[layer].unl) return + if (player[layer].active == x) { + completeChall(layer, x) + delete player[layer].active } else { - player.h.active = x + player[layer].active = x } - doReset("h", true) + doReset(layer, true) + updateChallTemp(layer) +} + +function completeChall(layer, x) { + var x = player[layer].active + if (!x) return + if (!player.points.gte(LAYER_CHALLS[layer][x].goal)) return + if (!player[layer].challs.includes(x)) { + if (layer == "h" && x == 62) needCanvasUpdate = true + player[layer].challs.push(x); + } + delete player[layer].active + updateChallTemp(layer) } function adjustMSDisp() { @@ -2909,21 +3383,24 @@ function milestoneShown(complete, auto=false) { function getSubspaceEff1() { if (!player.ss.unl) return new Decimal(0) - let eff = player.ss.subspace.times(player.ss.points).plus(1).log10().times(100) + let eff = player.ss.subspace.times(player.ss.points).add(1).log10().times(100) + if (player.sp.upgrades.includes(35)) eff = eff.times(LAYER_UPGS.sp[35].currently()) return eff.floor(); } function getSubspaceEff2() { if (!player.ss.unl) return new Decimal(1) - let eff = player.ss.subspace.plus(1).pow(750) + let eff = player.ss.subspace.add(1).pow(750) + if (player.sp.upgrades.includes(35)) eff = eff.pow(LAYER_UPGS.sp[35].currently()) return eff; } function getSubspaceEff3() { if (!player.ss.unl) return new Decimal(1) - let eff = player.ss.subspace.plus(1).log10().plus(1).log10().div(2.5).plus(1) + let eff = player.ss.subspace.add(1).log10().add(1).log10().div(2.5).add(1) if (player.ss.upgrades.includes(13)) eff = eff.times(1.5) - if (eff.gte(2)) eff = eff.log2().plus(1) + if (player.sp.upgrades.includes(35)) eff = eff.times(LAYER_UPGS.sp[35].currently()) + if (eff.gte(2)) eff = eff.log2().add(1) return eff; } @@ -2939,8 +3416,8 @@ function getSubspaceGainMult() { function addToHBBase() { let toAdd = new Decimal(0) - if (player.m.upgrades.includes(13)) toAdd = toAdd.plus(LAYER_UPGS.m[13].currently()) - if (player.m.upgrades.includes(33)) toAdd = toAdd.plus(LAYER_UPGS.m[33].currently()) + if (player.m.upgrades.includes(13)) toAdd = toAdd.add(LAYER_UPGS.m[13].currently()) + if (player.m.upgrades.includes(33)) toAdd = toAdd.add(LAYER_UPGS.m[33].currently()) return toAdd } @@ -2950,6 +3427,12 @@ function getHyperBoosterExp() { return exp } +function getExtraHyperBoosters() { + let x = new Decimal(0) + if (player.l.unl && tmp.l !== undefined) x = x.add(tmp.l.lbEff[1]) + return x +} + function getHyperBoosterPow() { let pow = new Decimal(1) if (player.hb.upgrades.includes(12)) pow = pow.times(LAYER_UPGS.hb[12].currently()) @@ -2957,16 +3440,16 @@ function getHyperBoosterPow() { } function getBalancePowerEff() { - let eff = player.ba.power.plus(1).sqrt() - if (player.ba.upgrades.includes(14)) eff = eff.pow(5) + let eff = player.ba.power.times(2).add(1).pow(2/3) + if (player.ba.upgrades.includes(14)) eff = eff.pow(3.85) if (player.ba.upgrades.includes(33)) eff = eff.pow(2) 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 mod = player.ba.positivity.add(1).log10().add(1).div(player.ba.negativity.add(1).log10().add(1)).log10().abs().add(1).pow(-1) + let pos = player.ba.positivity.add(1).log10().add(1) + let neg = player.ba.negativity.add(1).log10().add(1) if (player.ba.upgrades.includes(34)) mod = mod.times(1.5) if (player.ba.upgrades.includes(53)) mod = mod.times(LAYER_UPGS.ba[53].currently()) let eff = pos.times(neg).pow(mod) @@ -2997,6 +3480,8 @@ function getBalPowGainMult() { return mult; } +const MAX_SPELLS = 4 + const SPELL_NAMES = { 1: "Booster Launch", 2: "Time Warp", @@ -3025,9 +3510,10 @@ function getSpellPower(x) { if (player.m.upgrades.includes(22) && (x==2)) power = power.times(10) if (player.m.upgrades.includes(41)) { let casted = player.m.casted[x] - power = power.times(casted.max(1).log10().plus(1).log10().div(5).plus(1)) + power = power.times(casted.max(1).log10().add(1).log10().div(5).add(1)) } if (player.sp.upgrades.includes(23)) power = power.times(LAYER_UPGS.sp[23].currently()) + if (player.ps.upgrades.includes(13)) power = power.times(LAYER_UPGS.ps[13].currently()) if (power.gte(50)) power = power.log10().times(50/Math.log10(50)).min(power) return power.max(1); @@ -3037,7 +3523,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))) + if (x==4) eff = Decimal.sub(2, Decimal.div(base, power.log2().add(1))) return eff } @@ -3048,8 +3534,8 @@ function getSpellDesc(x) { } function getSpellTime() { - let time = 20 - if (player.m.best.gte(2.5e9)) time *= 10 + let time = 60 + if (player.m.total.gte(2.5e9)) time *= 4 if (player.m.upgrades.includes(43)) time *= LAYER_UPGS.m[43].currently().toNumber() return time } @@ -3072,18 +3558,19 @@ function activateSpell(x, force=false) { 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()) + if (!force) player.m.hexes = player.m.hexes.add(getHexGain()) } 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()) + if (player.l.unl && tmp.l !== undefined) gain = gain.times(tmp.l.lbEff[2]) return gain.floor() } function getHexEff() { - let eff = player.m.hexes.plus(1).pow(5) + let eff = player.m.hexes.times(2).max(1).pow(5) return eff; } @@ -3112,8 +3599,7 @@ function updateToCast(id) { function getSGenPowEff() { if (!player.sg.unl) return new Decimal(1) - if (!player.h.challs.includes(62)) return new Decimal(1) - let eff = player.sg.power.plus(1).pow(3) + let eff = player.sg.power.add(1).pow(3) return eff } @@ -3125,73 +3611,368 @@ function getSuperGenPowerGainMult() { function addToSGBase() { let toAdd = new Decimal(0) - if (player.ba.upgrades.includes(23)) toAdd = toAdd.plus(LAYER_UPGS.ba[23].currently()) - if (player.sp.upgrades.includes(21)) toAdd = toAdd.plus(LAYER_UPGS.sp[21].currently()) + if (player.ba.upgrades.includes(23)) toAdd = toAdd.add(LAYER_UPGS.ba[23].currently()) + if (player.sp.upgrades.includes(21)) toAdd = toAdd.add(LAYER_UPGS.sp[21].currently()) return toAdd } -function keepGoing() { - player.keepGoing = true; - player.tab = "tree" - needCanvasUpdate = true; +function getLifePowerMult() { + let x = tmp.layerEffs.ps.mult.div(30) + if (player.sp.upgrades.includes(42)) x = x.times(LAYER_UPGS.sp[42].currently()) + if (tmp.s !== undefined && tmp.s.trueSbUnl >= 6) x = x.times(tmp.s.sbEff[6]) + return x } -const ENDGAME = new Decimal("1e40000000"); +function getLifePowerExp() { + let x = tmp.layerEffs.ps.exp + return x +} + +function getLifePowerSoftcapStart() { + let x = tmp.layerEffs.l + return x +} + +function getLifePowerSoftcapExp() { + let x = 1/3 + return x +} + +let LIFE_BOOSTERS = { + max: 5, + unl() { + if (player.ps.upgrades.includes(21)) return 5 + return 4 + }, + calcNewPower(diff) { + if (!player.l.unl) return new Decimal(0) + + let exp = getLifePowerExp() + let cap = getLifePowerSoftcapStart() + let capExp = getLifePowerSoftcapExp() + + let power = player.l.power + if (power.gt(1)) power = power.root(exp) + if (power.gt(cap)) power = power.div(cap).pow(1/capExp).times(cap) + power = power.add(getLifePowerMult().times(diff)) + if (power.gt(cap)) power = power.div(cap).pow(capExp).times(cap) + if (power.gt(1)) power = power.pow(exp) + + return power + }, + eff() { + return player.l.power.add(1).log10() + }, + req(x) { + return tmp.l.lb[x].times(this[x].reqMult).add(this[x].req) + }, + reqTarget(x) { + return player.ps.points.sub(this[x].req).div(this[x].reqMult).add(1).floor() + }, + 1: { + req: new Decimal(1), + reqMult: new Decimal(1), + eff(str) { + return str.pow(0.15).div(3) + }, + effDesc(x) { + return "Add " + format(x) + " Hyper-Boosters to its effect" + } + }, + 2: { + req: new Decimal(1.5), + reqMult: new Decimal(1.5), + eff(str) { + let x = Decimal.pow(1e20, str.pow(0.75)) + if (x.gte("1e400")) x = Decimal.pow(10, x.log10().times(400).sqrt()) + return x + }, + effDesc(x) { + return "Gain " + format(x) + "x more Hexes" + } + }, + 3: { + req: new Decimal(3.5), + reqMult: new Decimal(2.5), + eff(str) { + return str.div(1.5).max(1).log10().add(1) + }, + effDesc(x) { + return "Multiply the base of Time Capsule effect by " + format(x) + "x" + } + }, + 4: { + req: new Decimal(10), + reqMult: new Decimal(3), + eff(str) { + return str.div(40).add(1) + }, + effDesc(x) { + return "Reduce the requirement of Super-Boosters, Super-Generators, and Hyper-Boosters by " + format(x) + "x" + } + }, + 5: { + req: new Decimal(5), + reqMult: new Decimal(6), + eff(str) { + return Decimal.pow(3, str.sqrt()) + }, + effDesc(x) { + return "Gain " + format(x) + "x more Hyperspace Energy" + } + }, +} + +let HYPERSPACE = { + cost(x) { + if (x === undefined) x = player.hs.space + if (tmp.s !== undefined && tmp.s.trueSbUnl >= 9) x = x.div(tmp.s.sbEff[9]) + let reduction = this.costReduction() + return { + hs: Decimal.pow(2, x.sqr()).div(reduction).floor(), + ba: Decimal.pow(10, x.max(x.div(2).sqr()).times(20).add(150)).div(reduction).floor() + } + }, + costReduction() { + let r = new Decimal(1) + if (player.ba.upgrades.includes(45)) r = LAYER_UPGS.ba[45].currently() + return r + }, + canBuy() { + let cost = this.cost() + return player.hs.points.gte(cost.hs) && player.ba.points.gte(cost.ba) + }, + buy() { + let cost = this.cost() + if (!this.canBuy()) return + player.ba.points = player.ba.points.sub(cost.ba) + player.hs.points = player.hs.points.sub(cost.hs) + player.hs.space = player.hs.space.add(1) + }, + canSuperUpg(x) { + return player.hs.space.gt(player.hs.spent) && tmp.hs.su[x].lt(player.hs.superUpgradeCap) + }, + superUpg(x) { + if (!this.canSuperUpg(x)) return + player.hs.spent = player.hs.spent.add(1) + tmp.hs.su[x] = tmp.hs.su[x].add(1) + player.hs.superUpgrades[x] = tmp.hs.su[x] + }, + respec(x) { + if (!player.hs.unl || !confirm("Are you sure?")) return + player.hs.spent = new Decimal(0) + player.hs.superUpgrades = {} + doReset("hs", true) + }, + eff() { + let r = new Decimal(1) + if (player.ba.upgrades.includes(35)) r = r.times(1.25) + if (tmp.s !== undefined && tmp.s.trueSbUnl >= 10) r = r.times(tmp.s.sbEff[10]) + return r + }, + nextCapReq(x) { + if (x === undefined) x = player.hs.superUpgradeCap + return Decimal.times(x, 200).add(1300) + }, + nextCapTarget() { + let x = player.g.points.sub(1300).div(200) + return x.floor().add(1) + }, + effs: { + 1(sb, su) { + return sb.add(1).pow(su.sqrt().times(2.5)) + }, + 2(sb, su) { + return sb.pow(0.25).times(su.sqrt()).div(120).add(1) + }, + 3(sb, su) { + return sb.cbrt().times(su.sqrt()).times(0.75).add(1) + }, + 4(sb, su) { + return Decimal.pow(2.5, sb.cbrt().times(su.sqrt())) + }, + 5(sb, su) { + return sb.add(10).log10().times(su.sqrt()).div(1.75).max(1) + }, + 6(sb, su) { + return Decimal.pow(sb.div(1e3).add(1), su) + }, + 7(sb, su) { + return sb.add(1).log10().times(su.cbrt()).div(25).add(1) + }, + 8(sb, su) { + return sb.times(su.sqr()).div(100).max(1).log10().add(1) + }, + 9(sb, su) { + return sb.times(su).max(1).log10().add(1) + }, + 10(sb, su) { + return sb.add(1).pow(su.cbrt().div(5)) + } + } +} + +let VERSION = { + num: 1.1, + name: "The Life Update" +} + +VERSION.withoutName = "v" + VERSION.num + (VERSION.pre ? " Pre-Release " + VERSION.pre : VERSION.pre ? " Beta " + VERSION.beta : "") +VERSION.withName = VERSION.withoutName + (VERSION.name ? ": " + VERSION.name : "") + +let IMPERIUM = { + lifeReq() { + return Decimal.pow(10, player.i.lifeBricks.times(2).sqr().add(15)) + }, + lifeTarget() { + return player.l.power.log10().sub(15).sqrt().div(2).add(1).floor() + }, + canBuild() { + let cost = this.cost() + return player.i.building || (player.i.points.gte(cost.i) && player.i.lifeBricks.gte(cost.l)) + }, + build() { + if (!this.canBuild()) return + if (player.i.building) { + if (!confirm("Are you sure?")) return + delete player.i.building + } else { + let cost = this.cost() + player.i.points = player.i.points.sub(cost.i) + player.i.lifeBricks = player.i.lifeBricks.sub(cost.l) + player.i.building = 1 + doReset("i", true) + } + player.i.progress = 0 + }, + cost(x) { + if (x === undefined) x = player.i.extraBuildings + let sub = player.sp.upgrades.includes(45) ? 3 : 0 + return { + i: x.times(1.75).add(0.5).sub(sub).ceil(), + l: x.times(1.5).add(1).sub(sub).ceil() + } + }, + speed() { + let x = Decimal.pow(3.75, player.i.extraBuildings.add(5)).recip() + x = x.times(IMPERIUM.sgSpeedBoost()) + if (player.sp.upgrades.includes(45)) x = x.times(5) + return x + }, + sgSpeedBoost() { + return player.sg.points.add(1).pow(2) + }, + collapsed(row) { + return tmp.i !== undefined && tmp.i.collapse !== undefined && tmp.i.collapse[row] + }, + maxCollapseRows: 1 +} + +const ENDGAME = new Decimal("e280000000"); + +function keepGoing() { + player.keepGoing = true; + showTab("tree") +} + +function toNumber(x) { + if (x.mag !== undefined) return x.toNumber() + if (x + 0 !== x) return parseFloat(x) + return x +} + +function addTime(diff, layer) { + let data = player + let time = data.timePlayed + if (layer) { + data = data[layer] + time = data.time + } + + //I am not that good to perfectly fix that leak. ~ DB Aarex + if (time + 0 !== time) { + console.log("Memory leak detected. Trying to fix...") + time = toNumber(time) + if (isNaN(time) || time == 0) { + console.log("Couldn't fix! Resetting...") + time = layer ? player.timePlayed : 0 + if (!layer) player.timePlayedReset = true + } + } + time += toNumber(diff) + + if (layer) data.time = time + else data.timePlayed = time +} function gameLoop(diff) { - diff = new Decimal(diff) - if (isNaN(diff.toNumber())) diff = new Decimal(0); - if (player.points.gte(ENDGAME)) gameEnded = true; - if (gameEnded&&!player.keepGoing) { - diff = new Decimal(0); - player.tab = "gameEnded"; + if (player.points.gte(ENDGAME) || gameEnded) gameEnded = 1 + + if (isNaN(diff)) diff = 0 + if (gameEnded && !player.keepGoing) { + diff = 0 + player.tab = "gameEnded" } - player.h.time += diff.toNumber() - if (tmp.hcActive ? tmp.hcActive[42] : true) { - if (player.h.time>=10) diff = new Decimal(0) - else diff = diff.div(Decimal.div(10, Decimal.sub(10, player.h.time+1)).pow(1000)) - } - 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) - player.p.best = player.p.best.max(player.p.points) + if (player.devSpeed) diff *= player.devSpeed + + addTime(diff) + addTime(diff, "h") + + if (tmp.challActive ? tmp.challActive.h[42] : true) { + if (player.h.time>=10) diff = 0 + else diff = Decimal.div(diff, Decimal.div(10, Decimal.sub(10, player.h.time + 1)).pow(1000)) } + if (diff === 0) return + + if (player.p.upgrades.includes(11)) player.points = player.points.add(tmp.pointGen.times(diff)).max(0) + if (player.g.unl) player.g.power = player.g.power.add(tmp.layerEffs.g.times(diff)).max(0) + if (player.g.best.gte(10)) generatePoints("p", diff) 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) + player.t.energy = player.t.energy.add(data.gain.times(diff)).min(data.limit).max(0) } - if (player.sg.unl) player.sg.power = player.sg.power.plus(tmp.layerEffs.sg.times(diff)).max(0) + if (player.sg.unl) player.sg.power = player.sg.power.add(tmp.layerEffs.sg.times(diff)).max(0) if (player.q.unl) { let mult = getQuirkLayerMult() - player.q.time = player.q.time.plus(mult.times(diff)).max(0) + player.q.time = player.q.time.add(mult.times(diff)).max(0) 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 (exp.gte(0)) player.q.energy = player.q.energy.add(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) - 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.q.best.gte(15)) generatePoints("e", diff) + if (player.ss.unl) player.ss.subspace = player.ss.subspace.add(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(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) + player.ba.power = player.ba.power.add(tmp.layerEffs.ba.power.times(tmp.balEff2).times(getBalPowGainMult()).times(diff)).max(0) + player.ba.positivity = player.ba.positivity.add(tmp.layerEffs.ba.pos.times(getPosGainMult()).times(diff)).max(0) + player.ba.negativity = player.ba.negativity.add(tmp.layerEffs.ba.neg.times(getNegGainMult()).times(diff)).max(0) } - if (player.m.unl) for (let i=1;i<=tmp.spellsUnl;i++) player.m.spellTimes[i] = Decimal.sub(player.m.spellTimes[i], diff).max(0).toNumber() - 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.unl) { + for (let i=1;i<=tmp.spellsUnl;i++) { + player.m.spellTimes[i] = Decimal.sub(player.m.spellTimes[i], diff).max(0).toNumber() + } } - if (player.m.best.gte(2.5e9)) player.m.hexes = player.m.hexes.plus(getHexGain().times(diff)).max(0) + if (player.m.total.gte(3)) { + generatePoints("h", diff) + generatePoints("q", diff) + } + if (player.m.total.gte(2.5e9)) player.m.hexes = player.m.hexes.add(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) + generatePoints("m", diff) + generatePoints("ba", diff) + } + if (player.hs.best.gte(2e4)) generatePoints("sp", Decimal.div(diff, 100)) + if (player.l.unl) { + player.l.power = LIFE_BOOSTERS.calcNewPower(diff) + for (var i=1; i<=tmp.l.lbUnl; i++) player.l.boosters[i] = LIFE_BOOSTERS.reqTarget(i).max(player.l.boosters[i]) + } + if (player.hs.unl) player.hs.superUpgradeCap = player.hs.superUpgradeCap.max(HYPERSPACE.nextCapTarget()) + if (player.i.unl) { + player.i.lifeBricks = player.i.lifeBricks.max(IMPERIUM.lifeTarget()) + if (player.i.building) player.i.progress += IMPERIUM.speed().times(diff).toNumber() + if (player.i.progress >= 1) { + player.i.progress = 0 + player.i.extraBuildings = player.i.extraBuildings.add(1) + delete player.i.building + } } if (player.b.auto&&player.t.best.gte(5)) doReset("b") @@ -3200,23 +3981,25 @@ function gameLoop(diff) { if (player.t.autoCap&&player.h.best.gte(5)) maxExtTimeCapsules() if (player.t.auto&&player.q.best.gte(10)) doReset("t") if (player.s.auto&&player.q.best.gte(10)) doReset("s") - if (player.s.autoBuild&&player.ss.best.gte(1)) for (let i=tmp.sbUnl;i>=1;i--) maxSpaceBuilding(i) + if (player.s.autoBuild&&player.ss.best.gte(1)) for (let i=tmp.s.trueSbUnl;i>=1;i--) maxSpaceBuilding(i) if (player.sb.auto&&player.h.best.gte(15)) doReset("sb") if (player.sg.auto&&player.sg.best.gte(2)) doReset("sg") 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.hb.auto&&player.m.total.gte(4)) doReset("hb") + if (player.ss.auto&&player.m.total.gte(4)) doReset("ss") 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.m.auto&&player.m.total.gte(50)) for (let i=1;i<=tmp.spellsUnl;i++) activateSpell(i) + if (player.ps.auto&&player.ps.best.gte(2)) doReset("ps") if (player.hasNaN&&!NaNalert) { - alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.") clearInterval(interval); player.autosave = false; NaNalert = true; + + alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.") } } @@ -3233,61 +4016,103 @@ var saveInterval = setInterval(function() { if (player.autosave) save(); }, 5000) +var ticking = false var interval = setInterval(function() { if (player===undefined||tmp===undefined) return; + if (ticking) return; if (gameEnded&&!player.keepGoing) return; - let diff = (Date.now()-player.time)/1000 - if (!player.offlineProd) offTime.remain = 0 - if (offTime.remain>0) { - offTime.speed = offTime.remain/5+1 - diff += offTime.speed/50 - offTime.remain = Math.max(offTime.remain-offTime.speed/50, 0) + ticking = true + let now = Date.now() + let diff = (now - player.time) / 1e3 + if (player.offTime !== undefined) { + 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 } - player.time = Date.now() + if (player.devSpeed) diff *= player.devSpeed + player.time = now if (needCanvasUpdate) resizeCanvas(); updateTemp(); - gameLoop(new Decimal(diff)) + gameLoop(diff) + ticking = false }, 50) +const themes = { + 1: "aqua" +} +const theme_names = { + aqua: "Aqua" +} + +function changeTheme() { + let aqua = player.theme == "aqua" + colors_theme = colors[player.theme || "default"] + document.body.style.setProperty('--background', aqua ? "#001f3f" : "#0f0f0f") + document.body.style.setProperty('--background_tooltip', aqua ? "rgba(0, 15, 31, 0.75)" : "rgba(0, 0, 0, 0.75)") + document.body.style.setProperty('--color', aqua ? "#bfdfff" : "#dfdfdf") + document.body.style.setProperty('--points', aqua ? "#dfefff" : "#ffffff") +} + +function getThemeName() { + return player.theme ? theme_names[player.theme] : "Default" +} + +function switchTheme() { + if (player.theme === undefined) player.theme = themes[1] + else { + player.theme = themes[Object.keys(themes)[player.theme] + 1] + if (!player.theme) delete player.theme + } + changeTheme() + resizeCanvas() +} + document.onkeydown = function(e) { if (player===undefined) return; if (gameEnded&&!player.keepGoing) return; let shiftDown = e.shiftKey let ctrlDown = e.ctrlKey let key = e.key - if (ctrlDown&&key=="b") e.preventDefault() - if ((!LAYERS.includes(key))||ctrlDown||shiftDown) { + if (onFocused) return + if (ctrlDown && key != "-" && key != "_" && key != "+" && key != "=" && key != "r" && key != "R" && key != "F5") e.preventDefault() + if (player.m.unl && key >= 0 && key <= 9) { + if (key == 0) activateSpell(10) + else activateSpell(key) + return + } else if ((!LAYERS.includes(key)) || ctrlDown || shiftDown) { switch(key) { case "a": if (player.ba.unl) doReset("ba") - break; + return case "b": if (ctrlDown && player.hb.unl) doReset("hb") - break; + return case "B": if (player.sb.unl) doReset("sb") - break; + return case "G": if (player.sg.unl) doReset("sg") - break; + return + case "s": + if (ctrlDown && player.hs.unl) doReset("hs") + return case "S": if (player.ss.unl) doReset("ss") - break; - case "1": - if (player.m.unl) activateSpell(1) - break; - case "2": - if (player.m.unl) activateSpell(2) - break; - case "3": - if (player.m.unl) activateSpell(3) - break; - case "4": - if (player.m.unl&&player.sp.upgrades.includes(13)) activateSpell(4) - break; + return + case "p": + if (ctrlDown && player.sp.unl) doReset("ps") + return case "P": if (player.sp.unl) doReset("sp") - break; + return } } else if (player[key].unl) doReset(key) +} + +var onFocused = false +function focused(x) { + onFocused = x } \ No newline at end of file diff --git a/js/temp.js b/js/temp.js index 6fc1de7..758621b 100644 --- a/js/temp.js +++ b/js/temp.js @@ -1,67 +1,146 @@ function updateTemp() { - if (!tmp.hcActive) tmp.hcActive = {} - for (let row=1;row<=H_CHALLS.rows;row++) { - for (let col=1;col<=H_CHALLS.cols;col++) { - let id = row*10+col - tmp.hcActive[id] = HCActive(id) + if (!tmp.challActive) { + let LAYERS_WITH_CHALLS = Object.keys(LAYER_CHALLS) + tmp.challActive = {} + for (let i = 0; i < LAYERS_WITH_CHALLS.length; i++) { + tmp.challActive[LAYERS_WITH_CHALLS[i]] = {} + updateChallTemp(LAYERS_WITH_CHALLS[i]) } } if (!tmp.layerEffs) tmp.layerEffs = {} for (let name in LAYER_EFFS) tmp.layerEffs[name] = LAYER_EFFS[name]() - + if (!tmp.layerReqs) tmp.layerReqs = {} for (let name in LAYER_REQS) tmp.layerReqs[name] = getLayerReq(name) - + if (!tmp.gainMults) tmp.gainMults = {} + if (!tmp.gainExp) tmp.gainExp = {} if (!tmp.resetGain) tmp.resetGain = {} if (!tmp.nextAt) tmp.nextAt = {} if (!tmp.layerAmt) tmp.layerAmt = {} for (let i in LAYERS) { tmp.layerAmt[LAYERS[i]] = getLayerAmt(LAYERS[i]) tmp.gainMults[LAYERS[i]] = getLayerGainMult(LAYERS[i]) + tmp.gainExp[LAYERS[i]] = getLayerGainExp(LAYERS[i]) tmp.resetGain[LAYERS[i]] = getResetGain(LAYERS[i]) tmp.nextAt[LAYERS[i]] = getNextAt(LAYERS[i]) } - + tmp.pointGen = getPointGen() - + + tmp.scaling12b = getScaling12Boosters() + tmp.atbb = addToBoosterBase() tmp.atgb = addToGenBase() - + tmp.genPowEff = getGenPowerEff() - + tmp.enhPow = getEnhancerPow() tmp.enhEff = getEnhancerEff() tmp.enhEff2 = getEnhancerEff2() tmp.subbedEnh = new Decimal(0) - if (tmp.hcActive ? tmp.hcActive[52] : true) { - tmp.subbedEnh = tmp.subbedEnh.plus(new Decimal(player.h.time).times(40).plus(1).log10().pow(10).max(10)).round() + if (tmp.challActive ? tmp.challActive.h[52] : true) { + tmp.subbedEnh = tmp.subbedEnh.add(new Decimal(player.h.time).times(40).add(1).log10().pow(10).max(10)).round() } - + tmp.freeExtCap = getFreeExtCapsules() tmp.timeEff = getTimeEnergyEff() tmp.attb = addToTimeBase() - - if (!tmp.spaceBuildEff) tmp.spaceBuildEff = {} - for (let i=1;i<=5;i++) tmp.spaceBuildEff[i] = getSpaceBuildingEff(i) - tmp.sbUnl = getSpaceBuildingsUnl() + tmp.mttb = multiplyToTimeBase() + + if (layerUnl("s")) { + tmp.s = { + sb: {}, + sbEff: {} + } + var data = tmp.s + + data.sbUnl = getSpaceBuildingsUnl() + data.trueSbUnl = Decimal.min(data.sbUnl, SPACE_BUILDINGS.max).floor().toNumber() + data.sbCostMult = getSpaceBuildingCostMult() + data.sbCostMod = getSpaceBuildingCostMod() + data.sbExtra = getExtraBuildingLevels() + data.sbPow = getSpaceBuildingPow() + data.sbSum = sumValues(player.s.buildings) + for (let i=data.trueSbUnl;i>=1;i--) { + data.sb[i] = fixValue(player.s.buildings[i]) + data.sbEff[i] = getSpaceBuildingEff(i) + } + } tmp.quirkEff = getQuirkEnergyEff() tmp.qCB = getQuirkLayerCostBase() - + tmp.ssEff1 = getSubspaceEff1() tmp.ssEff2 = getSubspaceEff2() tmp.ssEff3 = getSubspaceEff3() - + 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<=4;i++) tmp.spellEffs[i] = getSpellEff(i) - + tmp.sGenPowEff = getSGenPowEff() + + if (layerUnl("l")) { + if (!tmp.l) tmp.l = { + lb: {}, + lbEff: {} + } + var data = tmp.l + var data2 = LIFE_BOOSTERS + + data.lpEff = data2.eff() + data.lbUnl = data2.unl() + for (let i=1;i<=data2.max;i++) { + data.lb[i] = fixValue(player.l.boosters[i]) + data.lbEff[i] = data2[i].eff(data.lb[i].times(data.lpEff)) + } + } + + if (layerUnl("hs")) { + if (!tmp.hs) tmp.hs = { + su: {}, + suEff: {} + } + var data = tmp.hs + var data2 = HYPERSPACE + + data.eff = data2.eff() + for (let i=1;i<=tmp.s.trueSbUnl;i++) data.su[i] = fixValue(player.hs.superUpgrades[i]) + } + + if (layerUnl("i")) { + if (!tmp.i) tmp.i = {} + var data = tmp.i + + data.work = new Decimal(1) + if (player.i.building) data.work = data.work.add(player.i.extraBuildings.add(1).sqrt().add(1).div(5)) + data.workEff = Decimal.pow(2, data.work.sub(1)) + + data.collapse = {} + for (var i = 1; i <= IMPERIUM.maxCollapseRows; i++) if (data.work.gt(i + 0.5)) data.collapse[i] = data.work.sub(i + 0.5).times(2).min(1) + + data.compressed = tmp.s.sbUnl.sub(SPACE_BUILDINGS.max).max(0).floor().toNumber() + } +} + +function updateChallTemp(layer) { + if (player[layer] === undefined) return + + let data = tmp.challActive[layer] + let data2 = LAYER_CHALLS[layer] + let customActive = data2.active !== undefined + for (let row = 1; row <= data2.rows; row++) { + for (let col = 1; col <= data2.cols; col++) { + let id = row * 10 + col + if (customActive ? data2.active(id) : player[layer].active == id) data[id] = 1 + else delete data[id] + } + } } \ No newline at end of file diff --git a/js/v.js b/js/v.js index a990872..78e5093 100644 --- a/js/v.js +++ b/js/v.js @@ -1,47 +1,76 @@ var app; function loadVue() { + Vue.component('layer-node', { + props: ['layer', 'abb'], + template: ` + + ` + }) app = new Vue({ - el: "#app", - data: { - player, - tmp, - offTime, - Decimal, - format, - formatWhole, - formatTime, - layerUnl, - getLayerEffDesc, - doReset, - buyUpg, - getEnhancerCost, - getExtCapsuleCost, - getSpace, - getSpaceBuildingsUnl, - getSpaceBuildingCost, - getSpaceBuildingEffDesc, - buyBuilding, - getQuirkLayerCost, - buyQuirkLayer, - startHindrance, - HCActive, - milestoneShown, - destroyBuilding, - getSpellDesc, - activateSpell, - spellActive, - updateToCast, - keepGoing, - LAYERS, - LAYER_RES, - LAYER_TYPE, - LAYER_UPGS, - LAYER_EFFS, - LAYER_AMT_NAMES, - LAYER_RES_CEIL, - H_CHALLS, - SPELL_NAMES - }, + el: "#app", + data: { + player, + tmp, + Decimal, + format, + formatWhole, + formatTime, + focused, + getThemeName, + layerUnl, + getLayerEffDesc, + doReset, + buyUpg, + getEnhancerCost, + getExtCapsuleCost, + getSpace, + getSpaceBuildingsUnl, + getSpaceBuildingCost, + getSpaceBuildingEffDesc, + buyBuilding, + getQuirkLayerCost, + buyQuirkLayer, + startChall, + milestoneShown, + destroyBuilding, + getSpellDesc, + activateSpell, + spellActive, + updateToCast, + keepGoing, + VERSION, + ENDGAME, + LAYERS, + LAYER_RES, + LAYER_TYPE, + LAYER_UPGS, + LAYER_EFFS, + LAYER_AMT_NAMES, + LAYER_RES_CEIL, + LAYER_CHALLS, + SPACE_BUILDINGS, + SPELL_NAMES, + LIFE_BOOSTERS, + HYPERSPACE, + IMPERIUM + }, }) } \ No newline at end of file diff --git a/options_wheel.png b/options_wheel.png index 22a93b0..9a60fff 100644 Binary files a/options_wheel.png and b/options_wheel.png differ diff --git a/remove.png b/remove.png index 8e400f5..6c51c68 100644 Binary files a/remove.png and b/remove.png differ diff --git a/style.css b/style.css index a73ab83..ec580d5 100644 --- a/style.css +++ b/style.css @@ -1,7 +1,8 @@ * { transition-duration: 0.5s; text-align: center; - font-family: "Lucida Console", "Courier New", monospace; + font-family: "Inconsolata", monospace; + font-weight: bold; table-align: center; margin: auto; } @@ -12,10 +13,12 @@ } body { - background-color: black; - color: white; - text-shadow: 0px 0px 7px white; + background-color: var(--background); + color: var(--color); overflow: hidden; + --background: #0f0f0f; + --color: #dfdfdf; + --points: #ffffff; } html, body { @@ -23,6 +26,10 @@ html, body { height: 100%; } +td { + padding: 0 +} + .upgTable { display: flex !important; flex-flow: column wrap; @@ -41,20 +48,31 @@ html, body { margin: 0 auto; } -h1, h2 { +.upgAlign { + height: 120px; + vertical-align: 0 +} + +h1, h2, h3, b, input { display: inline; + font-family: "Lucida Console", "Courier New", monospace } .treeNode { height: 100px; width: 100px; - border: 1px solid black; + border: var(--hqProperty1); + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); border-radius: 50%; + box-shadow: var(--hqProperty2a), var(--hqProperty2b); font-size: 40px; + font-family: "Lucida Console", "Courier New", monospace; + color: rgba(0, 0, 0, 0.5); + text-shadow: var(--hqProperty3); } .locked { - background-color: #9c6e6e !important; + background-color: #bf8f8f !important; cursor: not-allowed; } @@ -63,12 +81,25 @@ h1, h2 { } .can:hover { + transform: scale(1.15, 1.15); + box-shadow: 0px 0px 20px var(--points) +} + +.treeNode.notify { transform: scale(1.1, 1.1); - text-shadow: 0px 0px 7px white; + border-color: rgba(255, 0, 0, 0.125) rgba(255, 0, 0, 0.25) rgba(255, 0, 0, 0.25) rgba(255, 0, 0, 0.125); + box-shadow: var(--hqProperty2a), 0px 0px 20px #ff0000 !important; + z-index: 3 +} + +.treeNode.can:hover { + transform: scale(1.15, 1.15); + box-shadow: var(--hqProperty2a), 0px 0px 20px var(--points); + z-index: 4 } .bought { - background-color: #68a66b !important; + background-color: #77bf5f !important; cursor: default; } @@ -76,30 +107,32 @@ h1, h2 { position: absolute; top: 0px; left: 0px; - background-color: black; - border: 1px solid black; - color: white; + background-color: var(--background); + border: 1px solid var(--background); + color: var(--color); font-size: 40px; cursor: pointer; } .back:hover { transform: scale(1.1, 1.1); - text-shadow: 0px 0px 7px white; + text-shadow: 0px 0px 7px var(--color); } .reset { - height: 100px; - width: 150px; - border-radius: 50%; - border: 1px solid black; + height: 120px; + width: 180px; + border-radius: 25%; + border: 4px solid; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); } .upg { height: 120px; width: 120px; border-radius: 25%; - border: 1px solid black; + border: 2px solid; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); font-size: 10px; } @@ -107,14 +140,17 @@ h1, h2 { height: 200px; width: 200px; border-radius: 25%; - border: 1px solid black; + border: 2px solid; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); } .longUpg { height: 50px; width: 120px; + background: var(--points); border-radius: 50%; - border: 1px solid black; + border: 2px solid; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); font-size: 10px; } @@ -122,22 +158,28 @@ h1, h2 { height: 40px; width: 40px; border-radius: 25%; - border: 1px solid black; + border: 2px solid; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); +} + +#points { + color: var(--points); + text-shadow: 0px 0px 10px var(--points); } .p { - background-color: #439ea3; - color: black; + background-color: #00bfbf; + color: rgba(0, 0, 0, 0.5); } .p_txt { - color: #439ea3; - text-shadow: 0px 0px 10px #439ea3; + color: #00bfbf; + text-shadow: 0px 0px 10px #00bfbf; } .b { background-color: #415a9e; - color: black; + color: rgba(0, 0, 0, 0.5); } .b_txt { @@ -147,7 +189,7 @@ h1, h2 { .g { background-color: #409c6e; - color: black; + color: rgba(0, 0, 0, 0.5); } .g_txt { @@ -157,7 +199,7 @@ h1, h2 { .e { background-color: #9643a3; - color: black; + color: rgba(0, 0, 0, 0.5); } .e_txt { @@ -167,7 +209,7 @@ h1, h2 { .t { background-color: #3f993d; - color: black; + color: rgba(0, 0, 0, 0.5); } .t_txt { @@ -176,28 +218,28 @@ h1, h2 { } .s { - background-color: white; - color: black; + background-color: #dfdfdf; + color: rgba(0, 0, 0, 0.5); } .s_txt { - color: white; - text-shadow: 0px 0px 10px white; + color: #dfdfdf; + text-shadow: 0px 0px 10px #dfdfdf; } .sb { - background-color: #415a9e; - color: black; + background-color: #494b99; + color: rgba(0, 0, 0, 0.5); } .sb_txt { - color: #415a9e; - text-shadow: 0px 0px 10px #415a9e; + color: #494b99; + text-shadow: 0px 0px 10px #494b99; } .h { background-color: #a14040; - color: black; + color: rgba(0, 0, 0, 0.5); } .h_txt { @@ -207,7 +249,7 @@ h1, h2 { .q { background-color: #ff2bf2; - color: black; + color: rgba(0, 0, 0, 0.5); } .q_txt { @@ -217,7 +259,7 @@ h1, h2 { .hb { background-color: #513d94; - color: black; + color: rgba(0, 0, 0, 0.5); } .hb_txt { @@ -226,18 +268,28 @@ h1, h2 { } .ss { - background-color: white; - color: black; + background-color: #eff7ff; + color: rgba(0, 0, 0, 0.5); } .ss_txt { - color: white; - text-shadow: 0px 0px 10px white; + color: #eff7ff; + 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: black; + color: rgba(0, 0, 0, 0.5); } .m_txt { @@ -247,7 +299,7 @@ h1, h2 { .ba { background-color: #ebc88f; - color: black; + color: rgba(0, 0, 0, 0.5); } .ba_txt { @@ -256,23 +308,93 @@ h1, h2 { } .sg { - background-color: #409c6e; - color: black; + background-color: #3d997a; + color: rgba(0, 0, 0, 0.5); } .sg_txt { - color: #409c6e; - text-shadow: 0px 0px 10px #409c6e; + color: #3d997a; + text-shadow: 0px 0px 10px #3d997a; } .sp { - background-color: #439ea3; - color: black; + background-color: #00a7bf; + color: rgba(0, 0, 0, 0.5); } .sp_txt { - color: #439ea3; - text-shadow: 0px 0px 10px #439ea3; + color: #00a7bf; + text-shadow: 0px 0px 10px #00a7bf; +} + +.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; +} + +.mb { + background-color: #ff9f7f; + color: rgba(0, 0, 0, 0.5); +} + +.mb_txt { + color: #ff9f7f; + text-shadow: 0px 0px 10px #ff9f7f; +} + +.ge { + background-color: #bfbfbf; + color: rgba(0, 0, 0, 0.5); +} + +.ge_txt { + color: #bfbfbf; + text-shadow: 0px 0px 10px #bfbfbf; +} + +.ma { + background-color: #9f9f9f; + color: rgba(0, 0, 0, 0.5); +} + +.ma_txt { + color: #9f9f9f; + text-shadow: 0px 0px 10px #9f9f9f; } #optionWheel { @@ -307,28 +429,49 @@ h1, h2 { -3px 0px 12px #02f2f2; } -#cl { - font-size: 20px; - color: white; - cursor: pointer; - width: 100%; - min-width: 100%; - -webkit-text-stroke-width: 1px; - -webkit-text-stroke-color: #02f2f2; - text-decoration: none; +#discord { + position: absolute; + top: 120px; + left: 4px; + width: 40px; + height: 40px; + cursor: pointer } -#cl:hover { +#discord:hover { transform: scale(1.2, 1.2); - text-shadow: 5px 0px 10px #02f2f2, - -3px 0px 12px #02f2f2; +} + +#version { + position: absolute; + right: 4px; + top: 4px; + text-align: right; + color: var(--points); + text-shadow: 0px 0px 10px var(--points); + cursor: pointer; +} + +#version:hover { + transform: scale(1.2, 1.2); + right: 4.8px; +} + +a { + color: #007fff; + text-decoration-line: none; + cursor: pointer } .link { - color: white; + display: block; + font-size: 20px; + color: #41f5f5; + text-decoration-line: none; cursor: pointer; - font-size: 16px; - font-weight: bold; + width: 100%; + min-width: 100%; + font-family: "Lucida Console", "Courier New", monospace; -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: #02f2f2; text-decoration: none; @@ -344,9 +487,10 @@ h1, h2 { height: 100px; width: 100px; border-radius: 25%; - border: 1px solid black; - background-color: #a1a1a1; - color: black; + border: 4px solid; + background-color: var(--color); + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); + color: rgba(0, 0, 0, 0.5); cursor: pointer; } @@ -369,14 +513,21 @@ h1, h2 { .milestone { width: 100%; height: 75px; - background-color: #9e6d64; + background-color: #bf8f8f; + border: 4px solid; + border-radius: 4px; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); + color: rgba(0, 0, 0, 0.5); } .milestoneDone { width: 100%; height: 75px; - background-color: #68a66b; - color: black; + background-color: #77bf5f; + border: 4px solid; + border-radius: 4px; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); + color: rgba(0, 0, 0, 0.5); } .left { @@ -403,7 +554,8 @@ h1, h2 { column-span: 1; position: absolute; overflow-y: auto; - overflow-x: hidden; + overflow-x: auto; + transition-duration: 0s } .col.right { @@ -418,12 +570,12 @@ h1, h2 { } .vl { - border-left: 6px solid #969696; + border-left: 6px solid var(--color); height: 100%; position: absolute; left: 50%; margin-left: -3px; - top: 0; + top: 0 } ul { @@ -431,36 +583,37 @@ ul { } .hChall { - background-color: #fa7f8a; - border: 4px solid #ff0017; - color: #ff0017; + background-color: #bf8f8f; + border: 4px solid; + border-color: rgba(255, 255, 255, 0.125) rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.25) rgba(255, 255, 255, 0.125); + color: rgba(0, 0, 0, 0.5); width: 300px; height: 300px; + font-size: 15px; border-radius: 33.33%; } .hChall.done { - background-color: #95fcb4; - border: 4px solid #038c2c; - color: #038c2c; + background-color: #77bf5f; } .hChall.canComplete { - background-color: #93f0fa; - border: 4px solid #03858f; - color: #03858f; + background-color: #ffbf00; } .fullWidth { position: absolute; + height: 100%; width: 100%; min-width: 100%; + overflow-y: auto; + overflow-x: auto; + transition-duration: 0s } [tooltip] { position: relative; - z-index: 2; - white-space: pre-wrap; + z-index: 2 } [tooltip]:before, @@ -484,9 +637,8 @@ ul { -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; - background-color: #000; - background-color: hsla(0, 0%, 5%, 0.9); - color: #fff; + background-color: var(--background_tooltip); + color: var(--points); content: attr(tooltip); text-align: center; font-size: 14px; @@ -501,8 +653,7 @@ ul { left: 50%; margin-left: -5px; width: 0; - border-top: 5px solid #000; - border-top: 5px solid hsla(0, 0%, 5%, 0.9); + border-top: 5px solid var(--background_tooltip); border-right: 5px solid transparent; border-left: 5px solid transparent; content: " ";