toHit.addModifier(4, "Sensors Completely Destroyed for Torso-Mounted Cockpit");
toHit = new ToHitData(ToHitData.IMPOSSIBLE, "Sensors Completely Destroyed for Torso-Mounted Cockpit"); return;
    protected static void setCommonModifiers(ToHitData toHit, IGame game, Entity ae, Targetable target) {        int attackerId = ae.getId();        int targetId = target.getTargetId();        // Battle Armor targets are hard for Meks and Tanks to hit.        if ( target instanceof BattleArmor ) {            toHit.addModifier( 1, "battle armor target" );        }        // attacker movement        toHit.append(Compute.getAttackerMovementModifier(game, attackerId));        // attacker terrain        toHit.append(Compute.getAttackerTerrainModifier(game, attackerId));        // target terrain        toHit.append(Compute.getTargetTerrainModifier(game, target));        // If it has a torso-mounted cockpit and two head sensor hits or three sensor hits...        // It gets a =4 penalty for being blind!        if (((Mech)ae).getCockpitType() == Mech.COCKPIT_TORSO_MOUNTED) {            int sensorHits = ae.getBadCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_SENSORS, Mech.LOC_HEAD);            int sensorHits2 = ae.getBadCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_SENSORS, Mech.LOC_CT);            if ((sensorHits + sensorHits2) == 3) {                toHit.addModifier(4, "Sensors Completely Destroyed for Torso-Mounted Cockpit");            } else if (sensorHits == 2) {                toHit.addModifier(4, "Head Sensors Destroyed for Torso-Mounted Cockpit");            }        }                // target immobile        toHit.append(Compute.getImmobileMod(target));        toHit.append(nightModifiers(game, target, null, ae));        if ( target.getTargetType() == Targetable.TYPE_ENTITY ) {            //Checks specific to entity targets            Entity te = (Entity) target;            // target movement            toHit.append(Compute.getTargetMovementModifier(game, targetId));            // target prone            if (te.isProne()) {                toHit.addModifier(-2, "target prone and adjacent");            }            IHex targHex = game.getBoard().getHex(te.getPosition());            // water partial cover?            if (te.height() > 0                    && te.getElevation() == -1                    && targHex.terrainLevel(Terrains.WATER) == te.height()) {                toHit.addModifier(3, "target has partial cover");            }                        //Pilot skills            Compute.modifyPhysicalBTHForAdvantages(ae, te, toHit, game);        }                }