Skip to content

[Feature] Implemented /shield ability and related affects #1494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Aug 16, 2021

Conversation

KayenEQ
Copy link
Contributor

@KayenEQ KayenEQ commented Aug 10, 2021

8/10/21
Better late than never!

Implemented the /shield ability.

/shield command mechanics
Warriors get this skill at level 30
Used by typing /shield while targeting a player
While active for the duration of 12 seconds baseline. The 'shield target' will take 50 pct less damage and the 'shielder' will be hit with the damage taken by the 'shield target' after all applicable mitigation is calculated. The damage on the 'shielder' will be reduced by 25 percent, this reduction can be increased to 50 pct if equipping a shield. You receive a 1% increase in mitigation for every 2 AC on the shield. Shielder must stay with in a close distance (15 units) to your 'shield target'. If either move out of range, shield ends, no message given (how live does it). Both duration and shield range can be modified by AA. Recast is 3 minutes.

Example: Wizard is being hit by npc who normally is hitting for 100 max hit. Warrior shields Wizard. NPC now hits Wizard for 100 damage, since shielded, the Wizard takes 50 damage and the Warrior takes 75 damage (without a shield equipped)

Perl quest function added that can be used to allow this ability to be used on any player/npc with maximum flexibility.

Perl_croak(aTHX_ "Usage: Mob::ShieldAbility(THIS, uint32 target_id, [int32 max_shielder_distance = 15], [int32 shield_duration = 12000], [int32 shield_target_mitigation= 50], [int32 shielder_mitigation = 50], [bool use_aa = false], bool [can_shield_npc = true]");

Implemented SE_ExtendedShielding 230
extends the range of your /shield ability by an amount of distance, base: distance units, limit: none, max: none

Implemented SE_ShieldDuration 255
extends the duration of your /shield ability, base: seconds, limit: none, max: none

Implemented SE_PetShield 210
allows pet to 'shield' owner for 50 pct of damage taken for a duration
base: Time multiplier 1=12 seconds, 2=24 ect),
limit: mitigation on pet owner override (not on live) - Added to allow for more flexibility, if set to zero will get default behavior
max: mitigation on pet override (not on live) - Added to allow for more flexibility, if set to zero will get default behavior

Mages have this his AA in our database named 'Shared Health'. It will now be functional.

@Akkadius
Copy link
Member

Left a few comments; there's merge conflicts as well.

You're just pumping these out like the good ol days! <3

@Akkadius
Copy link
Member

We chatted async in DM's on some pointer feedback; will loop back after iteration

This reverts commit 27e11e7.
reset variables on shield_target if shielder dies or zones during shielding.
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.
Shield now uses a common pathway through ShieldAbility, added parameters to perl function
@Akkadius
Copy link
Member

Took care of a bunch of syntax and typo things

@Akkadius Akkadius merged commit d40d211 into EQEmu:master Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants