From 5f5cbaf5b220cbb3fb5fe4605090987a16a9a832 Mon Sep 17 00:00:00 2001 From: Jacorb90 <39597610+Jacorb90@users.noreply.github.com> Date: Wed, 26 Aug 2020 12:26:46 -0400 Subject: [PATCH] Beta v1.1 Alpha 4 --- index.html | 23 +++++++++++++++++- js/game.js | 70 +++++++++++++++++++++++++++++++++++++++++++++++++----- js/v.js | 5 +++- style.css | 15 ++++++++++++ 4 files changed, 105 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 101b130..a249478 100644 --- a/index.html +++ b/index.html @@ -92,6 +92,11 @@
  • Implemented some new milestones
  • Balanced up to 15 Hindrance Spirit & 15 Quirks
  • +

    Beta v1.1 Alpha 4

    +





    @@ -228,6 +233,7 @@ 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
    @@ -238,6 +244,7 @@ 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

    @@ -250,7 +257,21 @@
    -



    +

    +
    +
    +
    +
    +

    {{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}}
    +
    +
    +
    +
    +

    diff --git a/js/game.js b/js/game.js index 8306518..9a143a9 100644 --- a/js/game.js +++ b/js/game.js @@ -82,6 +82,7 @@ function getStartPlayer() { unl: false, points: new Decimal(0), best: new Decimal(0), + active: 0, challs: [], upgrades: [], }, @@ -179,14 +180,21 @@ const ROW_LAYERS = [ ] const LAYER_EFFS = { - b: function() { return Decimal.pow(Decimal.add(2, tmp.atbb), player.b.points.plus(getFreeBoosters())) }, + b: function() { + if (HCActive(11)) return new Decimal(1); + return Decimal.pow(Decimal.add(2, tmp.atbb), player.b.points.plus(getFreeBoosters())) + }, g: function() { return Decimal.pow(Decimal.add(2, tmp.atgb), player.g.points).sub(1).times(getGenPowerGainMult()) }, t: function() { return { gain: Decimal.pow(3, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap))).sub(1).times(getTimeEnergyGainMult()), limit: Decimal.pow(2, player.t.points.plus(player.t.extCapsules.plus(tmp.freeExtCap))).sub(1).times(100).times(getTimeEnergyLimitMult()), }}, sb: function() { return Decimal.pow(1.5, player.sb.points.times(getSuperBoosterPow())) }, - h: function() { return 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) }, + 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); + if (ret.gte(100)) ret = ret.log10().times(50).min(ret); + return ret; + }, } const LAYER_UPGS = { @@ -658,7 +666,7 @@ const LAYER_UPGS = { }, q: { rows: 1, - cols: 2, + cols: 3, 11: { desc: "Quirks & Hindrance Spirit boost Point, Prestige Point, and Enhance Point gain.", cost: new Decimal(1), @@ -671,6 +679,11 @@ const LAYER_UPGS = { cost: new Decimal(5), unl: function() { 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) }, + }, }, } @@ -824,6 +837,7 @@ function checkForVars() { if (player.timePlayed === undefined) player.timePlayed = 0 if (player.hasNaN === undefined) player.hasNaN = false if (player.h === undefined) player.h = getStartPlayer().h + if (player.h.active === undefined) player.h.active = 0 if (player.q === undefined) player.q = getStartPlayer().q } @@ -1146,6 +1160,7 @@ function doReset(layer, force=false) { } 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))) return; let row = LAYER_ROW[layer] if (row==0) rowReset(0, layer) else for (let x=row;x>=1;x--) rowReset(x, layer) @@ -1228,10 +1243,12 @@ function getGenPowerEffExp() { 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)) exp = exp.times(1.15) + if (player.h.challs.includes(11)) exp = exp.times(1.25) return exp; } function getGenPowerEff() { + if (HCActive(11)) return new Decimal(1) let eff = player.g.power.plus(1).pow(getGenPowerEffExp()); return eff } @@ -1477,13 +1494,26 @@ function getQuirkLayerCost() { return cost.max(1); } +function getQuirkLayerMult() { + let mult = new Decimal(1) + if (player.q.upgrades.includes(13)) mult = mult.times(2) + return mult +} + function getQuirkEnergyGainExp() { return player.q.layers.sub(1) } function getQuirkEnergyEff() { let eff = player.q.energy.plus(1).pow(2) - if (player.q.upgrades.includes(12)) eff = eff.pow(player.q.energy.plus(1).log10().plus(1).log10().plus(1)) + if (player.q.upgrades.includes(12)) { + let mod = player.q.energy.plus(1).log10().plus(1).log10().plus(1) + if (mod.gte(2)) { + eff = eff.times(mod.div(2).pow(10)) + mod = new Decimal(2) + } + eff = eff.pow(mod) + } return eff; } @@ -1495,6 +1525,33 @@ function buyQuirkLayer() { player.q.layers = player.q.layers.plus(1) } +const H_CHALLS = { + rows: 1, + cols: 1, + 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", + }, +} + +function HCActive(x) { + 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)) player.h.challs.push(x); + player.h.active = 0 + } else { + player.h.active = x + } + doReset("h", true) +} + function gameLoop(diff) { if (isNaN(diff)) diff = 0; player.timePlayed += diff @@ -1506,9 +1563,10 @@ function gameLoop(diff) { player.t.energy = player.t.energy.plus(data.gain.times(diff)).min(data.limit) } if (player.q.unl) { - player.q.time = player.q.time.plus(diff) + let mult = getQuirkLayerMult() + player.q.time = player.q.time.plus(mult.times(diff)) let exp = getQuirkEnergyGainExp() - if (exp.gte(0)) player.q.energy = player.q.energy.plus(player.q.time.pow(exp).times(diff)) + if (exp.gte(0)) player.q.energy = player.q.energy.plus(player.q.time.pow(exp).times(mult).times(diff)) } if (player.q.best.gte(15)) player.e.points = player.e.points.plus(tmp.resetGain.e.times(diff)) diff --git a/js/v.js b/js/v.js index 0d9ca4b..6bd0351 100644 --- a/js/v.js +++ b/js/v.js @@ -22,13 +22,16 @@ function loadVue() { buyBuilding, getQuirkLayerCost, buyQuirkLayer, + startHindrance, + HCActive, LAYERS, LAYER_RES, LAYER_TYPE, LAYER_UPGS, LAYER_EFFS, LAYER_AMT_NAMES, - LAYER_RES_CEIL + LAYER_RES_CEIL, + H_CHALLS }, }) } \ No newline at end of file diff --git a/style.css b/style.css index 4246581..83590cf 100644 --- a/style.css +++ b/style.css @@ -351,6 +351,21 @@ ul { list-style-type: none; } +.hChall { + background-color: #fa7f8a; + border: 4px solid #ff0017; + color: #ff0017; + width: 300px; + height: 300px; + border-radius: 33.33%; +} + +.hChall.done { + background-color: #95fcb4; + border: 4px solid #038c2c; + color: #038c2c; +} + [tooltip] { position: relative; z-index: 2;