Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<canvas id="treeCanvas" class="canvas" v-if ="!(gameEnded && !player.keepGoing)"></canvas>

<div class="nav">
<span id="title">Lit</span>
<span id="subtitle">by thepaperpilot</span>
<div id="version" onclick="showTab('changelog-tab')" style="margin-right: 13px">{{VERSION.withoutName}}</div>
<span id="title">Lit+</span>
<span id="subtitle">modded by qq1010903229 (loader3229#3966), original game by thepaperpilot</span>
<div id="version" onclick="showTab('changelog-tab')" style="margin-right: 13px; display: none">{{VERSION.withoutName}}</div>
<div style="flex-grow:1"></div>
<div id="discord">
<img onclick="window.open((modInfo.discordLink ? modInfo.discordLink : 'https://discord.gg/F3xveHV'),'mywindow')" src="discord.png" target="_blank"></img>
Expand Down
112 changes: 96 additions & 16 deletions js/layers/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -142,8 +146,8 @@ addLayer("color", {
"blank",
["display-text", `You are collecting <span style="color: ${getCurrentColor()}; text-shadow: ${getCurrentColor()} 0 0 10px">${format(tmp.color.getResetGain)}</span> 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]]],
Expand All @@ -160,7 +164,7 @@ addLayer("color", {
3: {
title: "Alhazen",
display() {
return `<br/>Rebuyable. Double color energy gain.<br/><br/>Currently: x${format(this.effect())}<br/><br/>Cost: ${format(this.cost())} color energy`;
return `<br/>Rebuyable. Double color energy gain. (softcapped after ${hasYellowEffect(8)?format("2^1536"):format("2^1024")})<br/><br/>Currently: x${format(this.effect())}<br/><br/>Cost: ${format(this.cost())} color energy`;
},
style: () => ({
color: "white"
Expand All @@ -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() {
Expand All @@ -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() {
Expand Down Expand Up @@ -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() {
Expand All @@ -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() {
Expand All @@ -255,7 +270,7 @@ addLayer("color", {
55: {
title: "Einstein",
display() {
return `<br/>Rebuyable. Add 0.01 to the color gain exponent.<br/><br/>Currently: ^${format(this.effect())}<br/><br/>Cost: ${format(this.cost())} color energy`;
return `<br/>Rebuyable. Add 0.01 to the color gain exponent. (softcapped after ${format(hasUpgrade("color", 89)?1.49:1.36)})<br/><br/>Currently: ^${format(this.effect())}<br/><br/>Cost: ${format(this.cost())} color energy`;
},
style: () => ({
color: "white"
Expand All @@ -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() {
Expand All @@ -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;
}
},
Expand Down Expand Up @@ -333,7 +372,12 @@ addLayer("color", {
},
5: {
title: "Wave Theory",
description: "<br/>Color energy gain is multiplied by 5 raised to the amount of unspent light + 1",
description(){
if(hasYellowEffect(10)){
return "<br/>Color energy gain is multiplied by "+format(Decimal.pow(player.color.resetTime,10).add(5))+" raised to the amount of unspent light + 1";
}
return "<br/>Color energy gain is multiplied by 5 raised to the amount of unspent light + 1";
},
cost: new Decimal(1e6),
style: () => ({
color: "white"
Expand All @@ -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() {
Expand All @@ -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() {
Expand Down Expand Up @@ -396,6 +446,36 @@ addLayer("color", {
unlocked() {
return player.green.gte(this.id);
}
},
89: {
title: "Softcap theory",
description: "<br/>\"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: "<br/>\"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())}`;
}
}
}
});
Expand Down
12 changes: 6 additions & 6 deletions js/mod.js
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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 = `<h1>Changelog:</h1><br>
Expand All @@ -22,7 +22,7 @@ let changelog = `<h1>Changelog:</h1><br>
<br><h3>v1.0</h3><br>
- Finished rest of game.<br>`;

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)
Expand Down Expand Up @@ -63,7 +63,7 @@ var displayThings = [

// Determines when the game "ends"
function isEndgame() {
return player.points.gte(69);
return player.points.gte(300);
}


Expand Down
Loading