-
Notifications
You must be signed in to change notification settings - Fork 291
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
java.lang.IllegalArgumentException: Attacker or target not valid at megamek.common.actions.ThrashAttackAction.toHit #4949
Comments
From the MekHQ log
|
Thought about that too, but there should be no condition where there input parameter are null - so this check indicates some kind of a problem that would be masked if it treated it as impossible. If it's changed to return impossible instead of throwing an illegal argument error, then I would still recommend posting an error to the error log. |
ThrashAttack - is different than all the other attack actions when checking for physical attacks, the class gets newed up instead of the toHit function being static like all the others. ThrashAttack looks up the target and entity from the 'game' interface and not the entity and target passed into the constructor. I'm suspect the game object is out of sync with the target and entity the object it is constructed with. All the other 'toHit' methods on the Attack Actions are static and pass in and use the Entity ID and target. |
Environment
0.49.15
Windows 10
Java Vendor: Eclipse Adoptium
Java Version: 11.0.13
Description
I get the above error after clicking the 'Done' button at the end of the Round 15 Firing Phase.
Exact reproduction steps with the below campaign and MegaMek save file:
Files
Provide the .cpnx campaign file that this issue occurs in.
Poznan Heavy Lancers02.cpnx.gz
Also here is the MegaMek in-mission save file it occurs in.
BA_01.sav.gz
Provide any custom units that you are using in this campaign so that it will load on the developers machine.
Black Knight BL-7-KNT Hussar.zip
Provide any other files that you have customized in this campaign like the factions.xml for example.
I'm using the customized "Heavy" scenarios from Discord here: https://discord.com/channels/458705327911731231/1125131384835555491/1125151393515327498
scenariotemplates.zip
And provide the megamek.log and mekhq.log files for any NPEs or errors that MekHQ might be reporting.
mekhq.log
megamek.log
The text was updated successfully, but these errors were encountered: