Skip to content

[lua] Fix ranged PDIF edgecase#9792

Merged
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
UmeboshiXI:Ranged_PDIF_Edgecase
Apr 15, 2026
Merged

[lua] Fix ranged PDIF edgecase#9792
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
UmeboshiXI:Ranged_PDIF_Edgecase

Conversation

@UmeboshiXI
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 an edge case where a target's DEF was not clamped and could be reduced/floored to 0 by attacks that ignore defense. Once it hit a certain threshold, it would cause the attack to deal 0 damage.

calculateMeleePDIF() already had this fix applied.

Steps to test these changes

Open archery skill "Split Shot" script. Change ignoredDefense to 1.0. See that the attack does not deal 0 damage to a target.

@Xaver-DaRed Xaver-DaRed merged commit 595b61a into LandSandBoat:base Apr 15, 2026
19 of 20 checks passed
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