-
Notifications
You must be signed in to change notification settings - Fork 111
/
Copy pathUnitType.h
69 lines (56 loc) · 1.63 KB
/
UnitType.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#include "Common.h"
class CCBot;
class UnitType
{
mutable CCBot * m_bot;
#ifdef SC2API
sc2::UnitTypeID m_type;
#else
BWAPI::UnitType m_type;
#endif
public:
UnitType();
#ifdef SC2API
UnitType(const sc2::UnitTypeID & type, CCBot & bot);
sc2::UnitTypeID getAPIUnitType() const;
bool is(const sc2::UnitTypeID & type) const;
#else
UnitType(const BWAPI::UnitType & type, CCBot & bot);
BWAPI::UnitType getAPIUnitType() const;
bool is(const BWAPI::UnitType & type) const;
#endif
bool operator < (const UnitType & rhs) const;
bool operator == (const UnitType & rhs) const;
std::string getName() const;
CCRace getRace() const;
bool isValid() const;
bool isBuilding() const;
bool isCombatUnit() const;
bool isSupplyProvider() const;
bool isResourceDepot() const;
bool isRefinery() const;
bool isDetector() const;
bool isGeyser() const;
bool isMineral() const;
bool isWorker() const;
bool isMorphedBuilding() const;
bool canAttack() const;
bool canMove() const;
bool isAddon() const;
CCPositionType getAttackRange() const;
int tileWidth() const;
int tileHeight() const;
int supplyProvided() const;
int supplyRequired() const;
int mineralPrice() const;
int gasPrice() const;
const std::vector<UnitType> & whatBuilds() const;
static UnitType GetUnitTypeFromName(const std::string & name, CCBot & bot);
// lazy functions to let me know if this type is a special type
bool isOverlord() const;
bool isLarva() const;
bool isEgg() const;
bool isQueen() const;
bool isTank() const;
};