2020-10-17 22:18:57 +00:00
|
|
|
let modInfo = {
|
|
|
|
name: "The Modding Tree",
|
|
|
|
id: "modbase",
|
|
|
|
pointsName: "points",
|
2021-06-11 20:22:56 +00:00
|
|
|
modFiles: ["Demo/layers/c.js", "Demo/layers/f.js", "Demo/layers/a.js", "Demo/demoTree.js"],
|
|
|
|
|
|
|
|
|
2020-10-17 22:18:57 +00:00
|
|
|
discordName: "",
|
|
|
|
discordLink: "",
|
2020-10-27 23:25:03 +00:00
|
|
|
initialStartPoints: new Decimal (10), // Used for hard resets and new players
|
|
|
|
offlineLimit: 1, // In hours
|
2020-10-17 22:18:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Set your version in num and name
|
|
|
|
let VERSION = {
|
2021-09-08 04:01:24 +00:00
|
|
|
num: "2.6.6",
|
2021-06-03 18:04:20 +00:00
|
|
|
name: "Fixed Reality",
|
2020-10-17 22:18:57 +00:00
|
|
|
}
|
|
|
|
|
2020-12-05 19:52:29 +00:00
|
|
|
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...`
|
2020-10-17 22:18:57 +00:00
|
|
|
// 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() {
|
2021-06-17 17:40:55 +00:00
|
|
|
return player.points.gte(new Decimal("11"))
|
2020-10-17 22:18:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Less important things beyond this point!
|
|
|
|
|
2021-06-07 04:00:30 +00:00
|
|
|
// Style for the background, can be a function
|
|
|
|
var backgroundStyle = {
|
|
|
|
}
|
|
|
|
|
2020-10-17 22:18:57 +00:00
|
|
|
// You can change this if you have things that can be messed up by long tick lengths
|
|
|
|
function maxTickLength() {
|
2020-11-29 02:25:53 +00:00
|
|
|
return(3600) // Default is 1 hour which is just arbitrarily large
|
2020-11-29 01:10:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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){
|
2020-12-01 02:58:42 +00:00
|
|
|
}
|