SC2API
An API for AI for StarCraft II
|
Data about an ability. More...
#include <sc2_data.h>
Public Types | |
enum | Target { Target::None = 1, Target::Point = 2, Target::Unit = 3, Target::PointOrUnit = 4, Target::PointOrNone = 5 } |
Type of target this ability applies to. More... | |
Public Member Functions | |
AbilityData () | |
AbilityData constructor. | |
void | ReadFromProto (const SC2APIProtocol::AbilityData &ability_data) |
std::string | Log () const |
Serialize this ability to a string. | |
Public Attributes | |
bool | available |
If true, the ability is available to the current mods/map. | |
AbilityID | ability_id |
Stable ID. For a given ability, this value will be immutable throughout different patches. | |
std::string | link_name |
Catalog (game data xml) name of the ability. | |
uint32_t | link_index |
Catalog (game data xml) index of the ability. | |
std::string | button_name |
Name of the button for the command card. | |
std::string | friendly_name |
In case the button name is not descriptive. | |
std::string | hotkey |
UI hotkey. | |
uint32_t | remaps_to_ability_id |
This ability id may be represented by the given more generic id. | |
std::vector< uint32_t > | remaps_from_ability_id |
Other abilities remapped to this generic ability. | |
Target | target |
Determines if a point, unit, both or none is required as a target. | |
bool | allow_minimap |
Can be cast in the minimap. (Not implemented) | |
bool | allow_autocast |
Autocast can be set. | |
bool | is_building |
Requires placement to construct a building. | |
float | footprint_radius |
If the ability is placing a building, give the radius of the footprint. | |
bool | is_instant_placement |
Placement next to an existing structure, e.g., an add-on like a Tech Lab. | |
float | cast_range |
Range unit can cast ability without needing to approach target. | |
Data about an ability.
|
strong |
void sc2::AbilityData::ReadFromProto | ( | const SC2APIProtocol::AbilityData & | ability_data | ) |
Serialize this ability entry from the .proto file (used internally).
ability_data | The proto entry for this ability. |