mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
New spell effects
This commit is contained in:
+3
-1
@@ -3562,7 +3562,9 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
|
||||
// Clients can stun mobs under level 56 with their bash/kick when they get level 55 or greater.
|
||||
if( attacker->IsNPC() || (attacker->IsClient() && attacker->GetLevel() >= RuleI(Combat, ClientStunLevel) && GetLevel() < RuleI(Spells, BaseImmunityLevel)) )
|
||||
{
|
||||
if (MakeRandomInt(0,99) < (RuleI(Character, NPCBashKickStunChance)) || attacker->IsClient())
|
||||
int8 StunBashChanceBonus = spellbonuses.StunBashChance + itembonuses.StunBashChance + aabonuses.StunBashChance;
|
||||
|
||||
if (MakeRandomInt(0,99) < ((RuleI(Character, NPCBashKickStunChance) + StunBashChanceBonus)) || attacker->IsClient())
|
||||
{
|
||||
int stun_resist = itembonuses.StunResist+spellbonuses.StunResist;
|
||||
int frontal_stun_resist = itembonuses.FrontalStunResist+spellbonuses.FrontalStunResist;
|
||||
|
||||
@@ -1200,6 +1200,18 @@ void Client::ApplyAABonuses(uint32 aaid, uint32 slots, StatBonuses* newbon)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_StunBashChance:
|
||||
newbon->StunBashChance += base1;
|
||||
break;
|
||||
|
||||
case SE_IncreaseChanceMemwipe:
|
||||
newbon->IncreaseChanceMemwipe += base1;
|
||||
break;
|
||||
|
||||
case SE_CriticalMend:
|
||||
newbon->CriticalMend += base1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2416,6 +2428,18 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
||||
newbon->TwoHandBluntBlock += effect_value;
|
||||
break;
|
||||
|
||||
case SE_StunBashChance:
|
||||
newbon->StunBashChance += effect_value;
|
||||
break;
|
||||
|
||||
case SE_IncreaseChanceMemwipe:
|
||||
newbon->IncreaseChanceMemwipe += effect_value;
|
||||
break;
|
||||
|
||||
case SE_CriticalMend:
|
||||
newbon->CriticalMend += effect_value;
|
||||
break;
|
||||
|
||||
case SE_SpellEffectResistChance:
|
||||
{
|
||||
for(int e = 0; e < MAX_RESISTABLE_EFFECTS*2; e+=2)
|
||||
@@ -2777,6 +2801,8 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff
|
||||
return focusFcLimitUse;
|
||||
case SE_FcMute:
|
||||
return focusFcMute;
|
||||
case SE_FcStunTimeMod:
|
||||
return focusFcStunTimeMod;
|
||||
case SE_CriticalHealRate:
|
||||
return focusCriticalHealRate;
|
||||
case SE_AdditionalHeal2:
|
||||
@@ -3775,6 +3801,24 @@ void Mob::NegateSpellsBonuses(uint16 spell_id)
|
||||
case SE_DivineAura:
|
||||
spellbonuses.DivineAura = false;
|
||||
break;
|
||||
|
||||
case SE_StunBashChance:
|
||||
spellbonuses.StunBashChance = effect_value;
|
||||
itembonuses.StunBashChance = effect_value;
|
||||
aabonuses.StunBashChance = effect_value;
|
||||
break;
|
||||
|
||||
case SE_IncreaseChanceMemwipe:
|
||||
spellbonuses.IncreaseChanceMemwipe = effect_value;
|
||||
itembonuses.IncreaseChanceMemwipe = effect_value;
|
||||
aabonuses.IncreaseChanceMemwipe = effect_value;
|
||||
break;
|
||||
|
||||
case SE_CriticalMend:
|
||||
spellbonuses.CriticalMend = effect_value;
|
||||
itembonuses.CriticalMend = effect_value;
|
||||
aabonuses.CriticalMend = effect_value;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+2
-13
@@ -7610,19 +7610,8 @@ void Client::Handle_OP_Mend(const EQApplicationPacket *app)
|
||||
int mendhp = GetMaxHP() / 4;
|
||||
int currenthp = GetHP();
|
||||
if (MakeRandomInt(0, 199) < (int)GetSkill(SkillMend)) {
|
||||
int criticalchance = 0;
|
||||
switch(GetAA(aaCriticalMend)){
|
||||
case 1:
|
||||
criticalchance = 5;
|
||||
break;
|
||||
case 2:
|
||||
criticalchance = 10;
|
||||
break;
|
||||
case 3:
|
||||
criticalchance = 25;
|
||||
break;
|
||||
}
|
||||
criticalchance += 5*GetAA(aaMendingoftheTranquil);
|
||||
|
||||
int criticalchance = spellbonuses.CriticalMend + itembonuses.CriticalMend + aabonuses.CriticalMend;
|
||||
|
||||
if(MakeRandomInt(0,99) < criticalchance){
|
||||
mendhp *= 2;
|
||||
|
||||
@@ -78,6 +78,7 @@ typedef enum { //focus types
|
||||
focusIncreaseNumHits,
|
||||
focusFcLimitUse,
|
||||
focusFcMute,
|
||||
focusFcStunTimeMod,
|
||||
focusCriticalHealRate,
|
||||
focusAdditionalHeal2,
|
||||
focusAdditionalHeal,
|
||||
@@ -372,6 +373,9 @@ struct StatBonuses {
|
||||
int16 ShieldEquipHateMod; // Hate mod when shield equiped.
|
||||
int16 ShieldEquipDmgMod[2]; // Damage mod when shield equiped. 0 = damage modifier 1 = Unknown
|
||||
bool TriggerOnValueAmount; // Triggers off various different conditions, bool to check if client has effect.
|
||||
int8 StunBashChance; // chance to stun with bash.
|
||||
int8 IncreaseChanceMemwipe; // increases chance to memory wipe
|
||||
int8 CriticalMend; // chance critical monk mend
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
||||
+1
-1
@@ -3211,7 +3211,7 @@ void Mob::TryApplyEffect(Mob *target, uint32 spell_id)
|
||||
|
||||
for(int i = 0; i < EFFECT_COUNT; i++)
|
||||
{
|
||||
if (spells[spell_id].effectid[i] == SE_ApplyEffect || spells[spell_id].effectid[i] == SE_ApplyEffect2)
|
||||
if (spells[spell_id].effectid[i] == SE_ApplyEffect)
|
||||
{
|
||||
if(MakeRandomInt(0, 100) <= spells[spell_id].base[i])
|
||||
{
|
||||
|
||||
+27
-1
@@ -804,6 +804,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
|
||||
if (stun_resist <= 0 || MakeRandomInt(0,99) >= stun_resist) {
|
||||
mlog(COMBAT__HITS, "Stunned. We had %d percent resist chance.", stun_resist);
|
||||
|
||||
if (caster->IsClient())
|
||||
effect_value += effect_value*caster->CastToClient()->GetFocusEffect(focusFcStunTimeMod, spell_id)/100;
|
||||
|
||||
Stun(effect_value);
|
||||
} else {
|
||||
if (IsClient())
|
||||
@@ -1544,6 +1548,9 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
snprintf(effect_desc, _EDLEN, "Memory Blur: %d", effect_value);
|
||||
#endif
|
||||
int wipechance = spells[spell_id].base[i];
|
||||
int bonus = spellbonuses.IncreaseChanceMemwipe + itembonuses.IncreaseChanceMemwipe + aabonuses.IncreaseChanceMemwipe;
|
||||
wipechance += wipechance*bonus/100;
|
||||
|
||||
if(MakeRandomInt(0, 100) < wipechance)
|
||||
{
|
||||
if(IsAIControlled())
|
||||
@@ -2831,7 +2838,6 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
case SE_SpellVulnerability:
|
||||
case SE_SpellTrigger:
|
||||
case SE_ApplyEffect:
|
||||
case SE_ApplyEffect2:
|
||||
case SE_Twincast:
|
||||
case SE_DelayDeath:
|
||||
case SE_InterruptCasting:
|
||||
@@ -2932,6 +2938,10 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
|
||||
case SE_FcLimitUse:
|
||||
case SE_FcMute:
|
||||
case SE_FfLimitUseType:
|
||||
case SE_FcStunTimeMod:
|
||||
case SE_StunBashChance:
|
||||
case SE_IncreaseChanceMemwipe:
|
||||
case SE_CriticalMend:
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -4425,6 +4435,14 @@ int16 Client::CalcAAFocus(focusType type, uint32 aa_ID, uint16 spell_id)
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_FcStunTimeMod:
|
||||
{
|
||||
if(type == focusFcStunTimeMod)
|
||||
value = base1;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4949,6 +4967,14 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_FcStunTimeMod:
|
||||
{
|
||||
if(type == focusFcStunTimeMod)
|
||||
value = focus_spell.base[i];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
#if EQDEBUG >= 6
|
||||
//this spits up a lot of garbage when calculating spell focuses
|
||||
//since they have all kinds of extra effects on them.
|
||||
|
||||
Reference in New Issue
Block a user