mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-04 23:32:26 +00:00
Spell effect addition / fixes
This commit is contained in:
parent
970b30b467
commit
8caac162b2
@ -1,5 +1,10 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
|
||||
== 02/26/2014 ==
|
||||
Kayen: Implemented SE_FrenziedDevestation - increase critical spell chacnce and 2x mana cost for DD spells
|
||||
Kayen: Fixed SE_SpellProcChance - Now works on spell dervived procs
|
||||
|
||||
== 02/24/2014 ==
|
||||
Sorvani: Updated GetUnusedInstanceID to not recycle instance ID's unless it has reached max (65535)
|
||||
|
||||
|
||||
@ -359,7 +359,7 @@ typedef enum {
|
||||
#define SE_DispelBeneficial 209 // implemented
|
||||
//#define SE_PetShield 210 // *not implemented
|
||||
#define SE_AEMelee 211 // implemented
|
||||
//#define SE_CastingSkills 212 // *not implemented -Include/Exclude Casting Skill type. (*no longer used on live)
|
||||
#define SE_FrenziedDevastation 212 // implemented - increase spell criticals + all DD spells cast 2x mana.
|
||||
#define SE_PetMaxHP 213 // implemented[AA] - increases the maximum hit points of your pet
|
||||
#define SE_MaxHPChange 214 // implemented
|
||||
#define SE_PetAvoidance 215 // implemented[AA] - increases pet ability to avoid melee damage
|
||||
@ -397,7 +397,7 @@ typedef enum {
|
||||
#define SE_RaiseSkillCap 247 // *not implemented[AA] - adds skill over the skill cap.
|
||||
//#define SE_SecondaryForte 248 // not implemented as bonus(gives you a 2nd specialize skill that can go past 50 to 100)
|
||||
#define SE_SecondaryDmgInc 249 // implemented[AA] Allows off hand weapon to recieve a damage bonus (Sinister Strikes)
|
||||
#define SE_SpellProcChance 250 // implemented - Increase chance to sympathetic proc by %
|
||||
#define SE_SpellProcChance 250 // implemented - Increase chance to proc from melee proc spells (ie Spirit of Panther)
|
||||
#define SE_ConsumeProjectile 251 // implemented[AA] - chance to not consume an arrow (ConsumeProjectile = 100)
|
||||
#define SE_FrontalBackstabChance 252 // implemented[AA] - chance to perform a full damage backstab from front.
|
||||
#define SE_FrontalBackstabMinDmg 253 // implemented[AA] - allow a frontal backstab for mininum damage.
|
||||
|
||||
@ -1414,7 +1414,7 @@ bool Mob::PassCharismaCheck(Mob* caster, Mob* spellTarget, uint16 spell_id) {
|
||||
if (caster->IsClient())
|
||||
{
|
||||
//3: At maxed ability, Total Domination has a 50% chance of preventing the charm break that otherwise would have occurred.
|
||||
uint16 TotalDominationBonus = caster->aabonuses.CharmBreakChance + caster->spellbonuses.CharmBreakChance + caster->itembonuses.CharmBreakChance;
|
||||
int16 TotalDominationBonus = caster->aabonuses.CharmBreakChance + caster->spellbonuses.CharmBreakChance + caster->itembonuses.CharmBreakChance;
|
||||
|
||||
if (MakeRandomInt(0, 99) < TotalDominationBonus)
|
||||
return true;
|
||||
|
||||
@ -4149,6 +4149,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct* weapon, Mob *on
|
||||
}
|
||||
}
|
||||
|
||||
int16 SpellProcChance = spellbonuses.SpellProcChance + itembonuses.SpellProcChance + aabonuses.SpellProcChance;
|
||||
uint32 i;
|
||||
for(i = 0; i < MAX_PROCS; i++) {
|
||||
if (PermaProcs[i].spellID != SPELL_UNKNOWN) {
|
||||
@ -4169,6 +4170,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct* weapon, Mob *on
|
||||
else
|
||||
{
|
||||
int chance = ProcChance * (SpellProcs[i].chance);
|
||||
chance += chance*SpellProcChance/100;
|
||||
if(MakeRandomInt(0, 100) < chance) {
|
||||
mlog(COMBAT__PROCS, "Spell proc %d procing spell %d (%d percent chance)", i, SpellProcs[i].spellID, chance);
|
||||
ExecWeaponProc(nullptr, SpellProcs[i].spellID, on);
|
||||
@ -4180,6 +4182,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const Item_Struct* weapon, Mob *on
|
||||
}
|
||||
if (bRangedAttack) {
|
||||
int chance = ProcChance * RangedProcs[i].chance;
|
||||
chance += chance*SpellProcChance/100;
|
||||
if(MakeRandomInt(0, 100) < chance) {
|
||||
mlog(COMBAT__PROCS, "Ranged proc %d procing spell %d", i, RangedProcs[i].spellID, RangedProcs[i].chance);
|
||||
ExecWeaponProc(nullptr, RangedProcs[i].spellID, on);
|
||||
|
||||
@ -1228,6 +1228,14 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_FrenziedDevastation:
|
||||
newbon->FrenziedDevastation += base2;
|
||||
break;
|
||||
|
||||
case SE_SpellProcChance:
|
||||
newbon->SpellProcChance += base1;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2524,6 +2532,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
||||
newbon->DistanceRemoval = true;
|
||||
break;
|
||||
|
||||
case SE_FrenziedDevastation:
|
||||
newbon->FrenziedDevastation += spells[spell_id].base2[i];
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3866,7 +3878,13 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
spellbonuses.ImprovedTaunt[0] = effect_value;
|
||||
spellbonuses.ImprovedTaunt[1] = effect_value;
|
||||
spellbonuses.ImprovedTaunt[2] = -1;
|
||||
|
||||
break;
|
||||
|
||||
case SE_FrenziedDevastation:
|
||||
spellbonuses.FrenziedDevastation += effect_value;
|
||||
aabonuses.FrenziedDevastation += effect_value;
|
||||
itembonuses.FrenziedDevastation += effect_value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,8 +311,8 @@ struct StatBonuses {
|
||||
//uint16 BlockSpellEffect[EFFECT_COUNT]; // Prevents spells with certain effects from landing on you *no longer used
|
||||
bool ImmuneToFlee; // Bypass the fleeing flag
|
||||
uint16 VoiceGraft; // Stores the ID of the mob with which to talk through
|
||||
uint16 SpellProcChance; // chance to proc from sympathetic spell effects
|
||||
uint16 CharmBreakChance; // chance to break charm
|
||||
int16 SpellProcChance; // chance to proc from sympathetic spell effects
|
||||
int16 CharmBreakChance; // chance to break charm
|
||||
int16 SongRange; // increases range of beneficial bard songs
|
||||
uint16 HPToManaConvert; // Uses HP to cast spells at specific conversion
|
||||
uint16 FocusEffects[HIGHEST_FOCUS+1]; // Stores the focus effectid for each focustype you have.
|
||||
@ -335,6 +335,7 @@ struct StatBonuses {
|
||||
bool DivineAura; // invulnerability
|
||||
bool DistanceRemoval; // Check if Cancle if Moved effect is present
|
||||
int16 ImprovedTaunt[3]; // 0 = Max Level 1 = Aggro modifier 2 = buffid
|
||||
int16 FrenziedDevastation; // base1= AArank(used) base2= chance increase spell criticals + all DD spells 2x mana.
|
||||
//bool AbsorbMagicAtt; // Magic Rune *Need to be implemented for NegateEffect
|
||||
//bool MeleeRune; // Melee Rune *Need to be implemented for NegateEffect
|
||||
|
||||
|
||||
@ -2826,6 +2826,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
case SE_CriticalMend:
|
||||
case SE_LimitCastTimeMax:
|
||||
case SE_TriggerOnReqCaster:
|
||||
case SE_FrenziedDevastation:
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -5396,14 +5397,12 @@ bool Mob::AffectedBySpellExcludingSlot(int slot, int effect)
|
||||
|
||||
float Mob::GetSympatheticProcChances(float &ProcBonus, float &ProcChance, int32 cast_time, int16 ProcRateMod) {
|
||||
|
||||
ProcBonus = spellbonuses.SpellProcChance + itembonuses.SpellProcChance;
|
||||
ProcChance = 0;
|
||||
|
||||
if(cast_time > 0)
|
||||
{
|
||||
ProcChance = ((float)cast_time * RuleR(Casting, AvgSpellProcsPerMinute) / 60000.0f);
|
||||
ProcChance = ProcChance * (float)(ProcRateMod/100);
|
||||
ProcChance = ProcChance+(ProcChance*ProcBonus/100);
|
||||
}
|
||||
return ProcChance;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user