Package megamek.common

Examples of megamek.common.PilotingRollData.addModifier()


                nagReport.append(SharedUtility.addNag(rollTarget));
            }

            int lightPenalty = entity.getGame().getPlanetaryConditions().getLightPilotPenalty();
            if(lightPenalty > 0) {
                rollTarget.addModifier(lightPenalty, entity.getGame().getPlanetaryConditions().getLightCurrentName());
            }

            //check if we are moving recklessly
            rollTarget = entity.checkRecklessMove(step, curHex, lastPos, curPos, prevHex);
            if (rollTarget.getValue() != TargetRoll.CHECK_FALSE) {
View Full Code Here


            if (mod > 0) {
                reportStr = ("weight class modifier +")+mod;
            } else {
                reportStr = ("weight class modifier ")+mod;
            }
            psr.addModifier(mod, reportStr, false);
        }
        return psr;
    }

    /**
 
View Full Code Here

                // if this mech has 20+ damage, add another roll to the list.
                if (entity.damageThisPhase >= 20) {
                    if (game.getOptions().booleanOption("tacops_taking_damage")) {
                        PilotingRollData damPRD = new PilotingRollData(entity.getId());
                        int damMod = entity.damageThisPhase / 20;
                        damPRD.addModifier(damMod, damMod*20+"+ damage");
                        int weightMod = 0;
                        if (game.getOptions().booleanOption("tacops_physical_psr")) {
                            switch (entity.getWeightClass()) {
                            case EntityWeightClass.WEIGHT_LIGHT:
                                weightMod = 1;
View Full Code Here

                            case EntityWeightClass.WEIGHT_ASSAULT:
                                weightMod = -2;
                                break;
                            }
                            // the weight class PSR modifier is not cumulative
                            damPRD.addModifier(weightMod, "weight class modifier", false);
                        }game.addPSR(damPRD);
                    } else {
                        game.addPSR(new PilotingRollData(entity.getId(), 1, "20+ damage"));
                    }
                }
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.