Merge branch 'master' of http://github.com/DarkstarProject/darkstar
Merge branch 'master' of http://github.com/DarkstarProject/darkstar
Merge branch 'master' of http://github.com/DarkstarProject/darkstar
SCRIPTS: make HELM function names unique and arrays local
Calcabrina now spawns and re-spawns. Added mob family - Calcabrina can only use berserk.
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
Merge branch 'master' of http://github.com/DarkstarProject/darkstar
Use Modifier for Subtle Blow Gear Bonus, Cap Acc Bonus Per BGWiki
SCRIPTS: Twinkbrix: Implement Dice Game / Mine Shaft 2716 Warp

If you talk to Twinkbrix in Oldton Movalpolos, there is an event to play a game with him by trading up to 10,000 gil. After you trade gil to him, he'll roll the dice. The more gil you trade, the better your chances of winning the game. If you win, you get key item SHAFT_GATE_OPERATING_DIAL

If you trade him 2000 gil while having this key item, he'll warp you to Mine Shaft 2716.

The key item itself is ultimately used to enter ENM60 Pulling the Strings, which isn't implemented yet. However, it was also always a handy way to warp over to Mine Shaft 2716 solo.
Holding on to the key item instead of doing the ENM allows you to use him as a warp NPC to Mine Shaft 2716. I used to do this when I played retail (and the ENM too)

Reference: http://wiki.ffxiclopedia.org/wiki/Twinkbrix
Merge pull request #105 from starlightknight/afflatus-misery

Implemented White Mage Job Ability Afflatus Misery, Supporting Spells, and Bonuses
Merge pull request #168 from maxtherabbit/HELM

SCRIPTS: make HELM function names unique and arrays local