NOTE: This mod is designed for use with Requiem - The Roleplaying Overhaul. I tested it while using Requiem and have balanced it accordingly 
(you'll notice I  wrote this description assuming you also use Requiem). That said, I did not make any explicit dependencies to Requiem, and 
in theory the script effect I made is generalized enough that it should work in vanilla and with spells added by other mods. Therefore, I did 
not mark Requiem as being a required mod. SKSE is still required, however.

What this mod does:
The spell toggles the Blood Magic mode. While it is active, spells cost half as much but use health instead of magicka. There are safeguards 
in place to prevent you from casting spells that would kill you (I recommend you do not depend on this system and play carefully to avoid killing 
yourself).  In addition, most healing effects from potions and Restoration spells do not work while Blood Magic is active. You can disable the 
spell at any time to allow them to work, of course. Vampires do not receive the halved spell costs to offset their very large health buffs and 
additional sources of healing (see below).

Valid sources of healing while Blood Magic is active:
- Absorb Spells (Absorbing Grasp, Vampiric Drain, Absorb Health, Absorb Essence)
- Surpassing Potions
- Power of Life
- Histskin
- Regeneration (the Alchemy perk)
- Fortify Health Regeneration effects*
- Become Ethereal with the Eternal Spirit ability
- (Vampire only) Feeding from a corpse or victim
- (Vampire only) Elixirs of Blood (both the 100 health and the restore health over time effects)

*I added an additional effect to Fortify Health Regeneration enchantments and potions that reduces spell costs by another 10% (multiplicative) 
while Blood Magic is active. Hopefully that makes this particular effect more useful, as Requiem makes it very underwhelming.

All other sources of healing are (supposed to be) blocked. If you want specifics, any effect with the "MagicAlchRestoreHealth" and "MagicRestoreHealth" 
keywords are blocked (except surpassing potions). To obtain the spell, I placed spell tomes near all of the Transmute Blood spell tomes. There are 4 
locations. You probably know where to find at least one, and if not you can just add the tome or spell through the console (the spell's name is "Blood 
Magic").

Known Bugs:
- Circle of Palladium/Guardian Circle still heals you. I haven't been able to figure out how its healing effect is applied so I can block it. Any 
  insight would be appreciated.
- Spells cast by a staff cost no staff energy. This is a side effect of the fact that magicka costs are reduced to 0 while Blood Magic is active. 
- Spell costs in the magic menu are all listed as 0. Again, this is a side effect of the magicka cost being 0. The health costs are still applied 
  correctly, but you can't just look at the menu to tell how expensive a spell will be before casting. You can very quickly equip and unequip a spell 
  (or deactivate Blood Magic) to see the costs, but I would like to have them visible at all times in the future.
- The only scenario I have found where the protection system fails is when you charge a fire and forget spell while you have sufficient health to 
  cast it, but then take enough damage such that releasing the spell will kill you. For FF spells, the script only checks once whether it is safe 
  to cast the spell as you begin to charge it, not continuously like with concentration spells. Until I fix this, try not to charge a spell for too 
  long while you're close to the death threshold.

Compatibility
I did my best to make this mod as un-intrusive as possible, so I don't foresee many compatibility issues with other mods. If you have spells added to 
your game with different keyword conventions from the base game, then Blood Magic may have issues correctly identifying the spell type and applying the 
health costs accordingly.

You can freely modify and redistribute this mod as you wish as long as it's free (though please link to the Nexus page when possible). You do not need 
permission. Credit would be appreciated but is not required.

If you're curious as to how I scripted the spell or would like to make suggestions for improvement, I included the source code in the download file.
See the "Source" folder.