diff --git a/js/layers/color.js b/js/layers/color.js
index 75ecf8e1c..4dc0e07e7 100644
--- a/js/layers/color.js
+++ b/js/layers/color.js
@@ -120,13 +120,17 @@ addLayer("color", {
buyUpg(this.layer, id);
}
}
- if (hasCyanEffect(3)) {
+ if (hasCyanEffect(8)) {
for (id in layers[this.layer].buyables) {
- /*
if (layers[this.layer].buyables[id].buyMax) {
layers[this.layer].buyables[id].buyMax();
}
- */
+ if (isPlainObject(tmp[this.layer].buyables[id]) && (layers[this.layer].buyables[id].canAfford === undefined || layers[this.layer].buyables[id].canAfford() === true)) {
+ buyBuyable(this.layer, id);
+ }
+ }
+ }else if (hasCyanEffect(3)) {
+ for (id in layers[this.layer].buyables) {
if (isPlainObject(tmp[this.layer].buyables[id]) && (layers[this.layer].buyables[id].canAfford === undefined || layers[this.layer].buyables[id].canAfford() === true)) {
buyBuyable(this.layer, id);
}
@@ -142,8 +146,8 @@ addLayer("color", {
"blank",
["display-text", `You are collecting
${format(tmp.color.getResetGain)} color energy per second`],
"blank",
- ["row", [["upgrade", 1], ["upgrade", 5], ["upgrade", 21]]],
- ["row", [["upgrade", 2], ["upgrade", 8], ["upgrade", 34]]],
+ ["row", [["upgrade", 1], ["upgrade", 5], ["upgrade", 21], ["upgrade", 89]]],
+ ["row", [["upgrade", 2], ["upgrade", 8], ["upgrade", 34], ["upgrade", 144]]],
"blank",
["row", [["buyable", 3], ["buyable", 13], ["buyable", 55]]],
["row", [["buyMax", 3], ["buyMax", 13], ["buyMax", 55]]],
@@ -160,7 +164,7 @@ addLayer("color", {
3: {
title: "Alhazen",
display() {
- return `
Rebuyable. Double color energy gain.
Currently: x${format(this.effect())}
Cost: ${format(this.cost())} color energy`;
+ return `
Rebuyable. Double color energy gain. (softcapped after ${hasYellowEffect(8)?format("2^1536"):format("2^1024")})
Currently: x${format(this.effect())}
Cost: ${format(this.cost())} color energy`;
},
style: () => ({
color: "white"
@@ -171,13 +175,24 @@ addLayer("color", {
return new Decimal(100).times(new Decimal(10).pow(amount));
},
effect() {
- return new Decimal(2).pow(this.getLevel());
+ effect = new Decimal(2).pow(this.getLevel());
+ if (hasYellowEffect(6)) {
+ effect = new Decimal(2.2).pow(this.getLevel());
+ }
+ if(hasYellowEffect(8)){
+ if(effect.gte("2^1536")){
+ effect = Decimal.pow("2^1536",effect.log("2^1536").sqrt());
+ }
+ }else if(effect.gte("2^1024")){
+ effect = Decimal.pow("2^1024",effect.log("2^1024").sqrt());
+ }
+ return effect;
},
canAfford() {
return player[this.layer].points.gte(this.cost());
},
buy() {
- player[this.layer].points = player[this.layer].points.sub(this.cost());
+ if (!hasCyanEffect(6))player[this.layer].points = player[this.layer].points.sub(this.cost());
setBuyableAmount(this.layer, this.id, getBuyableAmount(this.layer, this.id).add(1));
},
buyMax() {
@@ -186,7 +201,7 @@ addLayer("color", {
const baseCost = new Decimal(100);
const amountAffordable = player[this.layer].points.times(costExponent.sub(1)).div(new Decimal(baseCost).times(Decimal.pow(costExponent, amount))).add(1).log(costExponent).floor();
const cost = baseCost.times(costExponent.pow(amount).times(costExponent.pow(amountAffordable).sub(1))).div(costExponent.sub(1));
- player[this.layer].points = player[this.layer].points.sub(cost);
+ if (!hasCyanEffect(6))player[this.layer].points = player[this.layer].points.sub(cost);
setBuyableAmount(this.layer, this.id, amount.add(amountAffordable));
},
unlocked() {
@@ -223,7 +238,7 @@ addLayer("color", {
return player[this.layer].points.gte(this.cost());
},
buy() {
- player[this.layer].points = player[this.layer].points.sub(this.cost());
+ if (!hasCyanEffect(6))player[this.layer].points = player[this.layer].points.sub(this.cost());
setBuyableAmount(this.layer, this.id, getBuyableAmount(this.layer, this.id).add(1));
},
buyMax() {
@@ -232,7 +247,7 @@ addLayer("color", {
const baseCost = new Decimal(1000);
const amountAffordable = player[this.layer].points.times(costExponent.sub(1)).div(new Decimal(baseCost).times(Decimal.pow(costExponent, amount))).add(1).log(costExponent).floor();
const cost = baseCost.times(costExponent.pow(amount).times(costExponent.pow(amountAffordable).sub(1))).div(costExponent.sub(1));
- player[this.layer].points = player[this.layer].points.sub(cost);
+ if (!hasCyanEffect(6))player[this.layer].points = player[this.layer].points.sub(cost);
setBuyableAmount(this.layer, this.id, amount.add(amountAffordable));
},
unlocked() {
@@ -255,7 +270,7 @@ addLayer("color", {
55: {
title: "Einstein",
display() {
- return `
Rebuyable. Add 0.01 to the color gain exponent.
Currently: ^${format(this.effect())}
Cost: ${format(this.cost())} color energy`;
+ return `
Rebuyable. Add 0.01 to the color gain exponent. (softcapped after ${format(hasUpgrade("color", 89)?1.49:1.36)})
Currently: ^${format(this.effect())}
Cost: ${format(this.cost())} color energy`;
},
style: () => ({
color: "white"
@@ -266,13 +281,29 @@ addLayer("color", {
return new Decimal(1e21).tetrate(amount.div(100).add(1));
},
effect() {
- return this.getLevel().times(0.01).add(1);
+ let effect=this.getLevel();
+ if (hasUpgrade("color", 89)){
+ if(effect.gte(49))effect=effect.pow(0.5).times(7);
+ } else {
+ if(effect.gte(36))effect=effect.pow(0.5).times(6);
+ }
+ if (hasUpgrade("color", 89)){
+ if(effect.gte(49*1.5))effect=effect.pow(0.5).times(7*Math.sqrt(1.5));
+ } else {
+ if(effect.gte(36*1.5))effect=effect.pow(0.5).times(6*Math.sqrt(1.5));
+ }
+ if (hasUpgrade("color", 89)){
+ if(effect.gte(49*2))effect=effect.pow(0.5).times(7*Math.sqrt(2));
+ } else {
+ if(effect.gte(36*2))effect=effect.pow(0.5).times(6*Math.sqrt(2));
+ }
+ return effect.mul(0.01).add(1);
},
canAfford() {
return player[this.layer].points.gte(this.cost());
},
buy() {
- player[this.layer].points = player[this.layer].points.sub(this.cost());
+ if (!hasCyanEffect(6))player[this.layer].points = player[this.layer].points.sub(this.cost());
setBuyableAmount(this.layer, this.id, getBuyableAmount(this.layer, this.id).add(1));
},
buyMax() {
@@ -295,7 +326,15 @@ addLayer("color", {
},
getLevel() {
let amount = getBuyableAmount(this.layer, this.id);
- amount = amount.add(Decimal.max(player.green.sub(55), 0));
+ amount = amount.add(Decimal.clamp(player.green.sub(55), 0, 33));
+ amount = amount.add(Decimal.clamp(player.green.sub(89), 0, 54));
+ amount = amount.add(Decimal.max(player.green.sub(144), 0));
+ if (hasYellowEffect(7)) {
+ amount = amount.mul(2);
+ }
+ if (hasUpgrade("color", 144)) {
+ amount = amount.mul(upgradeEffect("color", 144));
+ }
return amount;
}
},
@@ -333,7 +372,12 @@ addLayer("color", {
},
5: {
title: "Wave Theory",
- description: "
Color energy gain is multiplied by 5 raised to the amount of unspent light + 1",
+ description(){
+ if(hasYellowEffect(10)){
+ return "
Color energy gain is multiplied by "+format(Decimal.pow(player.color.resetTime,10).add(5))+" raised to the amount of unspent light + 1";
+ }
+ return "
Color energy gain is multiplied by 5 raised to the amount of unspent light + 1";
+ },
cost: new Decimal(1e6),
style: () => ({
color: "white"
@@ -343,6 +387,9 @@ addLayer("color", {
return player.green.gte(this.id);
},
effect() {
+ if(hasYellowEffect(10)){
+ return Decimal.pow(Decimal.pow(player.color.resetTime,10).add(5), player.points.sub(player.red).sub(player.green).sub(player.blue).add(1));
+ }
return Decimal.pow(5, player.points.sub(player.red).sub(player.green).sub(player.blue).add(1));
},
effectDisplay() {
@@ -361,6 +408,9 @@ addLayer("color", {
return player.green.gte(this.id);
},
effect() {
+ if(hasYellowEffect(9)){
+ return new Decimal(player.color.resetTime).max(1).pow(Decimal.pow(player.color.resetTime,0.75));
+ }
return new Decimal(player.color.resetTime).max(1);
},
effectDisplay() {
@@ -396,6 +446,36 @@ addLayer("color", {
unlocked() {
return player.green.gte(this.id);
}
+ },
+ 89: {
+ title: "Softcap theory",
+ description: "
\"Einstein\"'s softcap starts later (1.36 -> 1.49)",
+ cost: new Decimal("1e600"),
+ style: () => ({
+ color: "white"
+ }),
+ color: () => getCurrentColor(.5),
+ unlocked() {
+ return player.green.gte(this.id);
+ }
+ },
+ 144: {
+ title: "E=m*c^2",
+ description: "
\"Einstein\"'s level is boosted by its bought level.",
+ cost: new Decimal("1e1000"),
+ style: () => ({
+ color: "white"
+ }),
+ color: () => getCurrentColor(.5),
+ unlocked() {
+ return player.green.gte(this.id);
+ },
+ effect() {
+ return getBuyableAmount("color", 55).add(1);
+ },
+ effectDisplay() {
+ return `x${format(this.effect())}`;
+ }
}
}
});
diff --git a/js/mod.js b/js/mod.js
index 2209fffbb..409120151 100644
--- a/js/mod.js
+++ b/js/mod.js
@@ -1,7 +1,7 @@
let modInfo = {
- name: "Lit",
+ name: "Lit+",
id: "lit",
- author: "thepaperpilot",
+ author: "thepaperpilot, qq1010903229",
pointsName: "light",
discordName: "The Paper Pilot Community Server",
discordLink: "https://discord.gg/WzejVAx",
@@ -12,8 +12,8 @@ let modInfo = {
// Set your version in num and name
let VERSION = {
- num: "1.0",
- name: "Finished Game Jam",
+ num: "1.2",
+ name: "",
};
let changelog = `
Changelog:
@@ -22,7 +22,7 @@ let changelog = `
Changelog:
v1.0
- Finished rest of game.
`;
-let winText = "Congratulations! You've beaten the game! This was made in a 7 day game jam called IGJ 2021, and has no plans for further content. That said, feel free to see how much light you can get!";
+let winText = "Congratulations! You've beaten the game!";
// If you add new functions anywhere inside of a layer, and those functions have an effect when called, add them here.
// (The ones here are examples, all official functions are already taken care of)
@@ -63,7 +63,7 @@ var displayThings = [
// Determines when the game "ends"
function isEndgame() {
- return player.points.gte(69);
+ return player.points.gte(300);
}
diff --git a/js/tree.js b/js/tree.js
index 661266dce..5a9e01357 100644
--- a/js/tree.js
+++ b/js/tree.js
@@ -264,7 +264,12 @@ function getColorEffectDisplay(color, amount = player[color]) {
2: "Battery cap is multiplied by number of
\"Alhazen\" levels",
3: "Get sqrt(red light) more batteries",
4: "Each point of secondary colored light gives a free
\"Newton\" level",
- 5: "Color gain effect is multiplied by battery cap"
+ 5: "Color gain effect is multiplied by battery cap",
+ 6: "Base effect of
\"Alhazen\" is 2.2, instead of 2",
+ 7: "Double the level of
\"Einstein\"",
+ 8: "Softcap of
\"Alhazen\" starts at Infinity^1.5",
+ 9: "\"Emission theory\"'s effect is powered by itself^0.75",
+ 10: "\"Wave Theory\"'s base is increased based on time spent in challenge"
}[i]);
} else if (color === "cyan") {
getEffectDisplay = i => ({
@@ -272,7 +277,12 @@ function getColorEffectDisplay(color, amount = player[color]) {
2: "Batteries act as if they're being charged for an extra quarter second for each secondary colored light",
3: "Automatically purchase buyables",
4: "Even batteries charge themselves",
- 5: "Odd batteries charge themselves"
+ 5: "Odd batteries charge themselves",
+ 6: "Purchasing buyables doesn't cost any color energy",
+ 7: "No Effect",
+ 8: "Automatically purchase max buyables",
+ 9: "No Effect",
+ 10: "Automatically get light"
}[i]);
} else if (color === "magenta") {
getEffectDisplay = i => ({
@@ -280,12 +290,19 @@ function getColorEffectDisplay(color, amount = player[color]) {
2: "Divide goal by amount of secondary light",
3: "Allow bulk completion of up to 10 light at once",
4: "Lower goal by 1 level for each upgrade purchased",
- 5: "Lower goal by 1 level for each battery"
+ 5: "Lower goal by 1 level for each battery",
+ 6: "Lower goal by 3 levels",
+ 7: "Allow bulk completion of up to 20 light at once",
+ 8: "Allow bulk completion of up to 30 light at once",
+ 9: "Allow bulk completion of up to 40 light at once",
+ 10: "Allow bulk completion of up to 50 light at once"
}[i]);
}
let numEffects = player.points;
if (!(color in player)) {
- numEffects = numEffects.min(player.points.div(2).sqrt().floor()).min(5);
+ numEffects = numEffects.min(player.points.div(2).sqrt().floor());
+ if (color !== "yellow")numEffects = numEffects.min(10);
+ else numEffects = numEffects.min(10);
}
effectDisplayCache[color] = {
amount: amount,
@@ -336,7 +353,7 @@ function getSecondaryColor(color, component1, component2, requiredLevel, descrip
["column", [
"blank",
["display-text", `
${color.charAt(0).toUpperCase() + color.slice(1)}
${description}`],
- nextAt.gt(50) ? null : ["display-text", `
Next at ${formatWhole(nextAt)} each of ${component1} and ${component2} light
`],
+ nextAt.gt(9999) ? null : ["display-text", `
Next at ${formatWhole(nextAt)} each of ${component1} and ${component2} light
`],
"blank",
["display-text", getColorEffectDisplay(color, secondaryColor)]
]]
@@ -372,7 +389,7 @@ function getSecondaryColorBar(color, component1, component2) {
if (amount.eq(0)) {
return 0;
}
- return amount.div(player.points.div(2).sqrt().floor().min(5));
+ return amount.div(player.points.div(2).sqrt().floor());
},
style: {
marginBottom: "16px"
@@ -415,11 +432,11 @@ addLayer("tree-tab", {
1: {
name: "Get more color",
unlocked: true,
- completionLimit: 10,
+ completionLimit: 50,
fullDisplay() {
if (hasMagentaEffect(3) && inChallenge(this.layer, this.id) && this.canComplete()) {
const completions = this.canComplete();
- return `Start gathering color energy to produce a new light
Exit now to get
${completions} light${completions === 10 ? "" : `
Next at: ${formatWhole(this.goal(player.points.add(completions)))} color energy`}`;
+ return `Start gathering color energy to produce a new light
Exit now to get
${completions} light${`
Next at: ${formatWhole(this.goal(player.points.add(completions)))} color energy`}`;
}
return `Start gathering color energy to produce a new light
Goal: ${formatWhole(this.goal())} color energy`;
},
@@ -437,7 +454,15 @@ addLayer("tree-tab", {
if (hasMagentaEffect(5)) {
level = level.sub(getNumBatteries());
}
- let goal = softcap(level.max(1), new Decimal(50), new Decimal(2)).factorial();
+ if (hasMagentaEffect(6)) {
+ level = level.sub(3);
+ }
+ level = softcap(level.max(1), new Decimal(50), new Decimal(2));
+ level = softcap(level.max(1), new Decimal(800), new Decimal(2));
+ level = softcap(level.max(1), new Decimal(4000), new Decimal(2));
+ level = softcap(level.max(1), new Decimal(40000), new Decimal(2));
+ level = softcap(level.max(1), new Decimal(1500000), new Decimal(2));
+ let goal = level.factorial();
if (hasUpgrade("color", 2)) {
goal = goal.div(upgradeEffect("color", 2));
}
@@ -447,11 +472,19 @@ addLayer("tree-tab", {
return goal;
},
canComplete() {
+ if (hasCyanEffect(10)){
+ if (player.color.points.gte(this.goal()))player.points = player.points.add(1);
+ }
let completions = 0;
if (!hasMagentaEffect(3)) {
return player.color.points.gte(this.goal());
}
- while (player.color.points.gte(this.goal(player.points.add(completions))) && completions < 10) {
+ let maxCompletions = 10;
+ if (hasMagentaEffect(7)) maxCompletions += 10;
+ if (hasMagentaEffect(8)) maxCompletions += 10;
+ if (hasMagentaEffect(9)) maxCompletions += 10;
+ if (hasMagentaEffect(10)) maxCompletions += 10;
+ while (player.color.points.gte(this.goal(player.points.add(completions))) && completions < maxCompletions) {
completions++;
}
return completions;
@@ -525,8 +558,8 @@ addLayer("tree-tab", {
},
6: {
title: "Win the game!",
- requirementDescription: "69 light",
- done: () => player.points.gte(69),
+ requirementDescription: "300 light",
+ done: () => player.points.gte(300),
unlocked: () => hasMilestone("tree-tab", 5)
}
}