Class WeaponFireInfo

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

public class WeaponFireInfo extends Object
WeaponFireInfo is a wrapper around a WeaponAttackAction that includes probability to hit and expected damage
Since:
11/24/14 2:50 PM
  • Constructor Details

    • WeaponFireInfo

      protected WeaponFireInfo(Princess owner)
      For unit testing.
  • Method Details

    • getAction

      protected WeaponAttackAction getAction()
    • setAction

      protected void setAction(WeaponAttackAction action)
    • getTarget

      public Targetable getTarget()
    • setTarget

      protected void setTarget(Targetable target)
    • getToHit

      public ToHitData getToHit()
    • setToHit

      protected void setToHit(ToHitData toHit)
    • getGame

      public Game getGame()
    • setGame

      protected void setGame(Game game)
    • setWeapon

      protected void setWeapon(WeaponMounted weapon)
    • setAmmo

      protected void setAmmo(AmmoMounted ammo)
    • setHeat

      protected void setHeat(int heat)
    • getHeat

      public int getHeat()
    • getWeapon

      public WeaponMounted getWeapon()
    • getAmmo

      public AmmoMounted getAmmo()
    • getExpectedDamage

      public double getExpectedDamage()
    • computeExpectedBombDamage

      protected double[] computeExpectedBombDamage(Entity shooter, Mounted<?> weapon, Targetable targetHex)
      Worker function to compute bomb damage given the shooter and target hex.
      Parameters:
      shooter - The unit making the attack.
      weapon - The weapon being used in the attack.
      targetHex - The target hex.
      Returns:
      The array of expected damages of the attack.
    • getUpdatedFiringMode

      public Integer getUpdatedFiringMode()
      The updated firing mode, if any of the weapon involved in this attack. Null if no update required.
    • setUpdatedFiringMode

      public void setUpdatedFiringMode(int mode)