DarkstarProject/darkstar — pull request #117 by starlightknight (2014-04-06 21:33:51+00:00)
Title: Job Traits: Add Tranquil Heart

Tranquil Heart is a Passive Job Trait for WHM/RDM/SCH. The trait reduces enmity gained from Cure by a calculation based our your healing skill.

WHM: 21 / RDM: 26 / SCH: 30

From what I read on BGWiki, it gains a tick every 10 healing magic skill points, capping out at 25% at 500 healing magic skill. So in other words, every 10 healing magic points, it reduces enmity from cure by 0.5%

http://wiki.bluegartr.com/bg/Tranquil_Heart

Reduction % increases every 10 Healing Magic Skill and caps at -25% Enmity at 500 Skill.

Note: The info on BGWiki specifically says that the reduction step happens AFTER what is normally the final enmity calculation and cap check occurs, allowing the Tranquil Heart reduction to exceed the normal -50 Enmity limit.

To accomplish this, I had to refactor the Enmity functions a bit. I split UpdateEnmityFromCure into its own customized path of UpdateEnmity to accomplish this, but refactored a big repeatable chunk of UpdateEnmity into helper method CalculateEnmityBonus to reduce copy/paste.

I tested the bonus with WHM, RDM, and SCH, the 3 jobs it applies to. I also tested it with PLD, whom the bonus should NOT apply to (and it didn't!)

Things seem to be working correctly and when I debug log the Tranquil Heart Bonus it looks correct