-
Notifications
You must be signed in to change notification settings - Fork 293
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 6395: Add knowledge of smoke zero damage to princess #6397
Fix 6395: Add knowledge of smoke zero damage to princess #6397
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6397 +/- ##
============================================
+ Coverage 28.56% 28.57% +0.01%
+ Complexity 14090 14088 -2
============================================
Files 2788 2785 -3
Lines 273454 273302 -152
Branches 48432 48414 -18
============================================
Hits 78104 78104
+ Misses 191367 191217 -150
+ Partials 3983 3981 -2 ☔ View full report in Codecov by Sentry. |
Converted to draft; I'm also adding Thunder, FASCAM, maybe a couple others as well |
0109f41
to
3533e20
Compare
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.
Checked with Co-Pilot and IDEA AI
Have the
WeaponFireInfo.computeExpectedDamage()
method return 0 if the associated munition is Smoke, Flare, or FASCAM/Thunder type.This should give Princess a better idea of the utility of some munitions when planning turns and attacks, so she chooses them less often.
Similarly, explicitly set the damage value of Smoke, Flare, or FASCAM/Thunder artillery munitions to 0 for Artillery fire control computations.
We can either replace this with a generalized Smoke or Utility Munition planner, or implement that at a higher level, but for now we don't want Princess to treat zero-damage rounds as if they do damage to targets.
This also fixes an NPE path in minefield handling, when artillery-deployed minefields are used in counter-battery attacks.
Unfortunately it looks like all counter-battery attacks currently compute an expected damage of 0.0, possibly due to the targets being off-board, so Princess still chooses munitions for these attacks randomly.
Additionally, add trailing spaces to the Glancing Blow and Direct Blow messages so that they produce lines like:
- Glancing Blow - 6 missile(s) hit
rather than
- Glancing Blow -6 missile(s) hit
which can be confusing.
Testing:
Close #6395