diff --git a/zone/effects.cpp b/zone/effects.cpp index 2537751aa..2a1e189ce 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -356,58 +356,10 @@ int32 Client::GetActSpellCost(uint16 spell_id, int32 cost) cost -= mana_back; } - // This formula was derived from the following resource: - // http://www.eqsummoners.com/eq1/specialization-library.html - // WildcardX - float PercentManaReduction = 0; - float SpecializeSkill = GetSpecializeSkillValue(spell_id); - int SuccessChance = zone->random.Int(0, 100); - - float bonus = 1.0; - switch(GetAA(aaSpellCastingMastery)) - { - case 1: - bonus += 0.05; - break; - case 2: - bonus += 0.15; - break; - case 3: - bonus += 0.30; - break; - } - - bonus += 0.05f * GetAA(aaAdvancedSpellCastingMastery); - - if(SuccessChance <= (SpecializeSkill * 0.3 * bonus)) - { - PercentManaReduction = 1 + 0.05f * SpecializeSkill; - switch(GetAA(aaSpellCastingMastery)) - { - case 1: - PercentManaReduction += 2.5; - break; - case 2: - PercentManaReduction += 5.0; - break; - case 3: - PercentManaReduction += 10.0; - break; - } - - switch(GetAA(aaAdvancedSpellCastingMastery)) - { - case 1: - PercentManaReduction += 2.5; - break; - case 2: - PercentManaReduction += 5.0; - break; - case 3: - PercentManaReduction += 10.0; - break; - } - } + int spec = GetSpecializeSkillValue(spell_id); + int PercentManaReduction = 0; + if (spec) + PercentManaReduction = 1 + spec / 20; // there seems to be some non-obvious rounding here, let's truncate for now. int16 focus_redux = GetFocusEffect(focusManaCost, spell_id);