Fix PvP/PvE ratio caps and damage multiplier handling #125
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes PvP/PvE damage ratio handling by applying caps to aggregated attack and defense ratios instead of individual stats.
On retail, PvP/PvE attack and defense ratios (base + physical/magical modifiers) are capped only after aggregation.
Using per-stat lower/upper cap helpers would incorrectly clamp individual components and break valid mixed-stat configurations.
The final damage multiplier is additionally clamped to prevent negative or zero damage values, while upper bounds remain governed by stat caps.
lowerCapFor / upperCapFor functions operate on individual stats,
while PvP/PvE ratio limits on retail apply to the final aggregated value
(base + physical/magical modifiers).
Using per-stat caps would change valid configurations and result in incorrect behavior.
PvP Caps
PvE caps:
Final Damage Multiplier:
For example:
PvEDamageRatio + PvEDamageRatio_magical cap = 5000
PvPDamageRation min and max cap