Skip to content

fix: bonus attack coefficient broken for two-handed weapon classes#666

Merged
AngeloTadeucci merged 1 commit intomasterfrom
fix-bonus-attack-coefficient
Mar 6, 2026
Merged

fix: bonus attack coefficient broken for two-handed weapon classes#666
AngeloTadeucci merged 1 commit intomasterfrom
fix-bonus-attack-coefficient

Conversation

@AngeloTadeucci
Copy link
Collaborator

Two bugs in the bonus attack calculation caused 7/11 classes to deal drastically reduced damage:

  1. StatsManager.BonusAttackCoefficient had EquipSlot reads swapped — rightHandRarity read from EquipSlot.LH and leftHandRarity read from EquipSlot.RH. Two-handed weapons store in EquipSlot.RH as their primary slot, so the swapped reads made rightHandRarity=0, causing BonusAttack.Coefficient to return 0.

  2. BonusAttack.Coefficient early-returned the raw RarityMultiplier when leftHandRarity was 0, skipping the 4.96 * JobBonusMultiplier scaling. Two-handed classes got ~5.7x less bonus attack.

Affected classes: Berserker, Wizard, Archer, Heavy Gunner, Rune Blader, Striker, Soul Binder.

Two bugs in the bonus attack calculation caused 7/11 classes to deal
drastically reduced damage:

1. StatsManager.BonusAttackCoefficient had EquipSlot reads swapped —
   rightHandRarity read from EquipSlot.LH and leftHandRarity read
   from EquipSlot.RH. Two-handed weapons store in EquipSlot.RH as
   their primary slot, so the swapped reads made rightHandRarity=0,
   causing BonusAttack.Coefficient to return 0.

2. BonusAttack.Coefficient early-returned the raw RarityMultiplier
   when leftHandRarity was 0, skipping the 4.96 * JobBonusMultiplier
   scaling. Two-handed classes got ~5.7x less bonus attack.

Affected classes: Berserker, Wizard, Archer, Heavy Gunner, Rune Blader,
Striker, Soul Binder.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 6, 2026

Warning

Rate limit exceeded

@AngeloTadeucci has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 31 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 057771a1-18db-460c-bd7e-fd467dec5a99

📥 Commits

Reviewing files that changed from the base of the PR and between 6590f86 and f8351f4.

📒 Files selected for processing (2)
  • Maple2.Server.Core/Formulas/BonusAttack.cs
  • Maple2.Server.Game/Manager/StatsManager.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-bonus-attack-coefficient

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AngeloTadeucci AngeloTadeucci merged commit dc41f92 into master Mar 6, 2026
3 checks passed
@AngeloTadeucci AngeloTadeucci deleted the fix-bonus-attack-coefficient branch March 6, 2026 19:03
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.

1 participant