Skip to content

[cpp, combat] Fix Ranged Weapon Rank Calculations#9678

Merged
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
9001-Solutions:9001/fix-ranged-weapon-rank
Mar 30, 2026
Merged

[cpp, combat] Fix Ranged Weapon Rank Calculations#9678
Xaver-DaRed merged 1 commit into
LandSandBoat:basefrom
9001-Solutions:9001/fix-ranged-weapon-rank

Conversation

@9001-Sols
Copy link
Copy Markdown
Contributor

@9001-Sols 9001-Sols commented Mar 27, 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?

Fixes the Weapon Rank calculation for Ranged weapons to use only the Ranged Weapon, instead of Ranged Weapon + Ammo

Steps to test these changes

  • Equip Yoichinoyumi and Demon Arrow and confirm weapon rank is only 9
  • Equip Annihilator and Silver Bullet and confirm weapon rank is only 5
  • Or more broadly, make sure Weapon Rank is floor(RANGE_WEAPON_DMG / 9) and doesn't include ammo (unless the throwable is an ammo, in which case it uses the throwable damage)
Before (Yoichinoyumi + Annihilator) After (Yoichinoyumi + Annihilator)
image image

@9001-Sols 9001-Sols changed the title Fix Ranged Weapon Rank [core] [combat] Fix Ranged Weapon Rank Mar 27, 2026
@9001-Sols 9001-Sols marked this pull request as ready for review March 27, 2026 18:02
@9001-Sols 9001-Sols changed the title [core] [combat] Fix Ranged Weapon Rank [cpp, combat] Fix Ranged Weapon Rank Mar 27, 2026
}

wDamage += weapon->getModifier(Mod::RANGED_DMG_RANK);
wDamage -= weapon->getModifier(Mod::DMG_RATING); // Company sword, Maneater, etc don't boost weapon rank
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.

Now that we just read the weapon damage directly for calculations, we don't need to subtract out the mod

@9001-Sols 9001-Sols changed the title [cpp, combat] Fix Ranged Weapon Rank [cpp, combat] Fix Ranged Weapon Rank Calculations Mar 27, 2026
@LandSandBoat LandSandBoat deleted a comment from github-actions Bot Mar 30, 2026
@Xaver-DaRed Xaver-DaRed merged commit a6d220e into LandSandBoat:base Mar 30, 2026
11 checks passed
@9001-Sols 9001-Sols deleted the 9001/fix-ranged-weapon-rank branch April 2, 2026 00:47
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