generated from incremental-social/The-Modding-Tree
Compare commits
27 commits
3f8de45f2a
...
56a3b148dd
Author | SHA1 | Date | |
---|---|---|---|
56a3b148dd | |||
b059943431 | |||
5ad2cf2ec7 | |||
e02defcdfa | |||
dc4539ec52 | |||
707d9f3e73 | |||
225af74c76 | |||
436505af2d | |||
23e3094b13 | |||
3152cb8968 | |||
2835855ba5 | |||
dd5a98dcfa | |||
6901cf9290 | |||
d335c7171e | |||
006062ceb1 | |||
f1ac34d2a7 | |||
9dea0c31e7 | |||
88c0fa775b | |||
e3eeebc48e | |||
0ba046a84b | |||
6446cb09db | |||
3749af2fef | |||
6bea750d59 | |||
be53b94733 | |||
7f90ca449f | |||
c751543ea1 | |||
f590171c4f |
23 changed files with 1205 additions and 802 deletions
3
.idea/.gitignore
vendored
Normal file
3
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
9
.idea/just_another_tree.iml
Normal file
9
.idea/just_another_tree.iml
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
6
.idea/misc.xml
Normal file
6
.idea/misc.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/just_another_tree.iml" filepath="$PROJECT_DIR$/.idea/just_another_tree.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,83 +0,0 @@
|
|||
let modInfo = {
|
||||
name: "The Modding Tree",
|
||||
id: "modbase",
|
||||
pointsName: "points",
|
||||
modFiles: ["Demo/layers/c.js", "Demo/layers/f.js", "Demo/layers/a.js", "Demo/demoTree.js"],
|
||||
|
||||
|
||||
discordName: "",
|
||||
discordLink: "",
|
||||
initialStartPoints: new Decimal (10), // Used for hard resets and new players
|
||||
offlineLimit: 1, // In hours
|
||||
}
|
||||
|
||||
// Set your version in num and name
|
||||
let VERSION = {
|
||||
num: "2.6.6",
|
||||
name: "Fixed Reality",
|
||||
}
|
||||
|
||||
let changelog = `<h1>Changelog:</h1><br>
|
||||
<h3>v0.0</h3><br>
|
||||
- Added things.<br>
|
||||
- Added stuff.`
|
||||
|
||||
let winText = `Congratulations! You have reached the end and beaten this game, but for now...`
|
||||
// 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)
|
||||
var doNotCallTheseFunctionsEveryTick = ["doReset", "buy", "onPurchase", "blowUpEverything"]
|
||||
|
||||
function getStartPoints(){
|
||||
return new Decimal(modInfo.initialStartPoints)
|
||||
}
|
||||
|
||||
// Determines if it should show points/sec
|
||||
function canGenPoints(){
|
||||
return hasUpgrade("c", 11)
|
||||
}
|
||||
|
||||
// Calculate points/sec!
|
||||
function getPointGen() {
|
||||
if(!canGenPoints())
|
||||
return new Decimal(0)
|
||||
|
||||
let gain = new Decimal(1)
|
||||
if (hasUpgrade("c", 12)) gain = gain.times(upgradeEffect("c", 12))
|
||||
return gain
|
||||
}
|
||||
|
||||
// You can add non-layer related variables that should to into "player" and be saved here, along with default values
|
||||
function addedPlayerData() { return {
|
||||
weather: "Yes",
|
||||
happiness: new Decimal(72),
|
||||
}}
|
||||
|
||||
// Display extra things at the top of the page
|
||||
var displayThings = [
|
||||
function() {if (player.points.eq(69)) return "Tee hee!"},
|
||||
function() {if (player.f.points.gt(1)) return `You have ${player.f.points} farm points. (Which do nothing.)`},
|
||||
function() {if (inChallenge("c", 11)) return "The game is currently <h1>0%</h1> harder."},
|
||||
]
|
||||
|
||||
// Determines when the game "ends"
|
||||
function isEndgame() {
|
||||
return player.points.gte(new Decimal("11"))
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Less important things beyond this point!
|
||||
|
||||
// Style for the background, can be a function
|
||||
var backgroundStyle = {
|
||||
}
|
||||
|
||||
// You can change this if you have things that can be messed up by long tick lengths
|
||||
function maxTickLength() {
|
||||
return(3600) // Default is 1 hour which is just arbitrarily large
|
||||
}
|
||||
|
||||
// Use this if you need to undo inflation from an older version. If the version is older than the version that fixed the issue,
|
||||
// you can cap their current resources with this.
|
||||
function fixOldSave(oldVersion){
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
// treeLayout will override the default tree's layout if used
|
||||
var layoutInfo = {
|
||||
startTab: "c",
|
||||
startNavTab: "tree-tab",
|
||||
|
||||
showTree: true,
|
||||
|
||||
//treeLayout: ""
|
||||
|
||||
|
||||
}
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("spook", {
|
||||
row: 1,
|
||||
layerShown: "ghost",
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("g", {
|
||||
symbol: "TH",
|
||||
branches: [["c", "red", 4]],
|
||||
color: '#6d3678',
|
||||
layerShown: true,
|
||||
canClick() {return player.points.gte(10)},
|
||||
tooltip: "Thanos your points",
|
||||
tooltipLocked: "Thanos your points",
|
||||
onClick() {player.points = player.points.div(2)
|
||||
console.log(this.layer)}
|
||||
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
// A "ghost" layer which offsets f in the tree
|
||||
addNode("h", {
|
||||
branches: ["g"],
|
||||
layerShown: true,
|
||||
tooltip() {return "Restore your points to " + player.c.otherThingy},
|
||||
tooltipLocked() {return "Restore your points to " + player.c.otherThingy},
|
||||
row: "side",
|
||||
canClick() {return player.points.lt(player.c.otherThingy)},
|
||||
onClick() {player.points = new Decimal(player.c.otherThingy)}
|
||||
},
|
||||
)
|
||||
|
||||
addLayer("tree-tab", {
|
||||
tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]],
|
||||
previousTab: "",
|
||||
leftTab: true,
|
||||
style() {return {'background-color': '#222222'}},
|
||||
|
||||
})
|
|
@ -1,65 +0,0 @@
|
|||
|
||||
// A side layer with achievements, with no prestige
|
||||
addLayer("a", {
|
||||
startData() { return {
|
||||
unlocked: true,
|
||||
points: new Decimal(0),
|
||||
}},
|
||||
color: "yellow",
|
||||
resource: "achievement power",
|
||||
row: "side",
|
||||
tooltip() { // Optional, tooltip displays when the layer is locked
|
||||
return ("Achievements")
|
||||
},
|
||||
achievementPopups: true,
|
||||
achievements: {
|
||||
11: {
|
||||
image: "discord.png",
|
||||
name: "Get me!",
|
||||
done() {return true}, // This one is a freebie
|
||||
goalTooltip: "How did this happen?", // Shows when achievement is not completed
|
||||
doneTooltip: "You did it!", // Showed when the achievement is completed
|
||||
},
|
||||
12: {
|
||||
name: "Impossible!",
|
||||
done() {return false},
|
||||
goalTooltip: "Mwahahaha!", // Shows when achievement is not completed
|
||||
doneTooltip: "HOW????", // Showed when the achievement is completed
|
||||
textStyle: {'color': '#04e050'},
|
||||
},
|
||||
13: {
|
||||
name: "EIEIO",
|
||||
done() {return player.f.points.gte(1)},
|
||||
tooltip: "Get a farm point.\n\nReward: The dinosaur is now your friend (you can max Farm Points).", // Showed when the achievement is completed
|
||||
onComplete() {console.log("Bork bork bork!")}
|
||||
},
|
||||
},
|
||||
midsection: ["grid", "blank"],
|
||||
grid: {
|
||||
maxRows: 3,
|
||||
rows: 2,
|
||||
cols: 2,
|
||||
getStartData(id) {
|
||||
return id
|
||||
},
|
||||
getUnlocked(id) { // Default
|
||||
return true
|
||||
},
|
||||
getCanClick(data, id) {
|
||||
return player.points.eq(10)
|
||||
},
|
||||
getStyle(data, id) {
|
||||
return {'background-color': '#'+ (data*1234%999999)}
|
||||
},
|
||||
onClick(data, id) { // Don't forget onHold
|
||||
player[this.layer].grid[id]++
|
||||
},
|
||||
getTitle(data, id) {
|
||||
return "Gridable #" + id
|
||||
},
|
||||
getDisplay(data, id) {
|
||||
return data
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
|
@ -1,396 +0,0 @@
|
|||
var testTree = [["f", "c"],
|
||||
["g", "spook", "h"]]
|
||||
|
||||
addLayer("c", {
|
||||
layer: "c", // This is assigned automatically, both to the layer and all upgrades, etc. Shown here so you know about it
|
||||
name: "Candies", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "C", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: true,
|
||||
points: new Decimal(0),
|
||||
best: new Decimal(0),
|
||||
total: new Decimal(0),
|
||||
buyables: {}, // You don't actually have to initialize this one
|
||||
beep: false,
|
||||
thingy: "pointy",
|
||||
otherThingy: 10,
|
||||
drop: "drip",
|
||||
}},
|
||||
color: "#4BDC13",
|
||||
requires: new Decimal(10), // Can be a function that takes requirement increases into account
|
||||
resource: "lollipops", // Name of prestige currency
|
||||
baseResource: "points", // Name of resource prestige is based on
|
||||
baseAmount() {return player.points}, // Get the current amount of baseResource
|
||||
type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
|
||||
exponent: 0.5, // Prestige currency exponent
|
||||
base: 5, // Only needed for static layers, base of the formula (b^(x^exp))
|
||||
roundUpCost: false, // True if the cost needs to be rounded up (use when baseResource is static?)
|
||||
|
||||
// For normal layers, gain beyond [softcap] points is put to the [softcapPower]th power
|
||||
softcap: new Decimal(1e100),
|
||||
softcapPower: new Decimal(0.5),
|
||||
canBuyMax() {}, // Only needed for static layers with buy max
|
||||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
mult = new Decimal(1)
|
||||
if (hasUpgrade(this.layer, 166)) mult = mult.times(2) // These upgrades don't exist
|
||||
if (hasUpgrade(this.layer, 120)) mult = mult.times(upgradeEffect(this.layer, 120))
|
||||
return mult
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
row: 0, // Row the layer is in on the tree (0 is the first row)
|
||||
effect() {
|
||||
return { // Formulas for any boosts inherent to resources in the layer. Can return a single value instead of an object if there is just one effect
|
||||
waffleBoost: (true == false ? 0 : Decimal.pow(player[this.layer].points, 0.2)),
|
||||
icecreamCap: (player[this.layer].points * 10)
|
||||
}},
|
||||
effectDescription() { // Optional text to describe the effects
|
||||
eff = this.effect();
|
||||
eff.waffleBoost = eff.waffleBoost.times(buyableEffect(this.layer, 11).first)
|
||||
return "which are boosting waffles by "+format(eff.waffleBoost)+" and increasing the Ice Cream cap by "+format(eff.icecreamCap)
|
||||
},
|
||||
infoboxes:{
|
||||
coolInfo: {
|
||||
title: "Lore",
|
||||
titleStyle: {'color': '#FE0000'},
|
||||
body: "DEEP LORE!",
|
||||
bodyStyle: {'background-color': "#0000EE"}
|
||||
}
|
||||
},
|
||||
milestones: {
|
||||
0: {requirementDescription: "3 Lollipops",
|
||||
done() {return player[this.layer].best.gte(3)}, // Used to determine when to give the milestone
|
||||
effectDescription: "Unlock the next milestone",
|
||||
},
|
||||
1: {requirementDescription: "4 Lollipops",
|
||||
unlocked() {return hasMilestone(this.layer, 0)},
|
||||
done() {return player[this.layer].best.gte(4)},
|
||||
effectDescription: "You can toggle beep and boop (which do nothing)",
|
||||
toggles: [
|
||||
["c", "beep"], // Each toggle is defined by a layer and the data toggled for that layer
|
||||
["f", "boop"]],
|
||||
style() {
|
||||
if(hasMilestone(this.layer, this.id)) return {
|
||||
'background-color': '#1111DD'
|
||||
}},
|
||||
},
|
||||
},
|
||||
challenges: {
|
||||
|
||||
11: {
|
||||
name: "Fun",
|
||||
completionLimit: 3,
|
||||
challengeDescription() {return "Makes the game 0% harder<br>"+challengeCompletions(this.layer, this.id) + "/" + this.completionLimit + " completions"},
|
||||
unlocked() { return player[this.layer].best.gt(0) },
|
||||
goalDescription: 'Have 20 points I guess',
|
||||
canComplete() {
|
||||
return player.points.gte(20)
|
||||
},
|
||||
rewardEffect() {
|
||||
let ret = player[this.layer].points.add(1).tetrate(0.02)
|
||||
return ret;
|
||||
},
|
||||
rewardDisplay() { return format(this.rewardEffect())+"x" },
|
||||
countsAs: [12, 21], // Use this for if a challenge includes the effects of other challenges. Being in this challenge "counts as" being in these.
|
||||
rewardDescription: "Says hi",
|
||||
onComplete() {console.log("hiii")}, // Called when you successfully complete the challenge
|
||||
onEnter() {console.log("So challenging")},
|
||||
onExit() {console.log("Sweet freedom!")},
|
||||
|
||||
},
|
||||
},
|
||||
upgrades: {
|
||||
|
||||
11: {
|
||||
title: "Generator of Genericness",
|
||||
description: "Gain 1 Point every second.",
|
||||
cost: new Decimal(1),
|
||||
unlocked() { return player[this.layer].unlocked }, // The upgrade is only visible when this is true
|
||||
branches: [12],
|
||||
tooltip: "hi",
|
||||
},
|
||||
12: {
|
||||
description: "Point generation is faster based on your unspent Lollipops.",
|
||||
cost: new Decimal(1),
|
||||
unlocked() { return (hasUpgrade(this.layer, 11))},
|
||||
effect() { // Calculate bonuses from the upgrade. Can return a single value or an object with multiple values
|
||||
let ret = player[this.layer].points.add(1).pow(player[this.layer].upgrades.includes(24)?1.1:(player[this.layer].upgrades.includes(14)?0.75:0.5))
|
||||
if (ret.gte("1e20000000")) ret = ret.sqrt().times("1e10000000")
|
||||
return ret;
|
||||
},
|
||||
effectDisplay() { return format(this.effect())+"x" }, // Add formatting to the effect
|
||||
},
|
||||
13: {
|
||||
unlocked() { return (hasUpgrade(this.layer, 12))},
|
||||
onPurchase() { // This function triggers when the upgrade is purchased
|
||||
player[this.layer].unlockOrder = 0
|
||||
},
|
||||
style() {
|
||||
if (hasUpgrade(this.layer, this.id)) return {
|
||||
'background-color': '#1111dd'
|
||||
}
|
||||
else if (!canAffordUpgrade(this.layer, this.id)) {
|
||||
return {
|
||||
'background-color': '#dd1111'
|
||||
}
|
||||
} // Otherwise use the default
|
||||
},
|
||||
canAfford(){return player.points.lte(7)},
|
||||
pay(){player.points = player.points.add(7)},
|
||||
fullDisplay: "Only buyable with less than 7 points, and gives you 7 more. Unlocks a secret subtab."
|
||||
},
|
||||
22: {
|
||||
title: "This upgrade doesn't exist",
|
||||
description: "Or does it?.",
|
||||
currencyLocation() {return player[this.layer].buyables}, // The object in player data that the currency is contained in
|
||||
currencyDisplayName: "exhancers", // Use if using a nonstandard currency
|
||||
currencyInternalName: 11, // Use if using a nonstandard currency
|
||||
|
||||
cost: new Decimal(3),
|
||||
unlocked() { return player[this.layer].unlocked }, // The upgrade is only visible when this is true
|
||||
},
|
||||
},
|
||||
buyables: {
|
||||
showRespec: true,
|
||||
respec() { // Optional, reset things and give back your currency. Having this function makes a respec button appear
|
||||
player[this.layer].points = player[this.layer].points.add(player[this.layer].spentOnBuyables) // A built-in thing to keep track of this but only keeps a single value
|
||||
resetBuyables(this.layer)
|
||||
doReset(this.layer, true) // Force a reset
|
||||
},
|
||||
respecText: "Respec Thingies", // Text on Respec button, optional
|
||||
respecMessage: "Are you sure? Respeccing these doesn't accomplish much.",
|
||||
11: {
|
||||
title: "Exhancers", // Optional, displayed at the top in a larger font
|
||||
cost(x) { // cost for buying xth buyable, can be an object if there are multiple currencies
|
||||
if (x.gte(25)) x = x.pow(2).div(25)
|
||||
let cost = Decimal.pow(2, x.pow(1.5))
|
||||
return cost.floor()
|
||||
},
|
||||
effect(x) { // Effects of owning x of the items, x is a decimal
|
||||
let eff = {}
|
||||
if (x.gte(0)) eff.first = Decimal.pow(25, x.pow(1.1))
|
||||
else eff.first = Decimal.pow(1/25, x.times(-1).pow(1.1))
|
||||
|
||||
if (x.gte(0)) eff.second = x.pow(0.8)
|
||||
else eff.second = x.times(-1).pow(0.8).times(-1)
|
||||
return eff;
|
||||
},
|
||||
display() { // Everything else displayed in the buyable button after the title
|
||||
let data = tmp[this.layer].buyables[this.id]
|
||||
return "Cost: " + format(data.cost) + " lollipops\n\
|
||||
Amount: " + player[this.layer].buyables[this.id] + "/4\n\
|
||||
Adds + " + format(data.effect.first) + " things and multiplies stuff by " + format(data.effect.second)
|
||||
},
|
||||
unlocked() { return player[this.layer].unlocked },
|
||||
canAfford() {
|
||||
return player[this.layer].points.gte(tmp[this.layer].buyables[this.id].cost)},
|
||||
buy() {
|
||||
cost = tmp[this.layer].buyables[this.id].cost
|
||||
player[this.layer].points = player[this.layer].points.sub(cost)
|
||||
player[this.layer].buyables[this.id] = player[this.layer].buyables[this.id].add(1)
|
||||
player[this.layer].spentOnBuyables = player[this.layer].spentOnBuyables.add(cost) // This is a built-in system that you can use for respeccing but it only works with a single Decimal value
|
||||
},
|
||||
buyMax() {}, // You'll have to handle this yourself if you want
|
||||
style: {'height':'222px'},
|
||||
purchaseLimit: new Decimal(4),
|
||||
sellOne() {
|
||||
let amount = getBuyableAmount(this.layer, this.id)
|
||||
if (amount.lte(0)) return // Only sell one if there is at least one
|
||||
setBuyableAmount(this.layer, this.id, amount.sub(1))
|
||||
player[this.layer].points = player[this.layer].points.add(this.cost)
|
||||
},
|
||||
},
|
||||
},
|
||||
doReset(resettingLayer){ // Triggers when this layer is being reset, along with the layer doing the resetting. Not triggered by lower layers resetting, but is by layers on the same row.
|
||||
if(layers[resettingLayer].row > this.row) layerDataReset(this.layer, ["points"])
|
||||
},
|
||||
layerShown() {return true}, // Condition for when layer appears on the tree
|
||||
automate() {
|
||||
}, // Do any automation inherent to this layer if appropriate
|
||||
resetsNothing() {return false},
|
||||
onPrestige(gain) {
|
||||
return
|
||||
}, // Useful for if you gain secondary resources or have other interesting things happen to this layer when you reset it. You gain the currency after this function ends.
|
||||
|
||||
hotkeys: [
|
||||
{key: "c", description: "C: reset for lollipops or whatever", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
{key: "ctrl+c", description: "Ctrl+c: respec things", onPress(){respecBuyables(this.layer)}, unlocked() {return hasUpgrade('c', '22')}} ,
|
||||
],
|
||||
increaseUnlockOrder: [], // Array of layer names to have their order increased when this one is first unlocked
|
||||
|
||||
microtabs: {
|
||||
stuff: {
|
||||
first: {
|
||||
content: ["upgrades", ["display-text", function() {return "confirmed<br>" + player.c.drop}], ["drop-down", ["drop", ["drip", "drop"]]]]
|
||||
},
|
||||
second: {
|
||||
embedLayer: "f",
|
||||
|
||||
content: [["upgrade", 11],
|
||||
["row", [["upgrade", 11], "blank", "blank", ["upgrade", 11],]],
|
||||
|
||||
["display-text", function() {return "double confirmed"}]]
|
||||
},
|
||||
},
|
||||
otherStuff: {
|
||||
// There could be another set of microtabs here
|
||||
}
|
||||
},
|
||||
|
||||
bars: {
|
||||
longBoi: {
|
||||
fillStyle: {'background-color' : "#FFFFFF"},
|
||||
baseStyle: {'background-color' : "#696969"},
|
||||
textStyle: {'color': '#04e050'},
|
||||
borderStyle() {return {}},
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 30,
|
||||
progress() {
|
||||
return (player.points.add(1).log(10).div(10)).toNumber()
|
||||
},
|
||||
display() {
|
||||
return format(player.points) + " / 1e10 points"
|
||||
},
|
||||
unlocked: true,
|
||||
|
||||
},
|
||||
tallBoi: {
|
||||
fillStyle: {'background-color' : "#4BEC13"},
|
||||
baseStyle: {'background-color' : "#000000"},
|
||||
textStyle: {'text-shadow': '0px 0px 2px #000000'},
|
||||
|
||||
borderStyle() {return {'border-width': "7px"}},
|
||||
direction: UP,
|
||||
width: 50,
|
||||
height: 200,
|
||||
progress() {
|
||||
return player.points.div(100)
|
||||
},
|
||||
display() {
|
||||
return formatWhole((player.points.div(1)).min(100)) + "%"
|
||||
},
|
||||
unlocked: true,
|
||||
|
||||
},
|
||||
flatBoi: {
|
||||
fillStyle: {'background-color' : "#FE0102"},
|
||||
baseStyle: {'background-color' : "#222222"},
|
||||
textStyle: {'text-shadow': '0px 0px 2px #000000'},
|
||||
|
||||
borderStyle() {return {}},
|
||||
direction: UP,
|
||||
width: 100,
|
||||
height: 30,
|
||||
progress() {
|
||||
return player.c.points.div(50)
|
||||
},
|
||||
unlocked: true,
|
||||
|
||||
},
|
||||
},
|
||||
|
||||
// Optional, lets you format the tab yourself by listing components. You can create your own components in v.js.
|
||||
tabFormat: {
|
||||
"main tab": {
|
||||
buttonStyle() {return {'color': 'orange'}},
|
||||
shouldNotify: true,
|
||||
content:
|
||||
["main-display",
|
||||
"prestige-button", "resource-display",
|
||||
["blank", "5px"], // Height
|
||||
["raw-html", function() {return "<button onclick='console.log(`yeet`); makeParticles(textParticle)'>'HI'</button>"}],
|
||||
["display-text", "Name your points!"],
|
||||
["text-input", "thingy"],
|
||||
["display-text",
|
||||
function() {return 'I have ' + format(player.points) + ' ' + player[this.layer].thingy + ' points!'},
|
||||
{"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
|
||||
"h-line", "milestones", "blank", "upgrades", "challenges"],
|
||||
glowColor: "blue",
|
||||
|
||||
},
|
||||
thingies: {
|
||||
prestigeNotify: true,
|
||||
style() {return {'background-color': '#222222'}},
|
||||
buttonStyle() {return {'border-color': 'orange'}},
|
||||
content:[
|
||||
"buyables", "blank",
|
||||
["row", [
|
||||
["toggle", ["c", "beep"]], ["blank", ["30px", "10px"]], // Width, height
|
||||
["display-text", function() {return "Beep"}], "blank", ["v-line", "200px"],
|
||||
["column", [
|
||||
["prestige-button", "", {'width': '150px', 'height': '80px'}],
|
||||
["prestige-button", "", {'width': '100px', 'height': '150px'}],
|
||||
]],
|
||||
], {'width': '600px', 'height': '350px', 'background-color': 'green', 'border-style': 'solid'}],
|
||||
"blank",
|
||||
["display-image", "discord.png"],],
|
||||
},
|
||||
jail: {
|
||||
style() {return {'background-color': '#222222'}},
|
||||
|
||||
content: [
|
||||
["infobox", "coolInfo"],
|
||||
["bar", "longBoi"], "blank",
|
||||
["row", [
|
||||
["column", [
|
||||
["display-text", "Sugar level:", {'color': 'teal'}], "blank", ["bar", "tallBoi"]],
|
||||
{'background-color': '#555555', 'padding': '15px'}],
|
||||
"blank",
|
||||
["column", [
|
||||
["display-text", "idk"],
|
||||
["blank", ['0', '50px']], ["bar", "flatBoi"]
|
||||
]],
|
||||
]],
|
||||
"blank", ["display-text", "It's jail because \"bars\"! So funny! Ha ha!"],["tree", testTree],
|
||||
],
|
||||
},
|
||||
illuminati: {
|
||||
unlocked() {return (hasUpgrade("c", 13))},
|
||||
content:[
|
||||
["raw-html", function() {return "<h1> C O N F I R M E D </h1>"}], "blank",
|
||||
["microtabs", "stuff", {'width': '600px', 'height': '350px', 'background-color': 'brown', 'border-style': 'solid'}],
|
||||
["display-text", "Adjust how many points H gives you!"],
|
||||
["slider", ["otherThingy", 1, 30]], "blank", ["upgrade-tree", [[11],
|
||||
[12, 22, 22, 11]]]
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
style() {return {
|
||||
//'background-color': '#3325CC'
|
||||
}},
|
||||
nodeStyle() {return { // Style on the layer node
|
||||
'color': '#3325CC',
|
||||
'text-decoration': 'underline',
|
||||
'font-family': 'cursive'
|
||||
}},
|
||||
glowColor: "orange", // If the node is highlighted, it will be this color (default is red)
|
||||
componentStyles: {
|
||||
"challenge"() {return {'height': '200px'}},
|
||||
"prestige-button"() {return {'color': '#AA66AA'}},
|
||||
},
|
||||
tooltip() { // Optional, tooltip displays when the layer is unlocked
|
||||
let tooltip = formatWhole(player[this.layer].points) + " " + this.resource
|
||||
if (player[this.layer].buyables[11].gt(0)) tooltip += "<br><i><br><br><br>" + formatWhole(player[this.layer].buyables[11]) + " Exhancers</i>"
|
||||
return tooltip
|
||||
},
|
||||
shouldNotify() { // Optional, layer will be highlighted on the tree if true.
|
||||
// Layer will automatically highlight if an upgrade is purchasable.
|
||||
return (player.c.buyables[11] == 1)
|
||||
},
|
||||
marked: "discord.png",
|
||||
resetDescription: "Melt your points into ",
|
||||
})
|
||||
|
||||
const textParticle = {
|
||||
spread: 20,
|
||||
gravity: 0,
|
||||
time: 3,
|
||||
speed: 0,
|
||||
text: function() { return "<h1 style='color:yellow'>" + format(player.points)},
|
||||
offset: 30,
|
||||
fadeInTime: 1,
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
// This layer is mostly minimal but it uses a custom prestige type and a clickable
|
||||
addLayer("f", {
|
||||
infoboxes:{
|
||||
coolInfo: {
|
||||
title: "Lore",
|
||||
titleStyle: {'color': '#FE0000'},
|
||||
body: "DEEP LORE!",
|
||||
bodyStyle: {'background-color': "#0000EE"}
|
||||
}
|
||||
},
|
||||
|
||||
startData() { return {
|
||||
unlocked: false,
|
||||
points: new Decimal(0),
|
||||
boop: false,
|
||||
clickables: {[11]: "Start"}, // Optional default Clickable state
|
||||
}},
|
||||
color: "#FE0102",
|
||||
requires() {return new Decimal(10)},
|
||||
resource: "farm points",
|
||||
baseResource: "points",
|
||||
baseAmount() {return player.points},
|
||||
type: "static",
|
||||
exponent: 0.5,
|
||||
base: 3,
|
||||
roundUpCost: true,
|
||||
canBuyMax() {return false},
|
||||
//directMult() {return new Decimal(player.c.otherThingy)},
|
||||
|
||||
row: 1,
|
||||
layerShown() {return true},
|
||||
branches: ["c"], // When this layer appears, a branch will appear from this layer to any layers here. Each entry can be a pair consisting of a layer id and a color.
|
||||
|
||||
tooltipLocked() { // Optional, tooltip displays when the layer is locked
|
||||
return ("This weird farmer dinosaur will only see you if you have at least " + this.requires() + " points. You only have " + formatWhole(player.points))
|
||||
},
|
||||
midsection: [
|
||||
"blank", ['display-image', 'https://images.beano.com/store/24ab3094eb95e5373bca1ccd6f330d4406db8d1f517fc4170b32e146f80d?auto=compress%2Cformat&dpr=1&w=390'],
|
||||
["display-text", "Bork bork!"]
|
||||
],
|
||||
// The following are only currently used for "custom" Prestige type:
|
||||
prestigeButtonText() { //Is secretly HTML
|
||||
if (!this.canBuyMax()) return "Hi! I'm a <u>weird dinosaur</u> and I'll give you a Farm Point in exchange for all of your points and lollipops! (At least " + formatWhole(tmp[this.layer].nextAt) + " points)"
|
||||
if (this.canBuyMax()) return "Hi! I'm a <u>weird dinosaur</u> and I'll give you <b>" + formatWhole(tmp[this.layer].resetGain) + "</b> Farm Points in exchange for all of your points and lollipops! (You'll get another one at " + formatWhole(tmp[this.layer].nextAtDisp) + " points)"
|
||||
},
|
||||
getResetGain() {
|
||||
return getResetGain(this.layer, useType = "static")
|
||||
},
|
||||
getNextAt(canMax=false) { //
|
||||
return getNextAt(this.layer, canMax, useType = "static")
|
||||
},
|
||||
canReset() {
|
||||
return tmp[this.layer].baseAmount.gte(tmp[this.layer].nextAt)
|
||||
},
|
||||
// This is also non minimal, a Clickable!
|
||||
clickables: {
|
||||
|
||||
masterButtonPress() {
|
||||
if (getClickableState(this.layer, 11) == "Borkened...")
|
||||
player[this.layer].clickables[11] = "Start"
|
||||
},
|
||||
masterButtonText() {return (getClickableState(this.layer, 11) == "Borkened...") ? "Fix the clickable!" : "Does nothing"}, // Text on Respec button, optional
|
||||
11: {
|
||||
title: "Clicky clicky!", // Optional, displayed at the top in a larger font
|
||||
display() { // Everything else displayed in the buyable button after the title
|
||||
let data = getClickableState(this.layer, this.id)
|
||||
return "Current state:<br>" + data
|
||||
},
|
||||
unlocked() { return player[this.layer].unlocked },
|
||||
canClick() {
|
||||
return getClickableState(this.layer, this.id) !== "Borkened..."},
|
||||
onClick() {
|
||||
switch(getClickableState(this.layer, this.id)){
|
||||
case "Start":
|
||||
player[this.layer].clickables[this.id] = "A new state!"
|
||||
break;
|
||||
case "A new state!":
|
||||
player[this.layer].clickables[this.id] = "Keep going!"
|
||||
break;
|
||||
case "Keep going!":
|
||||
player[this.layer].clickables[this.id] = "Maybe that's a bit too far..."
|
||||
break;
|
||||
case "Maybe that's a bit too far...":
|
||||
makeParticles(coolParticle, 4)
|
||||
player[this.layer].clickables[this.id] = "Borkened..."
|
||||
break;
|
||||
default:
|
||||
player[this.layer].clickables[this.id] = "Start"
|
||||
break;
|
||||
}
|
||||
},
|
||||
onHold(){
|
||||
console.log("Clickkkkk...")
|
||||
},
|
||||
style() {
|
||||
switch(getClickableState(this.layer, this.id)){
|
||||
case "Start":
|
||||
return {'background-color': 'green'}
|
||||
break;
|
||||
case "A new state!":
|
||||
return {'background-color': 'yellow'}
|
||||
break;
|
||||
case "Keep going!":
|
||||
return {'background-color': 'orange'}
|
||||
break;
|
||||
case "Maybe that's a bit too far...":
|
||||
return {'background-color': 'red'}
|
||||
break;
|
||||
default:
|
||||
return {}
|
||||
break;
|
||||
}},
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
)
|
||||
|
||||
const coolParticle = {
|
||||
image:"options_wheel.png",
|
||||
spread: 20,
|
||||
gravity: 2,
|
||||
time: 3,
|
||||
rotation (id) {
|
||||
return 20 * (id - 1.5) + (Math.random() - 0.5) * 10
|
||||
},
|
||||
dir() {
|
||||
return (Math.random() - 0.5) * 10
|
||||
},
|
||||
speed() {
|
||||
return (Math.random() + 1.2) * 8
|
||||
},
|
||||
onClick() {
|
||||
console.log("yay")
|
||||
},
|
||||
onMouseOver() {
|
||||
console.log("hi")
|
||||
},
|
||||
onMouseLeave() {
|
||||
console.log("bye")
|
||||
},
|
||||
update() {
|
||||
//this.width += 1
|
||||
//setDir(this, 135)
|
||||
},
|
||||
layer: 'f',
|
||||
}
|
178
js/data/achievements.js
Normal file
178
js/data/achievements.js
Normal file
|
@ -0,0 +1,178 @@
|
|||
addLayer("ach", {
|
||||
name: "achievements", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "☆", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: true,
|
||||
has45: false,
|
||||
has55: false
|
||||
}},
|
||||
color: "#9d750d",
|
||||
effect() {
|
||||
return Decimal.div(player[this.layer].achievements.length, 20).add(1)
|
||||
},
|
||||
achievements: {
|
||||
11: {
|
||||
name: "All that progress is gone!",
|
||||
done() { return player.p.points.gte(1) },
|
||||
tooltip: "Reset for 1 PP."
|
||||
},
|
||||
12: {
|
||||
name: "So that's what the mechanic is...",
|
||||
done() { return getAlphaLevel().gte(2) },
|
||||
tooltip: "Reach Alpha level 2."
|
||||
},
|
||||
13: {
|
||||
name: "This is quite fun!",
|
||||
done() { return getBetaLevel().gte(1) },
|
||||
tooltip: "Reach Beta level 1."
|
||||
},
|
||||
14: {
|
||||
name: "Oh so many bars.",
|
||||
done() { return getGammaLevel().gte(1) },
|
||||
tooltip: "Reach Gamma level 1."
|
||||
},
|
||||
15: {
|
||||
name: "GREEN!!!",
|
||||
done() { return options.theme === "verdant" },
|
||||
tooltip: "Switch to the Verdant theme."
|
||||
},
|
||||
21: {
|
||||
name: "Nomial gains.",
|
||||
done() { return getPointGen().gte(1) },
|
||||
tooltip: "Get 1 point per second."
|
||||
},
|
||||
22: {
|
||||
name: "That's an exponent!",
|
||||
done() { return getEpsilonLevel().gte(1) },
|
||||
tooltip: "Reach Epsilon level 1."
|
||||
},
|
||||
23: {
|
||||
name: "What's a \"Rank\"?",
|
||||
done() { return getAlphaRank().gte(1) },
|
||||
tooltip: "Reach Alpha rank 1."
|
||||
},
|
||||
24: {
|
||||
name: "No more bars?",
|
||||
done() { return getZetaLevel().gte(1) },
|
||||
tooltip: "Reach Zeta level 1."
|
||||
},
|
||||
25: {
|
||||
name: "Lots of points",
|
||||
done() { return player.points.gte(200) },
|
||||
tooltip: "Reach 200 points."
|
||||
},
|
||||
31: {
|
||||
name: "Even more progress.",
|
||||
done() { return getBuyableAmount('p', 11).gte(1) },
|
||||
tooltip: "Get 1x <b>More progress</b> buyable."
|
||||
},
|
||||
32: {
|
||||
name: "So this just boosts Gamma further?",
|
||||
done() { return getBuyableAmount('p', 12).gte(1) },
|
||||
tooltip: "Get 1x <b>Rebased</b> buyable."
|
||||
},
|
||||
33: {
|
||||
name: "Softcap?? >:(",
|
||||
done() { return getPointGen().gte(getKappaEffect().mul(1000)) },
|
||||
tooltip: "Reach the first softcap."
|
||||
},
|
||||
33: {
|
||||
name: "Decrementy",
|
||||
done() { return getBuyableAmount('p', 13).gte(1) },
|
||||
tooltip: "Get 1x <b>Shorter bars</b> buyable."
|
||||
},
|
||||
34: {
|
||||
name: "Super!",
|
||||
done() { return player.sp.points.gte(1) },
|
||||
tooltip: "Reset for 1 SPP."
|
||||
},
|
||||
35: {
|
||||
name: "Where were you??",
|
||||
done() { return getPointGen().gt(0) && player.points.div(100).gte(getPointGen()) },
|
||||
tooltip: "Have your points reach 100x your points per second."
|
||||
},
|
||||
41: {
|
||||
name: "Progressed further.",
|
||||
done() { return getThetaLevel().gte(1) },
|
||||
tooltip: "Reach Theta level 1."
|
||||
},
|
||||
42: {
|
||||
name: "Literally just another exponent.",
|
||||
done() { return getIotaLevel().gte(1) },
|
||||
tooltip: "Reach Iota level 1."
|
||||
},
|
||||
43: {
|
||||
name: "YES! GOODBYE SOFTCAP!",
|
||||
done() { return getKappaLevel().gte(1) },
|
||||
tooltip: "Reach Kappa level 1."
|
||||
},
|
||||
44: {
|
||||
name: "Very big multiplier",
|
||||
done() { return getLambdaLevel().gte(1) },
|
||||
tooltip: "Reach Lambda level 1."
|
||||
},
|
||||
45: {
|
||||
name: "Don't even need PP anymore",
|
||||
done() { return player[this.layer].has45 },
|
||||
tooltip: "Reset for SPP with 0 PP."
|
||||
},
|
||||
51: {
|
||||
name: "An exponent to progress points?",
|
||||
done() { return getBuyableAmount('sp', 11).gte(1) },
|
||||
tooltip: "Get 1x <b>Much more progress</b> buyable."
|
||||
},
|
||||
52: {
|
||||
name: "And another exponent to points ¬_¬",
|
||||
done() { return getBuyableAmount('sp', 12).gte(1) },
|
||||
tooltip: "Get 1x <b>Super point booster</b> buyable."
|
||||
},
|
||||
53: {
|
||||
name: "A new prestige layer!",
|
||||
done() { return player.sp.points.gte(5000) },
|
||||
tooltip: "Reach 5000 SPP."
|
||||
},
|
||||
54: {
|
||||
name: "Ok so that speeds things up",
|
||||
done() { return hasMilestone('f', 2) },
|
||||
tooltip: "Earn Filestone 3."
|
||||
},
|
||||
55: {
|
||||
name: "Well that was useful",
|
||||
done() { return player[this.layer].has55 },
|
||||
tooltip: "Respec directory upgrades when you have none."
|
||||
},
|
||||
61: {
|
||||
name: "Ooh upgrades",
|
||||
done() { return player.f.upgrades.map(x => x - 20).filter(x => x >= 0 && x < 9).length == 3 },
|
||||
tooltip: "Get all row 2 directory upgrades."
|
||||
},
|
||||
62: {
|
||||
name: "Lots of boosts!!",
|
||||
done() { return player.f.upgrades.map(x => x - 30).filter(x => x >= 0 && x < 9).length == 3 },
|
||||
tooltip: "Get all row 3 directory upgrades."
|
||||
},
|
||||
63: {
|
||||
name: "Wait that's all of them?",
|
||||
done() { return player.f.upgrades.map(x => x - 40).filter(x => x >= 0 && x < 9).length == 4 },
|
||||
tooltip: "Get all row 4 directory upgrades."
|
||||
},
|
||||
64: {
|
||||
name: "Well that exploded",
|
||||
done() { return player.i.points.gt(0) },
|
||||
tooltip: "Reset for 1 integral.<br>Current endgame."
|
||||
},
|
||||
},
|
||||
tabFormat: [
|
||||
"blank",
|
||||
["raw-html", function () { return "Achievements: " + player[this.layer].achievements.length + "/" + (Object.keys(tmp[this.layer].achievements).length - 2) }],
|
||||
["raw-html", function () { return "Effect: x" + tmp[this.layer].effect + " to point gen." }],
|
||||
"blank",
|
||||
"achievements"
|
||||
],
|
||||
tooltip() {
|
||||
return player[this.layer].achievements.length + " achievement" + (player[this.layer].achievements.length == 1 ? "" : "s")
|
||||
},
|
||||
row: "side", // Row the layer is in on the tree (0 is the first row)
|
||||
layerShown(){return true}
|
||||
})
|
225
js/data/files.js
Normal file
225
js/data/files.js
Normal file
|
@ -0,0 +1,225 @@
|
|||
addLayer("f", {
|
||||
name: "files", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "🗎", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 2, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: false,
|
||||
points: new Decimal(0),
|
||||
total: new Decimal(0)
|
||||
}},
|
||||
color: "#7f1bae",
|
||||
requires() {
|
||||
let req = new Decimal(5000)
|
||||
if (hasUpgrade(this.layer, 32)) { req = req.mul(0.75) }
|
||||
if (hasMilestone(this.layer, 7)) { req = req.mul(0.8) }
|
||||
return req
|
||||
}, // Can be a function that takes requirement increases into account
|
||||
resource: "files", // Name of prestige currency
|
||||
baseResource: "super progress points", // Name of resource prestige is based on
|
||||
baseAmount() {return player.sp.points}, // Get the current amount of baseResource
|
||||
type: "static", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
|
||||
exponent: 1.3, // Prestige currency exponent
|
||||
base() {
|
||||
let base = 2
|
||||
if (hasUpgrade(this.layer, 41)) base **= 0.95
|
||||
return base
|
||||
},
|
||||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
canBuyMax() {
|
||||
return hasMilestone(this.layer, 6)
|
||||
},
|
||||
row: 2, // Row the layer is in on the tree (0 is the first row)
|
||||
displayRow: 0,
|
||||
hotkeys: [
|
||||
{key: "f", description: "F: Reset for files", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
],
|
||||
milestones: {
|
||||
0: {
|
||||
requirementDescription: "1 total File.",
|
||||
effectDescription() {
|
||||
return "Total levels boost point gen.<br>Effect: x" + getTotalLevel().add(1).log(5).add(1) + "."
|
||||
},
|
||||
done() { return player.f.total.gte(1) }
|
||||
},
|
||||
1: {
|
||||
requirementDescription: "2 total Files.",
|
||||
effectDescription: "Triple point gen.",
|
||||
done() { return player.f.total.gte(2) }
|
||||
},
|
||||
2: {
|
||||
requirementDescription: "3 total Files.",
|
||||
effectDescription: "Multiply PP requirement by 0.5x.",
|
||||
done() { return player.f.total.gte(3) }
|
||||
},
|
||||
3: {
|
||||
requirementDescription: "4 total Files.",
|
||||
effectDescription: "Square point gen.",
|
||||
done() { return player.f.total.gte(4) }
|
||||
},
|
||||
4: {
|
||||
requirementDescription: "5 total Files.",
|
||||
effectDescription: "Unlock the Directory.",
|
||||
done() { return player.f.total.gte(5) }
|
||||
},
|
||||
5: {
|
||||
requirementDescription: "7 total Files.",
|
||||
effectDescription() {
|
||||
return "Total Files boost point gen.<br>Effect: x" + player[this.layer].total.div(2).add(1) + "."
|
||||
},
|
||||
done() { return player.f.total.gte(7) }
|
||||
},
|
||||
6: {
|
||||
requirementDescription: "10 total Files.",
|
||||
effectDescription: "You can buy max files.",
|
||||
done() { return player.f.total.gte(10) }
|
||||
},
|
||||
7: {
|
||||
requirementDescription: "15 total Files.",
|
||||
effectDescription: "Multiply file cost by x0.8.",
|
||||
done() { return player.f.total.gte(15) }
|
||||
},
|
||||
8: {
|
||||
requirementDescription: "20 total Files.",
|
||||
effectDescription: "Autobuy all PP buyables.",
|
||||
done() { return player.f.total.gte(20) }
|
||||
},
|
||||
9: {
|
||||
requirementDescription: "30 total Files.",
|
||||
effectDescription: "You can now get fractional levels.",
|
||||
done() { return player.f.total.gte(30) }
|
||||
},
|
||||
},
|
||||
upgrades: {
|
||||
11: {
|
||||
description: "Total rank boosts point gen.",
|
||||
effect() { return getTotalRank().add(2) },
|
||||
effectDisplay() { return "^" + this.effect() + "." },
|
||||
cost: 1,
|
||||
canAfford() { return hasMilestone(this.layer, 4) },
|
||||
},
|
||||
21: {
|
||||
description: "Start with 2 free <b>Rebased</b> levels.",
|
||||
cost: 3,
|
||||
canAfford() { return hasUpgrade(this.layer, 11) },
|
||||
branches: [11]
|
||||
},
|
||||
22: {
|
||||
description: "Start with 2 free <b>Shorter bars</b> levels.",
|
||||
cost: 3,
|
||||
canAfford() { return hasUpgrade(this.layer, 11) },
|
||||
branches: [11]
|
||||
},
|
||||
23: {
|
||||
description: "Gain 10% of your PP gain every second.",
|
||||
cost: 4,
|
||||
canAfford() { return hasUpgrade(this.layer, 11) },
|
||||
branches: [11]
|
||||
},
|
||||
31: {
|
||||
description: "Make Gamma effect use total level as well.",
|
||||
cost: 5,
|
||||
canAfford() { return hasUpgrade(this.layer, 21) },
|
||||
branches: [21]
|
||||
},
|
||||
32: {
|
||||
description: "Multiply base File cost by 0.75.",
|
||||
cost: 6,
|
||||
canAfford() { return hasUpgrade(this.layer, 21) && hasUpgrade(this.layer, 22) },
|
||||
branches: [21, 22]
|
||||
},
|
||||
33: {
|
||||
description: "Multiply base PP cost by 0.75.",
|
||||
cost: 5,
|
||||
canAfford() { return hasUpgrade(this.layer, 22) },
|
||||
branches: [22]
|
||||
},
|
||||
41: {
|
||||
description: "Raise Beta, Delta, Zeta effects ^1.1.",
|
||||
cost: 8,
|
||||
canAfford() { return hasUpgrade(this.layer, 31) },
|
||||
branches: [31]
|
||||
},
|
||||
42: {
|
||||
description: "Raise File cost base ^0.95.",
|
||||
cost: 8,
|
||||
canAfford() { return hasUpgrade(this.layer, 32) },
|
||||
branches: [32]
|
||||
},
|
||||
43: {
|
||||
description: "Files divide PP cost.",
|
||||
cost: 9,
|
||||
canAfford() { return hasUpgrade(this.layer, 32) && hasUpgrade(this.layer, 33) },
|
||||
effect() { return player[this.layer].points.add(3).log(2).add(1) },
|
||||
effectDisplay() { return "/" + this.effect() + "." },
|
||||
branches: [32, 33]
|
||||
},
|
||||
44: {
|
||||
description: "Gain another 15% of your PP gain every second.",
|
||||
cost: 8,
|
||||
canAfford() { return hasUpgrade(this.layer, 23) && hasUpgrade(this.layer, 33) },
|
||||
branches: [[23, 2], 33]
|
||||
}
|
||||
},
|
||||
clickables: {
|
||||
21: {
|
||||
display() { return "Reset directory" },
|
||||
onClick() {
|
||||
if (confirm("Are you sure you want to respec? This will cause a File reset.")) {
|
||||
if (player[this.layer].upgrades == 0) {
|
||||
player.ach.has55 = true
|
||||
}
|
||||
for (let i of player[this.layer].upgrades) {
|
||||
player[this.layer].points = player[this.layer].points.add(tmp[this.layer].upgrades[i].cost)
|
||||
}
|
||||
player[this.layer].upgrades = []
|
||||
doReset('f', true)
|
||||
}
|
||||
},
|
||||
canClick() { return true },
|
||||
style: {
|
||||
width: "60px",
|
||||
minHeight: "60px"
|
||||
}
|
||||
}
|
||||
},
|
||||
layerShown(){ return player.p.points.gte(4000) || player[this.layer].unlocked },
|
||||
branches: ['p'],
|
||||
tabFormat: {
|
||||
filestones: {
|
||||
content: [
|
||||
"main-display",
|
||||
"prestige-button",
|
||||
"resource-display",
|
||||
"blank",
|
||||
"blank",
|
||||
["row", [
|
||||
["milestones", [0, 2, 4, 6, 8]],
|
||||
["milestones", [1, 3, 5, 7, 9]]
|
||||
]]
|
||||
]
|
||||
},
|
||||
directory: {
|
||||
content: [
|
||||
"main-display",
|
||||
["row", ["prestige-button", ["clickable", 11]]],
|
||||
"resource-display",
|
||||
"blank",
|
||||
"blank",
|
||||
["clickable", 21],
|
||||
"blank",
|
||||
["upgrade-tree", [
|
||||
[11],
|
||||
[21, 22, 23],
|
||||
[31, 32, 33],
|
||||
[41, 42, 43, 44]
|
||||
]]
|
||||
],
|
||||
unlocked() { return hasMilestone('f', 4) }
|
||||
},
|
||||
}
|
||||
})
|
37
js/data/integrals.js
Normal file
37
js/data/integrals.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
addLayer("i", {
|
||||
name: "integrals", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "∫", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: false,
|
||||
points: new Decimal(0)
|
||||
}},
|
||||
color: "#a62222",
|
||||
requires: Decimal.pow(2, 128), // Can be a function that takes requirement increases into account
|
||||
resource: "integrals", // Name of prestige currency
|
||||
baseResource: "points", // Name of resource prestige is based on
|
||||
baseAmount() {return player.points}, // Get the current amount of baseResource
|
||||
type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
|
||||
exponent: 1, // Prestige currency exponent
|
||||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
row: 3, // Row the layer is in on the tree (0 is the first row)
|
||||
displayRow: 1,
|
||||
hotkeys: [
|
||||
{key: "i", description: "I: reset for integrals", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
],
|
||||
tabFormat: [
|
||||
"main-display",
|
||||
"prestige-button",
|
||||
"resource-display",
|
||||
"blank",
|
||||
"blank",
|
||||
["raw-html", "Coming Soon!"]
|
||||
],
|
||||
layerShown(){ return player.points.gte("1e25") || player[this.layer].unlocked },
|
||||
branches: ['p', 'sp', 'f']
|
||||
})
|
132
js/data/levels.js
Normal file
132
js/data/levels.js
Normal file
|
@ -0,0 +1,132 @@
|
|||
function cumulativeExponential(base, levels) {
|
||||
return Decimal.add(levels, 1).pow_base(base).sub(1).div(Decimal.sub(base, 1))
|
||||
}
|
||||
function inverseCumulativeExponential(base, levels) {
|
||||
return Decimal.sub(base, 1).mul(levels).add(1).log(base)
|
||||
}
|
||||
|
||||
function getAlphaLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(1.1, Decimal.pow(points, buyableEffect('p', 13).pow(-1)))
|
||||
return hasMilestone('f', 9) ? level : level.floor()
|
||||
}
|
||||
function getAlphaCost(points = player.p.points) {
|
||||
return cumulativeExponential(1.1, getAlphaLevel(points).floor()).pow(buyableEffect('p', 13))
|
||||
}
|
||||
function getAlphaEffect(points = player.p.points) {
|
||||
return getAlphaLevel(points).mul(getAlphaRankEffect(points).add(1/20))
|
||||
}
|
||||
function getBetaLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(1.25, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 5))
|
||||
return hasMilestone('f', 9) ? level : level.floor()
|
||||
}
|
||||
function getBetaCost(points = player.p.points) {
|
||||
return cumulativeExponential(1.25, getBetaLevel(points).floor()).mul(5).pow(buyableEffect('p', 13))
|
||||
}
|
||||
function getBetaEffect(points = player.p.points) {
|
||||
return getBetaLevel(points).mul(getBetaRankEffect(points).add(1/20)).add(1).pow(hasUpgrade('f', 41) ? 1.2 : 1)
|
||||
}
|
||||
function getGammaLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(1.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 15))
|
||||
return hasMilestone('f', 9) ? level : level.floor()
|
||||
}
|
||||
function getGammaCost(points = player.p.points) {
|
||||
return cumulativeExponential(1.5, getGammaLevel(points).floor()).mul(15).pow(buyableEffect('p', 13))
|
||||
}
|
||||
function getGammaEffect(points = player.p.points) {
|
||||
return Decimal.add(points, 1).add(hasUpgrade('f', 31) ? getTotalLevel() : 0).log(Decimal.pow(50, buyableEffect('p', 12))).add(1).pow(getGammaLevel(points).mul(getGammaRankEffect(points).add(1/10)))
|
||||
}
|
||||
function getDeltaLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(2, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 30))
|
||||
return hasMilestone('f', 9) ? level : level.floor()
|
||||
}
|
||||
function getDeltaCost(points = player.p.points) {
|
||||
return cumulativeExponential(2, getDeltaLevel(points).floor()).mul(30).pow(buyableEffect('p', 13))
|
||||
}
|
||||
function getDeltaEffect(points = player.p.points) {
|
||||
return getDeltaLevel(points).mul(getDeltaRankEffect(points).add(1/5)).add(1).pow(hasUpgrade('f', 41) ? 1.2 : 1)
|
||||
}
|
||||
function getEpsilonLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(2.5, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 50))
|
||||
return hasMilestone('f', 9) ? level : level.floor()
|
||||
}
|
||||
function getEpsilonCost(points = player.p.points) {
|
||||
return cumulativeExponential(2.5, getEpsilonLevel(points).floor()).mul(50).pow(buyableEffect('p', 13))
|
||||
}
|
||||
function getEpsilonEffect(points = player.p.points) {
|
||||
return getEpsilonLevel(points).mul(getEpsilonRankEffect(points).add(1/10)).add(1)
|
||||
}
|
||||
function getZetaLevel(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
const level = inverseCumulativeExponential(3, Decimal.div(Decimal.pow(points, buyableEffect('p', 13).pow(-1)), 80))
|
||||
return hasMilestone('f', 9) ? level : level.floor()
|
||||
}
|
||||
function getZetaCost(points = player.p.points) {
|
||||
return cumulativeExponential(3, getZetaLevel(points).floor()).mul(80).pow(buyableEffect('p', 13))
|
||||
}
|
||||
function getZetaEffect(points = player.p.points) {
|
||||
return getZetaLevel(points).mul(getZetaRankEffect().add(1/3)).add(1).pow(hasUpgrade('f', 41) ? 1.2 : 1)
|
||||
}
|
||||
|
||||
function getTotalLevel(points = player.p.points) {
|
||||
return getAlphaLevel(points).add(getBetaLevel(points)).add(getGammaLevel(points)).add(getDeltaLevel(points)).add(getEpsilonLevel(points)).add(getZetaLevel(points))
|
||||
}
|
||||
|
||||
function getEtaLevel(points = player.sp.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return inverseCumulativeExponential(1.2, Decimal.mul(points, 2)).floor()
|
||||
}
|
||||
function getEtaCost(points = player.sp.points) {
|
||||
return cumulativeExponential(1.2, getEtaLevel(points)).div(2)
|
||||
}
|
||||
function getEtaEffect(points = player.sp.points) {
|
||||
return getEtaLevel(points).sqrt()
|
||||
}
|
||||
function getThetaLevel(points = player.sp.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return inverseCumulativeExponential(1.3, Decimal.div(points, 3)).floor()
|
||||
}
|
||||
function getThetaCost(points = player.sp.points) {
|
||||
return cumulativeExponential(1.3, getThetaLevel(points)).mul(3)
|
||||
}
|
||||
function getThetaEffect(points = player.sp.points) {
|
||||
return getThetaLevel(points).pow(1/4).add(1)
|
||||
}
|
||||
function getIotaLevel(points = player.sp.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return inverseCumulativeExponential(1.5, Decimal.div(points, 5)).floor()
|
||||
}
|
||||
function getIotaCost(points = player.sp.points) {
|
||||
return cumulativeExponential(1.5, getIotaLevel(points)).mul(5)
|
||||
}
|
||||
function getIotaEffect(points = player.sp.points) {
|
||||
return getIotaLevel(points).pow(1/3).add(1)
|
||||
}
|
||||
function getKappaLevel(points = player.sp.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return inverseCumulativeExponential(1.7, Decimal.div(points, 8)).floor()
|
||||
}
|
||||
function getKappaCost(points = player.sp.points) {
|
||||
return cumulativeExponential(1.7, getKappaLevel(points)).mul(8)
|
||||
}
|
||||
function getKappaEffect(points = player.sp.points) {
|
||||
return getKappaLevel(points).sqrt().add(1)
|
||||
}
|
||||
function getLambdaLevel(points = player.sp.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return inverseCumulativeExponential(2, Decimal.div(points, 13)).floor()
|
||||
}
|
||||
function getLambdaCost(points = player.sp.points) {
|
||||
return cumulativeExponential(2, getLambdaLevel(points)).mul(13)
|
||||
}
|
||||
function getLambdaEffect(points = player.sp.points) {
|
||||
return getLambdaLevel(points).add(1).pow(3/2)
|
||||
}
|
||||
|
||||
function getTotalSuperLevel(points = player.sp.points) {
|
||||
return getEtaLevel(points).add(getThetaLevel(points)).add(getIotaLevel(points)).add(getKappaLevel(points)).add(getLambdaLevel(points))
|
||||
}
|
291
js/data/progress.js
Normal file
291
js/data/progress.js
Normal file
|
@ -0,0 +1,291 @@
|
|||
addLayer("p", {
|
||||
name: "progress", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "%", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: true,
|
||||
points: new Decimal(0)
|
||||
}},
|
||||
color: "#0c6949",
|
||||
requires() {
|
||||
let req = new Decimal(1)
|
||||
if (hasMilestone('f', 2)) { req = req.mul(0.5) }
|
||||
if (hasUpgrade('f', 33)) { req = req.mul(0.75) }
|
||||
if (hasUpgrade('f', 43)) { req = req.div(upgradeEffect('f', 43)) }
|
||||
return req
|
||||
}, // Can be a function that takes requirement increases into account
|
||||
resource: "progress points", // Name of prestige currency
|
||||
baseResource: "points", // Name of resource prestige is based on
|
||||
baseAmount() {return player.points}, // Get the current amount of baseResource
|
||||
type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
|
||||
exponent: 0.3, // Prestige currency exponent
|
||||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
let mult = new Decimal(1)
|
||||
mult = mult.mul(buyableEffect(this.layer, 11))
|
||||
mult = mult.mul(getThetaEffect())
|
||||
return mult
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return buyableEffect('sp', 11)
|
||||
},
|
||||
row: 0, // Row the layer is in on the tree (0 is the first row)
|
||||
hotkeys: [
|
||||
{key: "p", description: "P: Reset for progress points", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
],
|
||||
passiveGeneration() {
|
||||
let gain = 0
|
||||
if (hasUpgrade('f', 23)) gain += 0.1
|
||||
if (hasUpgrade('f', 44)) gain += 0.15
|
||||
return gain
|
||||
},
|
||||
automate() {
|
||||
if (hasMilestone('f', 8)) {
|
||||
Object.values(tmp[this.layer].buyables).forEach(i => { if (i.canAfford) i.buy() })
|
||||
}
|
||||
},
|
||||
bars: {
|
||||
alpha: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getAlphaCost()) },
|
||||
display() {
|
||||
return "Alpha - Level " + getAlphaLevel() + " (" + player[this.layer].points + "/" + getAlphaCost()
|
||||
+ ")<br>Effect: +" + getAlphaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"}
|
||||
},
|
||||
alphaRank: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return getAlphaLevel().div(getAlphaRankCost()) },
|
||||
display() {
|
||||
return "Alpha - Rank " + getAlphaRank() + " (" + getAlphaLevel() + "/" + getAlphaRankCost()
|
||||
+ ")<br>Effect: +" + getAlphaRankEffect() + " to Alpha effect base."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
},
|
||||
beta: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getBetaCost()) },
|
||||
display() {
|
||||
return "Beta - Level " + getBetaLevel() + " (" + player[this.layer].points + "/" + getBetaCost()
|
||||
+ ")<br>Effect: x" + getBetaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getAlphaLevel().gt(0) }
|
||||
},
|
||||
betaRank: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return getBetaLevel().div(getBetaRankCost()) },
|
||||
display() {
|
||||
return "Beta - Rank " + getBetaRank() + " (" + getBetaLevel() + "/" + getBetaRankCost()
|
||||
+ ")<br>Effect: +" + getBetaRankEffect() + " to Beta effect base."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getAlphaLevel().gt(0) }
|
||||
},
|
||||
gamma: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getGammaCost()) },
|
||||
display() {
|
||||
return "Gamma - Level " + getGammaLevel() + " (" + player[this.layer].points + "/" + getGammaCost()
|
||||
+ ")<br>Effect: x" + getGammaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getBetaLevel().gt(0) }
|
||||
},
|
||||
gammaRank: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return getGammaLevel().div(getGammaRankCost()) },
|
||||
display() {
|
||||
return "Gamma - Rank " + getGammaRank() + " (" + getGammaLevel() + "/" + getGammaRankCost()
|
||||
+ ")<br>Effect: +" + getGammaRankEffect() + " to Gamma effect exponent."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getBetaLevel().gt(0) }
|
||||
},
|
||||
delta: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getDeltaCost()) },
|
||||
display() {
|
||||
return "Delta - Level " + getDeltaLevel() + " (" + player[this.layer].points + "/" + getDeltaCost()
|
||||
+ ")<br>Effect: x" + getDeltaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getGammaLevel().gt(0) }
|
||||
},
|
||||
deltaRank: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return getDeltaLevel().div(getDeltaRankCost()) },
|
||||
display() {
|
||||
return "Delta - Rank " + getDeltaRank() + " (" + getDeltaLevel() + "/" + getDeltaRankCost()
|
||||
+ ")<br>Effect: +" + getDeltaRankEffect() + " to Delta effect base."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getGammaLevel().gt(0) }
|
||||
},
|
||||
epsilon: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getEpsilonCost()) },
|
||||
display() {
|
||||
return "Epsilon - Level " + getEpsilonLevel() + " (" + player[this.layer].points + "/" + getEpsilonCost()
|
||||
+ ")<br>Effect: ^" + getEpsilonEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getDeltaLevel().gt(0) }
|
||||
},
|
||||
epsilonRank: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return getEpsilonLevel().div(getEpsilonRankCost()) },
|
||||
display() {
|
||||
return "Epsilon - Rank " + getEpsilonRank() + " (" + getEpsilonLevel() + "/" + getEpsilonRankCost()
|
||||
+ ")<br>Effect: +" + getEpsilonRankEffect() + " to Epsilon effect base."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getDeltaLevel().gt(0) }
|
||||
},
|
||||
zeta: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getZetaCost()) },
|
||||
display() {
|
||||
return "Zeta - Level " + getZetaLevel() + " (" + player[this.layer].points + "/" + getZetaCost()
|
||||
+ ")<br>Effect: x" + getZetaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getEpsilonLevel().gt(0) }
|
||||
},
|
||||
zetaRank: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return getZetaLevel().div(getZetaRankCost()) },
|
||||
display() {
|
||||
return "Zeta - Rank " + getZetaRank() + " (" + getZetaLevel() + "/" + getZetaRankCost()
|
||||
+ ")<br>Effect: +" + getZetaRankEffect() + " to Zeta effect base."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#0c6949"},
|
||||
unlocked() { return getEpsilonLevel().gt(0) }
|
||||
},
|
||||
},
|
||||
buyables: {
|
||||
11: {
|
||||
title: "More progress",
|
||||
effect() { return Decimal.pow(1.1, getBuyableAmount(this.layer, this.id)) },
|
||||
cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.2).mul(5).add(50) },
|
||||
display() {
|
||||
return "Increase progress point gain.<br><br>Amount: " + getBuyableAmount(this.layer, this.id)
|
||||
+ ".<br>Effect: x" + this.effect(getBuyableAmount(this.layer, this.id)) + ".<br>Cost: "
|
||||
+ this.cost(getBuyableAmount(this.layer, this.id)) + " total levels."
|
||||
},
|
||||
canAfford() { return Decimal.gte(getTotalLevel(), this.cost()) },
|
||||
buy() { addBuyables(this.layer, this.id, 1) }
|
||||
},
|
||||
12: {
|
||||
title: "Rebased",
|
||||
effect() { return Decimal.add(
|
||||
getBuyableAmount(this.layer, this.id), hasUpgrade('f', 21) ? 2 : 0
|
||||
).pow_base(0.95) },
|
||||
cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.4).mul(7).add(80) },
|
||||
display() {
|
||||
return "Decrease Gamma effect base.<br><br>Amount: " + getBuyableAmount(this.layer, this.id)
|
||||
+ ".<br>Effect: ^" + this.effect(getBuyableAmount(this.layer, this.id)) + ".<br>Cost: "
|
||||
+ this.cost(getBuyableAmount(this.layer, this.id)) + " total levels."
|
||||
},
|
||||
canAfford() { return Decimal.gte(getTotalLevel(), this.cost()) },
|
||||
buy() { addBuyables(this.layer, this.id, 1) }
|
||||
},
|
||||
13: {
|
||||
title: "Shorter bars",
|
||||
effect() { return Decimal.add(
|
||||
getBuyableAmount(this.layer, this.id), hasUpgrade('f', 22) ? 2 : 0
|
||||
).pow_base(0.98) },
|
||||
cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.6).mul(10).add(100) },
|
||||
display() {
|
||||
return "Decrease all level costs.<br><br>Amount: " + getBuyableAmount(this.layer, this.id)
|
||||
+ ".<br>Effect: ^" + this.effect(getBuyableAmount(this.layer, this.id)) + ".<br>Cost: "
|
||||
+ this.cost(getBuyableAmount(this.layer, this.id)) + " total levels."
|
||||
},
|
||||
canAfford() { return Decimal.gte(getTotalLevel(), this.cost()) },
|
||||
buy() { addBuyables(this.layer, this.id, 1) }
|
||||
}
|
||||
},
|
||||
clickables: {
|
||||
11: {
|
||||
display() { return "Hold to gain PP" },
|
||||
canClick() { return true },
|
||||
onClick() { if (canReset(this.layer)) doReset(this.layer) },
|
||||
onHold() { if (canReset(this.layer)) doReset(this.layer) }
|
||||
}
|
||||
},
|
||||
tabFormat: {
|
||||
levels: {
|
||||
content: [
|
||||
"main-display",
|
||||
["row", ["prestige-button", ["clickable", 11]]],
|
||||
"resource-display",
|
||||
["raw-html", () => "You have " + getTotalLevel() + " level" + (getTotalLevel().eq(1) ? "" : "s") + "."],
|
||||
["raw-html", () => "You have " + getTotalRank() + " rank" + (getTotalRank().eq(1) ? "" : "s") + "."],
|
||||
"blank",
|
||||
"blank",
|
||||
["bar", "alpha"],
|
||||
["bar", "beta"],
|
||||
["bar", "gamma"],
|
||||
["bar", "delta"],
|
||||
["bar", "epsilon"],
|
||||
["bar", "zeta"]
|
||||
]
|
||||
},
|
||||
ranks: {
|
||||
content: [
|
||||
"main-display",
|
||||
["row", ["prestige-button", ["clickable", 11]]],
|
||||
"resource-display",
|
||||
["raw-html", () => "You have " + getTotalLevel() + " level" + (getTotalLevel().eq(1) ? "" : "s") + "."],
|
||||
["raw-html", () => "You have " + getTotalRank() + " rank" + (getTotalRank().eq(1) ? "" : "s") + "."],
|
||||
"blank",
|
||||
"blank",
|
||||
["bar", "alphaRank"],
|
||||
["bar", "betaRank"],
|
||||
["bar", "gammaRank"],
|
||||
["bar", "deltaRank"],
|
||||
["bar", "epsilonRank"],
|
||||
["bar", "zetaRank"]
|
||||
],
|
||||
unlocked() { return getAlphaLevel().gte(18) }
|
||||
},
|
||||
buyables: {
|
||||
content: [
|
||||
"main-display",
|
||||
["row", ["prestige-button", ["clickable", 11]]],
|
||||
"resource-display",
|
||||
["raw-html", () => "You have " + getTotalLevel() + " level" + (getTotalLevel().eq(1) ? "" : "s") + "."],
|
||||
["raw-html", () => "You have " + getTotalRank() + " rank" + (getTotalRank().eq(1) ? "" : "s") + "."],
|
||||
"blank",
|
||||
"blank",
|
||||
"buyables"
|
||||
],
|
||||
unlocked() { return getTotalLevel().gte(45) }
|
||||
}
|
||||
},
|
||||
layerShown(){return true}
|
||||
})
|
64
js/data/ranks.js
Normal file
64
js/data/ranks.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
function getAlphaRank(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return getAlphaLevel(points).div(20).floor()
|
||||
}
|
||||
function getAlphaRankCost(points = player.p.points) {
|
||||
return getAlphaRank(points).add(1).mul(20)
|
||||
}
|
||||
function getAlphaRankEffect(points = player.p.points) {
|
||||
return getAlphaRank(points).div(25)
|
||||
}
|
||||
function getBetaRank(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return getBetaLevel(points).div(15).floor()
|
||||
}
|
||||
function getBetaRankCost(points = player.p.points) {
|
||||
return getBetaRank(points).add(1).mul(15)
|
||||
}
|
||||
function getBetaRankEffect(points = player.p.points) {
|
||||
return getBetaRank(points).div(100).mul(3)
|
||||
}
|
||||
function getGammaRank(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return getGammaLevel(points).div(12).floor()
|
||||
}
|
||||
function getGammaRankCost(points = player.p.points) {
|
||||
return getGammaRank(points).add(1).mul(12)
|
||||
}
|
||||
function getGammaRankEffect(points = player.p.points) {
|
||||
return getGammaRank(points).div(15)
|
||||
}
|
||||
function getDeltaRank(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return getDeltaLevel(points).div(10).floor()
|
||||
}
|
||||
function getDeltaRankCost(points = player.p.points) {
|
||||
return getDeltaRank(points).add(1).mul(10)
|
||||
}
|
||||
function getDeltaRankEffect(points = player.p.points) {
|
||||
return getDeltaRank(points).div(20)
|
||||
}
|
||||
function getEpsilonRank(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return getEpsilonLevel(points).div(8).floor()
|
||||
}
|
||||
function getEpsilonRankCost(points = player.p.points) {
|
||||
return getEpsilonRank(points).add(1).mul(8)
|
||||
}
|
||||
function getEpsilonRankEffect(points = player.p.points) {
|
||||
return getEpsilonRank(points).div(10)
|
||||
}
|
||||
function getZetaRank(points = player.p.points) {
|
||||
if (Decimal.eq(points, 0)) return new Decimal(0)
|
||||
return getZetaLevel(points).div(7).floor()
|
||||
}
|
||||
function getZetaRankCost(points = player.p.points) {
|
||||
return getZetaRank(points).add(1).mul(7)
|
||||
}
|
||||
function getZetaRankEffect(points = player.p.points) {
|
||||
return getZetaRank(points).div(5)
|
||||
}
|
||||
|
||||
function getTotalRank() {
|
||||
return getAlphaRank().add(getBetaRank()).add(getGammaRank()).add(getDeltaRank()).add(getEpsilonRank()).add(getZetaRank())
|
||||
}
|
156
js/data/super progress.js
Normal file
156
js/data/super progress.js
Normal file
|
@ -0,0 +1,156 @@
|
|||
addLayer("sp", {
|
||||
name: "super progress", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "‰", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 1, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: false,
|
||||
points: new Decimal(0)
|
||||
}},
|
||||
color: "#107f76",
|
||||
requires: 15000, // Can be a function that takes requirement increases into account
|
||||
resource: "super progress points", // Name of prestige currency
|
||||
baseResource: "points", // Name of resource prestige is based on
|
||||
baseAmount() {return player.points}, // Get the current amount of baseResource
|
||||
type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
|
||||
exponent: 0.5, // Prestige currency exponent
|
||||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
row: 1, // Row the layer is in on the tree (0 is the first row)
|
||||
displayRow: 0,
|
||||
hotkeys: [
|
||||
{key: "s", description: "S: Reset for super progress points", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
],
|
||||
onPrestige(gain) {
|
||||
if (player.p.points.eq(0)) { player.ach.has45 = true }
|
||||
},
|
||||
bars: {
|
||||
eta: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getEtaCost()) },
|
||||
display() {
|
||||
return "Eta - Level " + getEtaLevel() + " (" + player[this.layer].points + "/" + getEtaCost()
|
||||
+ ")<br>Effect: +" + getEtaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#107f76"}
|
||||
},
|
||||
theta: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getThetaCost()) },
|
||||
display() {
|
||||
return "Theta - Level " + getThetaLevel() + " (" + player[this.layer].points + "/" + getThetaCost()
|
||||
+ ")<br>Effect: x" + getThetaEffect() + " to PP."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#107f76"},
|
||||
unlocked() { return getEtaLevel().gt(0) }
|
||||
},
|
||||
iota: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getIotaCost()) },
|
||||
display() {
|
||||
return "Iota - Level " + getIotaLevel() + " (" + player[this.layer].points + "/" + getIotaCost()
|
||||
+ ")<br>Effect: ^" + getIotaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#107f76"},
|
||||
unlocked() { return getThetaLevel().gt(0) }
|
||||
},
|
||||
kappa: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getKappaCost()) },
|
||||
display() {
|
||||
return "Kappa - Level " + getKappaLevel() + " (" + player[this.layer].points + "/" + getKappaCost()
|
||||
+ ")<br>Effect: x" + getKappaEffect() + " to softcap."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#107f76"},
|
||||
unlocked() { return getIotaLevel().gt(0) }
|
||||
},
|
||||
lambda: {
|
||||
direction: RIGHT,
|
||||
width: 300,
|
||||
height: 50,
|
||||
progress() { return player[this.layer].points.div(getLambdaCost()) },
|
||||
display() {
|
||||
return "Lambda - Level " + getLambdaLevel() + " (" + player[this.layer].points + "/" + getLambdaCost()
|
||||
+ ")<br>Effect: x" + getLambdaEffect() + " to point gen."
|
||||
},
|
||||
fillStyle: {backgroundColor: "#107f76"},
|
||||
unlocked() { return getKappaLevel().gt(0) }
|
||||
},
|
||||
},
|
||||
buyables: {
|
||||
11: {
|
||||
title: "Much more progress",
|
||||
effect() { return Decimal.div(getBuyableAmount(this.layer, this.id), 20).add(1) },
|
||||
cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.2).mul(3).add(20) },
|
||||
display() {
|
||||
return "Increase PP gain.<br><br>Amount: " + getBuyableAmount(this.layer, this.id)
|
||||
+ ".<br>Effect: ^" + this.effect(getBuyableAmount(this.layer, this.id)) + ".<br>Cost: "
|
||||
+ this.cost(getBuyableAmount(this.layer, this.id)) + " total super levels."
|
||||
},
|
||||
canAfford() { return Decimal.gte(getTotalSuperLevel(), this.cost()) },
|
||||
buy() { addBuyables(this.layer, this.id, 1) }
|
||||
},
|
||||
12: {
|
||||
title: "Super point booster",
|
||||
effect() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.3).add(1) },
|
||||
cost() { return Decimal.pow(getBuyableAmount(this.layer, this.id), 1.2).mul(5).add(25) },
|
||||
display() {
|
||||
return "Increase point gen.<br><br>Amount: " + getBuyableAmount(this.layer, this.id)
|
||||
+ ".<br>Effect: ^" + this.effect(getBuyableAmount(this.layer, this.id)) + ".<br>Cost: "
|
||||
+ this.cost(getBuyableAmount(this.layer, this.id)) + " total super levels."
|
||||
},
|
||||
canAfford() { return Decimal.gte(getTotalSuperLevel(), this.cost()) },
|
||||
buy() { addBuyables(this.layer, this.id, 1) }
|
||||
},
|
||||
},
|
||||
clickables: {
|
||||
11: {
|
||||
display() { return "Hold to gain SPP" },
|
||||
canClick() { return true },
|
||||
onClick() { if (canReset(this.layer)) doReset(this.layer) },
|
||||
onHold() { if (canReset(this.layer)) doReset(this.layer) }
|
||||
}
|
||||
},
|
||||
tabFormat: {
|
||||
"super levels": {
|
||||
content: [
|
||||
"main-display",
|
||||
["row", ["prestige-button", ["clickable", 11]]],
|
||||
"resource-display",
|
||||
["raw-html", () => "You have " + getTotalSuperLevel() + " super level" + (getTotalSuperLevel().eq(1) ? "" : "s") + "."],
|
||||
"blank",
|
||||
"blank",
|
||||
["bar", "eta"],
|
||||
["bar", "theta"],
|
||||
["bar", "iota"],
|
||||
["bar", "kappa"],
|
||||
["bar", "lambda"],
|
||||
]
|
||||
},
|
||||
"super buyables": {
|
||||
content: [
|
||||
"main-display",
|
||||
["row", ["prestige-button", ["clickable", 11]]],
|
||||
"resource-display",
|
||||
["raw-html", () => "You have " + getTotalSuperLevel() + " super level" + (getTotalSuperLevel().eq(1) ? "" : "s") + "."],
|
||||
"blank",
|
||||
"blank",
|
||||
"buyables",
|
||||
],
|
||||
unlocked() { return getTotalSuperLevel().gte(18) }
|
||||
},
|
||||
},
|
||||
layerShown(){ return player.points.gte(10000) || player[this.layer].unlocked },
|
||||
branches: ['p'],
|
||||
})
|
28
js/layers.js
28
js/layers.js
|
@ -1,28 +0,0 @@
|
|||
addLayer("p", {
|
||||
name: "prestige", // This is optional, only used in a few places, If absent it just uses the layer id.
|
||||
symbol: "P", // This appears on the layer's node. Default is the id with the first letter capitalized
|
||||
position: 0, // Horizontal position within a row. By default it uses the layer id and sorts in alphabetical order
|
||||
startData() { return {
|
||||
unlocked: true,
|
||||
points: new Decimal(0),
|
||||
}},
|
||||
color: "#4BDC13",
|
||||
requires: new Decimal(10), // Can be a function that takes requirement increases into account
|
||||
resource: "prestige points", // Name of prestige currency
|
||||
baseResource: "points", // Name of resource prestige is based on
|
||||
baseAmount() {return player.points}, // Get the current amount of baseResource
|
||||
type: "normal", // normal: cost to gain currency depends on amount gained. static: cost depends on how much you already have
|
||||
exponent: 0.5, // Prestige currency exponent
|
||||
gainMult() { // Calculate the multiplier for main currency from bonuses
|
||||
mult = new Decimal(1)
|
||||
return mult
|
||||
},
|
||||
gainExp() { // Calculate the exponent on main currency from bonuses
|
||||
return new Decimal(1)
|
||||
},
|
||||
row: 0, // Row the layer is in on the tree (0 is the first row)
|
||||
hotkeys: [
|
||||
{key: "p", description: "P: Reset for prestige points", onPress(){if (canReset(this.layer)) doReset(this.layer)}},
|
||||
],
|
||||
layerShown(){return true}
|
||||
})
|
67
js/mod.js
67
js/mod.js
|
@ -1,28 +1,34 @@
|
|||
let modInfo = {
|
||||
name: "The ??? Tree",
|
||||
id: "mymod",
|
||||
author: "nobody",
|
||||
name: "Progressbar Incremental",
|
||||
id: "nif/pbic",
|
||||
author: "Nif",
|
||||
pointsName: "points",
|
||||
modFiles: ["layers.js", "tree.js"],
|
||||
modFiles: ["data/ranks.js", "data/levels.js", "data/progress.js", "data/super progress.js", "data/files.js", "data/integrals.js", "data/achievements.js", "data/tree.js"],
|
||||
|
||||
discordName: "",
|
||||
discordLink: "",
|
||||
initialStartPoints: new Decimal (10), // Used for hard resets and new players
|
||||
initialStartPoints: new Decimal (1), // Used for hard resets and new players
|
||||
offlineLimit: 1, // In hours
|
||||
}
|
||||
|
||||
// Set your version in num and name
|
||||
let VERSION = {
|
||||
num: "0.0",
|
||||
name: "Literally nothing",
|
||||
num: "1.0",
|
||||
name: "The first release.",
|
||||
}
|
||||
|
||||
let changelog = `<h1>Changelog:</h1><br>
|
||||
<h3>v0.0</h3><br>
|
||||
- Added things.<br>
|
||||
- Added stuff.`
|
||||
let changelog = `<h1>Changelog:</h1><br><br>
|
||||
<h3>v1.0</h3><br>
|
||||
- Added Progress, Super Progress, and File layers.<br>
|
||||
- Added bars Alpha to Lambda.<br>
|
||||
- Added ranks Alpha to Zeta.<br>
|
||||
- Added 3 buyables and 2 super buyables.<br>
|
||||
- Added 10 Filestones.<br>
|
||||
- Added 11 Directory upgrades.<br>
|
||||
- Added Integral reset.<br>
|
||||
- Current endgame: 1 integral.<br>`
|
||||
|
||||
let winText = `Congratulations! You have reached the end and beaten this game, but for now...`
|
||||
let winText = `Download 100% complete.<br><br>You won! Congratulations!<br>More content coming soon...`
|
||||
|
||||
// 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)
|
||||
|
@ -34,15 +40,35 @@ function getStartPoints(){
|
|||
|
||||
// Determines if it should show points/sec
|
||||
function canGenPoints(){
|
||||
return true
|
||||
return getAlphaLevel().gte(0)
|
||||
}
|
||||
|
||||
// Calculate points/sec!
|
||||
function getPointGen() {
|
||||
if(!canGenPoints())
|
||||
return new Decimal(0)
|
||||
|
||||
let gain = new Decimal(1)
|
||||
if(!canGenPoints()) return new Decimal(0)
|
||||
// additive
|
||||
let gain = getAlphaEffect()
|
||||
gain = gain.add(getEtaEffect())
|
||||
// multiplicative
|
||||
gain = gain.mul(getBetaEffect())
|
||||
gain = gain.mul(getGammaEffect())
|
||||
gain = gain.mul(getDeltaEffect())
|
||||
gain = gain.mul(getZetaEffect())
|
||||
gain = gain.mul(getLambdaEffect())
|
||||
gain = gain.mul(tmp.ach.effect)
|
||||
if (hasMilestone('f', 0)) gain = gain.mul(getTotalLevel().add(1).log(5).add(1))
|
||||
if (hasMilestone('f', 1)) gain = gain.mul(3)
|
||||
// exponentiative
|
||||
if (gain.gte(1)) {
|
||||
gain = gain.pow(getEpsilonEffect())
|
||||
gain = gain.pow(getIotaEffect())
|
||||
gain = gain.pow(buyableEffect('sp', 12))
|
||||
if (hasMilestone('f', 3)) gain = gain.pow(2)
|
||||
if (hasUpgrade('f', 11)) gain = gain.pow(upgradeEffect('f', 11))
|
||||
}
|
||||
// softcaps
|
||||
gain = softcap(gain, getKappaEffect().mul(1000), d => d.add(1).log(Math.E).add(1).pow(2).sub(1).div(2))
|
||||
gain = softcap(gain, Decimal.pow(2, 128), _ => new Decimal(0), player.points)
|
||||
return gain
|
||||
}
|
||||
|
||||
|
@ -52,11 +78,13 @@ function addedPlayerData() { return {
|
|||
|
||||
// Display extra things at the top of the page
|
||||
var displayThings = [
|
||||
"All exponentiative upgrades only take affect above 1.",
|
||||
() => getPointGen().gte(getKappaEffect().mul(1000)) ? "Your points per second are being logarithmically softcapped over " + getKappaEffect().mul(1000) + "/s" : ""
|
||||
]
|
||||
|
||||
// Determines when the game "ends"
|
||||
function isEndgame() {
|
||||
return player.points.gte(new Decimal("e280000000"))
|
||||
return player.i.points.gt(0)
|
||||
}
|
||||
|
||||
|
||||
|
@ -75,5 +103,6 @@ function maxTickLength() {
|
|||
|
||||
// Use this if you need to undo inflation from an older version. If the version is older than the version that fixed the issue,
|
||||
// you can cap their current resources with this.
|
||||
function fixOldSave(oldVersion){
|
||||
function fixOldSave(oldVersion) {
|
||||
|
||||
}
|
|
@ -409,4 +409,10 @@ function gridRun(layer, func, data, id) {
|
|||
}
|
||||
else
|
||||
return layers[layer].grid[func];
|
||||
}
|
||||
|
||||
// Small functions
|
||||
function softcap(number, after, method, delta = new Decimal(0)) {
|
||||
if (Decimal.add(number, delta).lt(after)) { return new Decimal(number) }
|
||||
else { return method(Decimal.add(number, delta).sub(after)).add(after).sub(delta) }
|
||||
}
|
|
@ -222,7 +222,7 @@ function loadOptions() {
|
|||
options = Object.assign(getStartOptions(), JSON.parse(decodeURIComponent(escape(atob(get2)))));
|
||||
else
|
||||
options = getStartOptions()
|
||||
if (themes.indexOf(options.theme) < 0) theme = "default"
|
||||
if (Object.keys(colors).indexOf(options.theme) < 0) theme = "default"
|
||||
fixData(options, getStartOptions())
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
// ************ Themes ************
|
||||
var themes = ["default", "aqua"]
|
||||
|
||||
var colors = {
|
||||
default: {
|
||||
1: "#ffffff",//Branch color 1
|
||||
|
@ -22,6 +20,36 @@ var colors = {
|
|||
background: "#001f3f",
|
||||
background_tooltip: "rgba(0, 15, 31, 0.75)",
|
||||
},
|
||||
verdant: {
|
||||
1: "#ceffbd",
|
||||
2: "#8fd376",
|
||||
3: "#6e965f",
|
||||
color: "#ceffbd",
|
||||
points: "#edf3eb",
|
||||
locked: "#c4a7b3",
|
||||
background: "#0d180e",
|
||||
background_tooltip: "rgba(0, 22, 3, 0.75)",
|
||||
},
|
||||
crimson: {
|
||||
1: "#f1b8b8",
|
||||
2: "#c28282",
|
||||
3: "#9f5555",
|
||||
color: "#f1b8b8",
|
||||
points: "#fcefef",
|
||||
locked: "#c4a7b3",
|
||||
background: "#251010",
|
||||
background_tooltip: "rgba(26, 13, 13, 0.75)",
|
||||
},
|
||||
amber: {
|
||||
1: "#eff1ac",
|
||||
2: "#b6b95a",
|
||||
3: "#7e812a",
|
||||
color: "#eff1ac",
|
||||
points: "#feffe4",
|
||||
locked: "#c4a7b3",
|
||||
background: "#161603",
|
||||
background_tooltip: "rgba(5, 6, 0, 0.75)",
|
||||
},
|
||||
}
|
||||
function changeTheme() {
|
||||
|
||||
|
@ -33,18 +61,17 @@ function changeTheme() {
|
|||
document.body.style.setProperty("--locked", colors_theme["locked"]);
|
||||
}
|
||||
function getThemeName() {
|
||||
return options.theme? options.theme : "default";
|
||||
return options.theme ? options.theme : "default";
|
||||
}
|
||||
|
||||
function switchTheme() {
|
||||
let index = themes.indexOf(options.theme)
|
||||
if (options.theme === null || index >= themes.length-1 || index < 0) {
|
||||
options.theme = themes[0];
|
||||
let index = Object.keys(colors).indexOf(options.theme)
|
||||
if (options.theme === null || index >= Object.keys(colors).length-1 || index < 0) {
|
||||
options.theme = Object.keys(colors)[0];
|
||||
}
|
||||
else {
|
||||
index ++;
|
||||
options.theme = themes[index];
|
||||
options.theme = themes[1];
|
||||
options.theme = Object.keys(colors)[index];
|
||||
}
|
||||
changeTheme();
|
||||
resizeCanvas();
|
||||
|
|
Loading…
Reference in a new issue