Class ArtilleryCommandAndControl

java.lang.Object
megamek.client.bot.princess.ArtilleryCommandAndControl

public class ArtilleryCommandAndControl extends Object
ArtilleryCommandAndControl class represents the artillery command and control for the bot. It keeps track of the artillery order given to it.
  • Constructor Details

    • ArtilleryCommandAndControl

      public ArtilleryCommandAndControl()
  • Method Details

    • addArtilleryTargets

      public void addArtilleryTargets(Collection<Coords> targets)
    • contains

      public boolean contains(Coords position)
    • removeArtilleryTarget

      @Deprecated(since="0.51.0", forRemoval=true) public void removeArtilleryTarget(Coords coords)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • removeArtilleryTargets

      public void removeArtilleryTargets()
    • getArtilleryTargets

      public Set<Coords> getArtilleryTargets()
    • isArtilleryHalted

      public boolean isArtilleryHalted()
    • isArtilleryAuto

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isArtilleryAuto()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • isArtilleryBarrage

      public boolean isArtilleryBarrage()
    • isArtilleryVolley

      public boolean isArtilleryVolley()
    • isArtillerySingle

      public boolean isArtillerySingle()
    • isCounterBattery

      public boolean isCounterBattery()
      Returns:
      true if the bot is in forced counter-battery mode: its artillery prioritizes firing the selected ammo back at any observed off-board enemy battery.
    • setArtilleryOrder

      public void setArtilleryOrder(ArtilleryCommandAndControl.ArtilleryOrder order)
    • setArtilleryOrder

    • getAmmo

      Returns:
      The special-ammo type the current fire mission should use
    • isHomingAmmo

      public boolean isHomingAmmo()
    • isSpecialAmmo

      @Deprecated(since="0.51.0", forRemoval=true) public boolean isSpecialAmmo()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • setShooter

      public boolean setShooter(Entity shooter)
      Add the shooter is already in the list of shooters. Used to make sure that in case we are doing a volley we know which units are already shooting.
      Parameters:
      shooter - the shooter unit
      Returns:
      false if the shooter is already in the list of shooters, true otherwise
    • hasAlreadyFired

      public boolean hasAlreadyFired(Entity shooter)
      Checks whether the given unit has already taken its shot during the current volley fire mission.
      Parameters:
      shooter - the shooter unit
      Returns:
      true if the shooter has already fired during this volley
    • reset

      public void reset()