-
Notifications
You must be signed in to change notification settings - Fork 286
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
Princess - enhanced anti-Mech targeting #5602
Princess - enhanced anti-Mech targeting #5602
Conversation
…e (primarily from player MekHQ units)
…s against immobile targets will exclude the possibility of called shots for balance purposes.
I have zero idea how to add UI stuff. Lets keep this to climbing one small Matterhorn at a time... It's also not that far off what was originally put in for ye olde TestBot back in the day, just a little more elegant and less brute force. |
The Java UI stuff is embarrassingly simple and straightforward, it's mostly just a lot of stultifying boilerplate. |
…argeting # Conflicts: # megamek/src/megamek/client/bot/princess/Princess.java
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5602 +/- ##
============================================
- Coverage 29.31% 29.28% -0.03%
Complexity 13803 13803
============================================
Files 2461 2461
Lines 262667 262977 +310
Branches 47006 47118 +112
============================================
+ Hits 77007 77024 +17
- Misses 181803 182095 +292
- Partials 3857 3858 +1 ☔ View full report in Codecov by Sentry. |
…type filtering logic.
… enhanced targeting only applies when all fire is against a single target.
…evel target type from Mech to Entity
Big push from working on the last couple of requests. Most of the code has been pulled out of the host method and into various other methods. In the process the target/attacker type limits have been slightly rewired, while there isn't any new ability to handle selecting aim locations or called shot directions for non-Mech targets it is now much easier to add them later. I've plumbed in a lot of system controls, including an overall on/off switch, with the defaults matching the original PR specs. That should make it easier if someone chooses to wire them into a UI at some future point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor typo in a comment, otherwise looks good. Looking forward to trying it out!
+ PR #5652: Fix ammo carrier issue that prevents Princess from firing ammo-based weapons + PR #5602: Princess - enhanced anti-Mech targeting + PR #5592: Cleanup and disentangle (TilesetManager, Client, BoardView) + PR #5591: Only consider MM internal dirs when creating the official unit list + PR #5570: ScenarioV2 extension, sky map
This PR enables Princess to take aimed shots and, if the option is enabled, use TacOps called shots. This will mostly come into play late in a game as Princess starts to take advantage of Mechs that have reduced or no armor in some locations although skilled units that mount a targeting computer and powerful ranged weapons may start taking immediate advantage to 'thin the herd'.
There is one point to note in the code - the setting of a called shot is entirely set up for the single-button toggle-through system for human players. A TODO has been left to indicate where it would be better to have a single send notification deliver the called shot setting rather than sending the change notification multiple times to toggle through.