Added Skill Check Dialog Using New Centralized Skill Check Utility#6578
Merged
IllianiBird merged 6 commits intoMegaMek:masterfrom Apr 11, 2025
IllianiBird:skillCheckDialog
Merged
Added Skill Check Dialog Using New Centralized Skill Check Utility#6578IllianiBird merged 6 commits intoMegaMek:masterfrom IllianiBird:skillCheckDialog
IllianiBird merged 6 commits intoMegaMek:masterfrom
IllianiBird:skillCheckDialog
Conversation
- Implemented new skill check feature, including UI updates and backend logic. - Refactored `SkillType`, `SkillCheckUtility` `MarginOfSuccess` enums to remove a handful of bugs or to add new functionality.
… failure images based on skill check results.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6578 +/- ##
============================================
- Coverage 11.43% 11.42% -0.01%
- Complexity 6451 6456 +5
============================================
Files 1086 1087 +1
Lines 139459 139560 +101
Branches 21571 21584 +13
============================================
+ Hits 15948 15950 +2
- Misses 121914 122015 +101
+ Partials 1597 1595 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…flect the change in current edge.
rjhancock
requested changes
Apr 11, 2025
Comment on lines
+1
to
+7
| package mekhq.gui.dialog; | ||
|
|
||
| import static megamek.common.Compute.randomInt; | ||
| import static mekhq.campaign.personnel.skills.SkillCheckUtility.determineTargetNumber; | ||
| import static mekhq.utilities.MHQInternationalization.getFormattedTextAt; | ||
|
|
||
| import java.awt.GridBagConstraints; |
…e beginning of the SkillCheckDialog.java file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Dev Notes
As mentioned in the title, this PR adds the ability for players to trigger Skill Checks at will. This is done by right-clicking on the character (or characters) and selecting 'Perform Skill Check', at which point the player is presented with a dialog where they can choose the skill and modifiers. They can also choose whether to use Edge, in the event of a failure.
Once the check has been set up the player is then presented with a second dialog showing the results of the check.
This functionality all uses our new centralized Skill Check utility class, ensuring that SPAs, traits, and attribute scores are all correctly factored into the target number.
Placeholder Art
This PR uses placeholder AI Generated art assets. A human artist has already been commissioned and expects to have the pieces ready by the launch of 50.05. Three pieces have been commissioned, the first is for the page where the user selects skill. Then there are two follow-up pieces one for when the check passes, another for when the check fails.
Ulterior Motives
Really I just wanted to test the new centralized Skill Check class and fix any bugs. That we get a fancy new dialog out of it is just a cherry on top of an unintentional cake.