bool IsPBAENukeSpell(uint16 spell_id) { if (IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) && spells[spell_id].aoerange > 0 && spells[spell_id].targettype == ST_AECaster) return true; return false; }
bool IsAENukeSpell(uint16 spell_id) { if (IsValidSpell(spell_id) && IsPureNukeSpell(spell_id) && spells[spell_id].aoerange > 0) return true; return false; }
bool IsPartialCapableSpell(uint16 spell_id) { if (spells[spell_id].no_partial_resist) return false; if (IsPureNukeSpell(spell_id)) return true; return false; }
bool IsPartialCapableSpell(uint16 spell_id) { if(IsPureNukeSpell(spell_id) || IsFearSpell(spell_id) || IsEffectInSpell(spell_id, SE_Root) || IsEffectInSpell(spell_id, SE_Charm)) { return true; } return false; }
int32 Client::GetActSpellCost(uint16 spell_id, int32 cost) { //FrenziedDevastation doubles mana cost of all DD spells int16 FrenziedDevastation = itembonuses.FrenziedDevastation + spellbonuses.FrenziedDevastation + aabonuses.FrenziedDevastation; if (FrenziedDevastation && IsPureNukeSpell(spell_id)) cost *= 2; // Formula = Unknown exact, based off a random percent chance up to mana cost(after focuses) of the cast spell if(itembonuses.Clairvoyance && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) { int16 mana_back = itembonuses.Clairvoyance * zone->random.Int(1, 100) / 100; // Doesnt generate mana, so best case is a free spell if(mana_back > cost) mana_back = 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; } } int16 focus_redux = GetFocusEffect(focusManaCost, spell_id); if(focus_redux > 0) { PercentManaReduction += zone->random.Real(1, (double)focus_redux); } cost -= (cost * (PercentManaReduction / 100)); // Gift of Mana - reduces spell cost to 1 mana if(focus_redux >= 100) { int buff_max = GetMaxTotalSlots(); for (int buffSlot = 0; buffSlot < buff_max; buffSlot++) { if (buffs[buffSlot].spellid == 0 || buffs[buffSlot].spellid >= SPDAT_RECORDS) continue; if(IsEffectInSpell(buffs[buffSlot].spellid, SE_ReduceManaCost)) { if(CalcFocusEffect(focusManaCost, buffs[buffSlot].spellid, spell_id) == 100) cost = 1; } } } if(cost < 0) cost = 0; return cost; }