Update ADA Missile to-hit mods to match RAW (as we understand them) #5034
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.
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:
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:
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: