523 Commits

Author SHA1 Message Date
KayenEQ
3faa0d2603 update 2021-09-23 11:41:36 -04:00
Noudess
9b06221be0 [Bug Fix] Fix bug where IVU could not be cast on char with Invis 2021-09-20 11:30:33 -04:00
KayenEQ
df9d6bc506
[Spells] Corrected implementation of SE_Purify 291 (#1541)
* Correct implementation of spa291

* debug removal
2021-09-19 15:17:10 -05:00
KayenEQ
71870cbd1c
[Spells] Update to SPA 442 and 443 (SE_TriggerOnReqTarget, SE_TriggerOnReqCaster) (#1543)
* Update to SPA 442 and 443

Use SpellRestriction Id's and updated PassCastRestriction code

* Update mob.cpp
2021-09-19 15:16:56 -05:00
KayenEQ
46edd56acc
[Spells] Update SPA 101 SE_CompleteHeal (#1544)
Fixed buff stacking issue
2021-09-19 15:16:21 -05:00
KayenEQ
d4e752987e fixes 2021-09-17 23:21:03 -04:00
Kinglykrab
7b1b05a35c
[Bug Fix] Resolves issues with improper genders and textures on spells. (#1533)
* [Bug Fix] Resolves issues with improper genders and textures on spells.
Spells will now properly understand their expected gender and texture.
Logic is based on what I saw in a stock PEQ database, can be adjusted if need be.
Any feedback is helpful.

* Made use of GetRaceGenderDefaultHeight() and added all races to their proper conditions.

* Formatting.
2021-09-12 22:40:07 -05:00
KayenEQ
cb3f8daedd
[Spells] Major update to cast restriction code and new spell field 'caster_requirement_id' (field220) implemented (#1508)
* Implemented spells_new table 'field220' as 'caster_requirement_id'

Implemented spells_new table 'field220' as 'caster_requirement_id'

* Update spell_effects.cpp

* updates to CastRestriction

enum using live description
updated entire function
missing and new types added
many fixes

* updates

* code fixes

* updates

* updates

* Update spdat.h

* typo fix
2021-08-31 00:41:20 -05:00
KayenEQ
5f3c054044
[Spells] Updated pet suspend code to use spell effect data and bonuses (#1501) 2021-08-31 00:35:18 -05:00
KayenEQ
bde5d6931c
[Spells] Implemented SPA 390 SE_FcTimerLockout (#1496)
* Implemented SPA 390 SE_FcTimerLockout

Implemented

SPA 390 SE_FcTimerLockout

This focus limited effect sets any spell that meets the criteria of the of the focus limits to be a on recast timer.
Base value: recast duration in milliseconds.

Note: This focus can only be applied from spells (not item or AA)
Note: Although reinforced by the server, to appear visually correct both server side and client side spell values need to match (ie. need to matching spells_new values).

Example spell: Suppression of Fire ID 16973.
Sets any fire spell in the clients spell bar to a 2 second recast when the client is affect by the spell.

* Formatting

* Use range based for

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-15 23:17:04 -05:00
KayenEQ
d40d21121a
[Feature] Implemented /shield ability and related affects (#1494)
* shield ability initial work

* updates

* update

* updates

* Update client_process.cpp

* major updates

optimized
pet support
perl support

* updates

* minor update

* fix merge error

* requested changes

* variable fix

* optimization

* minor update

* Revert "optimization"

This reverts commit 27e11e758b23933ba8b6878d12d3eeb1e780aeda.

* fix

reset variables on shield_target if shielder dies or zones during shielding.

* edge case fix

Catch and fix situations where shield target doesn't have shielder variable cleared. Can occur if shielder . uses ability when target is not in combat then zones.

* combined packet and mob function

Shield now uses a common pathway through ShieldAbility, added parameters to perl function

* Addressing formatting for Kayen

* Fix function typo

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-15 22:59:10 -05:00
KayenEQ
c821397367
[Spells] Implemented SPA 471 SE_Double_Melee_Round (#1492)
* Implemented SPA 471 SE_Double_Melee_Round

#define SE_Double_Melee_Round			471
Percent chance to repeat primary weapon round with a percent damage modifier, base: pct chance repeat, limit: pct dmg mod, max: none

* minor fixes

* tab to spaces
2021-08-11 01:38:38 -05:00
KayenEQ
2c01fe59ce
[Spells] Implemented SPA 489 SE_Worn_Endurance_Regen_Cap (#1493)
Implemented

SE_Worn_Endurance_Regen_Cap		489
modify worn item regen cap
base: amt, limit: none, max: none

Also added support to allow item mana regen cap to check item and spell bonuses.
2021-08-10 18:39:12 -05:00
KayenEQ
416fadd554
[Spells] Implemented SPA 504 and 506 (#1488)
* Implemented SPA 504 and 506

 SE_Damage_Taken_Position_Amt	506 // implemented - modify melee damage by amt if dmg taken from Front or Behind

SE_Melee_Damage_Position_Amt	504 // implemented - modify melee damage by amt if done from Front or Behind

* fix, description updates

* Update spdat.h
2021-08-10 14:46:52 -05:00
KayenEQ
51ad6d65dc
[Spells] Implemented SPA 476 SE_Weapons_Stance and Live-like AA Enable/Disable Toggle (#1477)
* Work started on SPA 476

defines

* bonus structure add

bonus structure set up

* updates spa476

updates spa476

* spell bonus now functional

spell bonus working well.

* major update with debug messages

aa, item and spell now working

* Pre clean up, effect implemented

working for AA, spells, items, all checked for stacking issues.

* removed debug messages

removed debug messages

* spdat description added

spdat description added

* minor fix

removed debug shout
removed unneeded code check.

* syntax updates, minor fixes

syntax updates, minor fixes

* syntax fixes

syntax fixes

* improvements to code

moved function to check at swap item.  Easier to manage and more live like behavior. Required minor adjustment
Still working on AA toggle.

* updates to aa buy, functionalish

* Syntax / Formatting

* Add break / default to switch

* updates

* completed v2

* Major revisions

Main function check moved to when items are swapped and out of when ever bonus are recalculated.

AA Toggle and data structure now more accurate to live.

* Update aa.cpp

* debug removed

* implemented SE_Buy_AA_Rank

Closer to live.

* Update aa.cpp

broadening AA toggle to be more general use.

* improved various checks

aa toggle is now broadly implemented to be usable with any passive effect.

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-10 14:46:37 -05:00
KayenEQ
0e7cfe96ef
[Spells] Update to SPA 130 and SPA 131 focus calculation, focus code improvements (#1486)
[Spells] Update to SPA 130 and SPA 131 focus calculation, focus code improvements
#use instead of PR 1483
2021-08-01 19:23:59 -05:00
KayenEQ
e71b11fcba
[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 commit e5b81791ee82e45a2c0b819bd15f2c9adc94cfd1.

* Revert "Revert "Format CalcFocusEffect""

This reverts commit a1ce29a8754704bbcce8f751fb9082383771d878.

* 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>
2021-08-01 17:45:05 -05:00
KayenEQ
d270670145
[Spells] Update for SPA 403 and 404 (#1482)
* Update for SPA403 and 404

Update
SPA SE_LimitSpellClass: 403
SPA SE_LimitSpellSubclass: 404

Now use spell table values from column 221 and 222 respectively.

Unknown what the values mean in these fields, but at least live spells work properly.

Added FocusLImitInclude Enum to improved focus effect function readability.

* Formatting

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 13:47:17 -05:00
KayenEQ
f01cf74fa6
[Spells] Update SPA 339 SE_TriggerOnCast (#1478)
* Recoded SE_TriggerOnCast Focus effect

Recoded SE_TriggerOnCast focus effect to be consistent with how all other focuses are checked. No longer an arbitrary limit as to number of a focus effects of this type you can have.

* new command: resetdisc_timer

usage: #resetdisc_timer [all | timer_id]

* syntax fixes

syntax improvements

* minor fix

changed numhits check

* Update spell_effects.cpp

* added better support for spell procs that don't require target.

* syntax

* Formatting and syntax tweaks

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 13:26:44 -05:00
KayenEQ
38beb804a3
[Spells] Added constant labeling to all StatBonuses that use as arrays. (#1485)
* constexpr labels added

* more updates

* more updates

* completed

* Update common.h

* Namespace constants, few minor spelling tweaks

Co-authored-by: Akkadius <akkadius1@gmail.com>
2021-08-01 13:13:14 -05:00
KayenEQ
72056ffba3
[Spells] Focus related functions to use int32 instead of int16
Need to increase from int16 to int32 when calculating focus due it causing issues with returning spell ids for some effects which can easily be over the int16 limit. CalcAAFocus and CalcFocusEffect were doing all math in int16 also, no reason not to increase to int32.
2021-08-01 13:06:57 -05:00
KayenEQ
187d6e9dc4
[Spells] Bug fix for AOE Harmony/Lull (#1472)
* Bug fix for AOE Harmony/Lull type spells.

Fixed bug with SPA 30 SE_SE_ChangeFrenzyRad and SPA 86 SE_Harmony allowing those spells to affect NPC's above their level restrictions when cast as a 'Targeted AE' spell (ie. Harmony, Wake of Tranquility) when the targeted NPC was bellow level restricted range, but the NPC's next to them were above it.

As coded now, the adjacent NPC's if over level limit will still get the buff applied to them BUT will not get any benefits from the buff.

This bug was originally reported by: Isaaru

* Live like behavior

Implemented the live like behavior, if this case occurs on live, the buff is not applied to the targets over the level limit and "Your target looks unaffected" message is given.

* code optimization

code optimization
2021-07-29 19:20:21 -04:00
KayenEQ
78b15a0214
Implemented SPA 498 and 499 (extra attack chance effects) (#1475)
* Implemented SPA 498 and 499

Implemented
SE_AddExtraAttackPct_1h_Primary	498 , gives your double attacks a percent chance to perform an extra attack with 1-handed primary weapon, base: chance, limit: amt attacks max: none

SE_AddExtraAttackPct_1h_Secondary	499  gives your double attacks a percent chance to perform an extra attack with 1-handed secondary weapon, base: chance, limit: amt attacks max: none

Added limit functionality to similar effect SPA 266

SPA 266 will now be calculated to take highest percent value when applying bonus. (was additive, which does not seem correct based on AA data)

* Update attack.cpp

code update

* Update bonuses.cpp

code update

* Update spdat.h

added commas

* Update spell_effects.cpp

fix to remove unknown spa message

Co-authored-by: Michael Cook (mackal) <mcook@mackal.net>
2021-07-29 19:19:35 -04:00
KayenEQ
a50663e0a4
Fix SE_TwinCastBlocker to block twinproc (#1476)
Improvement to SE_TwinCastBlocker implementation. Will now ensure both spell casted and weapon proced twincasts can be effectively blocked.
2021-07-29 18:56:02 -04:00
KayenEQ
fee8772bb6
Implemented SPA 482 SE_Skill_Base_Damage_Mod (#1474)
* Implemented SPA 482 SE_Skill_Base_Damage_Mod

Implemented SPA 482 SE_Skill_Base_Damage_Mod

Modifies base melee damage by skill
Base: pct Limit: skill(-1=ALL), max: none

* Update spell_effects.cpp

fix to remove unknown spa message
2021-07-29 18:55:06 -04:00
KayenEQ
5d92d484a1
Projectiles Update (#1468)
Fixed spell projectiles whose angle was not being calculated correctly.

Significantly improved all projectile timings. At least up to range of 300 should see more accurate timings for damage/effects occurring upon projectile impact. Will be noticed most significantly for all spell projectiles and for longer range archery.
2021-07-26 22:20:13 -04:00
KayenEQ
2b74d71ff5
[Feature] New SPAs pass 2 (#1459)
* 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.
2021-07-20 11:06:20 -04:00
KayenEQ
8a2a1b152e
[Feature] New SPAs pass 1 (#1454)
* 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.

* Fixes for PR

removed debug shouts
fixed description issue
2021-07-14 23:15:04 -04:00
Chris Miles
1f154af2ca
[Hotfix] SendIllusion revert to October 2021-06-23 00:17:56 -05:00
splose
d34afb6f30
Fix for unknown spell effect message with spell effect 459 (DamageModifierV2) (#1419) 2021-06-16 10:23:14 -05:00
splose
19b14ea2d4
[Bug Fix] Fixed Invis vs Undead / Invis Vs Animals not breaking charm + Added rule for custom capabilities (#1374)
* Fixed Invis vs Undead / Invis Vs Animals not breaking charm
Added rule for custom capabilities

* Fix logging & remove comments

* change logic

* change logic

* if (RuleB(Pets, LivelikeBreakCharmOnInvis) || IsInvisible(formerpet))
2021-06-16 09:31:38 -05:00
Chris Miles
8d90b5a2e7
[Hotfix] Illusion Revert (#1398)
* Revert some "fixes", clean some code up

* Use RaceGender default height data for when calculating size during SendIllusionPacket which should alleviate some inconsistencies for new clients zoning in and seeing the entity

* Some code cleanup
2021-06-13 18:06:27 -05:00
Dencelle
f0bf3826bd
[Bug Fix] NPC not breaking charm correctly (#1363)
* [Bug Fix] NPC not breaking charm correctly

#947 and #905
fixes the issue with charm breaking and spells being cast after to cause a faction war. this removes dots to stop faction wars also.

dot removal part needs better testing to ensure it works as intended

* Remove this-> since it is implied

* Update spell_effects.cpp

* clear all this->

* pMob to mob

* Added rule Spells:PreventFactionWarOnCharmBreak

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-06-11 15:55:23 -05:00
Paul Coene
21a1a7bed7
Client tracks pet sit/stand - force new pets to stand rather than use client (#1155)
Co-authored-by: Noudess <noudess@gmail.com>
2020-12-22 18:05:02 -06:00
Noudess
56afa0404b Updates to fix taunt button on PET UI to match live behavior. 2020-09-02 12:50:11 -04:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
Uleat
92d32feb0d Fix for player hp updates not matching between client and server 2020-01-28 21:24:14 -05:00
Kinglykrab
8b37ef5e67 Formatting 2020-01-20 21:14:28 -05:00
Kinglykrab
8e6dd638ff Implement SE_SummonCorpseZone (SPA 388).
- This SPA summons all of a targeted group or raid group member's corpses from anywhere in the world.
- Example Spell 16247 (Summon Remains)
2020-01-20 20:20:06 -05:00
Akkadius
9dda9098a0 Add logging for flee 2020-01-03 17:23:51 -06:00
Uleat
35fe27eb5d Added bot commands 'applypoison' and 'applypotion' .. new bot owner option 'buffcounter' 2019-12-03 22:01:13 -05:00
Noudess
566e6ea307 Added support for all SE_EyeOfZomm and some other small changes 2019-10-28 19:48:31 -04:00
Noudess
194c61a467 Modify eye of zomm support to be more efficient. 2019-10-26 10:42:00 -04:00
Noudess
ff59255e63 Eye of Zomm needed support in OP_ClientUpdate. 2019-10-22 10:45:54 -04:00
Akkadius
89bfbe6bd2 Logs::Combat to LogCombat 2019-09-02 04:21:03 -05:00
Akkadius
af4c630ede Logs::Spells to LogSpells 2019-09-02 03:26:44 -05:00
Akkadius
2970afff67 More log migrations to fmt / log aliases 2019-09-02 02:33:02 -05:00
Akkadius
bfd0752c4d Logs::None added to LogDebug 2019-09-01 23:54:24 -05:00
Akkadius
678c25e02c Simplify error logging 2019-09-01 22:05:44 -05:00
Michael Cook (mackal)
ef6b2976a3 Make SE_SummonPC only clear aggro for beneficial spells 2019-08-14 23:06:34 -04:00