mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Spells] New SPA focus effects and focus limits (#1462)
* Implemented SPA Duration Pct Implemented new spell effects SE_Duration_HP_Pct 524 SE_Duration_Mana_Pct 525 SE_Duration_Endurance_Pct 526 Consumes 'base1' % of your maximum health/mana/endurance every 6 seconds. 'max' is maximum amount that can be consumed per tic. Additional Functionality Can be used as a heal/gain % by setting the base1 value to a positive. * Implemented SPA Instant Mana/End pct Fixes for SPA 524-526 Implemented SE_Instant_Mana_Pct 522 SE_Instant_Endurance_Pct 523 Extracts 'base1' percent of your maximum mana/endurance, or 'max', whichever is lower. * Implemented: SPA 521 EndAbsorbPctDmg Implemented SE_Endurance_Absorb_Pct_Damage 521 Absorb Damage using Endurance: base1 % (base2 End per 1 HP) Note: Both base1 and base2 need to be divided by 100 for actually value * Implemented SE_HealthTransfer 509 Implemented SE_Health_Transfer 509 'life burn' Consume base2 % of Hit Points to Damage for base % of Hit Points Can be used for heal Act of Valor * Implemented SPA 515,516,518,496 Implemented SE_AC_Avoidance_Max_Percent 515 SE_AC_Mitigation_Max_Percent 516 SE_Attack_Accuracy_Max_Percent 518 Above are stackable defense and offensive mods SE_Critical_Melee_Damage_Mod_Max 496 - This is a non stackable melee critical modifier * Implemented SPA 503 , 505 SE_Melee_Damage_Position_Mod 503 define SE_Damage_Taken_Position_Mod 505 SPA 503 increase/decreases melee damage by percent base1 based on your position base2 0=back 1=front SPA 504 increase/decreases melee damage taken by percent base1 based on your position base2 0=back 1=front * Implemented 467,468 Implemented SE_DS_Mitigation_Amount 467 SE_DS_Mitigation_Percentage 468 Reduce incoming DS by amt or percentage. base1 is value, if a reduction is desired it should be set to negative for both. * Fixes Formula fixes * Update spdat.h Added spa descriptions. * Implemented SPA 469, 470 Implemented SE_Chance_Best_in_Spell_Grp 469 Chance to cast highest scribed spell within a spell group. All base2 spells share roll chance, only 1 cast. SE_Trigger_Best_in_Spell_Grp 470 Chance to cast highest scribed spell within a spell group. Each spell has own chance. Additional Changes: Rewrote TrySpellTrigger function used for SPA 340 since it incorporates SPA 469. Improved code so that chance of spell being triggered should be more accurate statistically. * Implemented SPA 474, 494 Implemented SE_Pet_Crit_Melee_Damage_Pct_Owner 474 - Gives pets a critical melee damage modifier from the owner SE_Pet_Add_Atk 494 - Gives pet a ATK bonus from the owner Fixed SE_PetMeleeMitigation 397 - The bonus was not being calculated * Implemented SPA 465,477,478 Implemented SE_PC_Pet_AE_Rampage 465 Chance for pet to AE rampage with a damage modifier SE_Hatelist_To_Top_Index 477 Chance to be put on top of RAMPAGE list SE_Hatelist_To_Tail_Index 478 Chance to be put on bottom of RAMPAGE list * Implemented Implemented SE_Fearstun 502 Stun with a max level limit. Normal stun restrictions don't apply. Base1 duration, base2 PC duration, max is level limit SE_TwinCastBlocker 39 Previously unused spell effect that is now used on live. Simply, if this effect is present in a spell then the spell can not be twin cast. * Implemented SPA 483 Implemented Fc_Spell_Damage_Pct_IncomingPC 483 - Focus effect that modifies iby percent incoming spell damage on the target. Base1= min Base2= max. Final percent is random between max and min each time focus is applied from a spell cast. Note: Written to stack with similar functioning focus SPA 269 SE_FcSpellVulnerability. * Implemented SPA 484 Implemented SE_Fc_Spell_Damage_Amt_IncomingPC 484 // focus effect that modifies incoming spell damage by flat amount. Consider it a debuff that adds damage to incoming spells. Positive value to add additional damage. * Implemented SPA 481, 485,486,512 Implemented SE_Fc_Cast_Spell_On_Land 481 Focus effect that is checked when a spell is cast on a target, if target has this focus effect and all limiting criteria are met, then the target will cast a spell as specified by the focus. Can be given a roll chance for success. Base1=Chance, Base2=Spellid Note: This spell has a huge amount of potential applications. See 'Alliance' type spells on live. (ie live spell 50247) Implemented associated focus limits seen in live spells. SE_Ff_CasterClass 485 - Caster of spell on target with a focus effect that is checked by incoming spells must be specified class or classes. SE_Ff_Same_Caster 486 -Caster of spell on target with a focus effect that is checked by incoming spells 0=Must be different caster 1=Must be same caster The following is an associated effect seen with SPA 481 SE_Proc_Timer_Modifier 512 This provides a way to rate limit the amount of spell triggers generated by SPA 481. For example after 1 successful spell trigger no additional spells can be triggered for 1.5 seconds. Ie. Base=1 and Base2 1500. Written in a flexible format to allow scaling of multiple different buffs with this effect at same time. * Stacking fixes for new effects Stacking fixes for new effects. * merge with upstream master merge and update up spdat.h * Update spdat.h * Fix for bolt spell targeting self if target zone/died while casting. Fix for bolt spell targeting self if target zone/died while casting. Despite the name being "ST_TargetOptional", this target type is reserved for projectile spells which all require a target, thus should be treated like any other targeted spell. * Implemented new focus and limits SE_Fc_Amplify_Mod 507 @Fc, On Caster, damage-heal-dot mod pct, base: pct SE_Fc_Amplify_Amt 508 @Fc, On Caster, damage-heal-dot mod flat amt, base: amt SE_Fc_ResistIncoming 510 implemented, @Fc, On Target, resist modifier, base: amt SE_Fc_CastTimeMod2 500 @Fc, On Caster, cast time mod pct, base: pct SE_Fc_CastTimeAmt 501 @Fc, On Caster, cast time mod flat amt, base: milliseconds SE_Ff_DurationMax 495 @Ff, Max duration of spell that can be focused, base: tics SE_Ff_ReuseTimeMin 490 @Ff, Minimum recast time of a spell that can be focused, base: recast time SE_Ff_ReuseTimeMax 491 @Ff, Max recast time of a spell that can be focused, base: recast time SE_Ff_Endurance_Min 492 @Ff, Minimum endurance cost of a spell that can be focused, base: endurance cost SE_Ff_Endurance_Max 493 @Ff, Max endurance cost of a spell that can be focused, base: endurance cost SE_Ff_Value_Min 479 @Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value SE_Ff_Value_Max 480 @Ff, Max base value of a spell that can be focused, base: spells to be focused base1 value SE_Ff_Override_NotFocusable 460 @Fc, Allow spell to be focused event if flagged with 'not_focusable' in spell table, base: 1 Added basic focus and limit descriptions to source. * Update spell_effects.cpp hotfix * fix for SE_Ff_Override_Notfocusable Fix for SE_Ff_Override_Notfocusable Logic was not correct. Changed where spell field 'not_focusable' makes check to properly account for this effect. * Update to SE_Fc_CastTimeMod2 Update to SE_Fc_CastTimeMod2 Found sources that show it can reduce cast time to instant. Rewrote formulas to account for such. * fix unintentional change, reverted back. * fixed missing break statements fixed missing break statements * update to IsFocusLimit missing limit cases added to IsFocusLimit * Format CalcFocusEffect * Revert "Format CalcFocusEffect" This reverts commite5b81791ee. * Revert "Revert "Format CalcFocusEffect"" This reverts commita1ce29a875. * Post merge fixes * More post merge adjustments * Another post merge change * Add LimitResist constants back * Swap int16's for 32's * int32 fix Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -3785,6 +3785,12 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff
|
||||
return focusPetPower;
|
||||
case SE_SpellResistReduction:
|
||||
return focusResistRate;
|
||||
case SE_Fc_ResistIncoming:
|
||||
focusFcResistIncoming;
|
||||
case SE_Fc_Amplify_Mod:
|
||||
focusFcResistIncoming;
|
||||
case SE_Fc_Amplify_Amt:
|
||||
focusFcResistIncoming;
|
||||
case SE_SpellHateMod:
|
||||
return focusSpellHateMod;
|
||||
case SE_ReduceReuseTimer:
|
||||
@@ -3831,6 +3837,10 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff
|
||||
return focusFcCastSpellOnLand;
|
||||
case SE_FcStunTimeMod:
|
||||
return focusFcStunTimeMod;
|
||||
case SE_Fc_CastTimeMod2:
|
||||
return focusFcCastTimeMod2;
|
||||
case SE_Fc_CastTimeAmt:
|
||||
return focusFcCastTimeAmt;
|
||||
case SE_FcHealPctCritIncoming:
|
||||
return focusFcHealPctCritIncoming;
|
||||
case SE_FcHealAmt:
|
||||
|
||||
+43
-40
@@ -108,46 +108,49 @@
|
||||
#define AURA_HARDCAP 2
|
||||
|
||||
typedef enum { //focus types
|
||||
focusSpellHaste = 1,
|
||||
focusSpellDuration,
|
||||
focusRange,
|
||||
focusReagentCost,
|
||||
focusManaCost,
|
||||
focusImprovedHeal,
|
||||
focusImprovedDamage,
|
||||
focusImprovedDamage2,
|
||||
focusImprovedDOT, //i dont know about this...
|
||||
focusFcDamagePctCrit,
|
||||
focusImprovedUndeadDamage,
|
||||
focusPetPower,
|
||||
focusResistRate,
|
||||
focusSpellHateMod,
|
||||
focusTriggerOnCast,
|
||||
focusSpellVulnerability,
|
||||
focusFcSpellDamagePctIncomingPC,
|
||||
focusTwincast,
|
||||
focusSympatheticProc,
|
||||
focusFcDamageAmt,
|
||||
focusFcDamageAmt2,
|
||||
focusFcDamageAmtCrit,
|
||||
focusSpellDurByTic,
|
||||
focusSwarmPetDuration,
|
||||
focusReduceRecastTime,
|
||||
focusBlockNextSpell,
|
||||
focusFcHealPctIncoming,
|
||||
focusFcDamageAmtIncoming,
|
||||
focusFcSpellDamageAmtIncomingPC,
|
||||
focusFcCastSpellOnLand,
|
||||
focusFcHealAmtIncoming,
|
||||
focusFcBaseEffects,
|
||||
focusIncreaseNumHits,
|
||||
focusFcLimitUse,
|
||||
focusFcMute,
|
||||
focusFcTimerRefresh,
|
||||
focusFcStunTimeMod,
|
||||
focusFcHealPctCritIncoming,
|
||||
focusFcHealAmt,
|
||||
focusFcHealAmtCrit,
|
||||
focusSpellHaste = 1, //@Fc, SPA: 127, SE_IncreaseSpellHaste, On Caster, cast time mod pct, base: pct
|
||||
focusSpellDuration, //@Fc, SPA: 128, SE_IncreaseSpellDuration, On Caster, spell duration mod pct, base: pct
|
||||
focusRange, //@Fc, SPA: 129, SE_IncreaseRange, On Caster, spell range mod pct, base: pct
|
||||
focusReagentCost, //@Fc, SPA: 131, SE_ReduceReagentCost, On Caster, do not consume reagent pct chance, base: min pct, limit: max pct
|
||||
focusManaCost, //@Fc, SPA: 132, SE_ReduceManaCost, On Caster, reduce mana cost by pct, base: min pct, limt: max pct
|
||||
focusImprovedHeal, //@Fc, SPA: 125, SE_ImprovedHeal, On Caster, spell healing mod pct, base: min pct, limit: max pct
|
||||
focusImprovedDamage, //@Fc, SPA: 124, SE_ImprovedDamage, On Caster, spell damage mod pct, base: min pct, limit: max pct
|
||||
focusImprovedDamage2, //@Fc, SPA: 461, SE_ImprovedDamage2, On Caster, spell damage mod pct, base: min pct, limit: max pct
|
||||
focusFcDamagePctCrit, //@Fc, SPA: 302, SE_FcDamagePctCrit, On Caster, spell damage mod pct, base: min pct, limit: max pct
|
||||
focusPetPower, //@Fc, SPA: 167, SE_PetPowerIncrease, On Caster, pet power mod, base: value
|
||||
focusResistRate, //@Fc, SPA: 126, SE_SpellResistReduction, On Caster, casted spell resist mod pct, base: min pct, limit: max pct
|
||||
focusSpellHateMod, //@Fc, SPA: 130, SE_SpellHateMod, On Caster, spell hate mod pct, base: min pct, limit: max pct
|
||||
focusTriggerOnCast, //@Fc, SPA: 339, SE_TriggerOnCast, On Caster, cast on spell use, base: chance pct limit: spellid
|
||||
focusSpellVulnerability, //@Fc, SPA: 296, SE_FcSpellVulnerability, On Target, spell damage taken mod pct, base: min pct, limit: max pct
|
||||
focusFcSpellDamagePctIncomingPC, //@Fc, SPA: 483, SE_Fc_Spell_Damage_Pct_IncomingPC, On Target, spell damage taken mod pct, base: min pct, limit: max pct
|
||||
focusTwincast, //@Fc, SPA: 399, SE_FcTwincast, On Caster, chance cast spell twice, base: chance pct
|
||||
focusSympatheticProc, //@Fc, SPA: 383, SE_SympatheticProc, On Caster, cast on spell use, base: variable proc chance on cast time, limit: spellid
|
||||
focusFcDamageAmt, //@Fc, SPA: 286, SE_FcDamageAmt, On Caster, spell damage mod flat amt, base: amt
|
||||
focusFcDamageAmt2, //@Fc, SPA: 462, SE_FcDamageAmt2, On Caster, spell damage mod flat amt, base: amt
|
||||
focusFcDamageAmtCrit, //@Fc, SPA: 303, SE_FFcDamageAmtCrit, On Caster, spell damage mod flat amt, base: amt
|
||||
focusSpellDurByTic, //@Fc, SPA: 287, SE_SpellDurationIncByTic, On Caster, spell buff duration mod, base: tics
|
||||
focusSwarmPetDuration, //@Fc, SPA: 398, SE_SwarmPetDuration, On Caster, swarm pet duration mod, base: milliseconds
|
||||
focusReduceRecastTime, //@Fc, SPA: 310, SE_ReduceReuseTimer, On Caster, disc reuse time mod, base: milliseconds
|
||||
focusBlockNextSpell, //@Fc, SPA: 335, SE_BlockNextSpellFocus, On Caster, chance to block next spell, base: chance
|
||||
focusFcHealPctIncoming, //@Fc, SPA: 395, SE_FcHealPctCritIncoming, On Target, heal received mod pct, base: pct
|
||||
focusFcDamageAmtIncoming, //@Fc, SPA: 297, SE_FcDamageAmtIncoming, On Target, damage taken flat amt, base: amt
|
||||
focusFcSpellDamageAmtIncomingPC, //@Fc, SPA: 484, SE_Fc_Spell_Damage_Amt_IncomingPC, On Target, damage taken flat amt, base: amt
|
||||
focusFcCastSpellOnLand, //@Fc, SPA: 481, SE_Fc_Cast_Spell_On_Land, On Target, cast spell if hit by spell, base: chance pct, limit: spellid
|
||||
focusFcHealAmtIncoming, //@Fc, SPA: 394, SE_FcHealAmtIncoming, On Target, heal received mod flat amt, base: amt
|
||||
focusFcBaseEffects, //@Fc, SPA: 413, SE_FcBaseEffects, On Caster, base spell effectiveness mod pct, base: pct
|
||||
focusIncreaseNumHits, //@Fc, SPA: 421, SE_FcIncreaseNumHits, On Caster, numhits mod flat amt, base: amt
|
||||
focusFcLimitUse, //@Fc, SPA: 420, SE_FcLimitUse, On Caster, numhits mod pct, base: pct
|
||||
focusFcMute, //@Fc, SPA: 357, SE_FcMute, On Caster, prevents spell casting, base: chance pct
|
||||
focusFcTimerRefresh, //@Fc, SPA: 389, SE_FcTimerRefresh, On Caster, reset all recast timers, base: 1
|
||||
focusFcStunTimeMod, //@Fc, SPA: 133, SE_FcStunTimeMod, On Caster, stun time mod pct, base: chance pct
|
||||
focusFcResistIncoming, //@Fc, SPA: 510, SE_Fc_Resist_Incoming, On Target, resist modifier, base: amt
|
||||
focusFcAmplifyMod, //@Fc, SPA: 507, SE_Fc_Amplify_Mod, On Caster, damage-heal-dot mod pct, base: pct
|
||||
focusFcAmplifyAmt, //@Fc, SPA: 508, SE_Fc_Amplify_Amt, On Caster, damage-heal-dot mod flat amt, base: amt
|
||||
focusFcCastTimeMod2, //@Fc, SPA: 500, SE_Fc_CastTimeMod2, On Caster, cast time mod pct, base: pct
|
||||
focusFcCastTimeAmt, //@Fc, SPA: 501, SE_Fc_CastTimeAmt, On Caster, cast time mod flat amt, base: milliseconds
|
||||
focusFcHealPctCritIncoming, //@Fc, SPA: 393, SE_FcHealPctCritIncoming, On Target, heal received critical chance mod, base: chance pct
|
||||
focusFcHealAmt, //@Fc, SPA: 392, SE_FcHealAmt, On Caster, spell healing mod flat amt, base: amt
|
||||
focusFcHealAmtCrit, //@Fc, SPA: 396, SE_FcHealAmtCrit, On Caster, spell healing mod flat amt, base: amt
|
||||
} focusType; //Any new FocusType needs to be added to the Mob::IsFocus function
|
||||
#define HIGHEST_FOCUS focusFcHealAmtCrit //Should always be last focusType in enum
|
||||
|
||||
|
||||
+12
-2
@@ -103,6 +103,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
value += value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100;
|
||||
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100)*ratio/100;
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusFcAmplifyMod, spell_id) / 100)*ratio / 100;
|
||||
|
||||
if (target) {
|
||||
value += int(value_BaseEffect*target->GetVulnerability(this, spell_id, 0)/100)*ratio/100;
|
||||
@@ -113,6 +114,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
|
||||
value -= GetFocusEffect(focusFcDamageAmt, spell_id);
|
||||
value -= GetFocusEffect(focusFcDamageAmt2, spell_id);
|
||||
value -= GetFocusEffect(focusFcAmplifyAmt, spell_id);
|
||||
|
||||
if (RuleB(Spells, IgnoreSpellDmgLvlRestriction) && !spells[spell_id].no_heal_damage_item_mod && itembonuses.SpellDmg)
|
||||
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value)*ratio / 100;
|
||||
@@ -140,6 +142,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
value += value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100;
|
||||
|
||||
value += value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100;
|
||||
value += value_BaseEffect*GetFocusEffect(focusFcAmplifyMod, spell_id)/100;
|
||||
|
||||
if (target) {
|
||||
value += value_BaseEffect*target->GetVulnerability(this, spell_id, 0)/100;
|
||||
@@ -150,6 +153,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
|
||||
value -= GetFocusEffect(focusFcDamageAmt, spell_id);
|
||||
value -= GetFocusEffect(focusFcDamageAmt2, spell_id);
|
||||
value -= GetFocusEffect(focusFcAmplifyAmt, spell_id);
|
||||
|
||||
if (RuleB(Spells, IgnoreSpellDmgLvlRestriction) && !spells[spell_id].no_heal_damage_item_mod && itembonuses.SpellDmg)
|
||||
value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value);
|
||||
@@ -191,11 +195,13 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusImprovedDamage, spell_id)/100)*ratio/100;
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100)*ratio/100;
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100)*ratio/100;
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusFcAmplifyMod, spell_id) / 100)*ratio/100;
|
||||
value += int(value_BaseEffect*target->GetVulnerability(this, spell_id, 0)/100)*ratio/100;
|
||||
extra_dmg = target->GetFcDamageAmtIncoming(this, spell_id) +
|
||||
int(GetFocusEffect(focusFcDamageAmtCrit, spell_id)*ratio/100) +
|
||||
GetFocusEffect(focusFcDamageAmt, spell_id) +
|
||||
GetFocusEffect(focusFcDamageAmt2, spell_id);
|
||||
GetFocusEffect(focusFcDamageAmt2, spell_id) +
|
||||
GetFocusEffect(focusFcAmplifyAmt, spell_id);
|
||||
|
||||
if (extra_dmg) {
|
||||
int duration = CalcBuffDuration(this, this, spell_id);
|
||||
@@ -211,11 +217,13 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) {
|
||||
value += value_BaseEffect*GetFocusEffect(focusImprovedDamage, spell_id)/100;
|
||||
value += value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100;
|
||||
value += value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100;
|
||||
value += value_BaseEffect*GetFocusEffect(focusFcAmplifyMod, spell_id)/100;
|
||||
value += value_BaseEffect*target->GetVulnerability(this, spell_id, 0)/100;
|
||||
extra_dmg = target->GetFcDamageAmtIncoming(this, spell_id) +
|
||||
GetFocusEffect(focusFcDamageAmtCrit, spell_id) +
|
||||
GetFocusEffect(focusFcDamageAmt, spell_id) +
|
||||
GetFocusEffect(focusFcDamageAmt2, spell_id);
|
||||
GetFocusEffect(focusFcDamageAmt2, spell_id) +
|
||||
GetFocusEffect(focusFcAmplifyAmt, spell_id);
|
||||
|
||||
if (extra_dmg) {
|
||||
int duration = CalcBuffDuration(this, this, spell_id);
|
||||
@@ -275,6 +283,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
value = value_BaseEffect;
|
||||
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusImprovedHeal, spell_id)/100);
|
||||
value += int(value_BaseEffect*GetFocusEffect(focusFcAmplifyMod, spell_id) / 100);
|
||||
|
||||
// Instant Heals
|
||||
if(spells[spell_id].buffduration < 1) {
|
||||
@@ -297,6 +306,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) {
|
||||
value *= modifier;
|
||||
value += GetFocusEffect(focusFcHealAmtCrit, spell_id) * modifier;
|
||||
value += GetFocusEffect(focusFcHealAmt, spell_id);
|
||||
value += GetFocusEffect(focusFcAmplifyAmt, spell_id);
|
||||
value += target->GetFocusIncoming(focusFcHealAmtIncoming, SE_FcHealAmtIncoming, this, spell_id);
|
||||
|
||||
if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.HealAmt && spells[spell_id].classes[(GetClass()%17) - 1] >= GetLevel() - 5)
|
||||
|
||||
+8
-2
@@ -3120,7 +3120,8 @@ uint32 Mob::GetLevelHP(uint8 tlevel)
|
||||
int32 Mob::GetActSpellCasttime(uint16 spell_id, int32 casttime)
|
||||
{
|
||||
int32 cast_reducer = GetFocusEffect(focusSpellHaste, spell_id);
|
||||
auto min_cap = casttime / 2;
|
||||
int32 cast_reducer_amt = GetFocusEffect(focusFcCastTimeAmt, spell_id);
|
||||
int32 cast_reducer_no_limit = GetFocusEffect(focusFcCastTimeMod2, spell_id);
|
||||
|
||||
if (level > 50 && casttime >= 3000 && !spells[spell_id].goodEffect &&
|
||||
(GetClass() == RANGER || GetClass() == SHADOWKNIGHT || GetClass() == PALADIN || GetClass() == BEASTLORD)) {
|
||||
@@ -3128,8 +3129,13 @@ int32 Mob::GetActSpellCasttime(uint16 spell_id, int32 casttime)
|
||||
cast_reducer += level_mod * 3;
|
||||
}
|
||||
|
||||
cast_reducer = std::min(cast_reducer, 50); //Max cast time with focusSpellHaste and level reducer is 50% of cast time.
|
||||
cast_reducer += cast_reducer_no_limit;
|
||||
casttime = casttime * (100 - cast_reducer) / 100;
|
||||
return std::max(casttime, min_cap);
|
||||
casttime -= cast_reducer_amt;
|
||||
|
||||
return std::max(casttime, 0);
|
||||
|
||||
}
|
||||
|
||||
void Mob::ExecWeaponProc(const EQ::ItemInstance *inst, uint16 spell_id, Mob *on, int level_override) {
|
||||
|
||||
+666
-415
File diff suppressed because it is too large
Load Diff
@@ -4531,8 +4531,13 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use
|
||||
resist_modifier += caster->GetSpecialAbilityParam(CASTING_RESIST_DIFF, 0);
|
||||
|
||||
int focus_resist = caster->GetFocusEffect(focusResistRate, spell_id);
|
||||
|
||||
resist_modifier -= 2 * focus_resist;
|
||||
|
||||
int focus_incoming_resist = GetFocusEffect(focusFcResistIncoming, spell_id);
|
||||
|
||||
resist_modifier -= focus_incoming_resist;
|
||||
|
||||
//Check for fear resist
|
||||
bool IsFear = false;
|
||||
if(IsFearSpell(spell_id))
|
||||
|
||||
Reference in New Issue
Block a user