From 47e2eb0acf919675ceae347496d02538cfc1a307 Mon Sep 17 00:00:00 2001 From: Fryguy Date: Sun, 7 Jan 2024 22:57:34 -0500 Subject: [PATCH] [Bug Fix] Harm Touch, Improved Harm Touch, and Unholy Touch (#3904) * [bug] HT / Imp HT / Unholy Touch Adjusted logic order for HT/Improved HT/Unholy Touch * Requested Changes --- zone/effects.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/zone/effects.cpp b/zone/effects.cpp index 3d7acd36c..3854005c4 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -62,15 +62,6 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) { int chance = 0; int legacy_manaburn_cap = RuleI(Spells, LegacyManaburnCap); - // Need to scale HT damage differently after level 40! It no longer scales by the constant value in the spell file. It scales differently, instead of 10 more damage per level, it does 30 more damage per level. So we multiply the level minus 40 times 20 if they are over level 40. - if ((spell_id == SPELL_HARM_TOUCH || spell_id == SPELL_HARM_TOUCH2 || spell_id == SPELL_IMP_HARM_TOUCH ) && GetLevel() > 40) - value -= (GetLevel() - 40) * 20; - - //This adds the extra damage from the AA Unholy Touch, 450 per level to the AA Improved Harm TOuch. - if (spell_id == SPELL_IMP_HARM_TOUCH && IsOfClientBot()) { //Improved Harm Touch - value -= GetAA(aaUnholyTouch) * 450; //Unholy Touch - } - chance = RuleI(Spells, BaseCritChance); //Wizard base critical chance is 2% (Does not scale with level) chance += itembonuses.CriticalSpellChance + spellbonuses.CriticalSpellChance + aabonuses.CriticalSpellChance; chance += itembonuses.FrenziedDevastation + spellbonuses.FrenziedDevastation + aabonuses.FrenziedDevastation; @@ -154,6 +145,16 @@ int64 Mob::GetActSpellDamage(uint16 spell_id, int64 value, Mob* target) { MessageString(Chat::SpellCrit, YOU_CRIT_BLAST, itoa(-value)); } + // Need to scale HT damage differently after level 40! It no longer scales by the constant value in the spell file. It scales differently, instead of 10 more damage per level, it does 30 more damage per level. So we multiply the level minus 40 times 20 if they are over level 40. + if ((spell_id == SPELL_HARM_TOUCH || spell_id == SPELL_HARM_TOUCH2 || spell_id == SPELL_IMP_HARM_TOUCH) && GetLevel() > 40) { + value -= (GetLevel() - 40) * 20; + } + + //This adds the extra damage from the AA Unholy Touch, 450 per level to the AA Improved Harm Touch. + if (spell_id == SPELL_IMP_HARM_TOUCH && IsOfClientBot()) { //Improved Harm Touch + value -= GetAA(aaUnholyTouch) * 450; //Unholy Touch + } + return value; } }