Clamped Unit Rating Mod for CamOps (redux) #3933
Merged
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.
Current Implementation
Currently, CamOps Unit Rating is uncapped. AtB relies on Unit Rating to generate TN modifiers to a number of different functions.
Problem
With CamOps being uncapped, there is no upper or lower boundary to the modifiers which can create undesirable effects. Such as...
Solution
Using
MathUtility.clamp()
I have boundUnitRating
so fit within the lower/upper bounds of the FM:M Dragoon Rating System (F-A*). This is only limited to the above instances, so things likeUnit Report
are unaffected.All issues listed under 'Problems' have been closed by this PR.
Credit
Credit for this solution goes to https://github.com/SuperStucco. All I did was edit the
getUnitRatingMod
to ensure it applied to all uses ofgetUnitRatingMod
. This approach was suggested by Nick and replaces my earlier approach of editing on a case-by-case basis.Closes
Closes #3729
Closes #3817
Closes #3753