public boolean canGoDown(int assumedElevation,Coords assumedPos) { boolean inWaterOrWoods = false; IHex hex = getGame().getBoard().getHex(assumedPos); int altitude = assumedElevation+hex.surface(); int minAlt = hex.surface(); if(hex.containsTerrain(Terrains.WOODS) || hex.containsTerrain(Terrains.WATER) || hex.containsTerrain(Terrains.JUNGLE)) { inWaterOrWoods=true; } switch(getMovementMode()) { case IEntityMovementMode.INF_JUMP: case IEntityMovementMode.INF_LEG: case IEntityMovementMode.INF_MOTORIZED: minAlt -= Math.max(0, hex.terrainLevel(Terrains.BLDG_BASEMENT)); break; case IEntityMovementMode.VTOL: minAlt = hex.ceiling(); if(inWaterOrWoods) { minAlt++; } break; case IEntityMovementMode.SUBMARINE: minAlt = hex.floor(); break; default: return false; } return (altitude > minAlt);
public boolean canGoDown() { return canGoDown(elevation,getPosition());
    public boolean canGoDown(int assumedElevation,Coords assumedPos) {        boolean inWaterOrWoods = false;        IHex hex = getGame().getBoard().getHex(assumedPos);        int altitude = assumedElevation+hex.surface();        int minAlt = hex.surface();        if(hex.containsTerrain(Terrains.WOODS) || hex.containsTerrain(Terrains.WATER) || hex.containsTerrain(Terrains.JUNGLE)) {            inWaterOrWoods=true;        }        switch(getMovementMode()) {        case IEntityMovementMode.INF_JUMP:        case IEntityMovementMode.INF_LEG:        case IEntityMovementMode.INF_MOTORIZED:            minAlt -= Math.max(0, hex.terrainLevel(Terrains.BLDG_BASEMENT));            break;        case IEntityMovementMode.VTOL:            minAlt = hex.ceiling();            if(inWaterOrWoods) {                minAlt++; //can't land here            }            break;        case IEntityMovementMode.SUBMARINE:            minAlt = hex.floor();            break;        default:            return false;        }        return (altitude > minAlt);    }