Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended range bracket bug fix #6547 #6747

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

BLR-IIC
Copy link
Contributor

@BLR-IIC BLR-IIC commented Mar 22, 2025

This is a fix for bug #6547 . It appears that the original extreme range rules from Maximum Tech were applied to all the weapons in MegaMek regardless of the TacOps rules reference mentioned in the bug report. Originally, MaxTech said that the extreme ranges were double the medium range. This made it possible for some weapons to have extremely short extreme ranges, such as MRMs (15-hex long range, 16-hex extreme range). The writers seemed to realize that and updated the rule in TacOps.

To determine which weapons to check for correct extreme ranges, I scrolled down the energy, ballistic, and missile weapons lists in MegaMekLab for both IS and Clan experimental tech and noted the weapons that have unevenly distributed range brackets (example - 2/4/5 as opposed to 2/4/6 S/M/L ranges). I examined each file with uneven range brackets and corrected their extreme range values where needed. This includes the underwater extreme range values for lasers and PPCs.

I ran MegaMek through the Gradle run function in IntelliJ IDEA and spot-checked corrected weapons ranges on a MegaMek game board. It seems my fix works properly.

Copy link

codecov bot commented Mar 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 30.07%. Comparing base (baf3842) to head (355dd48).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6747   +/-   ##
=========================================
  Coverage     30.06%   30.07%           
- Complexity    15597    15605    +8     
=========================================
  Files          2872     2872           
  Lines        282720   282721    +1     
  Branches      49259    49259           
=========================================
+ Hits          85002    85020   +18     
+ Misses       192154   192136   -18     
- Partials       5564     5565    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@BLR-IIC BLR-IIC marked this pull request as draft March 22, 2025 18:05
@BLR-IIC
Copy link
Contributor Author

BLR-IIC commented Mar 22, 2025

I just realized that I missed a few weapons that had even range brackets but uneven underwater range brackets. I'm in the process of fixing that now, so I changed this PR to draft status.

@Scoppio
Copy link
Collaborator

Scoppio commented Apr 1, 2025

Are you still working on it?

@BLR-IIC
Copy link
Contributor Author

BLR-IIC commented Apr 1, 2025

The only thing I have left to check are BA and infantry weapons. Unfortunately I've had some other priorities come up. I'll see if I can get this wrapped up this week.

@gsparks3
Copy link
Collaborator

gsparks3 commented Apr 2, 2025

CI weapons don't follow the same rules in any case - they don't actually have short/medium/long range brackets at all, just a list of range modifiers vs range in hexes that varies depending on the base range of the weapon, and therefore cannot have an Extreme range. So, only the BA weapons to check, looks like?

@BLR-IIC BLR-IIC marked this pull request as ready for review April 5, 2025 20:41
@BLR-IIC
Copy link
Contributor Author

BLR-IIC commented Apr 5, 2025

I think I got all the weapons with extreme ranges fixed now.

@Scoppio Scoppio added the Data Hammertime. label Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Data Hammertime.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants