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

Fix 5204: Fighter Squadron weapon crits and group damage application #5251

Merged

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Mar 15, 2024

This fixes the NPE caused when Capital Fighters take weapon crits; it also:

  • completes the missing squadron addition functionality (required to properly get the FighterSquadron back from a single Capital Fighter in the squadron);
  • implements part of the currently-broken Squadron-wide damage application (used for tracking damage for MekHQ purposes, reportedly).

The other problem from that issue, Warships unable to engage at Medium or greater range, could not be reproduced and was likely fixed in a previous PR.

TODO: There is still a lot of work to do on Capital Fighters:

  1. Weapon crits may or may not actually halve the damage for wings after a Weapon Critical is applied.
  2. I have no idea how to split units off from a Squadron other than letting them die.
  3. It looks like arbitrary squadron sizes are allowed, but I have not confirmed this yet.
  4. Unknown how well single-fighter Capital Fighters will actually operate.

Testing:

  • Ran all 3 projects' unit tests
  • Loaded the failing save in 0.49.18, exported the units as MULs, loaded into 0.49.19 with and without fixes for comparison

Close #5204

@BLR-IIC
Copy link

BLR-IIC commented Mar 15, 2024

The other problem from that issue, Warships unable to engage at Medium or greater range, could not be reproduced and was likely fixed in a previous PR.

This was apparently fixed in #5195 . Nice job here!

@SJuliez SJuliez merged commit 9dc392a into MegaMek:master Mar 20, 2024
4 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.

0.49.18 Space Battle Uncaught Exception with Warship Attacking Fighter Squadron
3 participants