/** * QuadVees and LAMs may not have to make PSRs to avoid falling depending on their mode, * and Mechs using tracks for movement do not have to make PSRs for damage to gyro or leg * actuators. * * @param gyroLegDamage Whether the PSR is due to damage to gyro or leg actuators * @return true if the Mech can fall due to failed PSR. */ @Override public boolean canFall(boolean gyroLegDamage) { return !isProne() && !(gyroLegDamage && movementMode == EntityMovementMode.TRACKED); }
/** * Return the height of this mech above the terrain. */ @Override public int height() { return isProne() ? 0 : isSuperHeavy() ? 2 : 1; }
@Override public boolean canChangeSecondaryFacing() { if (hasQuirk(OptionsConstants.QUIRK_NEG_NO_TWIST)) { return false; } return !isProne(); }
@Override public boolean isPermanentlyImmobilized(boolean checkCrew) { // First check for conditions that would permanently immobilize *any* // entity; if we find any, we're already done. if (super.isPermanentlyImmobilized(checkCrew)) { return true; } // If we're prone and base walking MP -- adjusted for gravity and // modular armor since they're reasonably permanent but ignoring heat // effects -- have dropped to 0, we're stuck even if we still have // jump jets because we can't get up anymore to *use* them. if ((getWalkMP(true, true, false) <= 0) && isProne()) { return true; } // Gyro destroyed? TW p. 258 at least heavily implies that that counts // as being immobilized as well, which makes sense because the 'Mech // certainly isn't leaving that hex under its own power anymore. int hitsToDestroyGyro = (gyroType == GYRO_HEAVY_DUTY) ? 3 : 2; if (getGyroHits() >= hitsToDestroyGyro) { return true; } return false; }
Mockito.when(mockMech.isImmobile()).thenReturn(false); Mockito.when(mockMech.isShutDown()).thenReturn(false); Mockito.when(mockMech.isProne()).thenReturn(false); Mockito.when(mockMech.isStuck()).thenReturn(false); Mockito.when(mockMech.isStalled()).thenReturn(false); Mockito.when(mockMech.isProne()).thenReturn(true); Mockito.when(mockMech.cannotStandUpFromHullDown()).thenReturn(true); Assert.assertTrue(mockPrincess.isImmobilized(mockMech)); Mockito.when(mockMech.isProne()).thenReturn(true); Mockito.when(mockMech.cannotStandUpFromHullDown()).thenReturn(false); Assert.assertFalse(mockPrincess.isImmobilized(mockMech)); Mockito.when(mockMech.isImmobile()).thenReturn(false); Mockito.when(mockMech.isShutDown()).thenReturn(false); Mockito.when(mockMech.isProne()).thenReturn(true); Mockito.when(mockMech.cannotStandUpFromHullDown()).thenReturn(false); Assert.assertTrue(mockPrincess.isImmobilized(mockMech)); Mockito.when(mockMech.isImmobile()).thenReturn(false); Mockito.when(mockMech.isShutDown()).thenReturn(false); Mockito.when(mockMech.isProne()).thenReturn(false); Mockito.when(mockMech.isStuck()).thenReturn(true); Assert.assertFalse(mockPrincess.isImmobilized(mockMech)); Mockito.when(mockMech.isImmobile()).thenReturn(false); Mockito.when(mockMech.isShutDown()).thenReturn(false); Mockito.when(mockMech.isProne()).thenReturn(false);
if (isProne() || (curHex.terrainLevel(Terrains.WATER) >= 2)) { return getHeatCapacity();
&& isProne()) { switch (roll) { case 2: