
diff --git a/js/layers/color.js b/js/layers/color.js
index 75ecf8e1cf..22bd1545a5 100644
--- a/js/layers/color.js
+++ b/js/layers/color.js
@@ -142,7 +142,7 @@ 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", 1], ["upgrade", 5], ["upgrade", 21], ["upgrade", 89]]],
["row", [["upgrade", 2], ["upgrade", 8], ["upgrade", 34]]],
"blank",
["row", [["buyable", 3], ["buyable", 13], ["buyable", 55]]],
@@ -160,7 +160,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,7 +171,18 @@ 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());
@@ -255,7 +266,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,7 +277,23 @@ 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());
@@ -295,7 +322,11 @@ 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.max(player.green.sub(89), 0));
+ if (hasYellowEffect(7)) {
+ amount = amount.mul(2);
+ }
return amount;
}
},
@@ -396,6 +427,18 @@ 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);
+ }
}
}
});
diff --git a/js/mod.js b/js/mod.js
index 2209fffbbe..5c58ed92a8 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.1",
+ 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(200);
}
diff --git a/js/tree.js b/js/tree.js
index 661266dce6..079e53e793 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: "Effect of
\"Alhazen\" is 2.2x",
+ 7: "Double the level of
\"Einstein\"",
+ 8: "Softcap of
\"Alhazen\" starts at Infinity^1.5",
+ 9: "No Effect",
+ 10: "No Effect"
}[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: "No Effect",
+ 7: "No Effect",
+ 8: "No Effect",
+ 9: "No Effect",
+ 10: "No Effect"
}[i]);
} else if (color === "magenta") {
getEffectDisplay = i => ({
@@ -280,12 +290,17 @@ 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()).min(10);
}
effectDisplayCache[color] = {
amount: amount,
@@ -336,7 +351,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 +387,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().min(10));
},
style: {
marginBottom: "16px"
@@ -419,7 +434,7 @@ addLayer("tree-tab", {
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,6 +452,9 @@ addLayer("tree-tab", {
if (hasMagentaEffect(5)) {
level = level.sub(getNumBatteries());
}
+ if (hasMagentaEffect(6)) {
+ level = level.sub(3);
+ }
let goal = softcap(level.max(1), new Decimal(50), new Decimal(2)).factorial();
if (hasUpgrade("color", 2)) {
goal = goal.div(upgradeEffect("color", 2));
@@ -451,7 +469,12 @@ addLayer("tree-tab", {
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 +548,8 @@ addLayer("tree-tab", {
},
6: {
title: "Win the game!",
- requirementDescription: "69 light",
- done: () => player.points.gte(69),
+ requirementDescription: "200 light",
+ done: () => player.points.gte(200),
unlocked: () => hasMilestone("tree-tab", 5)
}
}
From 45c99d50a85e5ae64eae1bdd0294286c39f6db63 Mon Sep 17 00:00:00 2001
From: qq1010903229 <1010903229@qq.com>
Date: Sun, 18 Apr 2021 12:43:45 +0800
Subject: [PATCH 2/3] commit
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 0e57443bf3..1c40d3bdd3 100644
--- a/index.html
+++ b/index.html
@@ -40,7 +40,7 @@
Lit+
-
modded by qq101090329, original game by thepaperpilot
+
modded by qq1010903229 (loader3229#3966), original game by thepaperpilot
{{VERSION.withoutName}}
From c63629a2bf188e6b128154e801bde4e15ce4f0ca Mon Sep 17 00:00:00 2001
From: qq1010903229 <1010903229@qq.com>
Date: Sun, 20 Jun 2021 08:23:32 +0800
Subject: [PATCH 3/3] commit
---
js/layers/color.js | 59 +++++++++++++++++++++++++++++++++++++---------
js/mod.js | 4 ++--
js/tree.js | 34 ++++++++++++++++----------
3 files changed, 72 insertions(+), 25 deletions(-)
diff --git a/js/layers/color.js b/js/layers/color.js
index 22bd1545a5..4dc0e07e7b 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);
}
@@ -143,7 +147,7 @@ addLayer("color", {
["display-text", `You are collecting ${format(tmp.color.getResetGain)} color energy per second`],
"blank",
["row", [["upgrade", 1], ["upgrade", 5], ["upgrade", 21], ["upgrade", 89]]],
- ["row", [["upgrade", 2], ["upgrade", 8], ["upgrade", 34]]],
+ ["row", [["upgrade", 2], ["upgrade", 8], ["upgrade", 34], ["upgrade", 144]]],
"blank",
["row", [["buyable", 3], ["buyable", 13], ["buyable", 55]]],
["row", [["buyMax", 3], ["buyMax", 13], ["buyMax", 55]]],
@@ -188,7 +192,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() {
@@ -197,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() {
@@ -234,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() {
@@ -243,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() {
@@ -299,7 +303,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() {
@@ -323,10 +327,14 @@ addLayer("color", {
getLevel() {
let amount = getBuyableAmount(this.layer, this.id);
amount = amount.add(Decimal.clamp(player.green.sub(55), 0, 33));
- amount = amount.add(Decimal.max(player.green.sub(89), 0));
+ 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;
}
},
@@ -364,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"
@@ -374,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() {
@@ -392,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() {
@@ -439,6 +458,24 @@ addLayer("color", {
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 5c58ed92a8..4091201519 100644
--- a/js/mod.js
+++ b/js/mod.js
@@ -12,7 +12,7 @@ let modInfo = {
// Set your version in num and name
let VERSION = {
- num: "1.1",
+ num: "1.2",
name: "",
};
@@ -63,7 +63,7 @@ var displayThings = [
// Determines when the game "ends"
function isEndgame() {
- return player.points.gte(200);
+ return player.points.gte(300);
}
diff --git a/js/tree.js b/js/tree.js
index 079e53e793..5a9e013571 100644
--- a/js/tree.js
+++ b/js/tree.js
@@ -265,11 +265,11 @@ function getColorEffectDisplay(color, amount = player[color]) {
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",
- 6: "Effect of \"Alhazen\" is 2.2x",
+ 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: "No Effect",
- 10: "No Effect"
+ 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 => ({
@@ -278,11 +278,11 @@ function getColorEffectDisplay(color, amount = player[color]) {
3: "Automatically purchase buyables",
4: "Even batteries charge themselves",
5: "Odd batteries charge themselves",
- 6: "No Effect",
+ 6: "Purchasing buyables doesn't cost any color energy",
7: "No Effect",
- 8: "No Effect",
+ 8: "Automatically purchase max buyables",
9: "No Effect",
- 10: "No Effect"
+ 10: "Automatically get light"
}[i]);
} else if (color === "magenta") {
getEffectDisplay = i => ({
@@ -300,7 +300,9 @@ function getColorEffectDisplay(color, amount = player[color]) {
}
let numEffects = player.points;
if (!(color in player)) {
- numEffects = numEffects.min(player.points.div(2).sqrt().floor()).min(10);
+ 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,
@@ -387,7 +389,7 @@ function getSecondaryColorBar(color, component1, component2) {
if (amount.eq(0)) {
return 0;
}
- return amount.div(player.points.div(2).sqrt().floor().min(10));
+ return amount.div(player.points.div(2).sqrt().floor());
},
style: {
marginBottom: "16px"
@@ -430,7 +432,7 @@ 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();
@@ -455,7 +457,12 @@ addLayer("tree-tab", {
if (hasMagentaEffect(6)) {
level = level.sub(3);
}
- let goal = softcap(level.max(1), new Decimal(50), new Decimal(2)).factorial();
+ 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));
}
@@ -465,6 +472,9 @@ 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());
@@ -548,8 +558,8 @@ addLayer("tree-tab", {
},
6: {
title: "Win the game!",
- requirementDescription: "200 light",
- done: () => player.points.gte(200),
+ requirementDescription: "300 light",
+ done: () => player.points.gte(300),
unlocked: () => hasMilestone("tree-tab", 5)
}
}