@Override public int getMaxElevationChange() { if (isAirborne()) { return 999; } return 1; }
@Override public int getRunMP(boolean gravity, boolean ignoreheat, boolean ignoremodulararmor) { // if aeros are on the ground, they can only move at cruising speed if (!isAirborne()) { return getWalkMP(gravity, ignoreheat, ignoremodulararmor); } return super.getRunMP(gravity, ignoreheat, ignoremodulararmor); }
@Override public boolean isImmobile() { // aeros are never immobile when in the air or space if (isAirborne() || isSpaceborne()) { return false; } return super.isImmobile(); }
@Override public int getElevation() { if ((game != null) && game.getBoard().inSpace()) { return 0; } // Altitude is not the same as elevation. If an aero is at 0 altitude, // then it is // grounded and uses elevation normally. Otherwise, just set elevation // to a very // large number so that a flying aero won't interact with the ground // maps in any way if (isAirborne()) { return 999; } return super.getElevation(); }
if (!isAirborne()) { j = j / 2; if (isSpheroid()) {
@Override public boolean canSpot() { // per a recent ruling on the official forums, aero units can't spot // for indirect LRM fire, unless they have a recon cam, an infrared or // hyperspec imager, or a high-res imager and it's not night if (!isAirborne() || hasWorkingMisc(MiscType.F_RECON_CAMERA) || hasWorkingMisc(MiscType.F_INFRARED_IMAGER) || hasWorkingMisc(MiscType.F_HYPERSPECTRAL_IMAGER) || (hasWorkingMisc(MiscType.F_HIRES_IMAGER) && ((game.getPlanetaryConditions().getLight() == PlanetaryConditions.L_DAY) || (game.getPlanetaryConditions().getLight() == PlanetaryConditions.L_DUSK)))) { return true; } else { return false; } }
@Override public boolean isLocationProhibited(Coords c, int currElevation) { if (isAirborne()) { return false; } IHex hex = game.getBoard().getHex(c); // Additional restrictions for hidden units if (isHidden()) { // Can't deploy in paved hexes if (hex.containsTerrain(Terrains.PAVEMENT) || hex.containsTerrain(Terrains.ROAD)) { return true; } // Can't deploy on a bridge if ((hex.terrainLevel(Terrains.BRIDGE_ELEV) == currElevation) && hex.containsTerrain(Terrains.BRIDGE)) { return true; } // Can't deploy on the surface of water if (hex.containsTerrain(Terrains.WATER) && (currElevation == 0)) { return true; } } // grounded aeros have the same prohibitions as wheeled tanks return hex.containsTerrain(Terrains.WOODS) || hex.containsTerrain(Terrains.ROUGH) || ((hex.terrainLevel(Terrains.WATER) > 0) && !hex.containsTerrain(Terrains.ICE)) || hex.containsTerrain(Terrains.RUBBLE) || hex.containsTerrain(Terrains.MAGMA) || hex.containsTerrain(Terrains.JUNGLE) || (hex.terrainLevel(Terrains.SNOW) > 1) || (hex.terrainLevel(Terrains.GEYSER) == 2); }
if (!(game.getBoard().inSpace() || (atmoCond == PlanetaryConditions.ATMO_VACUUM)) && isAirborne()) { prd.addModifier(+2, "Atmospheric operations");
&& ((Aero) ce()).isAirborne() && (cmd.getFinalNDown() == 0) && (cmd.getMpUsed() == 0) && !cmd.contains(MoveStepType.VLAND)) { ConfirmDialog nag = new ConfirmDialog(clientgui.frame,