Class AerospaceFireControl
Two corrections to the stock guess, both of which make the bot's expectations match what the server will actually allow:
- The dead zone. The stock guess never checks it, so the bot plans shots the server answers
with
IMPOSSIBLE, books the damage it expected to do, and moves somewhere on the strength of an attack it was never going to make. Over a ground mapsheet, where one level of altitude blocks fire within seventeen hexes, that describes most of the board. - Range. The stock guess converts ground hexes to aerospace range with integer division while the engine rounds up, and never adds the altitude difference the rules charge for (TW p.241). Both make the bot believe it is closer than it is.
-
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 TypeMethodDescriptionprotected FiringPlangetDiveBombPlan(Entity shooter, MovePath flightPath, Targetable target, Game game, boolean passedOverTarget, boolean guess) Drops on the best blast-footprint hex of the flown line, not on the target's own hex.protected intguessDistance(Entity shooter, EntityState shooterState, Targetable target, EntityState targetState, Game game) The range this guessed shot is resolved at, from a hypothetical shooter pose.Methods inherited from class megamek.client.bot.princess.FireControl
applyTsmHeatIncentive, calcCivilianTargetDisutility, calcCommandUtility, calcHeatTolerance, calcHeatTolerance, calcPriorityUnitTargetUtility, calcStrategicBuildingTargetUtility, calcTargetPotentialDamageMultiplier, correctFacing, effectivelyAmmoless, entityCanIndirectFireMissile, firingActivatesTsm, getAttackerMovementModifier, getFindClubAction, getMaxDamageAtRange, getSearchLightAction, getSpotAction, getTargetableEnemyEntities, getTargetMovementModifier, getUnjamWeaponPlan, getValidFacingChanges, guessBestFiringPlanUnderHeat, isCommander, isInArc, isSubCommander
-
Constructor Details
-
AerospaceFireControl
-
-
Method Details
-
getDiveBombPlan
protected FiringPlan getDiveBombPlan(Entity shooter, MovePath flightPath, Targetable target, Game game, boolean passedOverTarget, boolean guess) Drops on the best blast-footprint hex of the flown line, not on the target's own hex.The movement half steers the fighter over the seam of a formation; this half makes the drop actually land there. Worked from the pilot's seat: against a box lance with two hexes of spacing, cluster bombs (5 damage across all seven hexes, no falloff) on a corner mek's hex reach one target - its neighbors are empty - while the seam hex between two meks delivers full damage to both. Every hex the fighter physically flew through is a legal aim point (
passedOver), so the drop target is a search over the flown line with the same ring tables the ranker's footprint credit uses. Either way the payload is rationed - to the single victim's hit points on a direct drop, to the summed hit points of everything under the blast rings on a seam drop.- Overrides:
getDiveBombPlanin classFireControl- Parameters:
shooter- The unit doing the shooting.target- The unit being fired on.game- The currentGamepassedOverTarget- Set TRUE to automatically assume the target will be under the flight path rather than going through the full calculation.guess- Whether we're just thinking about this firing plan or about to- Returns:
- The
FiringPlancontaining all bombs on target, if the shooter is capable of dropping bombs.
-
guessDistance
protected int guessDistance(Entity shooter, EntityState shooterState, Targetable target, EntityState targetState, Game game) Description copied from class:FireControlThe range this guessed shot is resolved at, from a hypothetical shooter pose.Its own method so that CASPAR's aerospace gunnery can replace it without reproducing the rest of the to-hit guess. The stock behaviour is unchanged.
- Overrides:
guessDistancein classFireControl- Parameters:
shooter- the unit doing the shootingshooterState- the pose the shooter would be firing fromtarget- the unit being fired ontargetState- the pose the target would be ingame- the current game- Returns:
- the range to look up on the weapon's range brackets
-