MCPcopy Create free account
hub / github.com/bwapi/bwapi / CanUseTech

Method CanUseTech

bwapi/BWScriptEmulator/UnitInfo.cpp:28–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28bool UnitWrap::CanUseTech(TechType tech) const
29{
30 return pUnit->getPlayer()->hasResearched(TechTypes::Lockdown) && pUnit->getEnergy() >= tech.energyCost();
31}
32bool UnitWrap::UseTech(BWAPI::TechType tech, Unit pTarget, int targBit)
33{
34 if ( !pTarget )

Callers

nothing calls this directly

Calls 4

hasResearchedMethod · 0.80
getEnergyMethod · 0.80
energyCostMethod · 0.80
getPlayerMethod · 0.45

Tested by

no test coverage detected