int lVal = left.losModifiers().getValue(); int rVal = right.losModifiers().getValue();
int lVal = left.losModifiers(game).getValue(); int rVal = right.losModifiers(game).getValue();
    private static LosEffects losDivided(Game game, AttackInfo ai) {		Coords[] in = Compute.intervening(ai.attackPos, ai.targetPos);		LosEffects los = new LosEffects();		boolean targetInBuilding = false;		if (ai.targetEntity) {			targetInBuilding = Compute.isInBuilding(game, game.board.getHex(ai.targetPos).floor(), ai.targetPos);		}		            // If the target and attacker are both in a        // building, set that as the first LOS effect.		if ( targetInBuilding && Compute.isInBuilding( game, game.board.getHex(ai.attackPos).floor(), ai.attackPos ) ) {			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, ai, in[i], los.getThruBldg()) );        }                // if blocked already, return that        if (los.losModifiers().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, ai, in[i], los.getThruBldg());            LosEffects right = losForCoords( game, ai, 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.			final boolean isElevDiff = ai.attackAbsHeight != ai.targetAbsHeight;                        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 ( ai.targetInfantry && targetInBuilding ) {                if ( null == left.getThruBldg() ) {                    left.blocked = true;                }                else if ( null == right.getThruBldg() ) {                    right.blocked = true;                }            }                // which is better?            int lVal = left.losModifiers().getValue();            int rVal = right.losModifiers().getValue();            if (lVal > rVal || (lVal == rVal && left.isAttackerCover())) {                los = left;            } else {                los = right;            }        }                return los;    }