Package megamek.common

Examples of megamek.common.LandAirMech


     * @param ce
     *            the current entity
     */
    private void updateTransformationButtons(Entity ce) {
        if (ce instanceof LandAirMech) {
            final LandAirMech lam = (LandAirMech) ce;

            setLAMmechModeEnabled(lam.canConvertToMech());
            setLAMairmechModeEnabled(lam.canConvertToAirmech());
            setLAMaircraftModeEnabled(lam.canConvertToAircraft());
        } else {
            setLAMmechModeEnabled(false);
            setLAMairmechModeEnabled(false);
            setLAMaircraftModeEnabled(false);
        }
View Full Code Here


            cmd.addStep(MovePath.STEP_SHAKE_OFF_SWARMERS);
            clientgui.bv.drawMovementData(ce, cmd);
        } else if (ev.getActionCommand().equals(MOVE_MODE_MECH)) {
            clearAllMoves();
            if (ce instanceof LandAirMech) {
                final LandAirMech lam = (LandAirMech) client.getEntity(ce.getId());

                lam.convertToMode(LandAirMech.MODE_MECH);
                updateTransformationButtons(lam);
                clientgui.mechD.displayEntity(lam);
            }
        } else if (ev.getActionCommand().equals(MOVE_MODE_AIRMECH)) {
            clearAllMoves();
            if (ce instanceof LandAirMech) {
                final LandAirMech lam = (LandAirMech) client.getEntity(ce.getId());

                lam.convertToMode(LandAirMech.MODE_AIRMECH);
                updateTransformationButtons(lam);
                clientgui.mechD.displayEntity(lam);
            }
        } else if (ev.getActionCommand().equals(MOVE_MODE_AIRCRAFT)) {
            clearAllMoves();
            if (ce instanceof LandAirMech) {
                final LandAirMech lam = (LandAirMech) client.getEntity(ce.getId());

                lam.convertToMode(LandAirMech.MODE_AIRCRAFT);
                updateTransformationButtons(lam);
                clientgui.mechD.displayEntity(lam);
            }
        } else if (ev.getActionCommand().equals(MOVE_RECKLESS)) {
            cmd.setCareful(false);
View Full Code Here

        }

        // handle LAM speial rules

        // a temporary variable so I don't need to keep casting.
        LandAirMech lam;
        if (ae instanceof LandAirMech) {
            lam = (LandAirMech) ae;
            if (lam.isInMode(LandAirMech.MODE_AIRMECH)) {
                toHit.addModifier(2, "Attacker is a Flying Airmek");
            }
        }
        if (target instanceof LandAirMech) {
            lam = (LandAirMech) target;
            if (lam.isInMode(LandAirMech.MODE_AIRMECH) && lam.isFlying()) {
                if (ae.isFlying()) {
                    toHit.addModifier(-1, "Target is a flying Airmek"); // and
                    // we
                    // are
                    // too.
View Full Code Here

                iCockpitType = Mech.COCKPIT_STANDARD;
            }
            if (chassisConfig.indexOf("Quad") != -1) {
                mech = new QuadMech(iGyroType, iCockpitType);
            } else if (chassisConfig.indexOf("LAM") != -1) {
                mech = new LandAirMech(iGyroType, iCockpitType);
            } else {
                mech = new BipedMech(iGyroType, iCockpitType);
            }

            // aarg! those stupid sub-names in parenthesis screw everything up
View Full Code Here

TOP

Related Classes of megamek.common.LandAirMech

Copyright © 2018 www.massapicom. 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.