BWAPI 4.2.0 An API for interacting with Starcraft: Broodwar (1.16.1) |
Public Member Functions | |
constexpr | WeaponType (int id=WeaponTypes::Enum::None) |
int | damageAmount () const |
int | damageBonus () const |
int | damageCooldown () const |
int | damageFactor () const |
DamageType | damageType () const |
ExplosionType | explosionType () const |
TechType | getTech () const |
int | innerSplashRadius () const |
int | maxRange () const |
int | medianSplashRadius () const |
int | minRange () const |
int | outerSplashRadius () const |
bool | targetsAir () const |
bool | targetsGround () const |
bool | targetsMechanical () const |
bool | targetsNonBuilding () const |
bool | targetsNonRobotic () const |
bool | targetsOrganic () const |
bool | targetsOrgOrMech () const |
bool | targetsOwn () const |
bool | targetsTerrain () const |
UpgradeType | upgradeType () const |
UnitType | whatUses () const |
This object identifies a weapon type used by a unit to attack and deal damage.
Some weapon types can be upgraded while others are used for special abilities.
WeaponTypes::Enum::None
)Expected type constructor.
If the type is an invalid type, then it becomes Types::Unknown. A type is invalid if its value is less than 0 or greater than Types::Unknown.
id | The id that corresponds to this type. It is typically an integer value that corresponds to an internal Broodwar type. If the given id is invalid, then it becomes Types::Unknown. |
References BWAPI::WeaponTypes::allWeaponTypes(), BWAPI::WeaponTypes::normalWeaponTypes(), and BWAPI::WeaponTypes::specialWeaponTypes().
Retrieves the technology type that must be researched before this weapon can be used.
TechTypes::None | if no tech type is required to use this weapon. |
Retrieves the unit type that is intended to use this weapon type.
Retrieves the base amount of damage that this weapon can deal per attack.
Determines the bonus amount of damage that this weapon type increases by for every upgrade to this type.
Retrieves the base amount of cooldown time between each attack, in frames.
Obtains the intended number of missiles/attacks that are used.
This is used to multiply with the damage amount to obtain the full amount of damage for an attack.
Retrieves the upgrade type that increases this weapon's damage output.
Retrieves the damage type that this weapon applies to a unit type.
Retrieves the explosion type that indicates how the weapon deals damage.
Retrieves the minimum attack range of the weapon, measured in pixels.
This value is 0 for almost all weapon types, except for WeaponTypes::Arclite_Shock_Cannon and WeaponTypes::Arclite_Shock_Cannon_Edmund_Duke.
Retrieves the maximum attack range of the weapon, measured in pixels.
Retrieves the inner radius used for splash damage calculations, in pixels.
Retrieves the middle radius used for splash damage calculations, in pixels.
Retrieves the outer radius used for splash damage calculations, in pixels.
Checks if this weapon type can target air units.
Checks if this weapon type can target ground units.
Checks if this weapon type can only target mechanical units.
Checks if this weapon type can only target organic units.
Checks if this weapon type cannot target structures.
Checks if this weapon type cannot target robotic units.
Checks if this weapon type can target the ground.
Checks if this weapon type can only target organic or mechanical units.
Checks if this weapon type can only target units owned by the same player.
This is used for WeaponTypes::Consume.