Forked from
Starcraft AI Course / PyCommandCenter
191 commits behind the upstream repository.
-
David Bergström authoredDavid Bergström authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
UnitType.h 1.44 KiB
#pragma once
#include "Common.h"
class IDABot;
class UnitType
{
mutable IDABot * m_bot;
sc2::UnitTypeID m_type;
public:
UnitType();
UnitType(const sc2::UnitTypeID & type, IDABot & bot);
sc2::UnitTypeID getAPIUnitType() const;
bool is(const sc2::UnitTypeID & type) const;
bool operator < (const UnitType & rhs) const;
bool operator == (const UnitType & rhs) const;
std::string getName() const;
CCRace getRace() const;
int getMovementSpeed() 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, IDABot & 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;
};