Skip to content

[cpp] fixes ranged job abilities#9941

Merged
WinterSolstice8 merged 1 commit into
LandSandBoat:basefrom
lefneer311:ranged_job_abilities
May 6, 2026
Merged

[cpp] fixes ranged job abilities#9941
WinterSolstice8 merged 1 commit into
LandSandBoat:basefrom
lefneer311:ranged_job_abilities

Conversation

@lefneer311
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?

  • Removes shadow bug for double and triple shot (+40% activation rate over what's shown on mod::double_shot_rate and mod::triple_shot_rate

  • Existing bug is due to base power applied both in src/map/entities/charentity.cpp:2104 ("40 +") and scripts/globals/job_utils/ranger.lua:294 (power = 40) for double shot and scripts/actions/abilities/triple_shot.lua:16 for triple shot (power = 40); both cases result in mod power of 40, but activation rate of 80 due to charentity calculation.

  • Adds barrage logic for trusts, which scales with player level, and prevents overlap of barrage/double shot/triple shot

Steps to test these changes

Activate double shot or triple shot, fire at targets and compare results for damage and TP (easiest indicator)
Your base activation rate should be approximately 40%, if every shot hit. Typically observed at 30-40% due to racc and rng.

For testing the Trust Barrage effects, summon Semih Lafihna after level 50. She will use it effectively.

Sources:
https://www.bg-wiki.com/ffxi/Barrage
*established around 2012
https://www.bg-wiki.com/ffxi/Double_Shot
https://www.bg-wiki.com/ffxi/Triple_Shot

WinterSolstice8
WinterSolstice8 previously approved these changes May 4, 2026
Copy link
Copy Markdown
Contributor

@WinterSolstice8 WinterSolstice8 left a comment

Choose a reason for hiding this comment

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

Very good find on the double/triple shot.

@WinterSolstice8 WinterSolstice8 dismissed their stale review May 4, 2026 18:25

code didn't compile

@WinterSolstice8
Copy link
Copy Markdown
Contributor

Looks like battleutils::getBarrageShotCount needs a refactor to support trusts, it doesnt look like it will be all that hard though.

@lefneer311
Copy link
Copy Markdown
Contributor Author

Looks like battleutils::getBarrageShotCount needs a refactor to support trusts, it doesnt look like it will be all that hard though.

Agreed! Although for trusts, we could probably skip the getBarrageShotCount with the logic already present.

@WinterSolstice8 - how would you prefer I proceed on this one? I can remove the faulty line and force push, or head on over to the battleutils.

@WinterSolstice8
Copy link
Copy Markdown
Contributor

Looks like battleutils::getBarrageShotCount needs a refactor to support trusts, it doesnt look like it will be all that hard though.

Agreed! Although for trusts, we could probably skip the getBarrageShotCount with the logic already present.

@WinterSolstice8 - how would you prefer I proceed on this one? I can remove the faulty line and force push, or head on over to the battleutils.

There is slightly more than just getBarrageShotCount itself that annoys me so I'll make a PR just to fix that. It will make your PR smaller here too (you will just be able to call that function and get the output you want)

@lefneer311
Copy link
Copy Markdown
Contributor Author

Copy - I'll consolidate and update post #9943

@lefneer311 lefneer311 marked this pull request as draft May 5, 2026 16:19
@lefneer311 lefneer311 marked this pull request as draft May 5, 2026 16:19
@lefneer311 lefneer311 closed this May 5, 2026
@lefneer311 lefneer311 force-pushed the ranged_job_abilities branch from 1b05115 to 1a90b78 Compare May 5, 2026 16:19
@lefneer311 lefneer311 reopened this May 5, 2026
@lefneer311
Copy link
Copy Markdown
Contributor Author

Consolidated post #9943

Also adjusted the priority order for evaluating Triple Shot before Double Shot.

Comment thread src/map/entities/trustentity.cpp Outdated
- Removes shadow bug for double and triple shot (+40% activation rate over what's shown on mod::double_shot_rate and mod::triple_shot_rate

- Existing bug is due to base power applied both in src/map/entities/charentity.cpp:2104 ("40 +") and scripts/globals/job_utils/ranger.lua:294 (power = 40) for double shot and scripts/actions/abilities/triple_shot.lua:16 for triple shot (power = 40); both cases result in mod power of 40, but activation rate of 80 due to charentity calculation.

- Adds barrage logic for trusts, which scales with player level, and prevents overlap of barrage/double shot/triple shot
@lefneer311 lefneer311 force-pushed the ranged_job_abilities branch from 8aa8a27 to 7a18991 Compare May 5, 2026 18:34
@lefneer311 lefneer311 marked this pull request as ready for review May 5, 2026 18:57
@WinterSolstice8 WinterSolstice8 merged commit d40f201 into LandSandBoat:base May 6, 2026
16 of 17 checks passed
@lefneer311 lefneer311 deleted the ranged_job_abilities branch May 6, 2026 22:48
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