The cost of the skill tree node. [currency, cost] - The currency and cost of the skill tree node.
The description of the upgrade. Can be a string or a function that returns a string.
// A dynamic description that returns a string
const description = (level) => `This upgrade is at level ${level}`;
// ... create upgrade here (see currencyStatic.addUpgrade)
const upgrade = currencyStatic.getUpgrade("upgradeID");
// Buy 1 level of the upgrade
currencyStatic.buyUpgrade("upgradeID", 1);
// Getter property
console.log(upgrade.description); // "This upgrade is at level 1"
The effect of the skill tree node.
The ID of the upgrade. Used to retrieve the upgrade later.
The maximum level of the upgrade. Warning: If not set, the upgrade will not have a maximum level and can continue to increase indefinitely.
The name of the upgrade. Defaults to the ID.
The skill nodes that are required to unlock this skill node. See RequiredSkill for more information. Can also be a function that takes the skill tree context and returns the required skills.
Represents a skill tree node. WIP