Package megamek.common

Examples of megamek.common.BattleArmor.locations()


                            "Couldn't get an integer from " + attrStr);
                }

                /* Shooting strength is set... oddly. */
                // Calculate the number of troopers who can't shoot.
                attrVal = entity.locations() - attrVal - 1;

                // Initialize the internals, then mark off the non-shooting
                // troopers (work last to first); the EntityEncoder will
                // override these values to the actual values.
                entity.autoSetInternal();
View Full Code Here


                // Initialize the internals, then mark off the non-shooting
                // troopers (work last to first); the EntityEncoder will
                // override these values to the actual values.
                entity.autoSetInternal();
                for (int loop = 1; loop <= attrVal; loop++) {
                    entity.setInternal(IArmorState.ARMOR_NA, entity.locations()
                            - loop);
                }

                // Now apply the damage.
                entity.applyDamage();
View Full Code Here

        // Set the weight (number of troops), and then initialize the armor.
        retVal.setWeight(stateMenPerSquad);
        retVal.refreshLocations();
        retVal.autoSetInternal();
        retVal.setArmorType(stateArmorType);
        for (int x = 1; x < retVal.locations(); x++) {
            retVal.initializeArmor(stateArmorValue, x);
        }

        // Set the tech base.
        if (stateTechBase == TECH_BASE_IS) {
View Full Code Here

        // Set the weight (number of troops), and then initialize the armor.
        retVal.setWeight(stateMenPerSquad);
        retVal.refreshLocations();
        retVal.autoSetInternal();
        retVal.setArmorType(stateArmorType);
        for (int x = 1; x < retVal.locations(); x++) {
            retVal.initializeArmor(stateArmorValue, x);
        }

        // Set the tech base.
        if (stateTechBase == TECH_BASE_IS) {
View Full Code Here

            throw new EntityLoadingException("Incorrect armor array length");
        }

        // add the body to the armor array
        t.refreshLocations();
        for (int x = 1; x < t.locations(); x++) {
            t.initializeArmor(armor[0], x);
        }

        t.autoSetInternal();
View Full Code Here

        t.autoSetInternal();

        loadEquipment(t, "Squad", BattleArmor.LOC_SQUAD);
        String[] abbrs = t.getLocationAbbrs();
        for (int loop = 1; loop < t.locations(); loop++) {
            loadEquipment(t, abbrs[loop], loop);
        }
        return t;
    }
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.