if (null != hex && entity.locationIsLeg(loc)) {  phaseReport.append (desc.toString()); desc = new StringBuffer(); PilotingRollData rollTarget = entity.checkWaterMove (hex.levelOf(Terrain.WATER)); doSkillCheckInPlace(entity, rollTarget); }
    private String breachLocation(Entity entity, int loc, Hex hex) {        StringBuffer desc = new StringBuffer();        if (entity.getInternal(loc) < 0 ||            entity.getLocationStatus(loc) < Entity.LOC_NORMAL) {            //already destroyed or breached? don't bother            return desc.toString();        }        desc.append( " <<<" )            .append( entity.getShortName() )			.append( " ")			.append( entity.getLocationAbbr(loc) )            .append( " BREACHED>>>" );        if (entity instanceof Tank) {            desc.append( destroyEntity(entity, "hull breach in vacuum", true, true) );            return desc.toString();        }        // equipment and crits will be marked in applyDamage?        // equipment marked missing        for (Enumeration i = entity.getEquipment(); i.hasMoreElements();) {            Mounted mounted = (Mounted)i.nextElement();            if (mounted.getLocation() == loc) {                mounted.setBreached(true);            }        }        // all critical slots set as useless        for (int i = 0; i < entity.getNumberOfCriticals(loc); i++) {            final CriticalSlot cs = entity.getCritical(loc, i);            if (cs != null) {                cs.setBreached(true);            }        }        //Check location for engine/cockpit breach and report accordingly        if (loc == Mech.LOC_CT) {            desc.append( destroyEntity(entity, "hull breach") );        }        if (loc == Mech.LOC_HEAD) {            entity.crew.setDoomed(true);            desc.append( destroyEntity(entity, "hull breach") );            desc.append( "\n*** " )                .append( entity.getDisplayName() );            if (entity.getLocationStatus(loc) == Entity.LOC_WET)            	desc.append( " Pilot Drowned! ***" );            else desc.append( " Pilot died to explosive decompression! ***");        }        //if it's a leg, apply PSRs for actuators        if (null != hex && entity.locationIsLeg(loc)) {            // Record the results to the phase report before resolving the PSR            phaseReport.append (desc.toString());            desc = new StringBuffer();            PilotingRollData rollTarget =                entity.checkWaterMove (hex.levelOf(Terrain.WATER));            doSkillCheckInPlace(entity, rollTarget);        }        // Set the status of the location.        // N.B. if we set the status before rolling water PSRs, we get a        // "LEG DESTROYED" modifier; setting the status after gives a hip        // actuator modifier.        entity.setLocationStatus(loc, Entity.LOC_BREACHED);        // Did the hull breach destroy the engine?        if (entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_LT) +        	entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_CT) +			entity.getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_RT) >= 3) {        	desc.append( destroyEntity(entity, "engine destruction") );        }        return desc.toString();    }