Start to Implement Afflatus Misery

References:
http://wiki.ffxiclopedia.org/wiki/Afflatus_Misery
http://wiki.bluegartr.com/bg/Afflatus_Misery

What's Done:
-The ability can activate and grant the effect EFFECT_AFFLATUS_MISERY
-Afflatus Misery / Afflatus Solace will overwrite each other
-Added tracking MOD_AFFLATUS_MISERY to battleutils to keep the last damage count, used to calculate bonuses
-Updated Esuna script to grant the Afflatus Misery bonus if its active; if its active it will heal 2 effects instead of one, and can remove effects normally only removable by Erase as well.
-Updated Banish Spells to get the potency bonus if casted while Afflatus Misery is active, using the Gartr info as a guide. I could not find any exact formula, so I made it as close to the info from FFXIclopedia/Gartr as possible

Todo:
-Cura bonuses.
-Auspice Bonus.
Made a semi educated attempt to implement Cura/Cure II

Complete with Afflatus Misery bonus. Primarily used BGWiki
as a source:

http://wiki.bluegartr.com/bg/Cura
http://wiki.bluegartr.com/bg/Cura_II
http://wiki.bluegartr.com/bg/Cure_Formula
http://wiki.bluegartr.com/bg/Cure_Potency

I googled around on this a lot and there does not seem to be a lot of concrete info, so I made it as close to within the known guidelines as possible. Even if its not perfect, it is workable and should be reasonably close to what is expected. Additional notes in the comments.

Also fixed up the SQL for these spells. The targetLevel was wrong as these are self target only. I also updated the fixed enmity values to match BGWiki.
Commit out debug prints; forgot this in the last commit
Start to Implement Auspice / Afflatus Misery Support

What Works:
-Cast the spell & gaining the effect
-Subtle Blow Bonus Granted for TP Reduction
-Enspell if Afflatus Misery is on at the time of casting

To-do:
-Finish coding accuracy bonus effect w/ Afflatus Misery. I am still searching for the appropriate place to hook this up. Basically, I need to find the place where the system has decided a miss happened, and then insert a check to boost accuracy in this scenario. If someone reads this and wants to point me in the right direction, awesome, otherwise I'll keep looking tomorrow when I have more time.

-Fix bonus states if Afflatus Misery is used after Auspice is cast.
Add Cura III spell with its Afflatus Misery Bonus

Cura III is now learnable and has its correct base price, mp, cast times, etc set according to BGWiki

Implementation is very similar to the implementation of Cura/Cura II: largely semi-educated guesswork based off of the best available info on BGWiki, as I could not find a concrete cura formula anywhere. Should be reasonably close, workable.
Implement Auspice Enspell & Accuracy Bonus w/ Afflatus Misery

Enspell Bonus:
If Afflatus Misery & Auspice after active together, then auspice acts as a light enspell. It is calculated like at tier II enspell and must check that it applies only on hitCount 0

Accuracy Bonus:
Each time the player misses an attack while the combination of Misery & Auspice is active, the system is supposed to boost their accuracy by 10. This effect wears off as soon as eith Auspice OR Misery wears off.

Since I am still new, I poked around looking for ways to do this, so this could be noobish. The way I found that works is to track the accumlating bonus as a char_var while adding the bonus to MOD_ACC. The char_var is then used to subtract the bonus that was gained from the combination from MOD_ACC when either effect wears off. If this is not an appropriate way to do this, please let me know. I am always happy to learn.
Cleanup Afflatus Misery / Banish Magic.lua Path

This was done at @teschnei's request, as he doesnt want any sepll that doesn't get a bonus from Afflatus Misery to be on the same codepath.

So what I had to do to achieve this, is split Banish spells into their own codepath, doDivineBanishNuke() - this is necessary because the Afflatus Misery only applies bonuses to Banish spells, NOT Holy

I then placed the call to HandleAfflatusMisery in the doDivineBanishNuke code path, and then was able to remove the checks for divine skill and eligible spells

Let me know if this is sufficient for you. This way the Banish formula calculation is at least centralized instead of copy/pasted in 7 different files.
Auspice Cast Time is now 3 sec, not 7 sec.

Fixes Auspice taking long to cast than the casting gauge filling

http://wiki.ffxiclopedia.org/wiki/Auspice
Incorporate feedback from teschnei (thanks for the detailed review/advice) :-)
Refactoring to convert extra modifiers to use effect subpower
Use Modifier for Subtle Blow Gear Bonus, Cap Acc Bonus Per BGWiki
Merge pull request #105 from starlightknight/afflatus-misery

Implemented White Mage Job Ability Afflatus Misery, Supporting Spells, and Bonuses