Package megamek.client.bot.princess
Class ArtilleryCommandAndControl
java.lang.Object
megamek.client.bot.princess.ArtilleryCommandAndControl
ArtilleryCommandAndControl class represents the artillery command and control for the bot. It keeps track of the
artillery order given to it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumThe ammo type a fire mission should use, mapped to the artillery munitions it covers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArtilleryTargets(Collection<Coords> targets) booleangetAmmo()booleanhasAlreadyFired(Entity shooter) Checks whether the given unit has already taken its shot during the current volley fire mission.booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanbooleanbooleanbooleanbooleanbooleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.voidremoveArtilleryTarget(Coords coords) Deprecated, for removal: This API element is subject to removal in a future version.voidvoidreset()voidvoidsetArtilleryOrder(ArtilleryCommandAndControl.ArtilleryOrder order, ArtilleryCommandAndControl.SpecialAmmo ammo) booleansetShooter(Entity shooter) Add the shooter is already in the list of shooters.
-
Constructor Details
-
ArtilleryCommandAndControl
public ArtilleryCommandAndControl()
-
-
Method Details
-
addArtilleryTargets
-
contains
-
removeArtilleryTarget
Deprecated, for removal: This API element is subject to removal in a future version. -
removeArtilleryTargets
public void removeArtilleryTargets() -
getArtilleryTargets
-
isArtilleryHalted
public boolean isArtilleryHalted() -
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:
trueif the bot is in forced counter-battery mode: its artillery prioritizes firing the selected ammo back at any observed off-board enemy battery.
-
setArtilleryOrder
-
setArtilleryOrder
public void setArtilleryOrder(ArtilleryCommandAndControl.ArtilleryOrder order, ArtilleryCommandAndControl.SpecialAmmo ammo) -
getAmmo
- Returns:
- The special-ammo type the current fire mission should use
-
isHomingAmmo
public boolean isHomingAmmo() -
isSpecialAmmo
Deprecated, for removal: This API element is subject to removal in a future version. -
setShooter
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
Checks whether the given unit has already taken its shot during the current volley fire mission.- Parameters:
shooter- the shooter unit- Returns:
trueif the shooter has already fired during this volley
-
reset
public void reset()
-