Examples of IHex


Examples of megamek.common.IHex

            return;
        }

        int smokeLevel = 0;
        for (Coords smokeCoords : coords) {
            IHex smokeHex = game.getBoard().getHex(smokeCoords);
            Report r;
            if (smokeHex == null) {
                continue;
            }
            // Have to check if it's inferno smoke or from a heavy/hardened
            // building
            // - heavy smoke from those
            if (bInferno
                    || (Building.MEDIUM < smokeHex.terrainLevel(Terrains.FUEL_TANK))
                    || (Building.MEDIUM < smokeHex.terrainLevel(Terrains.BUILDING))) {
                if (smokeHex.terrainLevel(Terrains.SMOKE) == 2) {
                    // heavy smoke fills hex
                    r = new Report(5180, Report.PUBLIC);
                    r.add(smokeCoords.getBoardNum());
                    addReport(r);
                    smokeLevel = 2;
                } else {
                    smokeLevel = Math.max(smokeLevel, 2);;
                    r = new Report(5185, Report.PUBLIC);
                    r.add(smokeCoords.getBoardNum());
                    addReport(r);
                    smokeLevel = 2;
                }
            } else {
                if (smokeHex.terrainLevel(Terrains.SMOKE) == 2) {
                    // heavy smoke overpowers light
                    r = new Report(5190, Report.PUBLIC);
                    r.add(smokeCoords.getBoardNum());
                    smokeLevel = Math.max(smokeLevel, 1);
                    addReport(r);
                } else if (smokeHex.terrainLevel(Terrains.SMOKE) == 1) {
                    // light smoke continue to fill hex
                    r = new Report(5195, Report.PUBLIC);
                    r.add(smokeCoords.getBoardNum());
                    addReport(r);
                    smokeLevel = Math.max(smokeLevel, 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.