MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
296 stars 286 forks source link

Losing gun emplacement deployment turns with vehicle lance movement on #5316

Closed AaronGullickson closed 6 months ago

AaronGullickson commented 6 months ago

If you have gun emplacements that need to be deployed and you have the vehicle lance movement option turned on, you will not be given enough turns to deploy all gun emplacements. In fact you will only be given a number of turns equal to the correct amount divided by the number of vehicles that move together in vehicle lance movement (rounded down).

This bug is easy to replicate. Load up a force consisting of four turrets and a map where they can be placed. Set vehicle lance movement to 2. You will only be able to place two turrets and then the deployment round will end.

It seems clear that turrets are being treated as vees for purposes of the number of deployment turns but they are not being treated as vees in terms of being able to deploy X units per turn. IIRC they are a subclass of vee, so likely somewhere a !(en instanceof GunEmplacement) is either missing or needs to be added.

AaronGullickson commented 6 months ago

This is likely the same bug as #4453 but is not a bot issue - it affects human players too.

gsparks3 commented 6 months ago

Duplicate of #3306 (although it's been enough versions since that was reported that knowing it's still active is useful).

AaronGullickson commented 6 months ago

Whoops, missed that one in my search.