Skip to content
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

[Spells] Implemented SPA 122 SE_ReduceSkill #4234

Merged
merged 6 commits into from
May 4, 2024
Merged

[Spells] Implemented SPA 122 SE_ReduceSkill #4234

merged 6 commits into from
May 4, 2024

Conversation

KayenEQ
Copy link
Contributor

@KayenEQ KayenEQ commented Apr 1, 2024

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.

SE_ReduceSkill SPA 122	 base: skill id, limit: none, max: none, formula: % skill is reduced (positive)
common/spdat.h Outdated Show resolved Hide resolved
remove incorrect SPA addition
zone/client.h Outdated Show resolved Hide resolved
zone/client.h Outdated Show resolved Hide resolved
Comment on lines +12415 to +12417
if (itembonuses.skillmodmax[skill_id] > 0){

if (itembonuses.skillmodmax[skill_id] > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the same conditions, is this intentional or copy and paste error?

Copy link
Member

@Akkadius Akkadius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still insane to read, maybe can be improved at a later date

@Akkadius Akkadius merged commit a71ad41 into master May 4, 2024
2 checks passed
@Akkadius Akkadius deleted the kayen_SPA122 branch May 4, 2024 23:11
Akkadius added a commit that referenced this pull request May 5, 2024
@Akkadius Akkadius mentioned this pull request May 9, 2024
catapultam-habeo pushed a commit to The-Heroes-Journey-EQEMU/Server that referenced this pull request Jul 14, 2024
* Implement SPA122 v1

* Implemented SPA 122 ReduceSkill

SE_ReduceSkill SPA 122	 base: skill id, limit: none, max: none, formula: % skill is reduced (positive)

* Implemented SPA 122 Reduce Skill

remove incorrect SPA addition

* Break out multiple lines

* reformatted

reformatted

---------

Co-authored-by: Akkadius <[email protected]>
catapultam-habeo pushed a commit to The-Heroes-Journey-EQEMU/Server that referenced this pull request Jul 14, 2024
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.

3 participants