Package megamek.common

Examples of megamek.common.ToHitData.addModifier()


            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, Mech.LOC_LARM)) {
                toHit.addModifier(2, "Upper arm actuator destroyed");
            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_RARM)) {
                toHit.addModifier(2, "Lower arm actuator missing or destroyed");
            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_LARM)) {
                toHit.addModifier(2, "Lower arm actuator missing or destroyed");
            }
            if (hasClaws) {
View Full Code Here


            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_RARM)) {
                toHit.addModifier(2, "Lower arm actuator missing or destroyed");
            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_LARM)) {
                toHit.addModifier(2, "Lower arm actuator missing or destroyed");
            }
            if (hasClaws) {
                toHit.addModifier(2, "Mek has claws");
            }
            if ( ae.hasFunctionalArmAES(Mech.LOC_RARM) && ae.hasFunctionalArmAES(Mech.LOC_LARM) ) {
View Full Code Here

            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, Mech.LOC_LARM)) {
                toHit.addModifier(2, "Lower arm actuator missing or destroyed");
            }
            if (hasClaws) {
                toHit.addModifier(2, "Mek has claws");
            }
            if ( ae.hasFunctionalArmAES(Mech.LOC_RARM) && ae.hasFunctionalArmAES(Mech.LOC_LARM) ) {
                toHit.addModifier(-1,"AES modifer");
            }
        } else {
View Full Code Here

            }
            if (hasClaws) {
                toHit.addModifier(2, "Mek has claws");
            }
            if ( ae.hasFunctionalArmAES(Mech.LOC_RARM) && ae.hasFunctionalArmAES(Mech.LOC_LARM) ) {
                toHit.addModifier(-1,"AES modifer");
            }
        } else {
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, club
                    .getLocation())) {
                toHit.addModifier(2, "Upper arm actuator destroyed");
View Full Code Here

                toHit.addModifier(-1,"AES modifer");
            }
        } else {
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_UPPER_ARM, club
                    .getLocation())) {
                toHit.addModifier(2, "Upper arm actuator destroyed");
                if ((((MiscType) club.getType()).hasSubType(MiscType.S_LANCE))) {
                    return new ToHitData(TargetRoll.IMPOSSIBLE,
                            "Unable to use lance with upper arm actuator missing or destroyed");
                }
            }
View Full Code Here

                            "Unable to use lance with upper arm actuator missing or destroyed");
                }
            }
            if (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, club
                    .getLocation())) {
                toHit.addModifier(2, "Lower arm actuator missing or destroyed");
                if ((((MiscType) club.getType()).hasSubType(MiscType.S_LANCE))) {
                    return new ToHitData(TargetRoll.IMPOSSIBLE,
                            "Unable to use lance with lower arm actuator missing or destroyed");
                }
            }
View Full Code Here

                            "Unable to use lance with lower arm actuator missing or destroyed");
                }
            }
            // Rules state +2 bth if your using a club with claws.
            if (hasClaws) {
                toHit.addModifier(2, "Mek has claws");
            }
            if ((((MiscType) club.getType()).hasSubType(MiscType.S_LANCE))
                    && (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, club
                            .getLocation()) || !ae.hasWorkingSystem(
                            Mech.ACTUATOR_UPPER_ARM, club.getLocation()))) {
View Full Code Here

                    && (!ae.hasWorkingSystem(Mech.ACTUATOR_LOWER_ARM, club
                            .getLocation()) || !ae.hasWorkingSystem(
                            Mech.ACTUATOR_UPPER_ARM, club.getLocation()))) {
            }
            if ( ae.hasFunctionalArmAES(club.getLocation()) ) {
                toHit.addModifier(-1,"AES modifer");
            }
        }

        // elevation
        if (attackerElevation == targetElevation) {
View Full Code Here

            if (shield) {
                toHit.setHitTable(ToHitData.HIT_PUNCH);
            } else {
                toHit.setHitTable(aimTable);
                if (aimTable != ToHitData.HIT_NORMAL) {
                    toHit.addModifier(4, "called shot");
                }
            }
        } else if (attackerElevation < targetElevation) {
            if (target.getHeight() == 0) {
                if (shield) {
View Full Code Here

        toHit = new ToHitData(base, "base");

        // BMR(r), page 33. +3 modifier for DFA on infantry.
        if (te instanceof Infantry) {
            toHit.addModifier(3, "Infantry target");
        }

        // Battle Armor targets are hard for Meks and Tanks to hit.
        if (te instanceof BattleArmor) {
            toHit.addModifier(1, "battle armor target");
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.