Skip to content

Commit d10e8fa

Browse files
authored
Fix #7743: Let stacked ASF LAMs transform (#7765)
Fixes #7743 LAM extends (Biped) Mek, for these checks we shouldn't consider it a Mek, it's treated as a vehicle.
2 parents 28a709f + c99d0a4 commit d10e8fa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

megamek/src/megamek/common/compute/Compute.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,9 @@ public static Entity stackingViolation(Game game, Entity entering,
562562
return null;
563563
}
564564

565-
boolean isMek = (entering instanceof Mek)
565+
// LAM in fighter mode shouldn't be treated as a Mek for all this
566+
boolean isMek =
567+
((entering instanceof Mek) && !(entering instanceof LandAirMek lam && lam.getConversionMode() == LandAirMek.CONV_MODE_FIGHTER))
566568
|| (entering instanceof SmallCraft);
567569
boolean isLargeSupport = (entering instanceof LargeSupportTank)
568570
|| (entering instanceof Dropship)
@@ -667,9 +669,10 @@ public static Entity stackingViolation(Game game, Entity entering,
667669

668670
// If the entering entity is a mek, then any other mek in the hex is a violation. Unless grappled
669671
// (but chain whip grapples don't count) grounded small craft are treated as meks for purposes
670-
// of stacking
672+
// of stacking. A LAM in fighter mode is not treated like a mek for this.
671673
if (isMek
672-
&& (((inHex instanceof Mek) && (inHex
674+
&& ((((inHex instanceof Mek && !(entering instanceof LandAirMek lam
675+
&& lam.getConversionMode() == LandAirMek.CONV_MODE_FIGHTER))) && (inHex
673676
.getGrappled() != entering.getId() || inHex
674677
.isChainWhipGrappled()))
675678
|| (inHex instanceof SmallCraft))) {

0 commit comments

Comments
 (0)