-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathUnitTypes.h
30 lines (24 loc) · 899 Bytes
/
UnitTypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "sc2api/sc2_interfaces.h"
namespace sc2util {
// useful functions for filtering and classifying units
// all mineral types
bool IsMineral(sc2::UNIT_TYPEID type);
// all geyser types
bool IsVespene(sc2::UNIT_TYPEID type);
// workers + mules
bool IsWorkerType(sc2::UNIT_TYPEID type);
// if it produces workers, it's a centre
bool IsCommandStructure(sc2::UNIT_TYPEID type);
// if it's a building that attacks you
bool isStaticDefense(sc2::UNIT_TYPEID type);
// a moving enemy that hits from range (TODO : list very incomplete)
bool IsRangedUnit(sc2::UNIT_TYPEID type);
// any building
bool IsBuilding(sc2::UNIT_TYPEID type);
// any moving enemy with a weapon
bool IsArmyUnitType(sc2::UNIT_TYPEID type);
bool isChronoed(const sc2::Unit * unit);
float getRange(const sc2::Unit *z, const sc2::UnitTypes & types);
sc2::Race getRace(sc2::UNIT_TYPEID type);
}