Use new roll dice, select casualties, and remove casualties steps #8087
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.
The Fire and FireAa classes are no longer used in building the 3 fire
sub steps.
The AirVsNonSubs step is removed because that firing group is now named
and will be displayed in the battle ui when it fires, selects, and
removes.
This is the last part of #7823
This will cause the step names in the battle UI to change because the new step classes generate slightly different names. Here's an example of the old names:
Here's what it looks now:
Notice that there is a "fire", "select", and "notify" line for all of the firing groups.
Another change is how "air vs subs" is displayed in the Battle UI. Previously, a single line was shown "Air defend non subs" or "Air attack non subs". Here's an example:
Now, that line is no longer going to be shown and instead each of the firing groups get their own set of "fire", "select", and "remove". I've added special coding to detect the air vs subs to give it a better name. Here's what it looks like now:
In addition to the new names, the Battle UI will actually highlight them. So when there is different firing groups, each time the dice is rolled, it will highlight which firing group is doing it. It previously worked this way only for AA firing groups. If there were multiple other groups, it would just highlight the same " fire" line or " select casualties" until all the groups were done.
Testing
I've run a Hard AI run of WWII 1940 world for 12 rounds. No errors were found.
I ran multiple of my old saves to verify compatibility. There is potentially some issues if some of the new step names don't match the old step names. I've fixed most of them but there might be some really rare cases. If these issues do happen, the UI will just say that " wasn't found" and continue. And this will only affect the current round of the save game. So it should be very minor.
I ran AA flyover battles, strategic bombing battles, amphibious, land, sea, and sub battles.
Screens Shots
Additional Notes to Reviewer
Release Note
CHANGE|Battle step strings in Battle UI have been updated to indicate all of the possible offensive and defensive groups that are participating. Instead of one "British fire", there could be multiple "British units fire" depending on canNotTarget, canNotBeTargetedBy, subs, typeAA, etc