Package megamek.client.bot.princess
Class InfantryFireControl
java.lang.Object
megamek.client.bot.princess.FireControl
megamek.client.bot.princess.InfantryFireControl
This class is intended to help the bot calculate firing plans for infantry units.
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.client.bot.princess.FireControl
FireControl.FireControlType -
Field Summary
Fields inherited from class megamek.client.bot.princess.FireControl
CIVILIAN_TARGET_DISUTILITY, CRITICAL_UTILITY, DAMAGE_UTILITY, EJECTED_PILOT_DISUTILITY, KILL_UTILITY, OVERHEAT_DISUTILITY, OVERHEAT_DISUTILITY_AERO, owner, TARGET_HP_FRACTION_DEALT_UTILITY, TSM_ACTIVATION_UTILITY, TSM_DESIRED_HEAT, TSM_HEAT_CEILING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetMaxDamageAtRange(MovePath shooterPath, MovePath targetPath, int range, boolean useExtremeRange, boolean useLOSRange) Calculates the maximum damage a unit can do at a given range.protected FiringPlanguessBestFiringPlanUnderHeat(Entity shooter, EntityState shooterState, Targetable target, EntityState targetState, int maxHeat, Game game) Guesses the 'best' firing plan under a certain heat, except this is infantry so we ignore heatMethods inherited from class megamek.client.bot.princess.FireControl
applyTsmHeatIncentive, calcCivilianTargetDisutility, calcCommandUtility, calcHeatTolerance, calcHeatTolerance, calcPriorityUnitTargetUtility, calcStrategicBuildingTargetUtility, calcTargetPotentialDamageMultiplier, correctFacing, effectivelyAmmoless, entityCanIndirectFireMissile, firingActivatesTsm, getAttackerMovementModifier, getDiveBombPlan, getFindClubAction, getMaxDamageAtRange, getSearchLightAction, getSpotAction, getTargetableEnemyEntities, getTargetMovementModifier, getUnjamWeaponPlan, getValidFacingChanges, guessDistance, isCommander, isInArc, isSubCommander
-
Constructor Details
-
InfantryFireControl
-
-
Method Details
-
getMaxDamageAtRange
public double getMaxDamageAtRange(MovePath shooterPath, MovePath targetPath, int range, boolean useExtremeRange, boolean useLOSRange) Calculates the maximum damage a unit can do at a given range. Chance to hit is not a factor.- Parameters:
range- The range to be checked.useExtremeRange- Is the extreme range optional rule in effect?- Returns:
- The most damage done at that range.
-
guessBestFiringPlanUnderHeat
protected FiringPlan guessBestFiringPlanUnderHeat(Entity shooter, @Nullable EntityState shooterState, Targetable target, @Nullable EntityState targetState, int maxHeat, Game game) Guesses the 'best' firing plan under a certain heat, except this is infantry so we ignore heat- Overrides:
guessBestFiringPlanUnderHeatin classFireControl- Parameters:
shooter- The unit doing the shooting.shooterState- The current state of the shooting unit.target- The unit being shot at.targetState- The current state of the target unit.maxHeat- How much heat we're willing to tolerate. Ignored, since infantry doesn't track heat.game- The currentGame- Returns:
- the 'best' firing plan under a certain heat.
-