[Spells] Implemented SPA 463 SE_SHIELD_TARGET (#4224)

SPA 463 SE_SHIELD_TARGET

Live description: "Shields your target, taking a percentage of their damage".

Only example spell on live is an NPC who uses it during a raid event "Laurion's Song" expansion. SPA 54492 'Guardian Stance' Described as 100% Melee Shielding

Example of mechanic. Base value = 70. Caster puts buff on target. Each melee hit Buff Target takes 70% less damage, Buff Caster receives 30% of the melee damage.
Added mechanic to cause buff to fade if target or caster are separated by a distance greater than the casting range of the spell. This allows similar mechanics to the /shield ability, without a range removal mechanic it would be too easy to abuse if put on a player spell. *can not confirm live does this currently

Can not be cast on self.
This commit is contained in:
KayenEQ
2024-03-30 13:34:03 -04:00
committed by GitHub
parent cd89926435
commit 9e3bf91374
6 changed files with 101 additions and 5 deletions
+3
View File
@@ -512,6 +512,7 @@ struct StatBonuses {
uint8 invisibility; // invisibility level
uint8 invisibility_verse_undead; // IVU level
uint8 invisibility_verse_animal; // IVA level
int32 ShieldTargetSpa[2]; // [0] base = % mitigation amount, [1] buff slot
// AAs
int32 TrapCircumvention; // reduce chance to trigger a trap.
@@ -657,6 +658,8 @@ namespace SBIndex {
constexpr uint16 COMBAT_PROC_SPELL_ID = 1; // SPA
constexpr uint16 COMBAT_PROC_RATE_MOD = 2; // SPA
constexpr uint16 COMBAT_PROC_REUSE_TIMER = 3; // SPA
constexpr uint16 SHIELD_TARGET_MITIGATION_PERCENT = 0; // SPA 463
constexpr uint16 SHIELD_TARGET_BUFFSLOT = 1; // SPA 463
};