Blizzard / Blizzard/s2client-api
Common Unit Types / Helper Functions
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 280
- PR merge metrics
- No merged PRs in 30d
Description
When writing a bot, several unit types of a race are often required. It would be nice if the Race namespace had the following functions:
sc2::Race::GetTownHall(race) -> returns the UnitTypeID of Nexus if race == Protoss, for example
sc2::Race::GetSupplyProvider(race)
sc2::Race::GetWorker(race)
sc2::Race::GetRefinery(race)
It would also be quite nice to have something like an sc2::UnitType namespace, in which the following functions existed:
sc2::UnitType::IsTownHall(id)
sc2::UnitType::IsSupplyProvider(id)
sc2::UnitType::IsWorker(id)
sc2::UnitType::IsRefinery(id)
sc2::UnitType::IsGeyser(id)
sc2::UnitType::IsMineral(id)
sc2::UnitType::IsBuilding(id) -> whether the given type is a building
sc2::UnitType::WhatBuilds(id) -> id = barracks returns SCV, id = marine returns barracks, etc
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.