s2client 0.1.0

Rust implementation of Blizzard's Machine Learning API.
Documentation
use sc2api::common;

pub enum Target {
    None = 1,
    Point = 2,
    Unit = 3,
    PointOrUnit = 4,
    PointOrNone = 5,
}

pub struct AbilityData {
    ability_id : u32,
    link_name :  String,
    link_index : u32,
    button_name : String,
    friendly_name : String,
    hotkey : String,
    remaps_to_ability_id : u32,
    available : bool,
    target : Target,
    allow_minimap : bool,
    allow_autocast : bool,
    is_building : bool,
    footprint_radius : f32,
    is_instant_placement : bool,
    cast_range : f32,
}

pub enum Attribute {
    Light = 1,
    Armored = 2,
    Biological = 3,
    Mechanical = 4,
    Robotic = 5,
    Psionic = 6,
    Massive = 7,
    Structure = 8,
    Hover = 9,
    Heroic = 10,
    Summoned = 11,
}

pub struct DamageBonus {
    attribute : Attribute,
    bonus : f32,
}

pub enum TargetType {
    Ground = 1,
    Air = 2,
    Any = 3,
}

pub struct Weapon {
    target_type : TargetType,
    damage : f32,
    damage_bonus : DamageBonus,
    attacks : u32,
    range : f32,
    speed : f32,
}

pub struct UnitTypeData {
    unit_id : u32,
    name : String,
    available : bool,
    cargo_sizee : u32,
    mineral_cost : u32,
    vespine_cost : u32,
    food_required : f32,
    food_provided : f32,
    ability_id : u32,
    race : common::Race,
    build_time : f32,
    has_vespine : bool,
    has_minerals : bool,

    tech_alias : Vec<u32>,
    unit_alias : u32,

    tech_requirement : u32,
    require_attached : bool,

    attributes : Vec<Attribute>,
    movement_speed : f32,
    armor : f32,
    weapons : Vec<Weapon>,
}

pub struct UpgradeData {
    upgrade_id : u32,
    name : String,
    mineral_cost : u32,
    vespine_cost : u32,
    research_time : f32,
    ability_id : u32
}

pub struct BuffData {
    buff_id : u32,
    name : String,
}