Heal Specific Health Type (Shield and Armor Healing)
Heal a specific health type and leave the other health pools untouched.
How does the code work?
By default, the Workshop does not allow us to apply healing to a specific health type using basic actions such as Heal, Start Heal Over Time, or Set Player Health. These actions always distribute healing across all available health pools, prioritizing Health, Armor and then Shields.
To heal a specific health type, we take advantage of a feature (or bug, depending on how you see it) that occurs when removing custom health pools.
Always make sure to correctly identify the custom health pool you created (by saving it's ID into another variable), so it can be removed without affecting other custom health pools.
When you remove a health pool from a player, any remaining value in that pool is converted into healing of that same health type.
For example:
A hero has 100 base shields. You add 25 custom shields, then damage is dealt to this custom shield pool, when you remove those 25 shields, whatever value remains is converted into shield healing. We take advantage of it by removing the health pool before it's even possible to receive damage.
This behavior works for all the three regenerative health types, Health, Armor and Shields.
Note: Despite being a great way to heal a specific health type, you will not:
- Be rewarded with healing points in the scoreboard.
- Be rewarded with ultimate progress. (It is possible to fix with Workshop.)
- Be rewarded with perk progress.
- Be able to track who's the healer/healee with "Player Dealt/Received Healing" parameter.
- Be able to negate or reduce healing. (Also possible to fix with Workshop.)
- Be able to amplify healing.
Ideas on how to use it:
- You can substitue certain abilities healing for specific healing.
- You can replicate Symmetra's passive (shield lifesteal) to other heroes, close your eyes and Imagine Torbjörn stealing your armor.
- You can balance custom healing that would otherwive be too overpowered if it healed other health types (by preventing it from affecting armor, for example).