public static LosEffects losDivided(Game game, int attackerId, Targetable target) {
public static LosEffects losDivided(Game game, int attackerId, Targetable target, boolean underWaterCombat) {
    public static LosEffects losDivided(Game game, int attackerId, Targetable target) {        final Entity ae = game.getEntity(attackerId);        Coords[] in = intervening(ae.getPosition(), target.getPosition());        LosEffects los = new LosEffects();        boolean targetInBuilding = false;        if ( target instanceof Entity ) {            targetInBuilding = isInBuilding(game, (Entity) target);        }        final boolean isElevDiff =             ( ae.getElevation() != target.getElevation() );        // If the target and attacker are both in a        // building, set that as the first LOS effect.        if ( targetInBuilding && isInBuilding( game, ae ) ) {            los.setThruBldg( game.board.getBuildingAt( in[0] ) );        }        // add non-divided line segments        for (int i = 3; i < in.length - 2; i += 3) {            los.add( losForCoords(game, attackerId, target,                                  in[i], los.getThruBldg()) );        }                // if blocked already, return that        if (losModifiers(los).getValue() == ToHitData.IMPOSSIBLE) {            return los;        }                // go through divided line segments        for (int i = 1; i < in.length - 2; i += 3) {            // get effects of each side            LosEffects left = losForCoords( game, attackerId, target,                                             in[i], los.getThruBldg() );            LosEffects right = losForCoords( game, attackerId, target,                                             in[i+1], los.getThruBldg() );            // If a target Entity is at a different elevation as its            // attacker, and if the attack is through a building, the            // target has cover.            if ( targetInBuilding && isElevDiff ) {                 if ( null != left.getThruBldg() ) {                     left.setTargetCover(true);                 }                 if ( null != right.getThruBldg() ) {                     right.setTargetCover(true);                 }            }            // Include all previous LOS effects.            left.add(los);            right.add(los);            // Infantry inside a building can only be            // targeted by units in the same building.            if ( target instanceof Infantry &&                 targetInBuilding ) {                if ( null == left.getThruBldg() ) {                    left.blocked = true;                }                else if ( null == right.getThruBldg() ) {                    right.blocked = true;                }            }            // which is better?            int lVal = losModifiers(left).getValue();            int rVal = losModifiers(right).getValue();            if (lVal > rVal || (lVal == rVal && left.isAttackerCover())) {                los = left;            } else {                los = right;            }        }                return los;    }