Skip to content

Conversation

@pavelbraginskiy
Copy link
Member

New side hit location tables and ammo explosion cap.

Copilot AI review requested due to automatic review settings September 10, 2025 04:58
@pavelbraginskiy pavelbraginskiy requested a review from a team as a code owner September 10, 2025 04:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements Playtest Package #1 Survivability Rules, introducing new side hit location tables and less lethal ammo explosions to improve unit survivability in BattleTech gameplay.

Key changes include:

  • New side hit location logic for all Mek types that uses front-facing hit tables and maps results to appropriate side locations
  • Ammo explosion damage cap system (20 damage normally, 10 with CASE) that blows out armor when exceeded
  • New game option to enable/disable these playtest rules

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
TWDamageManagerModular.java Adds ammo explosion damage cap logic with CASE considerations
TripodMek.java Implements new side hit location tables for tripod mechs
QuadMek.java Implements new side hit location tables and kick mechanics for quad mechs
Mek.java Implements base new side hit location tables for standard mechs
LandAirMek.java Implements new side hit location tables for land-air mechs
OptionsConstants.java Adds PLAYTEST_1 constant for the new option
GameOptions.java Adds playtest option to game configuration (currently enabled by default)
report-messages.properties Adds message strings for ammo explosion cap reports
messages.properties Adds UI text for the playtest option

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 18.51852% with 44 lines in your changes missing coverage. Please review.
✅ Project coverage is 28.84%. Comparing base (4d52b0a) to head (a17a2e4).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
...ek/server/totalWarfare/TWDamageManagerModular.java 0.00% 20 Missing and 1 partial ⚠️
megamek/src/megamek/common/units/QuadMek.java 10.00% 7 Missing and 2 partials ⚠️
megamek/src/megamek/common/units/Mek.java 53.84% 1 Missing and 5 partials ⚠️
megamek/src/megamek/common/units/TripodMek.java 20.00% 3 Missing and 1 partial ⚠️
megamek/src/megamek/common/units/LandAirMek.java 0.00% 3 Missing ⚠️
megamek/src/megamek/common/units/Entity.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7404      +/-   ##
============================================
- Coverage     28.84%   28.84%   -0.01%     
- Complexity    14147    14154       +7     
============================================
  Files          3087     3087              
  Lines        293522   293560      +38     
  Branches      50939    50955      +16     
============================================
+ Hits          84676    84679       +3     
- Misses       200922   200937      +15     
- Partials       7924     7944      +20     

☔ 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.

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace the multiple identical code blocks with a function, and move the option check out of applyPlaytestExplosionReduction() and up into the calling function.

@pavelbraginskiy
Copy link
Member Author

Copy link
Collaborator

@Sleet01 Sleet01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@HammerGS HammerGS merged commit 2be1ef7 into MegaMek:main Sep 11, 2025
7 checks passed
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.

3 participants