Class InfantryFireControl

java.lang.Object
megamek.client.bot.princess.FireControl
megamek.client.bot.princess.InfantryFireControl

public class InfantryFireControl extends FireControl
This class is intended to help the bot calculate firing plans for infantry units.
  • Constructor Details

    • InfantryFireControl

      public InfantryFireControl(Princess owner)
  • 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:
      guessBestFiringPlanUnderHeat in class FireControl
      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 current Game
      Returns:
      the 'best' firing plan under a certain heat.