diff --git a/index.html b/index.html index 68fcf89..97e813a 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,12 @@


-

Beta v1.2 Alpha 14

+

v1.0 Beta 1

+
+

Beta v1.2


@@ -290,6 +295,7 @@ 3: Cast spell 3
A: Balance reset
+ Shift+P: Super-Prestige reset





@@ -363,6 +369,14 @@ +
+ + + +
+ + +
@@ -462,9 +476,9 @@

- Note: Activating a Spell costs Magic.

+ Note: Activating a Spell costs Magic.

-
+




@@ -494,6 +508,14 @@ 8 Balance Energy
You can buy max Hyper-Boosters & Subspace Energy, and Hyper-Boosters/Subspace Energy 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
+



diff --git a/js/canvas.js b/js/canvas.js index 5ca17b6..8b8c9a0 100644 --- a/js/canvas.js +++ b/js/canvas.js @@ -54,6 +54,10 @@ function drawTree() { drawTreeBranch("q", "ba") drawTreeBranch("ss", "ba") } + if (layerUnl('sp')) { + drawTreeBranch("m", "sp") + drawTreeBranch("ba", "sp") + } needCanvasUpdate = false; } diff --git a/js/game.js b/js/game.js index 7ed0e7b..ec8e6b3 100644 --- a/js/game.js +++ b/js/game.js @@ -15,7 +15,7 @@ function getStartPlayer() { msDisplay: "always", offlineProd: true, versionType: "beta", - version: 1.2, + version: 1.3, timePlayed: 0, hasNaN: false, points: new Decimal(10), @@ -132,23 +132,27 @@ function getStartPlayer() { m: { unl: false, auto: false, + autoIns: false, points: new Decimal(0), best: new Decimal(0), spellTimes: { 1: 0, 2: 0, 3: 0, + 4: 0, }, hexes: new Decimal(0), toCast: { 1: "1", 2: "1", 3: "1", + 4: "1", }, casted: { 1: new Decimal(1), 2: new Decimal(1), 3: new Decimal(1), + 4: new Decimal(1), }, upgrades: [], }, @@ -161,10 +165,17 @@ function getStartPlayer() { negativity: new Decimal(0), upgrades: [], }, + sp: { + unl: false, + points: new Decimal(0), + best: new Decimal(0), + total: new Decimal(0), + upgrades: [], + }, } } -const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "sg", "h", "q", "hb", "ss", "m", "ba"] +const LAYERS = ["p", "b", "g", "e", "t", "s", "sb", "sg", "h", "q", "hb", "ss", "m", "ba", "sp"] const LAYER_REQS = { p: new Decimal(10), @@ -181,6 +192,7 @@ const LAYER_REQS = { ss: new Decimal(36), m: new Decimal(1e80), ba: new Decimal(1e130), + sp: new Decimal("1e8500000"), } const LAYER_RES = { @@ -198,6 +210,7 @@ const LAYER_RES = { ss: "subspace energy", m: "magic", ba: "balance energy", + sp: "super-prestige points", } const LAYER_RES_CEIL = ["sb", "sg", "hb", "ss"] @@ -217,6 +230,7 @@ const LAYER_TYPE = { ss: "static", m: "normal", ba: "normal", + sp: "normal", } const LAYER_EXP = { @@ -234,6 +248,7 @@ const LAYER_EXP = { ss: new Decimal(1.1), m: new Decimal(0.01), ba: new Decimal(0.00667), + sp: new Decimal(2e-7), } const LAYER_BASE = { @@ -262,7 +277,8 @@ const LAYER_ROW = { ss: 3, m: 4, ba: 4, - future_layer: 5, + sp: 5, + future_layer: 6, } const ROW_LAYERS = [ @@ -271,6 +287,7 @@ const ROW_LAYERS = [ ["e","t","s","sb","sg"], ["h","q","hb","ss"], ["m","ba"], + ["sp"], ["future_layer"], ] @@ -279,6 +296,7 @@ const ORDER_UP = [ [], ["e","t","s","sb"], ["hb","ss"], + ["sp"], [], ] @@ -339,6 +357,7 @@ const LAYER_UPGS = { currently: function() { let ret = player.points.plus(1).log10().pow(0.75).plus(1) if (player.g.upgrades.includes(15)) ret = ret.pow(LAYER_UPGS.g[15].currently()) + if (player.sp.upgrades.includes(11)) ret = ret.pow(100) return ret; }, effDisp: function(x) { return format(x)+"x" }, @@ -363,6 +382,7 @@ const LAYER_UPGS = { let ret = player.points.plus(1).log10().cbrt().plus(1) if (player.g.upgrades.includes(23)) ret = ret.pow(LAYER_UPGS.g[23].currently()) if (player.p.upgrades.includes(33)) ret = ret.pow(1.25) + if (player.sp.upgrades.includes(11)) ret = ret.pow(100) return ret; }, effDisp: function(x) { return format(x)+"x" }, @@ -374,6 +394,7 @@ const LAYER_UPGS = { currently: function() { let ret = player.p.points.plus(1).log10().plus(1).pow(player.p.points.plus(1).log10().div(200).plus(1)).pow(player.p.upgrades.includes(32) ? LAYER_UPGS.p[32].currently() : 1) if (ret.gte("1e1000")) ret = ret.log10().times("1e997") + if (player.sp.upgrades.includes(11)) ret = ret.pow(100) return ret; }, effDisp: function(x) { return format(x)+"x" }, @@ -1332,6 +1353,34 @@ const LAYER_UPGS = { effDisp: function(x) { return format(x)+"x" }, }, }, + sp: { + rows: 1, + cols: 4, + 11: { + desc: "The Prestige Upgrade 3, 6, & 7 effects are raised to the power of 100.", + cost: new Decimal(1), + unl: function() { return player.sp.unl }, + }, + 12: { + desc: "Total Super-Prestige Points boost Magic & Balance Power gain.", + cost: new Decimal(2), + unl: function() { return player.sp.upgrades.includes(11) }, + currently: function() { return player.sp.total.plus(1).pow(2.5) }, + effDisp: function(x) { return format(x)+"x" }, + }, + 13: { + desc: "Unlock a new Spell.", + cost: new Decimal(3), + unl: function() { return player.sp.upgrades.includes(12) }, + }, + 14: { + desc: "Your Best Super-Prestige Points boost Hex & Balance Energy gain.", + cost: new Decimal(8), + unl: function() { return player.sp.upgrades.includes(13) }, + currently: function() { return player.sp.best.plus(1).pow(1.9) }, + effDisp: function(x) { return format(x)+"x" }, + }, + }, } const TAB_REQS = { @@ -1354,6 +1403,7 @@ const TAB_REQS = { ss: function() { return (player.ss.unl||player.s.points.gte(tmp.layerReqs.ss))&&layerUnl('ss') }, m: function() { return (player.m.unl||player.h.points.gte(tmp.layerReqs.m))&&layerUnl('m') }, ba: function() { return (player.ba.unl||player.q.points.gte(tmp.layerReqs.ba))&&layerUnl('ba') }, + sp: function() { return (player.sp.unl||player.p.points.gte(tmp.layerReqs.sp))&&layerUnl('sp') }, } const LAYER_AMT_NAMES = { @@ -1371,6 +1421,7 @@ const LAYER_AMT_NAMES = { ss: "space energy", m: "hindrance spirit", ba: "quirks", + sp: "prestige points", } function getLayerAmt(layer) { @@ -1400,6 +1451,9 @@ function getLayerAmt(layer) { case "ba": return player.q.points; break; + case "sp": + return player.p.points; + break; } return amt } @@ -1547,8 +1601,15 @@ function checkForVars() { if (player.m.auto === undefined) player.m.auto = false if (player.m.toCast === undefined) player.m.toCast = start.m.toCast if (player.m.casted === undefined) player.m.casted = start.m.casted + if (player.m.autoIns === undefined) { + player.m.autoIns = false + player.m.spellTimes[4] = 0 + player.m.toCast[4] = "1" + player.m.casted[4] = new Decimal(1) + } if (player.ba === undefined) player.ba = start.ba if (player.offlineProd === undefined) player.offlineProd = true + if (player.sp === undefined) player.sp = start.sp } function convertToDecimal() { @@ -1591,12 +1652,15 @@ function convertToDecimal() { player.m.points = new Decimal(player.m.points) player.m.best = new Decimal(player.m.best) player.m.hexes = new Decimal(player.m.hexes) - for (let i=1;i<=3;i++) player.m.casted[i] = new Decimal(player.m.casted[i]) + for (let i=1;i<=4;i++) player.m.casted[i] = new Decimal(player.m.casted[i]) player.ba.points = new Decimal(player.ba.points) player.ba.best = new Decimal(player.ba.best) player.ba.power = new Decimal(player.ba.power) player.ba.positivity = new Decimal(player.ba.positivity) player.ba.negativity = new Decimal(player.ba.negativity) + player.sp.points = new Decimal(player.sp.points) + player.sp.best = new Decimal(player.sp.best) + player.sp.total = new Decimal(player.sp.total) } function toggleOpt(name) { @@ -1759,6 +1823,12 @@ function getLayerGainMult(layer) { if (player.ba.unl) mult = mult.times(tmp.balEff) if (player.m.unl) mult = mult.times(tmp.hexEff) break; + case "m": + if (player.sp.upgrades.includes(12)) mult = mult.times(LAYER_UPGS.sp[12].currently()) + break; + case "ba": + if (player.sp.upgrades.includes(12)) mult = mult.times(LAYER_UPGS.sp[12].currently()) + break; } return mult } @@ -1849,6 +1919,9 @@ function layerUnl(layer) { case "ba": return player.q.unl&&player.ss.unl break; + case "sp": + return player.m.unl&&player.ba.unl + break; } } @@ -1862,7 +1935,7 @@ function rowReset(row, layer) { case 1: player.points = new Decimal(10); player.p.points = new Decimal(0); - if (LAYER_ROW[layer]>=3 && player.h.best.gte(10)) player.p.upgrades = prev.p.upgrades; + if ((LAYER_ROW[layer]>=3 && player.h.best.gte(10))||player.sp.total.gte(1)) player.p.upgrades = prev.p.upgrades; else if ((player.h.best.lt(1)&&player.q.best.lt(1))||LAYER_ROW[layer]>=3) { if (layer=="b"||layer=="g") { if (player[layer].best.lt(8)) player.p.upgrades = []; @@ -1877,11 +1950,11 @@ function rowReset(row, layer) { case 2: player.b.points = new Decimal(0); player.b.best = player.m.best.gte(1)?player.b.best:new Decimal(0); - if (!player.t.best.gte(4)) player.b.upgrades = []; + if (!player.t.best.gte(4)&&!player.sp.total.gte(1)) player.b.upgrades = []; player.g.points = new Decimal(0); player.g.power = new Decimal(0); player.g.best = player.m.best.gte(1)?player.g.best:new Decimal(0); - if (!player.s.best.gte(4)) player.g.upgrades = []; + if (!player.s.best.gte(4)&&!player.sp.total.gte(1)) player.g.upgrades = []; player.t.energy = new Decimal(0); if (layer=="t"||layer=="e"||layer=="s") { if (player[layer].best.gte(2)) { @@ -1897,13 +1970,13 @@ function rowReset(row, layer) { player.t.points = new Decimal(0); player.t.order = 0 if (player.h.best.lt(2)&&player.m.best.lt(1)) player.t.best = new Decimal(0); - if (player.h.best.lt(4)) player.t.upgrades = []; + if (player.h.best.lt(4)&&!player.sp.total.gte(1)) player.t.upgrades = []; player.t.extCapsules = new Decimal(0); player.e.order = 0 player.e.points = new Decimal(0); if (player.h.best.lt(2)&&player.m.best.lt(1)) player.e.best = new Decimal(0); player.e.enhancers = new Decimal(0); - if (player.h.best.lt(4)) player.e.upgrades = []; + if (player.h.best.lt(4)&&!player.sp.total.gte(1)) player.e.upgrades = []; player.s = { unl: player.s.unl, order: 0, @@ -1917,7 +1990,7 @@ function rowReset(row, layer) { 4: new Decimal(0), 5: new Decimal(0) }), - upgrades: player.h.best.gte(4) ? player.s.upgrades : [], + upgrades: (player.h.best.gte(4)||player.sp.total.gte(1)) ? player.s.upgrades : [], auto: player.s.auto, autoBuild: player.s.autoBuild, } @@ -1927,7 +2000,7 @@ function rowReset(row, layer) { order: 0, points: new Decimal(0), best: (player.h.best.gte(2)||player.m.best.gte(1)) ? player.sb.best : new Decimal(0), - upgrades: player.h.best.gte(10) ? player.sb.upgrades : [], + upgrades: (player.h.best.gte(10)||player.sp.total.gte(1)) ? player.sb.upgrades : [], } player.sg = { unl: player.sg.unl, @@ -1948,7 +2021,7 @@ function rowReset(row, layer) { points: new Decimal(0), best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.h.best:new Decimal(0), active: 0, - challs: player.m.best.gte(2)?player.h.challs:[], + challs: (player.m.best.gte(2)||player.sp.total.gte(1))?player.h.challs:[], upgrades: [], } player.q = { @@ -1959,7 +2032,7 @@ function rowReset(row, layer) { layers: new Decimal(0), energy: new Decimal(0), time: new Decimal(0), - upgrades: player.ba.best.gte(2)?player.q.upgrades:[], + upgrades: (player.ba.best.gte(2)||player.sp.total.gte(1))?player.q.upgrades:[], } player.hb = { unl: player.hb.unl, @@ -1967,7 +2040,7 @@ function rowReset(row, layer) { order: player.hb.order, points: new Decimal(0), best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.hb.best:new Decimal(0), - upgrades: player.ba.best.gte(5)?player.hb.upgrades:[], + upgrades: (player.ba.best.gte(5)||player.sp.total.gte(1))?player.hb.upgrades:[], } player.ss = { unl: player.ss.unl, @@ -1976,12 +2049,44 @@ function rowReset(row, layer) { points: new Decimal(0), best: (player.ba.best.gte(1)||player.m.best.gte(1))?player.ss.best:new Decimal(0), subspace: new Decimal(0), - upgrades: player.ba.best.gte(5)?player.ss.upgrades:[], + upgrades: (player.ba.best.gte(5)||player.sp.total.gte(1))?player.ss.upgrades:[], } break; case 5: - player.m = start.m - player.ba = start.ba + player.m = { + unl: player.m.unl, + auto: player.m.auto, + autoIns: player.m.autoIns, + points: new Decimal(0), + best: player.sp.total.gte(2) ? player.m.best : new Decimal(0), + spellTimes: { + 1: 0, + 2: 0, + 3: 0, + 4: 0, + }, + hexes: new Decimal(0), + toCast: player.m.toCast, + casted: { + 1: new Decimal(1), + 2: new Decimal(1), + 3: new Decimal(1), + 4: new Decimal(1), + }, + upgrades: player.sp.total.gte(1) ? player.m.upgrades : [], + } + player.ba = { + unl: player.ba.unl, + points: new Decimal(0), + best: player.sp.total.gte(5) ? player.ba.best : new Decimal(0), + power: new Decimal(0), + positivity: new Decimal(0), + negativity: new Decimal(0), + upgrades: player.sp.total.gte(1) ? player.ba.upgrades : [], + } + break; + case 6: + player.sp = start.sp break; } } @@ -1993,7 +2098,11 @@ function doReset(layer, force=false) { if (LAYER_TYPE[layer]=="static") { if (tmp.layerAmt[layer].lt(tmp.nextAt[layer])) return; player[layer].points = player[layer].points.plus(canBuyMax(layer)?gain:1) - } else player[layer].points = player[layer].points.plus(gain) + if (player[layer].total) player[layer].total = player[layer].total.plus(canBuyMax(layer)?gain:1) + } else { + player[layer].points = player[layer].points.plus(gain) + if (player[layer].total) player[layer].total = player[layer].total.plus(gain) + } player[layer].best = player[layer].best.max(player[layer].points) if (!player[layer].unl) { @@ -2015,6 +2124,7 @@ function doReset(layer, force=false) { else for (let x=row;x>=1;x--) rowReset(x, layer) updateTemp() + updateTemp() } function buyUpg(layer, id) { @@ -2294,6 +2404,7 @@ function getSpaceBuildingCostMod() { let mod = new Decimal(1) if (player.s.upgrades.includes(24)&&!(tmp.hcActive?tmp.hcActive[12]:true)) mod = mod.times(0.5) if (player.s.upgrades.includes(42)) mod = mod.times(0.6) + if (spellActive(4)) mod = mod.times(Decimal.sub(1, tmp.spellEffs[4].sub(1))) return mod; } @@ -2792,22 +2903,31 @@ function getNegGainMult() { return mult; } +function getBalPowGainMult() { + let mult = new Decimal(1) + if (player.sp.upgrades.includes(14)) mult = mult.times(LAYER_UPGS.sp[14].currently()) + return mult; +} + const SPELL_NAMES = { 1: "Booster Launch", 2: "Time Warp", 3: "Quirk Amplification", + 4: "Spacial Compression", } const SPELL_DESCS = { 1: "Boosters are X% stronger", 2: "Time Capsules are X% stronger", 3: "Quirk Layers are X% more efficient", + 4: "Space Buildings cost scale X% slower", } const SPELL_BASE = { 1: 1.25, 2: 1.1, 3: 1.04, + 4: 1.01, } function getSpellPower(x) { @@ -2823,6 +2943,7 @@ function getSpellEff(x) { let base = SPELL_BASE[x] let power = getSpellPower(x) let eff = Decimal.pow(base, power) + if (x==4) eff = Decimal.sub(2, Decimal.div(base, power.log2().plus(1))) return eff } @@ -2842,17 +2963,19 @@ function getSpellTime() { function spellActive(x) { if (!player.m.unl) return false if (!tmp.spellEffs) return false + if (tmp.spellsUnl0 } function activateSpell(x, force=false) { + if (tmp.spellsUnl