Cluster artillery logic for when it doubles was poor#8150
Open
TenkawaBC wants to merge 3 commits intoMegaMek:mainfrom
Open
Cluster artillery logic for when it doubles was poor#8150TenkawaBC wants to merge 3 commits intoMegaMek:mainfrom
TenkawaBC wants to merge 3 commits intoMegaMek:mainfrom
Conversation
… into account Fortified or woods, not additional terrain types. I took the terrain types from the infantryInOpen check, removed the buildings and inversed it. Added new report line so that cluster artillery reports when it doubled when not in the open
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8150 +/- ##
============================================
- Coverage 29.91% 29.90% -0.01%
+ Complexity 17380 17379 -1
============================================
Files 3172 3172
Lines 307484 307537 +53
Branches 53752 53774 +22
============================================
- Hits 91990 91979 -11
- Misses 205901 205974 +73
+ Partials 9593 9584 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… place. Fixed long term bug in infantryInOpen with pavement preventing the open bonus. It should have only been if urban guerrilla SPA was selected.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates artillery/infantry damage handling to better match TO:AUE p.166 by improving “in the open” determination and expanding cluster-munition doubling logic beyond just woods/fortified hexes.
Changes:
- Fix
ServerHelper.infantryInOpen()logic around Urban Guerrilla + road/pavement so it only affects those terrain types. - Update cluster-munition artillery damage to double against conventional infantry whenever they are not “in the open” (excluding buildings) and add a corresponding report line.
- Add a new report message string (ID
6046) for the new cluster-doubling report.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
megamek/src/megamek/server/ServerHelper.java |
Corrects the Urban Guerrilla + pavement/road condition in the infantry “in open” check. |
megamek/src/megamek/common/weapons/handlers/AreaEffectHelper.java |
Replaces narrow terrain checks with a broader “not in open” check for cluster-munition doubling and emits a new report line. |
megamek/resources/megamek/common/report-messages.properties |
Adds report message 6046 used by the new report line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
megamek/src/megamek/common/weapons/handlers/AreaEffectHelper.java
Outdated
Show resolved
Hide resolved
31173a3 to
334d386
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It only into account Fortified or woods, not additional terrain types (eg: rough, jungle).
I took the terrain types from the infantryInOpen check, removed the buildings and inversed it.
Added new report line so that cluster artillery reports when it doubled when not in the open.
This was done as per TO:AUE p. 166. This should fix issue #8086.