MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
134 stars 171 forks source link

[0.50.0-nightly] All non-KIA enemy personnel default marked as captured #4447

Closed ObviousTech closed 3 months ago

ObviousTech commented 4 months ago

Environment

mekhq 0.50 nightly snapshot from 7/20 UTC, downloaded 7/20. ("yesterday"'s, as a new build was posted in the last hour) Windows What java version are you using? Temurin-17.0.12+7 (build 17.0.12+7)

Description

Unsure if specific to AtB, but happens in AtB.

When finishing a megamek scenario, if the player controls the field, it goes through the salvage + capture screens. Normally, there is some roll to determine if each individual person is marked as captured. Some escape, some may be captured, with the rolled I believe modified by the number of hits they took. Currently, except the ones flagged as KIA, all enemy personnel on the board are getting default flagged as Captured, even those whose units were flagged as Escaped.

The relevant AtB rules: AtB Rules 2.32 xls, "Campaign System" tab, lines 839-843

Prisioners (sic)
After a battle, the side that controls the battlefield frequently captures surviving personel from the other side, the mercenary code
allows this personell(sic) to be ransomed.
To see if someone is captured, his/her unit must be destroyed or at least completely immobile after the battle (0 walking points)
and only in a result of 1 in a 1d6 roll the individual is captured – if wounded, each wound suffered applies -1 to the roll.

Potentially related options:

Campaign:

Megamek:

Files

all-captured.zip

mekhq save +related megamek save for the pending scenario, just do /victory on the megamek save to complete the scenario, then say you held the field

player name: Septiclover (septi-clover, not septic-lover)

IllianiCBT commented 4 months ago

Thanks for the report. This is actually working as intended.

When using the 'ejected pilots flee' all ejected pilots are considered to have been picked up at the end of the scenario. This was always the case, however there was a single missing line that caused picked up pilots to not be automatically captured. Now that bug has been fixed, you're seeing the expected behavior.

However, that said, I do think there should be some kind of dice-roll here. I'll take a look and see what I can do. Unfortunately, this area of the code is quite old and most definitely haunted. So the amount of changes I can make are somewhat limited.

IllianiCBT commented 4 months ago

Addendum to the above: "even those whose units were flagged as Escaped." I missed this line in my original reading. That's definitely a bug.

IllianiCBT commented 3 months ago

Closing as resolved (manually closing to make it easier for me to see what issues still need actioning).