diff --git a/changelog.txt b/changelog.txt index e6d342c55..56307b361 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,9 @@ Kayen: Implemented SE_ResourceTap - Coverts a percent of dmg from dmg spells(DD/ Kayen: Implemented SE_FactionModPct - Modifies faction gains and losses by percent. Kayen: Re-Implemented SE_TriggerMeleeThreshold and SE_TriggerSpellThreshold correctly - Trigger spell if owner of buff takes more than the specified damage amount in a SINGLE hit, then fade the buff. +Kayen: Implemented SE_LimitSpellClass - Focus Limits spell to pre defined categories. (3=Cures,3=Offensive, 6=Lifetap) +Kayen: Changed SE_LimitMaxMana to SE_MeleeVulnerability - Weakness/Mitigation verse melee damage +(Despite lives SPA lable as the former it clearly is not what the effect does from all spell examples) == 06/25/2014 == Kayen: Updated SE_Hate (Renamed from SE_Hate2) to now properly work for instant +/- hate spells. diff --git a/common/spdat.h b/common/spdat.h index 69b6573b0..02dca8ff7 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -538,7 +538,7 @@ typedef enum { //#define SE_SummonCorpseZone 388 // *not implemented - summons a corpse from any zone(nec AA) #define SE_FcTimerRefresh 389 // implemented - Refresh spell icons //#define SE_FcTimerLockout 390 // *not implemented - Sets recast timers to specific value, focus limited. -#define SE_LimitManaMax 391 // implemented +#define SE_MeleeVulnerability 391 // implemented [Live SPA has this as LimitManaMax however that is clearly not the effect used] #define SE_FcHealAmt 392 // implemented - Adds or removes healing from spells #define SE_FcHealPctIncoming 393 // implemented - HealRate with focus restrictions. #define SE_FcHealAmtIncoming 394 // implemented - Adds/Removes amount of healing on target by X value with foucs restrictions. diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 01e2e4f91..48a3d95e1 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1315,6 +1315,10 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon) newbon->PetMeleeMitigation += base1; break; + case SE_MeleeVulnerability: + newbon->MeleeVulnerability += base1; + break; + case SE_FactionModPct: { if((base1 < 0) && (newbon->FactionModPct > base1)) @@ -2854,6 +2858,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne newbon->PetMeleeMitigation += effect_value; break; + case SE_MeleeVulnerability: + newbon->MeleeVulnerability += effect_value; + break; + case SE_Sanctuary: newbon->Sanctuary = true; break; diff --git a/zone/common.h b/zone/common.h index 10b3d2200..e3a9dfb09 100644 --- a/zone/common.h +++ b/zone/common.h @@ -374,6 +374,7 @@ struct StatBonuses { int16 Metabolism; // Food/drink consumption rates. bool Sanctuary; // Sanctuary effect, lowers place on hate list until cast on others. int16 FactionModPct; // Modifies amount of faction gained. + int16 MeleeVulnerability; // Weakness/mitigation to melee damage // AAs int8 Packrat; //weight reduction for items, 1 point = 10% diff --git a/zone/mob.cpp b/zone/mob.cpp index cf7b2d243..59e02568b 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -3419,6 +3419,8 @@ int16 Mob::GetSkillDmgTaken(const SkillUseTypes skill_used) { int skilldmg_mod = 0; + int16 MeleeVuln = spellbonuses.MeleeVulnerability + itembonuses.MeleeVulnerability + aabonuses.MeleeVulnerability; + // All skill dmg mod + Skill specific skilldmg_mod += itembonuses.SkillDmgTaken[HIGHEST_SKILL+1] + spellbonuses.SkillDmgTaken[HIGHEST_SKILL+1] + itembonuses.SkillDmgTaken[skill_used] + spellbonuses.SkillDmgTaken[skill_used]; @@ -3427,6 +3429,8 @@ int16 Mob::GetSkillDmgTaken(const SkillUseTypes skill_used) if ((SkillDmgTaken_Mod[skill_used]) || (SkillDmgTaken_Mod[HIGHEST_SKILL+1])) skilldmg_mod += SkillDmgTaken_Mod[skill_used] + SkillDmgTaken_Mod[HIGHEST_SKILL+1]; + skilldmg_mod += MeleeVuln; + if(skilldmg_mod < -100) skilldmg_mod = -100; @@ -3452,7 +3456,8 @@ bool Mob::TryFadeEffect(int slot) { for(int i = 0; i < EFFECT_COUNT; i++) { - if (spells[buffs[slot].spellid].effectid[i] == SE_CastOnFadeEffectAlways || spells[buffs[slot].spellid].effectid[i] == SE_CastOnRuneFadeEffect) + if (spells[buffs[slot].spellid].effectid[i] == SE_CastOnFadeEffectAlways || + spells[buffs[slot].spellid].effectid[i] == SE_CastOnRuneFadeEffect) { uint16 spell_id = spells[buffs[slot].spellid].base[i]; BuffFadeBySlot(slot); diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index dcc6b6e1b..8c49414d7 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2942,7 +2942,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) case SE_FcIncreaseNumHits: case SE_CastonFocusEffect: case SE_FcHealAmtIncoming: - case SE_LimitManaMax: + case SE_MeleeVulnerability: case SE_DoubleRangedAttack: case SE_ShieldEquipHateMod: case SE_ShieldEquipDmgMod: @@ -4287,11 +4287,6 @@ int16 Client::CalcAAFocus(focusType type, uint32 aa_ID, uint16 spell_id) LimitFailure = true; break; - case SE_LimitManaMax: - if(spell.mana > base1) - LimitFailure = true; - break; - case SE_LimitTarget: if (base1 < 0) { if (-base1 == spell.targettype) //Exclude @@ -4718,11 +4713,6 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo return 0; break; - case SE_LimitManaMax: - if(spell.mana > focus_spell.base[i]) - return 0; - break; - case SE_LimitTarget: if (focus_spell.base[i] < 0) { if (-focus_spell.base[i] == spell.targettype) //Exclude