if (mounted.getType() == MiscType.HEAT_SINK && !mounted.isDestroyed() && (mounted.getLocation() == Mech.LOC_RLEG || mounted.getLocation() == Mech.LOC_LLEG)) {
if (mounted.getType() == MiscType.HEAT_SINK && !mounted.isDestroyed() && locationIsLeg(mounted.getLocation()) ) {
    public int getHeatCapacityWithWater(Game game) {        int capacity = getHeatCapacity();        int sinksUnderwater = 0;        final Hex curHex = game.board.getHex(getPosition());        // are we even in water?  is it depth 1+        if (curHex.getTerrainType() != Terrain.WATER            || curHex.getElevation() >= 0) {            return capacity;        } else if (curHex.getElevation() == -1) {            for (Enumeration i = miscList.elements(); i.hasMoreElements();) {                Mounted mounted = (Mounted)i.nextElement();                if (mounted.getType() == MiscType.HEAT_SINK && !mounted.isDestroyed()                && (mounted.getLocation() == Mech.LOC_RLEG || mounted.getLocation() == Mech.LOC_LLEG)) {                    sinksUnderwater++;                }            }        } else if (curHex.getElevation() <= -2) {            sinksUnderwater = getHeatCapacity();        }                return capacity + Math.min(sinksUnderwater, 6);    }