Steamhammer/Source/StrategyManager.cpp
bool StrategyManager::hasDropTech()
{
	if (_selfRace == BWAPI::Races::Zerg)
	{
		// NOTE May be slow drop.
		return BWAPI::Broodwar->self()->getUpgradeLevel(BWAPI::UpgradeTypes::Ventral_Sacs) > 0 &&
			UnitUtil::GetCompletedUnitCount(BWAPI::UnitTypes::Zerg_Overlord) > 0;
	}
	if (_selfRace == BWAPI::Races::Protoss)
	{
		return UnitUtil::GetCompletedUnitCount(BWAPI::UnitTypes::Protoss_Shuttle) > 0;
	}
	if (_selfRace == BWAPI::Races::Terran)
	{
		return UnitUtil::GetCompletedUnitCount(BWAPI::UnitTypes::Terran_Dropship) > 0;
	}

	return false;
}
// Whether we have the tech and transport to drop.
Whether we have the tech and transport to drop.
Whether we have the tech and transport to drop .
bool StrategyManager::hasDropTech()
{
	if (_selfRace == BWAPI::Races::Zerg)
	{
		return BWAPI::Broodwar->self()->getUpgradeLevel(BWAPI::UpgradeTypes::Ventral_Sacs) > 0 &&
			UnitUtil::GetCompletedUnitCount(BWAPI::UnitTypes::Zerg_Overlord) > 0;
	}
	if (_selfRace == BWAPI::Races::Protoss)
	{
		return UnitUtil::GetCompletedUnitCount(BWAPI::UnitTypes::Protoss_Shuttle) > 0;
	}
	if (_selfRace == BWAPI::Races::Terran)
	{
		return UnitUtil::GetCompletedUnitCount(BWAPI::UnitTypes::Terran_Dropship) > 0;
	}
	return false;
}
bool StrategyManager :: hasDropTech ( ) { if ( _selfRace == BWAPI :: Races :: Zerg ) { return BWAPI :: Broodwar -> self ( ) -> getUpgradeLevel ( BWAPI :: UpgradeTypes :: Ventral_Sacs ) > 0 && UnitUtil :: GetCompletedUnitCount ( BWAPI :: UnitTypes :: Zerg_Overlord ) > 0 ; } if ( _selfRace == BWAPI :: Races :: Protoss ) { return UnitUtil :: GetCompletedUnitCount ( BWAPI :: UnitTypes :: Protoss_Shuttle ) > 0 ; } if ( _selfRace == BWAPI :: Races :: Terran ) { return UnitUtil :: GetCompletedUnitCount ( BWAPI :: UnitTypes :: Terran_Dropship ) > 0 ; } return false ; }
Whether we have the tech and transport to drop.
Whether we have the tech and transport to drop .
// NOTE May be slow drop.