Package megamek.client.bot.princess
Class WeaponFireInfo
java.lang.Object
megamek.client.bot.princess.WeaponFireInfo
WeaponFireInfo is a wrapper around a WeaponAttackAction that includes probability to hit and expected damage
- Since:
- 11/24/14 2:50 PM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected double[]computeExpectedBombDamage(Entity shooter, Mounted<?> weapon, Targetable targetHex) Worker function to compute bomb damage given the shooter and target hex.protected WeaponAttackActiongetAmmo()doublegetGame()intgetHeat()getToHit()The updated firing mode, if any of the weapon involved in this attack.protected voidsetAction(WeaponAttackAction action) protected voidsetAmmo(AmmoMounted ammo) protected voidprotected voidsetHeat(int heat) protected voidsetTarget(Targetable target) protected voidvoidsetUpdatedFiringMode(int mode) protected voidsetWeapon(WeaponMounted weapon)
-
Constructor Details
-
WeaponFireInfo
For unit testing.
-
-
Method Details
-
getAction
-
setAction
-
getTarget
-
setTarget
-
getToHit
-
setToHit
-
getGame
-
setGame
-
setWeapon
-
setAmmo
-
setHeat
protected void setHeat(int heat) -
getHeat
public int getHeat() -
getWeapon
-
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
The updated firing mode, if any of the weapon involved in this attack. Null if no update required. -
setUpdatedFiringMode
public void setUpdatedFiringMode(int mode)
-