boolean targetOffBoard = !game.getBoard().contains(target.getPosition()); boolean targetUnderWater; boolean targetInWater; boolean targetOnLand; if (targetOffBoard) { targetUnderWater = true; targetInWater = false; targetOnLand = true; } else { targetUnderWater = targetHex.containsTerrain(Terrains.WATER) && targetHex.depth() > 0 && targEl < targetHex.surface(); targetInWater = targetHex.containsTerrain(Terrains.WATER) && targetHex.depth() > 0 && targEl == targetHex.surface(); targetOnLand = !(targetUnderWater || targetInWater); }  boolean underWaterCombat = targetUnderWater || attUnderWater;  ai.attUnderWater = attUnderWater; ai.attInWater = attInWater; ai.attOnLand = attOnLand; ai.targetUnderWater = targetUnderWater; ai.targetInWater = targetInWater; ai.targetOnLand = targetOnLand; ai.underWaterCombat = underWaterCombat; ai.attOffBoard = attOffBoard;  return calculateLos(game, ai);
    public static LosEffects calculateLos(IGame game, AttackInfo ai) {                if (ai.attOffBoard) {            LosEffects los = new LosEffects();            los.blocked = true;            return los;        }        if (ai.attOnLand && ai.targetUnderWater ||            ai.attUnderWater && ai.targetOnLand) {            LosEffects los = new LosEffects();            los.blocked = true;            return los;                     }                double degree = ai.attackPos.degree(ai.targetPos);        if (degree % 60 == 30) {            return LosEffects.losDivided(game, ai);        } else {            return LosEffects.losStraight(game, ai);        }    }