From 4f4ed19b872cffa22d4358c619b7f58768850a3b Mon Sep 17 00:00:00 2001 From: Acamaeda Date: Tue, 6 Oct 2020 23:11:36 -0400 Subject: [PATCH] Added Micro-tabs and probably lots of other small things to that effect --- docs/layer-features.md | 25 ++++++++++- docs/milestones.md | 2 + index.html | 11 ++--- js/game.js | 48 ++++++++++++++++----- js/layers.js | 95 +++++++++++++++++++++++++++++++----------- js/temp.js | 4 ++ js/utils.js | 25 ++++++++--- js/v.js | 33 +++++++++++++++ style.css | 7 +++- 9 files changed, 199 insertions(+), 51 deletions(-) diff --git a/docs/layer-features.md b/docs/layer-features.md index 98bdf9c..7d9bc66 100644 --- a/docs/layer-features.md +++ b/docs/layer-features.md @@ -89,8 +89,9 @@ Key: - type: Determines which prestige formula you use. "normal": The amount of currency you gain is independent of its current amount (like Prestige). formula before bonuses is based on `baseResource^exponent` - "static: The cost is dependent on your total after reset. + "static": The cost is dependent on your total after reset. formula before bonuses is based on `base^(x^exponent)` + "custom": You can define everything, from the calculations to the text on the button, yourself. (See more at the bottom) - exponent: Used as described above. @@ -138,4 +139,24 @@ Key: for any not-yet-unlocked layers in this list increases. This can be used to make them harder to unlock. - should_notify: **optional**, a function to return true if this layer should be highlighted in the tree. - The layer will automatically be highlighted if you can buy an upgrade whether you have this or not. \ No newline at end of file + The layer will automatically be highlighted if you can buy an upgrade whether you have this or not. + + +# Custom Prestige type only +(No effect otherwise) + +- prestigeButtonText(): **Only for custom prestige type**, Function that returns the entirety of the text that should + be displayed on the prestige button.You can use HTML as well! + +- getResetGain(): **Only for custom prestige type**, Returns how many points you should get if you reset now. You can call + getResetGain(this.layer, useType = "static") or similar to calculate what your gain would be under another + prestige type (provided you have all of the required features in the layer.) + +- getNextAt(canMax=false): **Only for custom prestige type**, Returns how many of the base currency you need to get to + the next point. canMax is an optional variable used with Static-ish layers to differentiate between if + it's looking for the first point you can reset at, or the requirement for any gain at all. + (Supporting both is good). You can also call getNextAt(this.layer, canMax=false, useType = "static") + or similar to calculate what your next at would be under another prestige type (provided you have + all of the required features in the layer.) + +- canReset(): **Only for custom prestige type**, return true only if you have the resources required to do a prestige here. \ No newline at end of file diff --git a/docs/milestones.md b/docs/milestones.md index 9af8fd2..4510939 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -29,6 +29,8 @@ Milestone features: the value being toggled is stored in, and the second is the internal name of the variable to toggle. (e.g. [["b", "auto"], ["g", "auto"]) + **Tip:** Toggles are not de-set if the milestone becomes locked! In this case, you should also check if the player has the milestone. + - layer: **Assigned automagically**. It's the same value as the name of this layer, so you can do player[this.layer].points or similar - id: **Assigned automagically**. It's the id for this milestone. diff --git a/index.html b/index.html index 1e25222..eee263d 100644 --- a/index.html +++ b/index.html @@ -52,6 +52,7 @@

v1.3: Tabbing out