From 9ecf98195c5b43f86faf534587efe37dd16ad53c Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Sat, 8 Mar 2014 05:35:22 -0500 Subject: [PATCH] Lull spell effect revisions --- changelog.txt | 6 ++++++ zone/aggro.cpp | 3 ++- zone/spells.cpp | 17 +++++++---------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/changelog.txt b/changelog.txt index b9f59ba88..df6cc662d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 03/08/2014 == +Kayen: Revision to lull/harmony/pacification code to be consistent with live based on extensive personal parsing. +*Lulls on initial cast do not check regular resists (MR ect) but only apply a flat ~7.5 % resist chance + level modifier +*If Lull is resisted, a second resistance check is made this time using regular resists and a charisma modifier (same as charm) +which if 'resisted' will cause the caster to gain aggro. + == 03/05/2014 == demonstar55: Corrected rogue's evade to be single target sorvani: fixed crash issue 119 diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 862c91605..71956a535 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -1446,7 +1446,8 @@ bool Mob::PassCharismaCheck(Mob* caster, Mob* spellTarget, uint16 spell_id) { else { // Assume this is a harmony/pacify spell - resist_check = ResistSpell(spells[spell_id].resisttype, spell_id, caster); + // If 'Lull' spell resists, do a second resist check with a charisma modifier AND regular resist checks. If resists agian you gain aggro. + resist_check = ResistSpell(spells[spell_id].resisttype, spell_id, caster, true); if (resist_check == 100) return true; diff --git a/zone/spells.cpp b/zone/spells.cpp index cef63351c..8769e16a2 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4173,16 +4173,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use } //Setup our base resist chance. - //Lulls have a slightly higher chance to resist than normal 15/200 or ~ 7.5% - int resist_chance; - if(IsHarmonySpell(spell_id)) - { - resist_chance = 15; - } - else - { - resist_chance = 0; - } + int resist_chance = 0; //Adjust our resist chance based on level modifiers int temp_level_diff = GetLevel() - caster->GetLevel(); @@ -4242,6 +4233,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use if (CharismaCheck) { //Charisma ONLY effects the initial resist check when charm is cast with 10 CHA = -1 Resist mod up to 200 CHA + //'Lull' spells only check charisma if inital cast is resisted to see if mob will aggro, same modifier/cap as above. //Charisma DOES NOT extend charm durations. int16 charisma = caster->GetCHA(); @@ -4251,6 +4243,11 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use resist_modifier -= charisma/RuleI(Spells, CharismaEffectiveness); } + //Lull spells DO NOT use regular resists on initial cast, instead they use a flat +15 modifier. Live parses confirm this. + //Regular resists are used when checking if mob will aggro off of a lull resist. + if(!CharismaCheck && IsHarmonySpell(spell_id)) + target_resist = 15; + //Add our level, resist and -spell resist modifier to our roll chance resist_chance += level_mod; resist_chance += resist_modifier;