From 220b9fd84189c947f3a10095e5656ababaa680be Mon Sep 17 00:00:00 2001 From: Jacorb90 <39597610+Jacorb90@users.noreply.github.com> Date: Wed, 19 Aug 2020 18:12:31 -0400 Subject: [PATCH] Alpha Build 2 --- index.html | 19 +++++++++-- js/game.js | 93 +++++++++++++++++++++++++++++++++++++++++++++++------- style.css | 20 ++++++++++++ 3 files changed, 119 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index ea1d980..7e78047 100644 --- a/index.html +++ b/index.html @@ -11,8 +11,19 @@
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 |
2 space energy Keep Booster/Generator milestones on reset |
3 space energy Keep Prestige Upgrades on reset |
diff --git a/js/game.js b/js/game.js
index d64aa90..ad8f3b3 100644
--- a/js/game.js
+++ b/js/game.js
@@ -126,7 +126,7 @@ const LAYER_EFFS = {
b: function() { return Decimal.pow(Decimal.add(2, addToBoosterBase()), player.b.points) },
g: function() { return Decimal.pow(Decimal.add(2, addToGenBase()), player.g.points).sub(1).times(getGenPowerGainMult()) },
t: function() { return {
- gain: Decimal.pow(3, player.t.points.plus(player.t.extCapsules.plus(getFreeExtCapsules()))).sub(1),
+ gain: Decimal.pow(3, player.t.points.plus(player.t.extCapsules.plus(getFreeExtCapsules()))).sub(1).times(getTimeEnergyGainMult()),
limit: Decimal.pow(2, player.t.points.plus(player.t.extCapsules.plus(getFreeExtCapsules()))).sub(1).times(100).times(getTimeEnergyLimitMult()),
}},
}
@@ -196,7 +196,7 @@ const LAYER_UPGS = {
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)?5:1) },
+ currently: function() { return player.g.points.plus(1).log10().sqrt().div(3).times(player.t.upgrades.includes(14)?8.5:1) },
effDisp: function(x) { return "+"+format(x)+" to base" },
},
13: {
@@ -238,7 +238,7 @@ const LAYER_UPGS = {
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)?2.75:1) },
+ currently: function() { return player.b.points.plus(1).log10().sqrt().div(3).times(player.t.upgrades.includes(14)?3.75:1) },
effDisp: function(x) { return "+"+format(x)+" to base" },
},
13: {
@@ -318,7 +318,7 @@ const LAYER_UPGS = {
},
},
t: {
- rows: 1,
+ rows: 2,
cols: 4,
11: {
desc: "Non-extra Time Capsules boost the Booster effect.",
@@ -342,13 +342,35 @@ const LAYER_UPGS = {
effDisp: function(x) { return "+"+format(x) },
},
14: {
- desc: "Generator Upgrades 2 & 10 is 175% stronger, and Booster Upgrade 2 is 400% stronger.",
+ 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) },
},
+ 21: {
+ desc: "Time Energy boosts its own production & cap, 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" },
+ },
+ 22: {
+ desc: "???",
+ cost: new Decimal(1/0),
+ unl: function() { return false },
+ },
+ 23: {
+ desc: "???",
+ cost: new Decimal(1/0),
+ unl: function() { return false },
+ },
+ 24: {
+ desc: "???",
+ cost: new Decimal(1/0),
+ unl: function() { return false },
+ },
},
s: {
- rows: 1,
+ rows: 2,
cols: 4,
11: {
desc: "Add a free level to all Space Buildings.",
@@ -374,12 +396,35 @@ const LAYER_UPGS = {
cost: new Decimal(4),
unl: function() { 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" },
+ },
+ 22: {
+ desc: "???",
+ cost: new Decimal(1/0),
+ unl: function() { return false },
+ },
+ 23: {
+ desc: "???",
+ cost: new Decimal(1/0),
+ unl: function() { return false },
+ },
+ 24: {
+ desc: "???",
+ cost: new Decimal(1/0),
+ unl: function() { return false },
+ },
},
}
const TAB_REQS = {
tree: function() { return true },
options: function() { return true },
+ info: function() { return true },
p: function() { return (player.p.unl||player.points.gte(getLayerReq('p')))&&layerUnl('p') },
b: function() { return (player.b.unl||player.points.gte(getLayerReq('b')))&&layerUnl('b') },
g: function() { return (player.g.unl||player.points.gte(getLayerReq('g')))&&layerUnl('g') },
@@ -634,11 +679,11 @@ function rowReset(row, layer) {
case 2:
player.b.points = new Decimal(0);
player.b.best = new Decimal(0);
- player.b.upgrades = [];
+ if (!player.t.best.gte(4)) player.b.upgrades = [];
player.g.points = new Decimal(0);
player.g.power = new Decimal(0);
player.g.best = new Decimal(0);
- player.g.upgrades = [];
+ if (!player.s.best.gte(4)) player.g.upgrades = [];
player.t.energy = new Decimal(0);
if (layer=="t"||layer=="e"||layer=="s") {
if (player[layer].best.gte(2)) {
@@ -802,14 +847,24 @@ function getFreeExtCapsules() {
function getTimeEnergyEff() {
if (!player.t.unl) return new Decimal(1)
- let eff = player.t.energy.plus(1).pow(1.2)
+ let exp = 1.2
+ if (player.t.upgrades.includes(21)) exp = 1.75
+ let eff = player.t.energy.plus(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)) mult = mult.times(LAYER_UPGS.t[21].currently())
+ return mult;
+}
+
function getTimeEnergyLimitMult() {
if (!player.t.unl) return new Decimal(1)
let mult = new Decimal(1);
if (player.t.upgrades.includes(12)) mult = mult.times(LAYER_UPGS.t[12].currently())
+ if (player.t.upgrades.includes(21)) mult = mult.times(LAYER_UPGS.t[21].currently())
return mult;
}
@@ -839,6 +894,13 @@ function getSpaceBuildingCost(x) {
return cost
}
+function getSpaceBuildingPow() {
+ if (!player.s.unl) return new Decimal(0)
+ let pow = new Decimal(1)
+ if (player.s.upgrades.includes(21)) pow = pow.times(LAYER_UPGS.s[21].currently())
+ return pow
+}
+
function getExtraBuildingLevels(x) {
let lvl = new Decimal(0)
if (player.s.upgrades.includes(11)) lvl = lvl.plus(1);
@@ -850,6 +912,8 @@ function getSpaceBuildingEff(x) {
let bought = player.s.buildings[x].plus(getExtraBuildingLevels(x));
if (!player.s.unl) bought = new Decimal(0);
if (getSpaceBuildingsUnl() |