Skip to content

[lua] Fix elegy potency bug#10855

Open
9001-Sols wants to merge 1 commit into
LandSandBoat:basefrom
9001-Solutions:9001/elegy-potency-bug
Open

[lua] Fix elegy potency bug#10855
9001-Sols wants to merge 1 commit into
LandSandBoat:basefrom
9001-Solutions:9001/elegy-potency-bug

Conversation

@9001-Sols

@9001-Sols 9001-Sols commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Fixes Elegy potency gain from Song+ gear (ELEGY_EFFECT/ALL_SONGS_EFFECT) being 10x too low. gearBoost was multiplied by 6375/256 instead of 63750/256. Elegy power feeds HASTE_MAGIC, which is in /10000 units, so per-point gear potency is 25.5/1024 * 10000 ≈ 249.

Steps to test these changes

  1. Cast Battlefield Elegy (base 2500 = 25% slow) with no Song+ gear; confirm ~25% slow
  2. Equip ~10 points of Elegy + / All Songs + gear and recast
  3. Confirm potency now scales up toward the 5000 (50% slow)

Test Results

Before After
image image

Before almost no perceivable effect, after matches BG wiki's +2 chart, as well as the original comment -- Simplified numbers of: 25.5 * 10000/1024:
image

@9001-Sols
9001-Sols marked this pull request as ready for review July 24, 2026 22:06
@LandSandBoat LandSandBoat deleted a comment from github-actions Bot Jul 24, 2026
power = power + utils.clamp(gearBoost - 1, 0, 20) + caster:getJobPointLevel(xi.jp.REQUIEM_EFFECT) * 3
elseif spellEffect == xi.effect.ELEGY then
power = power + gearBoost * 6375 / 256 -- Simplified numbers of: 25.5 * 10000/1024
power = power + gearBoost * 63750 / 256 -- Simplified numbers of: 25.5 * 10000/1024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

power = power + math.floor(gearBoost * 25.6) * 10000 / 1024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will match the values in this table exactly.
imagen

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