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

Update ADA Missile to-hit mods to match RAW (as we understand them) #5034

Merged
merged 4 commits into from
Jan 13, 2024

Conversation

Sleet01
Copy link
Collaborator

@Sleet01 Sleet01 commented Jan 10, 2024

A recent conversation showed that I probably had not properly implemented all of the relevant To-Hit mods for Air-Defense Arrow IV Missiles in MegaMek:

As far as I can tell, a unit firing an ADA at a fighter over their own map would have the following calculations:

Gunnery +
Attacker Movement +
Angle of Attack(side if you're not on the flight path, nose if you are) +
Flak (-2) +
NOE (+3) (if applicable) +
Any relevant attacker crits +
Evasion (+3) (if applicable)

Plus the special ADA Missile range bands, and possibly Stealth Armor.
Looking at the Aerospace Attack Modifiers Table (TW. pg 237) we are likely also missing "Target is at Zero Velocity" and "Target is Conducting Air-To-Ground Attack This Turn".

Due to some confusion between the Flak Artillery rules and the Total Warfare Flak rules, the current implementation does not include:

  • AoA Nose/Side/Aft (+1/+2/+0)
  • Nap-of-the-Earth overhead/distant (+1/+3)
  • Evasion for ASF/Small Craft/Large Craft (+3/+2/+1)
  • Target Aerospace unit currently attacking a ground target (-3)
  • Stealth Armor, variable for range (+0/+1/+2)
  • Target at Zero Velocity (-2)
  • Target conducting A2G attack this turn (-3)

The VTOL to-hit calculations are likely also missing some mods, namely TMM.
The "Below" table logic also needed to be reversed.

Another user previously posted a forum question asking for clarification of the exact mods that apply to ADA Missile attacks, here, but after discussing the topic with more players I'm going to go ahead with this PR on the assumption that most - if not all - points are correct.

I will likely submit another, more compact, patch after determining how best to place the ADA range calculations in the normal to-hit code path as opposed to handling it all as a special case.

Testing:

  • Verified with ADA Missile units against a variety of targets.
  • Ran all MegaMek unit tests.

@Sleet01 Sleet01 requested a review from NickAragua January 10, 2024 04:49
@SJuliez SJuliez merged commit 618b650 into MegaMek:master Jan 13, 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.

3 participants