if((assumedElevation == bldcur && climb)
if((assumedElevation == bldcur && climb && (this instanceof Mech))
    public int calcElevation(IHex current, IHex next, int assumedElevation, boolean climb) {        int retVal = assumedElevation;        if ((getMovementMode() == IEntityMovementMode.SUBMARINE)                || (getMovementMode() == IEntityMovementMode.VTOL)) {            retVal += current.surface();            retVal -= next.surface();        } else {            if ((getMovementMode() != IEntityMovementMode.HOVER)                    && (getMovementMode() != IEntityMovementMode.NAVAL)                    && (getMovementMode() != IEntityMovementMode.HYDROFOIL)) {                int prevWaterLevel = 0;                if (current.containsTerrain(Terrains.WATER)) {                    prevWaterLevel = current.terrainLevel(Terrains.WATER);                    if(!(current.containsTerrain(Terrains.ICE))                             || assumedElevation < 0) {                        //count water, only if the entity isn't on ice surface                        retVal += current.terrainLevel(Terrains.WATER);                                        }                }                if (next.containsTerrain(Terrains.WATER)) {                    int waterLevel = next.terrainLevel(Terrains.WATER);                    if(next.containsTerrain(Terrains.ICE)) {                        //a mech can only climb out onto ice in depth 2 or shallower water                        //mech on the surface will stay on the surface                                                if((waterLevel == 1 && prevWaterLevel == 1)                            || (prevWaterLevel <= 2 && climb)                            || assumedElevation >= 0) {                            retVal += waterLevel;                        }                    }                    retVal -= waterLevel;                }            }            if(next.containsTerrain(Terrains.BUILDING)                   || current.containsTerrain(Terrains.BUILDING)) {                int bldcur = Math.max(0, current.terrainLevel(Terrains.BLDG_ELEV));                int bldnex = Math.max(0, next.terrainLevel(Terrains.BLDG_ELEV));                if((assumedElevation == bldcur && climb)                    || retVal > bldnex) {                    retVal = bldnex;                }            }            if((getMovementMode() != IEntityMovementMode.NAVAL)                    && (getMovementMode() != IEntityMovementMode.HYDROFOIL)                    && (next.containsTerrain(Terrains.BRIDGE)                            || current.containsTerrain(Terrains.BRIDGE))) {                int brdnex = Math.max(-(next.depth()), next.terrainLevel(Terrains.BRIDGE_ELEV));                if(Math.abs((next.surface() + brdnex) - (current.surface() + assumedElevation))<= getMaxElevationChange()) {                    //bridge is reachable at least                    if(climb                            || Math.abs((next.surface() + retVal) - (current.surface() + assumedElevation)) > getMaxElevationChange()                            || !isElevationValid(retVal, next)) {                        //use bridge if you can't use the base terrain or if you prefer to by climb mode                        retVal = brdnex;                    }                }            }        }        return retVal;    }