[Spells] Implemented SPA 122 SE_ReduceSkill #4234
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented SPA 122 - ReduceSkill
This spell effect acts as a debuff that reduces a clients skill value by percentage.
Example Live spell Curse of 1H Blunt (39667) "Decrease 1H Blunt Skill by 45%"
Base value: Skill ID, Limit: none, Max: none, Formula value = % reduction
For above example. Base=0 (1H Blunt skill id), Formula = 45
So if your 1H Blunt skills is 200, and you apply a 45% debuff you now have a 1H Blunt skill of 110 for the duration of the debuff.
The client GetSkill function I know looks a bit ugly, but I coded it in a way to be consistent with the current format and use the least amount of additional checks/calculations, since we do check this very often in the code. Essentially it just adds one check if you have the debuff, then will do all calculations to account for that, otherwise it just checks skills in the way it did before.