Swap HP or XP for MP

==Swap HP or XP for MP==
by @mike_the_monk
=== Summary ===
As detailed in this wiki page on custom rules for Habitica, a player who finds that they need more motivation to avoid bad Habits might want to swap Health for Mana; having less Health could motivate them more to avoid bad Habits, and additional Mana allows them to use skills more. Similarly, a player could find it motivating to delay leveling up by losing experience in order to heal themselves, especially if using skills more (with more mana) is a greater motivator to a player than leveling up.
This script creates custom Reward buttons that create these custom skills, and you can create one or both.
* Swap Health for Mana allows you to pay 5 HP to gain 10 MP, up to a maximum of 12 times per day. This skill unlocks at level 11, when players unlock Mana.
* Swap Experience for Mana allows you to pay 50 XP to gain 10 MP, up to a maximum XP spent of 1/3 of what's needed to level up. This skill unlocks at level 11, when players unlock Mana.
==== Code ====
*https://raw.githubusercontent.com/mike-the-monk/Habitica-customizations/main/Automated%20FCV%20scripts/Swap%20HP%20or%20XP%20for%20MP
==== Required Customizations ====
Which of these custom skills do you want to create? You can create one or both.
*CREATE_HP_FOR_MP will create this custom skill if the value is set to 1 (which is the default), which lets you pay HP to gain MP. If you don't want the it, change the value to a 0.
*CREATE_MANA_POTION will create this custom skill if the value is set to 1 (which is the default), which lets you pay XP to gain MP. If you don't want the it, change the value to a 0.
==== Optional Customizations ====
*NOTIFICATIONS_ON can be changed to a 0 so you don't get any private message notifications; if you keep it as a 1, you'll get all the usual messages (examples include if you're already at max Mana or exceeded the limit for daily skill usage)
----
=== Credits and Acknowledgments ===
* This wiki page, especially the section on custom rules, for giving the idea of how to use Fix Character Values to create custom skills.
Category:Extensions, Add-Ons, and Customizations
zh:用生命值或经验值换取魔法值