If $test is more than 6, the I want two things to happen
Should also apply to $test = 6
Can the player ever return to that passage with the link? If so, does "deactivate" mean for all time or only for the current instance—i.e. should the link be active again when they return or still be switched out with the alternate text?
The link should be permanently deactivated if used when $test >= 6, but not in other cases.
Here's a picture that might help explain things: https://imgur.com/9ayurGY
IN this scenario, the option shown in the red box, costs 6 energy to be implemented.
When clicking on the link, I want to consider the amount of energy the player has. In this case, 0.
Since the player has insufficient energy, I want the link to lead to another passage. In this case the link should not be deactivated.
If the player has enough energy, then I want the link to deactivate, change it's text, and change a variable (basically run a script which deducts energy cost from total energy available).