Skip to content

[lua] Fix edge cases that report incorrect misses for mob/weaponskill#9694

Merged
WinterSolstice8 merged 1 commit into
LandSandBoat:basefrom
WinterSolstice8:weaponskill_edgecase
Mar 31, 2026
Merged

[lua] Fix edge cases that report incorrect misses for mob/weaponskill#9694
WinterSolstice8 merged 1 commit into
LandSandBoat:basefrom
WinterSolstice8:weaponskill_edgecase

Conversation

@WinterSolstice8
Copy link
Copy Markdown
Contributor

@WinterSolstice8 WinterSolstice8 commented Mar 31, 2026

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?

Weaponskills and mobskills could report a "miss" even if the WS didn't actually miss, you just dealt zero damage

Steps to test these changes

Give a mob or yourself invincible, test mobskill/weaponskill reporting 0 damage

also check miss still works
image
image


-- Do the extra hit for our offhand if applicable
if calcParams.extraOffhandHit and hitsDone < 8 and finaldmg < targetHp then
calcParams.hitsLanded = 0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was being reset for no reason. It's only incremented inside getSingleHitDamage and was previously checked nowhere else.


while hitsDone < 8 and offhandMultiHitsDone < numOffhandMultis and finaldmg < targetHp do
local offhandDmg = calcParams.weaponDamage[2] + calcParams.fSTR + wsc * alpha
calcParams.hitsLanded = 0
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was being reset for no reason. It's only incremented inside getSingleHitDamage and was previously checked nowhere else.

@WinterSolstice8 WinterSolstice8 merged commit fd93f9a into LandSandBoat:base Mar 31, 2026
11 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.

2 participants