From cf5c520aa62901291bfa0887b4b5e2a5a53bdf6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Bergstr=C3=B6m?= <davbe125@student.liu.se> Date: Tue, 26 Jun 2018 10:32:39 +0200 Subject: [PATCH] Move Python library files to separate directory and add enums --- CMakeLists.txt | 24 +- library.cpp | 260 -------- python-api-src/CMakeLists.txt | 22 + python-api-src/lib_sc2_typeenums.cpp | 830 ++++++++++++++++++++++++++ python-api-src/library.cpp | 46 ++ library.h => python-api-src/library.h | 8 +- 6 files changed, 905 insertions(+), 285 deletions(-) delete mode 100644 library.cpp create mode 100644 python-api-src/CMakeLists.txt create mode 100644 python-api-src/lib_sc2_typeenums.cpp create mode 100644 python-api-src/library.cpp rename library.h => python-api-src/library.h (71%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 80e706f..6ac0623 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,7 @@ set(BUILD_API_TESTS OFF CACHE INTERNAL "" FORCE) add_subdirectory(lib/pybind11) add_subdirectory(lib/s2client-api) add_subdirectory(src) +add_subdirectory(python-api-src) # Hack to make compile, these flags are otherwise set to give errors on warnings set_target_properties(sc2api PROPERTIES COMPILE_FLAGS "/W4") @@ -25,26 +26,3 @@ set_target_properties(sc2utils PROPERTIES COMPILE_FLAGS "/W3") set_target_properties(sc2protocol PROPERTIES COMPILE_FLAGS "/W0") set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CommandCenter) - -# TODO: Move everything below this line to a separate directory - -include_directories(SYSTEM - ${PROJECT_SOURCE_DIR}/lib/s2client-api/include - ${PROJECT_SOURCE_DIR}/lib/s2client-api/contrib/protobuf/src - ${PROJECT_BINARY_DIR}/lib/s2client-api/generated -) - -# All the source files for the bot. -file(GLOB BOT_SOURCES "src/*.cpp" "src/*.h" "src/*.hpp") - -link_directories(${PROJECT_BINARY_DIR}/s2client-api/bin) - -# Enable compilation of the SC2 version of the bot code -# TODO: Remove all remaining BW code -add_definitions(-DSC2API) - -# Create the executable. -pybind11_add_module(library library.cpp library.h ${BOT_SOURCES}) -target_link_libraries(library PRIVATE - sc2api sc2lib sc2utils sc2protocol libprotobuf -) diff --git a/library.cpp b/library.cpp deleted file mode 100644 index 1b5acfb..0000000 --- a/library.cpp +++ /dev/null @@ -1,260 +0,0 @@ -#include "library.h" - -namespace py = pybind11; - - -PYBIND11_MODULE(library, m) -{ - m.doc() = "pybind11 example plugin"; - - py::class_<Coordinator>(m, "Coordinator") - .def(py::init()) - .def("SetParticipants", &sc2::Coordinator::SetParticipants) - .def("LaunchStarcraft", &sc2::Coordinator::LaunchStarcraft) - .def("StartGame", &sc2::Coordinator::StartGame) - .def("Update", &sc2::Coordinator::Update); - - py::enum_<sc2::Race>(m, "Race") - .value("Terran", sc2::Race::Terran) - .value("Zerg", sc2::Race::Zerg) - .value("Protoss", sc2::Race::Protoss) - .value("Random", sc2::Race::Random); - - py::class_<sc2::Agent>(m, "Agent") - .def(py::init()); - - // IDABot is a specialization of Agent - py::class_<IDABot, sc2::Agent>(m, "IDABot") - .def(py::init()); - - py::class_<sc2::PlayerSetup>(m, "PlayerSetup"); - - py::enum_<sc2::Difficulty>(m, "Difficulty") - .value("VeryEasy", sc2::Difficulty::VeryEasy) - .value("Easy", sc2::Difficulty::Easy) - .value("Medium", sc2::Difficulty::Medium) - .value("MediumHard", sc2::Difficulty::MediumHard) - .value("Hard", sc2::Difficulty::Hard) - .value("HardVeryHard", sc2::Difficulty::HardVeryHard) - .value("VeryHard", sc2::Difficulty::VeryHard) - .value("CheatVision", sc2::Difficulty::CheatVision) - .value("CheatMoney", sc2::Difficulty::CheatMoney) - .value("CheatInsane", sc2::Difficulty::CheatInsane); - - m.def("CreateParticipant", &sc2::CreateParticipant, "Create participant from agent"); - - py::enum_<sc2::UNIT_TYPEID>(m, "UNIT_TYPEID") - .value("INVALID", sc2::UNIT_TYPEID::INVALID) - .value("TERRAN_ARMORY", sc2::UNIT_TYPEID::TERRAN_ARMORY) - .value("TERRAN_AUTOTURRET", sc2::UNIT_TYPEID::TERRAN_AUTOTURRET) - .value("TERRAN_BANSHEE", sc2::UNIT_TYPEID::TERRAN_BANSHEE) - .value("TERRAN_BARRACKS", sc2::UNIT_TYPEID::TERRAN_BARRACKS) - .value("TERRAN_BARRACKSFLYING", sc2::UNIT_TYPEID::TERRAN_BARRACKSFLYING) - .value("TERRAN_BARRACKSREACTOR", sc2::UNIT_TYPEID::TERRAN_BARRACKSREACTOR) - .value("TERRAN_BARRACKSTECHLAB", sc2::UNIT_TYPEID::TERRAN_BARRACKSTECHLAB) - .value("TERRAN_BATTLECRUISER", sc2::UNIT_TYPEID::TERRAN_BATTLECRUISER) - .value("TERRAN_BUNKER", sc2::UNIT_TYPEID::TERRAN_BUNKER) - .value("TERRAN_COMMANDCENTER", sc2::UNIT_TYPEID::TERRAN_COMMANDCENTER) - .value("TERRAN_COMMANDCENTERFLYING", sc2::UNIT_TYPEID::TERRAN_COMMANDCENTERFLYING) - .value("TERRAN_CYCLONE", sc2::UNIT_TYPEID::TERRAN_CYCLONE) - .value("TERRAN_ENGINEERINGBAY", sc2::UNIT_TYPEID::TERRAN_ENGINEERINGBAY) - .value("TERRAN_FACTORY", sc2::UNIT_TYPEID::TERRAN_FACTORY) - .value("TERRAN_FACTORYFLYING", sc2::UNIT_TYPEID::TERRAN_FACTORYFLYING) - .value("TERRAN_FACTORYREACTOR", sc2::UNIT_TYPEID::TERRAN_FACTORYREACTOR) - .value("TERRAN_FACTORYTECHLAB", sc2::UNIT_TYPEID::TERRAN_FACTORYTECHLAB) - .value("TERRAN_FUSIONCORE", sc2::UNIT_TYPEID::TERRAN_FUSIONCORE) - .value("TERRAN_GHOST", sc2::UNIT_TYPEID::TERRAN_GHOST) - .value("TERRAN_GHOSTACADEMY", sc2::UNIT_TYPEID::TERRAN_GHOSTACADEMY) - .value("TERRAN_HELLION", sc2::UNIT_TYPEID::TERRAN_HELLION) - .value("TERRAN_HELLIONTANK", sc2::UNIT_TYPEID::TERRAN_HELLIONTANK) - .value("TERRAN_LIBERATOR", sc2::UNIT_TYPEID::TERRAN_LIBERATOR) - .value("TERRAN_LIBERATORAG", sc2::UNIT_TYPEID::TERRAN_LIBERATORAG) - .value("TERRAN_MARAUDER", sc2::UNIT_TYPEID::TERRAN_MARAUDER) - .value("TERRAN_MARINE", sc2::UNIT_TYPEID::TERRAN_MARINE) - .value("TERRAN_MEDIVAC", sc2::UNIT_TYPEID::TERRAN_MEDIVAC) - .value("TERRAN_MISSILETURRET", sc2::UNIT_TYPEID::TERRAN_MISSILETURRET) - .value("TERRAN_MULE", sc2::UNIT_TYPEID::TERRAN_MULE) - .value("TERRAN_ORBITALCOMMAND", sc2::UNIT_TYPEID::TERRAN_ORBITALCOMMAND) - .value("TERRAN_ORBITALCOMMANDFLYING", sc2::UNIT_TYPEID::TERRAN_ORBITALCOMMANDFLYING) - .value("TERRAN_PLANETARYFORTRESS", sc2::UNIT_TYPEID::TERRAN_PLANETARYFORTRESS) - .value("TERRAN_RAVEN", sc2::UNIT_TYPEID::TERRAN_RAVEN) - .value("TERRAN_REAPER", sc2::UNIT_TYPEID::TERRAN_REAPER) - .value("TERRAN_REFINERY", sc2::UNIT_TYPEID::TERRAN_REFINERY) - .value("TERRAN_SCV", sc2::UNIT_TYPEID::TERRAN_SCV) - .value("TERRAN_SENSORTOWER", sc2::UNIT_TYPEID::TERRAN_SENSORTOWER) - .value("TERRAN_SIEGETANK", sc2::UNIT_TYPEID::TERRAN_SIEGETANK) - .value("TERRAN_SIEGETANKSIEGED", sc2::UNIT_TYPEID::TERRAN_SIEGETANKSIEGED) - .value("TERRAN_STARPORT", sc2::UNIT_TYPEID::TERRAN_STARPORT) - .value("TERRAN_STARPORTFLYING", sc2::UNIT_TYPEID::TERRAN_STARPORTFLYING) - .value("TERRAN_STARPORTREACTOR", sc2::UNIT_TYPEID::TERRAN_STARPORTREACTOR) - .value("TERRAN_STARPORTTECHLAB", sc2::UNIT_TYPEID::TERRAN_STARPORTTECHLAB) - .value("TERRAN_SUPPLYDEPOT", sc2::UNIT_TYPEID::TERRAN_SUPPLYDEPOT) - .value("TERRAN_SUPPLYDEPOTLOWERED", sc2::UNIT_TYPEID::TERRAN_SUPPLYDEPOTLOWERED) - .value("TERRAN_THOR", sc2::UNIT_TYPEID::TERRAN_THOR) - .value("TERRAN_THORAP", sc2::UNIT_TYPEID::TERRAN_THORAP) - .value("TERRAN_VIKINGASSAULT", sc2::UNIT_TYPEID::TERRAN_VIKINGASSAULT) - .value("TERRAN_VIKINGFIGHTER", sc2::UNIT_TYPEID::TERRAN_VIKINGFIGHTER) - .value("TERRAN_WIDOWMINE", sc2::UNIT_TYPEID::TERRAN_WIDOWMINE) - .value("TERRAN_WIDOWMINEBURROWED", sc2::UNIT_TYPEID::TERRAN_WIDOWMINEBURROWED) - .value("TERRAN_KD8CHARGE", sc2::UNIT_TYPEID::TERRAN_KD8CHARGE) - .value("TERRAN_NUKE", sc2::UNIT_TYPEID::TERRAN_NUKE) - .value("TERRAN_POINTDEFENSEDRONE", sc2::UNIT_TYPEID::TERRAN_POINTDEFENSEDRONE) - .value("TERRAN_REACTOR", sc2::UNIT_TYPEID::TERRAN_REACTOR) - .value("TERRAN_TECHLAB", sc2::UNIT_TYPEID::TERRAN_TECHLAB) - .value("ZERG_BANELING", sc2::UNIT_TYPEID::ZERG_BANELING) - .value("ZERG_BANELINGBURROWED", sc2::UNIT_TYPEID::ZERG_BANELINGBURROWED) - .value("ZERG_BANELINGCOCOON", sc2::UNIT_TYPEID::ZERG_BANELINGCOCOON) - .value("ZERG_BANELINGNEST", sc2::UNIT_TYPEID::ZERG_BANELINGNEST) - .value("ZERG_BROODLING", sc2::UNIT_TYPEID::ZERG_BROODLING) - .value("ZERG_BROODLORD", sc2::UNIT_TYPEID::ZERG_BROODLORD) - .value("ZERG_BROODLORDCOCOON", sc2::UNIT_TYPEID::ZERG_BROODLORDCOCOON) - .value("ZERG_CHANGELING", sc2::UNIT_TYPEID::ZERG_CHANGELING) - .value("ZERG_CHANGELINGMARINE", sc2::UNIT_TYPEID::ZERG_CHANGELINGMARINE) - .value("ZERG_CHANGELINGMARINESHIELD", sc2::UNIT_TYPEID::ZERG_CHANGELINGMARINESHIELD) - .value("ZERG_CHANGELINGZEALOT", sc2::UNIT_TYPEID::ZERG_CHANGELINGZEALOT) - .value("ZERG_CHANGELINGZERGLING", sc2::UNIT_TYPEID::ZERG_CHANGELINGZERGLING) - .value("ZERG_CHANGELINGZERGLINGWINGS", sc2::UNIT_TYPEID::ZERG_CHANGELINGZERGLINGWINGS) - .value("ZERG_CORRUPTOR", sc2::UNIT_TYPEID::ZERG_CORRUPTOR) - .value("ZERG_CREEPTUMOR", sc2::UNIT_TYPEID::ZERG_CREEPTUMOR) - .value("ZERG_CREEPTUMORBURROWED", sc2::UNIT_TYPEID::ZERG_CREEPTUMORBURROWED) - .value("ZERG_CREEPTUMORQUEEN", sc2::UNIT_TYPEID::ZERG_CREEPTUMORQUEEN) - .value("ZERG_DRONE", sc2::UNIT_TYPEID::ZERG_DRONE) - .value("ZERG_DRONEBURROWED", sc2::UNIT_TYPEID::ZERG_DRONEBURROWED) - .value("ZERG_EGG", sc2::UNIT_TYPEID::ZERG_EGG) - .value("ZERG_EVOLUTIONCHAMBER", sc2::UNIT_TYPEID::ZERG_EVOLUTIONCHAMBER) - .value("ZERG_EXTRACTOR", sc2::UNIT_TYPEID::ZERG_EXTRACTOR) - .value("ZERG_GREATERSPIRE", sc2::UNIT_TYPEID::ZERG_GREATERSPIRE) - .value("ZERG_HATCHERY", sc2::UNIT_TYPEID::ZERG_HATCHERY) - .value("ZERG_HIVE", sc2::UNIT_TYPEID::ZERG_HIVE) - .value("ZERG_HYDRALISK", sc2::UNIT_TYPEID::ZERG_HYDRALISK) - .value("ZERG_HYDRALISKBURROWED", sc2::UNIT_TYPEID::ZERG_HYDRALISKBURROWED) - .value("ZERG_HYDRALISKDEN", sc2::UNIT_TYPEID::ZERG_HYDRALISKDEN) - .value("ZERG_INFESTATIONPIT", sc2::UNIT_TYPEID::ZERG_INFESTATIONPIT) - .value("ZERG_INFESTEDTERRANSEGG", sc2::UNIT_TYPEID::ZERG_INFESTEDTERRANSEGG) - .value("ZERG_INFESTOR", sc2::UNIT_TYPEID::ZERG_INFESTOR) - .value("ZERG_INFESTORBURROWED", sc2::UNIT_TYPEID::ZERG_INFESTORBURROWED) - .value("ZERG_INFESTORTERRAN", sc2::UNIT_TYPEID::ZERG_INFESTORTERRAN) - .value("ZERG_LAIR", sc2::UNIT_TYPEID::ZERG_LAIR) - .value("ZERG_LARVA", sc2::UNIT_TYPEID::ZERG_LARVA) - .value("ZERG_LOCUSTMP", sc2::UNIT_TYPEID::ZERG_LOCUSTMP) - .value("ZERG_LOCUSTMPFLYING", sc2::UNIT_TYPEID::ZERG_LOCUSTMPFLYING) - .value("ZERG_LURKERDENMP", sc2::UNIT_TYPEID::ZERG_LURKERDENMP) - .value("ZERG_LURKERMP", sc2::UNIT_TYPEID::ZERG_LURKERMP) - .value("ZERG_LURKERMPBURROWED", sc2::UNIT_TYPEID::ZERG_LURKERMPBURROWED) - .value("ZERG_LURKERMPEGG", sc2::UNIT_TYPEID::ZERG_LURKERMPEGG) - .value("ZERG_MUTALISK", sc2::UNIT_TYPEID::ZERG_MUTALISK) - .value("ZERG_NYDUSCANAL", sc2::UNIT_TYPEID::ZERG_NYDUSCANAL) - .value("ZERG_NYDUSNETWORK", sc2::UNIT_TYPEID::ZERG_NYDUSNETWORK) - .value("ZERG_OVERLORD", sc2::UNIT_TYPEID::ZERG_OVERLORD) - .value("ZERG_OVERLORDCOCOON", sc2::UNIT_TYPEID::ZERG_OVERLORDCOCOON) - .value("ZERG_OVERLORDTRANSPORT", sc2::UNIT_TYPEID::ZERG_OVERLORDTRANSPORT) - .value("ZERG_OVERSEER", sc2::UNIT_TYPEID::ZERG_OVERSEER) - .value("ZERG_QUEEN", sc2::UNIT_TYPEID::ZERG_QUEEN) - .value("ZERG_QUEENBURROWED", sc2::UNIT_TYPEID::ZERG_QUEENBURROWED) - .value("ZERG_RAVAGER", sc2::UNIT_TYPEID::ZERG_RAVAGER) - .value("ZERG_RAVAGERCOCOON", sc2::UNIT_TYPEID::ZERG_RAVAGERCOCOON) - .value("ZERG_ROACH", sc2::UNIT_TYPEID::ZERG_ROACH) - .value("ZERG_ROACHBURROWED", sc2::UNIT_TYPEID::ZERG_ROACHBURROWED) - .value("ZERG_ROACHWARREN", sc2::UNIT_TYPEID::ZERG_ROACHWARREN) - .value("ZERG_SPAWNINGPOOL", sc2::UNIT_TYPEID::ZERG_SPAWNINGPOOL) - .value("ZERG_SPINECRAWLER", sc2::UNIT_TYPEID::ZERG_SPINECRAWLER) - .value("ZERG_SPINECRAWLERUPROOTED", sc2::UNIT_TYPEID::ZERG_SPINECRAWLERUPROOTED) - .value("ZERG_SPIRE", sc2::UNIT_TYPEID::ZERG_SPIRE) - .value("ZERG_SPORECRAWLER", sc2::UNIT_TYPEID::ZERG_SPORECRAWLER) - .value("ZERG_SPORECRAWLERUPROOTED", sc2::UNIT_TYPEID::ZERG_SPORECRAWLERUPROOTED) - .value("ZERG_SWARMHOSTBURROWEDMP", sc2::UNIT_TYPEID::ZERG_SWARMHOSTBURROWEDMP) - .value("ZERG_SWARMHOSTMP", sc2::UNIT_TYPEID::ZERG_SWARMHOSTMP) - .value("ZERG_TRANSPORTOVERLORDCOCOON", sc2::UNIT_TYPEID::ZERG_TRANSPORTOVERLORDCOCOON) - .value("ZERG_ULTRALISK", sc2::UNIT_TYPEID::ZERG_ULTRALISK) - .value("ZERG_ULTRALISKCAVERN", sc2::UNIT_TYPEID::ZERG_ULTRALISKCAVERN) - .value("ZERG_VIPER", sc2::UNIT_TYPEID::ZERG_VIPER) - .value("ZERG_ZERGLING", sc2::UNIT_TYPEID::ZERG_ZERGLING) - .value("ZERG_ZERGLINGBURROWED", sc2::UNIT_TYPEID::ZERG_ZERGLINGBURROWED) - .value("ZERG_PARASITICBOMBDUMMY", sc2::UNIT_TYPEID::ZERG_PARASITICBOMBDUMMY) - .value("PROTOSS_ADEPT", sc2::UNIT_TYPEID::PROTOSS_ADEPT) - .value("PROTOSS_ADEPTPHASESHIFT", sc2::UNIT_TYPEID::PROTOSS_ADEPTPHASESHIFT) - .value("PROTOSS_ARCHON", sc2::UNIT_TYPEID::PROTOSS_ARCHON) - .value("PROTOSS_ASSIMILATOR", sc2::UNIT_TYPEID::PROTOSS_ASSIMILATOR) - .value("PROTOSS_CARRIER", sc2::UNIT_TYPEID::PROTOSS_CARRIER) - .value("PROTOSS_COLOSSUS", sc2::UNIT_TYPEID::PROTOSS_COLOSSUS) - .value("PROTOSS_CYBERNETICSCORE", sc2::UNIT_TYPEID::PROTOSS_CYBERNETICSCORE) - .value("PROTOSS_DARKSHRINE", sc2::UNIT_TYPEID::PROTOSS_DARKSHRINE) - .value("PROTOSS_DARKTEMPLAR", sc2::UNIT_TYPEID::PROTOSS_DARKTEMPLAR) - .value("PROTOSS_DISRUPTOR", sc2::UNIT_TYPEID::PROTOSS_DISRUPTOR) - .value("PROTOSS_DISRUPTORPHASED", sc2::UNIT_TYPEID::PROTOSS_DISRUPTORPHASED) - .value("PROTOSS_FLEETBEACON", sc2::UNIT_TYPEID::PROTOSS_FLEETBEACON) - .value("PROTOSS_FORGE", sc2::UNIT_TYPEID::PROTOSS_FORGE) - .value("PROTOSS_GATEWAY", sc2::UNIT_TYPEID::PROTOSS_GATEWAY) - .value("PROTOSS_HIGHTEMPLAR", sc2::UNIT_TYPEID::PROTOSS_HIGHTEMPLAR) - .value("PROTOSS_IMMORTAL", sc2::UNIT_TYPEID::PROTOSS_IMMORTAL) - .value("PROTOSS_INTERCEPTOR", sc2::UNIT_TYPEID::PROTOSS_INTERCEPTOR) - .value("PROTOSS_MOTHERSHIP", sc2::UNIT_TYPEID::PROTOSS_MOTHERSHIP) - .value("PROTOSS_MOTHERSHIPCORE", sc2::UNIT_TYPEID::PROTOSS_MOTHERSHIPCORE) - .value("PROTOSS_NEXUS", sc2::UNIT_TYPEID::PROTOSS_NEXUS) - .value("PROTOSS_OBSERVER", sc2::UNIT_TYPEID::PROTOSS_OBSERVER) - .value("PROTOSS_ORACLE", sc2::UNIT_TYPEID::PROTOSS_ORACLE) - .value("PROTOSS_ORACLESTASISTRAP", sc2::UNIT_TYPEID::PROTOSS_ORACLESTASISTRAP) - .value("PROTOSS_PHOENIX", sc2::UNIT_TYPEID::PROTOSS_PHOENIX) - .value("PROTOSS_PHOTONCANNON", sc2::UNIT_TYPEID::PROTOSS_PHOTONCANNON) - .value("PROTOSS_PROBE", sc2::UNIT_TYPEID::PROTOSS_PROBE) - .value("PROTOSS_PYLON", sc2::UNIT_TYPEID::PROTOSS_PYLON) - .value("PROTOSS_PYLONOVERCHARGED", sc2::UNIT_TYPEID::PROTOSS_PYLONOVERCHARGED) - .value("PROTOSS_ROBOTICSBAY", sc2::UNIT_TYPEID::PROTOSS_ROBOTICSBAY) - .value("PROTOSS_ROBOTICSFACILITY", sc2::UNIT_TYPEID::PROTOSS_ROBOTICSFACILITY) - .value("PROTOSS_SENTRY", sc2::UNIT_TYPEID::PROTOSS_SENTRY) - .value("PROTOSS_SHIELDBATTERY", sc2::UNIT_TYPEID::PROTOSS_SHIELDBATTERY) - .value("PROTOSS_STALKER", sc2::UNIT_TYPEID::PROTOSS_STALKER) - .value("PROTOSS_STARGATE", sc2::UNIT_TYPEID::PROTOSS_STARGATE) - .value("PROTOSS_TEMPEST", sc2::UNIT_TYPEID::PROTOSS_TEMPEST) - .value("PROTOSS_TEMPLARARCHIVE", sc2::UNIT_TYPEID::PROTOSS_TEMPLARARCHIVE) - .value("PROTOSS_TWILIGHTCOUNCIL", sc2::UNIT_TYPEID::PROTOSS_TWILIGHTCOUNCIL) - .value("PROTOSS_VOIDRAY", sc2::UNIT_TYPEID::PROTOSS_VOIDRAY) - .value("PROTOSS_WARPGATE", sc2::UNIT_TYPEID::PROTOSS_WARPGATE) - .value("PROTOSS_WARPPRISM", sc2::UNIT_TYPEID::PROTOSS_WARPPRISM) - .value("PROTOSS_WARPPRISMPHASING", sc2::UNIT_TYPEID::PROTOSS_WARPPRISMPHASING) - .value("PROTOSS_ZEALOT", sc2::UNIT_TYPEID::PROTOSS_ZEALOT) - .value("NEUTRAL_BATTLESTATIONMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_BATTLESTATIONMINERALFIELD) - .value("NEUTRAL_BATTLESTATIONMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_BATTLESTATIONMINERALFIELD750) - .value("NEUTRAL_COLLAPSIBLEROCKTOWERDEBRIS", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLEROCKTOWERDEBRIS) - .value("NEUTRAL_COLLAPSIBLEROCKTOWERDIAGONAL", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLEROCKTOWERDIAGONAL) - .value("NEUTRAL_COLLAPSIBLEROCKTOWERPUSHUNIT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLEROCKTOWERPUSHUNIT) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERDEBRIS", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERDEBRIS) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERDIAGONAL", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERDIAGONAL) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNIT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNIT) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPLEFT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPLEFT) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPRIGHT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPRIGHT) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERRAMPLEFT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERRAMPLEFT) - .value("NEUTRAL_COLLAPSIBLETERRANTOWERRAMPRIGHT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERRAMPRIGHT) - .value("NEUTRAL_DEBRISRAMPLEFT", sc2::UNIT_TYPEID::NEUTRAL_DEBRISRAMPLEFT) - .value("NEUTRAL_DEBRISRAMPRIGHT", sc2::UNIT_TYPEID::NEUTRAL_DEBRISRAMPRIGHT) - .value("NEUTRAL_DESTRUCTIBLEDEBRIS6X6", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEDEBRIS6X6) - .value("NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEBLUR", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEBLUR) - .value("NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEULBR", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEULBR) - .value("NEUTRAL_DESTRUCTIBLEROCK6X6", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEROCK6X6) - .value("NEUTRAL_DESTRUCTIBLEROCKEX1DIAGONALHUGEBLUR", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEROCKEX1DIAGONALHUGEBLUR) - .value("NEUTRAL_FORCEFIELD", sc2::UNIT_TYPEID::NEUTRAL_FORCEFIELD) - .value("NEUTRAL_KARAKFEMALE", sc2::UNIT_TYPEID::NEUTRAL_KARAKFEMALE) - .value("NEUTRAL_LABMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_LABMINERALFIELD) - .value("NEUTRAL_LABMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_LABMINERALFIELD750) - .value("NEUTRAL_MINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_MINERALFIELD) - .value("NEUTRAL_MINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_MINERALFIELD750) - .value("NEUTRAL_PROTOSSVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_PROTOSSVESPENEGEYSER) - .value("NEUTRAL_PURIFIERMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERMINERALFIELD) - .value("NEUTRAL_PURIFIERMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERMINERALFIELD750) - .value("NEUTRAL_PURIFIERRICHMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERRICHMINERALFIELD) - .value("NEUTRAL_PURIFIERRICHMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERRICHMINERALFIELD750) - .value("NEUTRAL_PURIFIERVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERVESPENEGEYSER) - .value("NEUTRAL_RICHMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_RICHMINERALFIELD) - .value("NEUTRAL_RICHMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_RICHMINERALFIELD750) - .value("NEUTRAL_RICHVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_RICHVESPENEGEYSER) - .value("NEUTRAL_SCANTIPEDE", sc2::UNIT_TYPEID::NEUTRAL_SCANTIPEDE) - .value("NEUTRAL_SHAKURASVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_SHAKURASVESPENEGEYSER) - .value("NEUTRAL_SPACEPLATFORMGEYSER", sc2::UNIT_TYPEID::NEUTRAL_SPACEPLATFORMGEYSER) - .value("NEUTRAL_UNBUILDABLEBRICKSDESTRUCTIBLE", sc2::UNIT_TYPEID::NEUTRAL_UNBUILDABLEBRICKSDESTRUCTIBLE) - .value("NEUTRAL_UNBUILDABLEPLATESDESTRUCTIBLE", sc2::UNIT_TYPEID::NEUTRAL_UNBUILDABLEPLATESDESTRUCTIBLE) - .value("NEUTRAL_UTILITYBOT", sc2::UNIT_TYPEID::NEUTRAL_UTILITYBOT) - .value("NEUTRAL_VESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_VESPENEGEYSER) - .value("NEUTRAL_XELNAGATOWER", sc2::UNIT_TYPEID::NEUTRAL_XELNAGATOWER); - - m.def("CreateComputer", &sc2::CreateComputer, "Create participant from built-in Starcraft computer"); -} diff --git a/python-api-src/CMakeLists.txt b/python-api-src/CMakeLists.txt new file mode 100644 index 0000000..34bace6 --- /dev/null +++ b/python-api-src/CMakeLists.txt @@ -0,0 +1,22 @@ +include_directories(SYSTEM + ${PROJECT_SOURCE_DIR}/lib/s2client-api/include + ${PROJECT_SOURCE_DIR}/lib/s2client-api/contrib/protobuf/src + ${PROJECT_BINARY_DIR}/lib/s2client-api/generated +) + +# All the source files for the bot. +file(GLOB BOT_SOURCES "../src/*.cpp" "../src/*.h" "../src/*.hpp") + +file(GLOB LIBRARY_SOURCES "*.cpp" "*.h") + +link_directories(${PROJECT_BINARY_DIR}/s2client-api/bin) + +# Enable compilation of the SC2 version of the bot code +# TODO: Remove all remaining BW code +add_definitions(-DSC2API) + +# Create the executable. +pybind11_add_module(library library.cpp library.h ${BOT_SOURCES} ${LIBRARY_SOURCES}) +target_link_libraries(library PRIVATE + sc2api sc2lib sc2utils sc2protocol libprotobuf +) diff --git a/python-api-src/lib_sc2_typeenums.cpp b/python-api-src/lib_sc2_typeenums.cpp new file mode 100644 index 0000000..21b0c09 --- /dev/null +++ b/python-api-src/lib_sc2_typeenums.cpp @@ -0,0 +1,830 @@ +#include "library.h" + +namespace py = pybind11; + +// This file is brought to you by VIM, phew. + +void define_pyteenums(py::module & m) +{ + py::enum_<sc2::UNIT_TYPEID>(m, "UNIT_TYPEID") + .value("INVALID", sc2::UNIT_TYPEID::INVALID) + .value("TERRAN_ARMORY", sc2::UNIT_TYPEID::TERRAN_ARMORY) + .value("TERRAN_AUTOTURRET", sc2::UNIT_TYPEID::TERRAN_AUTOTURRET) + .value("TERRAN_BANSHEE", sc2::UNIT_TYPEID::TERRAN_BANSHEE) + .value("TERRAN_BARRACKS", sc2::UNIT_TYPEID::TERRAN_BARRACKS) + .value("TERRAN_BARRACKSFLYING", sc2::UNIT_TYPEID::TERRAN_BARRACKSFLYING) + .value("TERRAN_BARRACKSREACTOR", sc2::UNIT_TYPEID::TERRAN_BARRACKSREACTOR) + .value("TERRAN_BARRACKSTECHLAB", sc2::UNIT_TYPEID::TERRAN_BARRACKSTECHLAB) + .value("TERRAN_BATTLECRUISER", sc2::UNIT_TYPEID::TERRAN_BATTLECRUISER) + .value("TERRAN_BUNKER", sc2::UNIT_TYPEID::TERRAN_BUNKER) + .value("TERRAN_COMMANDCENTER", sc2::UNIT_TYPEID::TERRAN_COMMANDCENTER) + .value("TERRAN_COMMANDCENTERFLYING", sc2::UNIT_TYPEID::TERRAN_COMMANDCENTERFLYING) + .value("TERRAN_CYCLONE", sc2::UNIT_TYPEID::TERRAN_CYCLONE) + .value("TERRAN_ENGINEERINGBAY", sc2::UNIT_TYPEID::TERRAN_ENGINEERINGBAY) + .value("TERRAN_FACTORY", sc2::UNIT_TYPEID::TERRAN_FACTORY) + .value("TERRAN_FACTORYFLYING", sc2::UNIT_TYPEID::TERRAN_FACTORYFLYING) + .value("TERRAN_FACTORYREACTOR", sc2::UNIT_TYPEID::TERRAN_FACTORYREACTOR) + .value("TERRAN_FACTORYTECHLAB", sc2::UNIT_TYPEID::TERRAN_FACTORYTECHLAB) + .value("TERRAN_FUSIONCORE", sc2::UNIT_TYPEID::TERRAN_FUSIONCORE) + .value("TERRAN_GHOST", sc2::UNIT_TYPEID::TERRAN_GHOST) + .value("TERRAN_GHOSTACADEMY", sc2::UNIT_TYPEID::TERRAN_GHOSTACADEMY) + .value("TERRAN_HELLION", sc2::UNIT_TYPEID::TERRAN_HELLION) + .value("TERRAN_HELLIONTANK", sc2::UNIT_TYPEID::TERRAN_HELLIONTANK) + .value("TERRAN_LIBERATOR", sc2::UNIT_TYPEID::TERRAN_LIBERATOR) + .value("TERRAN_LIBERATORAG", sc2::UNIT_TYPEID::TERRAN_LIBERATORAG) + .value("TERRAN_MARAUDER", sc2::UNIT_TYPEID::TERRAN_MARAUDER) + .value("TERRAN_MARINE", sc2::UNIT_TYPEID::TERRAN_MARINE) + .value("TERRAN_MEDIVAC", sc2::UNIT_TYPEID::TERRAN_MEDIVAC) + .value("TERRAN_MISSILETURRET", sc2::UNIT_TYPEID::TERRAN_MISSILETURRET) + .value("TERRAN_MULE", sc2::UNIT_TYPEID::TERRAN_MULE) + .value("TERRAN_ORBITALCOMMAND", sc2::UNIT_TYPEID::TERRAN_ORBITALCOMMAND) + .value("TERRAN_ORBITALCOMMANDFLYING", sc2::UNIT_TYPEID::TERRAN_ORBITALCOMMANDFLYING) + .value("TERRAN_PLANETARYFORTRESS", sc2::UNIT_TYPEID::TERRAN_PLANETARYFORTRESS) + .value("TERRAN_RAVEN", sc2::UNIT_TYPEID::TERRAN_RAVEN) + .value("TERRAN_REAPER", sc2::UNIT_TYPEID::TERRAN_REAPER) + .value("TERRAN_REFINERY", sc2::UNIT_TYPEID::TERRAN_REFINERY) + .value("TERRAN_SCV", sc2::UNIT_TYPEID::TERRAN_SCV) + .value("TERRAN_SENSORTOWER", sc2::UNIT_TYPEID::TERRAN_SENSORTOWER) + .value("TERRAN_SIEGETANK", sc2::UNIT_TYPEID::TERRAN_SIEGETANK) + .value("TERRAN_SIEGETANKSIEGED", sc2::UNIT_TYPEID::TERRAN_SIEGETANKSIEGED) + .value("TERRAN_STARPORT", sc2::UNIT_TYPEID::TERRAN_STARPORT) + .value("TERRAN_STARPORTFLYING", sc2::UNIT_TYPEID::TERRAN_STARPORTFLYING) + .value("TERRAN_STARPORTREACTOR", sc2::UNIT_TYPEID::TERRAN_STARPORTREACTOR) + .value("TERRAN_STARPORTTECHLAB", sc2::UNIT_TYPEID::TERRAN_STARPORTTECHLAB) + .value("TERRAN_SUPPLYDEPOT", sc2::UNIT_TYPEID::TERRAN_SUPPLYDEPOT) + .value("TERRAN_SUPPLYDEPOTLOWERED", sc2::UNIT_TYPEID::TERRAN_SUPPLYDEPOTLOWERED) + .value("TERRAN_THOR", sc2::UNIT_TYPEID::TERRAN_THOR) + .value("TERRAN_THORAP", sc2::UNIT_TYPEID::TERRAN_THORAP) + .value("TERRAN_VIKINGASSAULT", sc2::UNIT_TYPEID::TERRAN_VIKINGASSAULT) + .value("TERRAN_VIKINGFIGHTER", sc2::UNIT_TYPEID::TERRAN_VIKINGFIGHTER) + .value("TERRAN_WIDOWMINE", sc2::UNIT_TYPEID::TERRAN_WIDOWMINE) + .value("TERRAN_WIDOWMINEBURROWED", sc2::UNIT_TYPEID::TERRAN_WIDOWMINEBURROWED) + .value("TERRAN_KD8CHARGE", sc2::UNIT_TYPEID::TERRAN_KD8CHARGE) + .value("TERRAN_NUKE", sc2::UNIT_TYPEID::TERRAN_NUKE) + .value("TERRAN_POINTDEFENSEDRONE", sc2::UNIT_TYPEID::TERRAN_POINTDEFENSEDRONE) + .value("TERRAN_REACTOR", sc2::UNIT_TYPEID::TERRAN_REACTOR) + .value("TERRAN_TECHLAB", sc2::UNIT_TYPEID::TERRAN_TECHLAB) + .value("ZERG_BANELING", sc2::UNIT_TYPEID::ZERG_BANELING) + .value("ZERG_BANELINGBURROWED", sc2::UNIT_TYPEID::ZERG_BANELINGBURROWED) + .value("ZERG_BANELINGCOCOON", sc2::UNIT_TYPEID::ZERG_BANELINGCOCOON) + .value("ZERG_BANELINGNEST", sc2::UNIT_TYPEID::ZERG_BANELINGNEST) + .value("ZERG_BROODLING", sc2::UNIT_TYPEID::ZERG_BROODLING) + .value("ZERG_BROODLORD", sc2::UNIT_TYPEID::ZERG_BROODLORD) + .value("ZERG_BROODLORDCOCOON", sc2::UNIT_TYPEID::ZERG_BROODLORDCOCOON) + .value("ZERG_CHANGELING", sc2::UNIT_TYPEID::ZERG_CHANGELING) + .value("ZERG_CHANGELINGMARINE", sc2::UNIT_TYPEID::ZERG_CHANGELINGMARINE) + .value("ZERG_CHANGELINGMARINESHIELD", sc2::UNIT_TYPEID::ZERG_CHANGELINGMARINESHIELD) + .value("ZERG_CHANGELINGZEALOT", sc2::UNIT_TYPEID::ZERG_CHANGELINGZEALOT) + .value("ZERG_CHANGELINGZERGLING", sc2::UNIT_TYPEID::ZERG_CHANGELINGZERGLING) + .value("ZERG_CHANGELINGZERGLINGWINGS", sc2::UNIT_TYPEID::ZERG_CHANGELINGZERGLINGWINGS) + .value("ZERG_CORRUPTOR", sc2::UNIT_TYPEID::ZERG_CORRUPTOR) + .value("ZERG_CREEPTUMOR", sc2::UNIT_TYPEID::ZERG_CREEPTUMOR) + .value("ZERG_CREEPTUMORBURROWED", sc2::UNIT_TYPEID::ZERG_CREEPTUMORBURROWED) + .value("ZERG_CREEPTUMORQUEEN", sc2::UNIT_TYPEID::ZERG_CREEPTUMORQUEEN) + .value("ZERG_DRONE", sc2::UNIT_TYPEID::ZERG_DRONE) + .value("ZERG_DRONEBURROWED", sc2::UNIT_TYPEID::ZERG_DRONEBURROWED) + .value("ZERG_EGG", sc2::UNIT_TYPEID::ZERG_EGG) + .value("ZERG_EVOLUTIONCHAMBER", sc2::UNIT_TYPEID::ZERG_EVOLUTIONCHAMBER) + .value("ZERG_EXTRACTOR", sc2::UNIT_TYPEID::ZERG_EXTRACTOR) + .value("ZERG_GREATERSPIRE", sc2::UNIT_TYPEID::ZERG_GREATERSPIRE) + .value("ZERG_HATCHERY", sc2::UNIT_TYPEID::ZERG_HATCHERY) + .value("ZERG_HIVE", sc2::UNIT_TYPEID::ZERG_HIVE) + .value("ZERG_HYDRALISK", sc2::UNIT_TYPEID::ZERG_HYDRALISK) + .value("ZERG_HYDRALISKBURROWED", sc2::UNIT_TYPEID::ZERG_HYDRALISKBURROWED) + .value("ZERG_HYDRALISKDEN", sc2::UNIT_TYPEID::ZERG_HYDRALISKDEN) + .value("ZERG_INFESTATIONPIT", sc2::UNIT_TYPEID::ZERG_INFESTATIONPIT) + .value("ZERG_INFESTEDTERRANSEGG", sc2::UNIT_TYPEID::ZERG_INFESTEDTERRANSEGG) + .value("ZERG_INFESTOR", sc2::UNIT_TYPEID::ZERG_INFESTOR) + .value("ZERG_INFESTORBURROWED", sc2::UNIT_TYPEID::ZERG_INFESTORBURROWED) + .value("ZERG_INFESTORTERRAN", sc2::UNIT_TYPEID::ZERG_INFESTORTERRAN) + .value("ZERG_LAIR", sc2::UNIT_TYPEID::ZERG_LAIR) + .value("ZERG_LARVA", sc2::UNIT_TYPEID::ZERG_LARVA) + .value("ZERG_LOCUSTMP", sc2::UNIT_TYPEID::ZERG_LOCUSTMP) + .value("ZERG_LOCUSTMPFLYING", sc2::UNIT_TYPEID::ZERG_LOCUSTMPFLYING) + .value("ZERG_LURKERDENMP", sc2::UNIT_TYPEID::ZERG_LURKERDENMP) + .value("ZERG_LURKERMP", sc2::UNIT_TYPEID::ZERG_LURKERMP) + .value("ZERG_LURKERMPBURROWED", sc2::UNIT_TYPEID::ZERG_LURKERMPBURROWED) + .value("ZERG_LURKERMPEGG", sc2::UNIT_TYPEID::ZERG_LURKERMPEGG) + .value("ZERG_MUTALISK", sc2::UNIT_TYPEID::ZERG_MUTALISK) + .value("ZERG_NYDUSCANAL", sc2::UNIT_TYPEID::ZERG_NYDUSCANAL) + .value("ZERG_NYDUSNETWORK", sc2::UNIT_TYPEID::ZERG_NYDUSNETWORK) + .value("ZERG_OVERLORD", sc2::UNIT_TYPEID::ZERG_OVERLORD) + .value("ZERG_OVERLORDCOCOON", sc2::UNIT_TYPEID::ZERG_OVERLORDCOCOON) + .value("ZERG_OVERLORDTRANSPORT", sc2::UNIT_TYPEID::ZERG_OVERLORDTRANSPORT) + .value("ZERG_OVERSEER", sc2::UNIT_TYPEID::ZERG_OVERSEER) + .value("ZERG_QUEEN", sc2::UNIT_TYPEID::ZERG_QUEEN) + .value("ZERG_QUEENBURROWED", sc2::UNIT_TYPEID::ZERG_QUEENBURROWED) + .value("ZERG_RAVAGER", sc2::UNIT_TYPEID::ZERG_RAVAGER) + .value("ZERG_RAVAGERCOCOON", sc2::UNIT_TYPEID::ZERG_RAVAGERCOCOON) + .value("ZERG_ROACH", sc2::UNIT_TYPEID::ZERG_ROACH) + .value("ZERG_ROACHBURROWED", sc2::UNIT_TYPEID::ZERG_ROACHBURROWED) + .value("ZERG_ROACHWARREN", sc2::UNIT_TYPEID::ZERG_ROACHWARREN) + .value("ZERG_SPAWNINGPOOL", sc2::UNIT_TYPEID::ZERG_SPAWNINGPOOL) + .value("ZERG_SPINECRAWLER", sc2::UNIT_TYPEID::ZERG_SPINECRAWLER) + .value("ZERG_SPINECRAWLERUPROOTED", sc2::UNIT_TYPEID::ZERG_SPINECRAWLERUPROOTED) + .value("ZERG_SPIRE", sc2::UNIT_TYPEID::ZERG_SPIRE) + .value("ZERG_SPORECRAWLER", sc2::UNIT_TYPEID::ZERG_SPORECRAWLER) + .value("ZERG_SPORECRAWLERUPROOTED", sc2::UNIT_TYPEID::ZERG_SPORECRAWLERUPROOTED) + .value("ZERG_SWARMHOSTBURROWEDMP", sc2::UNIT_TYPEID::ZERG_SWARMHOSTBURROWEDMP) + .value("ZERG_SWARMHOSTMP", sc2::UNIT_TYPEID::ZERG_SWARMHOSTMP) + .value("ZERG_TRANSPORTOVERLORDCOCOON", sc2::UNIT_TYPEID::ZERG_TRANSPORTOVERLORDCOCOON) + .value("ZERG_ULTRALISK", sc2::UNIT_TYPEID::ZERG_ULTRALISK) + .value("ZERG_ULTRALISKCAVERN", sc2::UNIT_TYPEID::ZERG_ULTRALISKCAVERN) + .value("ZERG_VIPER", sc2::UNIT_TYPEID::ZERG_VIPER) + .value("ZERG_ZERGLING", sc2::UNIT_TYPEID::ZERG_ZERGLING) + .value("ZERG_ZERGLINGBURROWED", sc2::UNIT_TYPEID::ZERG_ZERGLINGBURROWED) + .value("ZERG_PARASITICBOMBDUMMY", sc2::UNIT_TYPEID::ZERG_PARASITICBOMBDUMMY) + .value("PROTOSS_ADEPT", sc2::UNIT_TYPEID::PROTOSS_ADEPT) + .value("PROTOSS_ADEPTPHASESHIFT", sc2::UNIT_TYPEID::PROTOSS_ADEPTPHASESHIFT) + .value("PROTOSS_ARCHON", sc2::UNIT_TYPEID::PROTOSS_ARCHON) + .value("PROTOSS_ASSIMILATOR", sc2::UNIT_TYPEID::PROTOSS_ASSIMILATOR) + .value("PROTOSS_CARRIER", sc2::UNIT_TYPEID::PROTOSS_CARRIER) + .value("PROTOSS_COLOSSUS", sc2::UNIT_TYPEID::PROTOSS_COLOSSUS) + .value("PROTOSS_CYBERNETICSCORE", sc2::UNIT_TYPEID::PROTOSS_CYBERNETICSCORE) + .value("PROTOSS_DARKSHRINE", sc2::UNIT_TYPEID::PROTOSS_DARKSHRINE) + .value("PROTOSS_DARKTEMPLAR", sc2::UNIT_TYPEID::PROTOSS_DARKTEMPLAR) + .value("PROTOSS_DISRUPTOR", sc2::UNIT_TYPEID::PROTOSS_DISRUPTOR) + .value("PROTOSS_DISRUPTORPHASED", sc2::UNIT_TYPEID::PROTOSS_DISRUPTORPHASED) + .value("PROTOSS_FLEETBEACON", sc2::UNIT_TYPEID::PROTOSS_FLEETBEACON) + .value("PROTOSS_FORGE", sc2::UNIT_TYPEID::PROTOSS_FORGE) + .value("PROTOSS_GATEWAY", sc2::UNIT_TYPEID::PROTOSS_GATEWAY) + .value("PROTOSS_HIGHTEMPLAR", sc2::UNIT_TYPEID::PROTOSS_HIGHTEMPLAR) + .value("PROTOSS_IMMORTAL", sc2::UNIT_TYPEID::PROTOSS_IMMORTAL) + .value("PROTOSS_INTERCEPTOR", sc2::UNIT_TYPEID::PROTOSS_INTERCEPTOR) + .value("PROTOSS_MOTHERSHIP", sc2::UNIT_TYPEID::PROTOSS_MOTHERSHIP) + .value("PROTOSS_MOTHERSHIPCORE", sc2::UNIT_TYPEID::PROTOSS_MOTHERSHIPCORE) + .value("PROTOSS_NEXUS", sc2::UNIT_TYPEID::PROTOSS_NEXUS) + .value("PROTOSS_OBSERVER", sc2::UNIT_TYPEID::PROTOSS_OBSERVER) + .value("PROTOSS_ORACLE", sc2::UNIT_TYPEID::PROTOSS_ORACLE) + .value("PROTOSS_ORACLESTASISTRAP", sc2::UNIT_TYPEID::PROTOSS_ORACLESTASISTRAP) + .value("PROTOSS_PHOENIX", sc2::UNIT_TYPEID::PROTOSS_PHOENIX) + .value("PROTOSS_PHOTONCANNON", sc2::UNIT_TYPEID::PROTOSS_PHOTONCANNON) + .value("PROTOSS_PROBE", sc2::UNIT_TYPEID::PROTOSS_PROBE) + .value("PROTOSS_PYLON", sc2::UNIT_TYPEID::PROTOSS_PYLON) + .value("PROTOSS_PYLONOVERCHARGED", sc2::UNIT_TYPEID::PROTOSS_PYLONOVERCHARGED) + .value("PROTOSS_ROBOTICSBAY", sc2::UNIT_TYPEID::PROTOSS_ROBOTICSBAY) + .value("PROTOSS_ROBOTICSFACILITY", sc2::UNIT_TYPEID::PROTOSS_ROBOTICSFACILITY) + .value("PROTOSS_SENTRY", sc2::UNIT_TYPEID::PROTOSS_SENTRY) + .value("PROTOSS_SHIELDBATTERY", sc2::UNIT_TYPEID::PROTOSS_SHIELDBATTERY) + .value("PROTOSS_STALKER", sc2::UNIT_TYPEID::PROTOSS_STALKER) + .value("PROTOSS_STARGATE", sc2::UNIT_TYPEID::PROTOSS_STARGATE) + .value("PROTOSS_TEMPEST", sc2::UNIT_TYPEID::PROTOSS_TEMPEST) + .value("PROTOSS_TEMPLARARCHIVE", sc2::UNIT_TYPEID::PROTOSS_TEMPLARARCHIVE) + .value("PROTOSS_TWILIGHTCOUNCIL", sc2::UNIT_TYPEID::PROTOSS_TWILIGHTCOUNCIL) + .value("PROTOSS_VOIDRAY", sc2::UNIT_TYPEID::PROTOSS_VOIDRAY) + .value("PROTOSS_WARPGATE", sc2::UNIT_TYPEID::PROTOSS_WARPGATE) + .value("PROTOSS_WARPPRISM", sc2::UNIT_TYPEID::PROTOSS_WARPPRISM) + .value("PROTOSS_WARPPRISMPHASING", sc2::UNIT_TYPEID::PROTOSS_WARPPRISMPHASING) + .value("PROTOSS_ZEALOT", sc2::UNIT_TYPEID::PROTOSS_ZEALOT) + .value("NEUTRAL_BATTLESTATIONMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_BATTLESTATIONMINERALFIELD) + .value("NEUTRAL_BATTLESTATIONMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_BATTLESTATIONMINERALFIELD750) + .value("NEUTRAL_COLLAPSIBLEROCKTOWERDEBRIS", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLEROCKTOWERDEBRIS) + .value("NEUTRAL_COLLAPSIBLEROCKTOWERDIAGONAL", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLEROCKTOWERDIAGONAL) + .value("NEUTRAL_COLLAPSIBLEROCKTOWERPUSHUNIT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLEROCKTOWERPUSHUNIT) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERDEBRIS", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERDEBRIS) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERDIAGONAL", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERDIAGONAL) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNIT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNIT) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPLEFT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPLEFT) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPRIGHT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERPUSHUNITRAMPRIGHT) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERRAMPLEFT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERRAMPLEFT) + .value("NEUTRAL_COLLAPSIBLETERRANTOWERRAMPRIGHT", sc2::UNIT_TYPEID::NEUTRAL_COLLAPSIBLETERRANTOWERRAMPRIGHT) + .value("NEUTRAL_DEBRISRAMPLEFT", sc2::UNIT_TYPEID::NEUTRAL_DEBRISRAMPLEFT) + .value("NEUTRAL_DEBRISRAMPRIGHT", sc2::UNIT_TYPEID::NEUTRAL_DEBRISRAMPRIGHT) + .value("NEUTRAL_DESTRUCTIBLEDEBRIS6X6", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEDEBRIS6X6) + .value("NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEBLUR", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEBLUR) + .value("NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEULBR", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEDEBRISRAMPDIAGONALHUGEULBR) + .value("NEUTRAL_DESTRUCTIBLEROCK6X6", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEROCK6X6) + .value("NEUTRAL_DESTRUCTIBLEROCKEX1DIAGONALHUGEBLUR", sc2::UNIT_TYPEID::NEUTRAL_DESTRUCTIBLEROCKEX1DIAGONALHUGEBLUR) + .value("NEUTRAL_FORCEFIELD", sc2::UNIT_TYPEID::NEUTRAL_FORCEFIELD) + .value("NEUTRAL_KARAKFEMALE", sc2::UNIT_TYPEID::NEUTRAL_KARAKFEMALE) + .value("NEUTRAL_LABMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_LABMINERALFIELD) + .value("NEUTRAL_LABMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_LABMINERALFIELD750) + .value("NEUTRAL_MINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_MINERALFIELD) + .value("NEUTRAL_MINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_MINERALFIELD750) + .value("NEUTRAL_PROTOSSVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_PROTOSSVESPENEGEYSER) + .value("NEUTRAL_PURIFIERMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERMINERALFIELD) + .value("NEUTRAL_PURIFIERMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERMINERALFIELD750) + .value("NEUTRAL_PURIFIERRICHMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERRICHMINERALFIELD) + .value("NEUTRAL_PURIFIERRICHMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERRICHMINERALFIELD750) + .value("NEUTRAL_PURIFIERVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_PURIFIERVESPENEGEYSER) + .value("NEUTRAL_RICHMINERALFIELD", sc2::UNIT_TYPEID::NEUTRAL_RICHMINERALFIELD) + .value("NEUTRAL_RICHMINERALFIELD750", sc2::UNIT_TYPEID::NEUTRAL_RICHMINERALFIELD750) + .value("NEUTRAL_RICHVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_RICHVESPENEGEYSER) + .value("NEUTRAL_SCANTIPEDE", sc2::UNIT_TYPEID::NEUTRAL_SCANTIPEDE) + .value("NEUTRAL_SHAKURASVESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_SHAKURASVESPENEGEYSER) + .value("NEUTRAL_SPACEPLATFORMGEYSER", sc2::UNIT_TYPEID::NEUTRAL_SPACEPLATFORMGEYSER) + .value("NEUTRAL_UNBUILDABLEBRICKSDESTRUCTIBLE", sc2::UNIT_TYPEID::NEUTRAL_UNBUILDABLEBRICKSDESTRUCTIBLE) + .value("NEUTRAL_UNBUILDABLEPLATESDESTRUCTIBLE", sc2::UNIT_TYPEID::NEUTRAL_UNBUILDABLEPLATESDESTRUCTIBLE) + .value("NEUTRAL_UTILITYBOT", sc2::UNIT_TYPEID::NEUTRAL_UTILITYBOT) + .value("NEUTRAL_VESPENEGEYSER", sc2::UNIT_TYPEID::NEUTRAL_VESPENEGEYSER) + .value("NEUTRAL_XELNAGATOWER", sc2::UNIT_TYPEID::NEUTRAL_XELNAGATOWER); + + py::enum_<sc2::ABILITY_ID>(m, "ABILITY_ID") + .value("INVALID", sc2::ABILITY_ID::INVALID) + .value("SMART", sc2::ABILITY_ID::SMART) + .value("ATTACK", sc2::ABILITY_ID::ATTACK) + .value("ATTACK_ATTACK", sc2::ABILITY_ID::ATTACK_ATTACK) + .value("ATTACK_ATTACKBUILDING", sc2::ABILITY_ID::ATTACK_ATTACKBUILDING) + .value("ATTACK_REDIRECT", sc2::ABILITY_ID::ATTACK_REDIRECT) + .value("BEHAVIOR_BUILDINGATTACKOFF", sc2::ABILITY_ID::BEHAVIOR_BUILDINGATTACKOFF) + .value("BEHAVIOR_BUILDINGATTACKON", sc2::ABILITY_ID::BEHAVIOR_BUILDINGATTACKON) + .value("BEHAVIOR_CLOAKOFF", sc2::ABILITY_ID::BEHAVIOR_CLOAKOFF) + .value("BEHAVIOR_CLOAKOFF_BANSHEE", sc2::ABILITY_ID::BEHAVIOR_CLOAKOFF_BANSHEE) + .value("BEHAVIOR_CLOAKOFF_GHOST", sc2::ABILITY_ID::BEHAVIOR_CLOAKOFF_GHOST) + .value("BEHAVIOR_CLOAKON", sc2::ABILITY_ID::BEHAVIOR_CLOAKON) + .value("BEHAVIOR_CLOAKON_BANSHEE", sc2::ABILITY_ID::BEHAVIOR_CLOAKON_BANSHEE) + .value("BEHAVIOR_CLOAKON_GHOST", sc2::ABILITY_ID::BEHAVIOR_CLOAKON_GHOST) + .value("BEHAVIOR_GENERATECREEPOFF", sc2::ABILITY_ID::BEHAVIOR_GENERATECREEPOFF) + .value("BEHAVIOR_GENERATECREEPON", sc2::ABILITY_ID::BEHAVIOR_GENERATECREEPON) + .value("BEHAVIOR_HOLDFIREOFF", sc2::ABILITY_ID::BEHAVIOR_HOLDFIREOFF) + .value("BEHAVIOR_HOLDFIREOFF_LURKER", sc2::ABILITY_ID::BEHAVIOR_HOLDFIREOFF_LURKER) + .value("BEHAVIOR_HOLDFIREON", sc2::ABILITY_ID::BEHAVIOR_HOLDFIREON) + .value("BEHAVIOR_HOLDFIREON_GHOST", sc2::ABILITY_ID::BEHAVIOR_HOLDFIREON_GHOST) + .value("BEHAVIOR_HOLDFIREON_LURKER", sc2::ABILITY_ID::BEHAVIOR_HOLDFIREON_LURKER) + .value("BEHAVIOR_PULSARBEAMOFF", sc2::ABILITY_ID::BEHAVIOR_PULSARBEAMOFF) + .value("BEHAVIOR_PULSARBEAMON", sc2::ABILITY_ID::BEHAVIOR_PULSARBEAMON) + .value("BUILD_ARMORY", sc2::ABILITY_ID::BUILD_ARMORY) + .value("BUILD_ASSIMILATOR", sc2::ABILITY_ID::BUILD_ASSIMILATOR) + .value("BUILD_BANELINGNEST", sc2::ABILITY_ID::BUILD_BANELINGNEST) + .value("BUILD_BARRACKS", sc2::ABILITY_ID::BUILD_BARRACKS) + .value("BUILD_BUNKER", sc2::ABILITY_ID::BUILD_BUNKER) + .value("BUILD_COMMANDCENTER", sc2::ABILITY_ID::BUILD_COMMANDCENTER) + .value("BUILD_CREEPTUMOR", sc2::ABILITY_ID::BUILD_CREEPTUMOR) + .value("BUILD_CREEPTUMOR_QUEEN", sc2::ABILITY_ID::BUILD_CREEPTUMOR_QUEEN) + .value("BUILD_CREEPTUMOR_TUMOR", sc2::ABILITY_ID::BUILD_CREEPTUMOR_TUMOR) + .value("BUILD_CYBERNETICSCORE", sc2::ABILITY_ID::BUILD_CYBERNETICSCORE) + .value("BUILD_DARKSHRINE", sc2::ABILITY_ID::BUILD_DARKSHRINE) + .value("BUILD_ENGINEERINGBAY", sc2::ABILITY_ID::BUILD_ENGINEERINGBAY) + .value("BUILD_EVOLUTIONCHAMBER", sc2::ABILITY_ID::BUILD_EVOLUTIONCHAMBER) + .value("BUILD_EXTRACTOR", sc2::ABILITY_ID::BUILD_EXTRACTOR) + .value("BUILD_FACTORY", sc2::ABILITY_ID::BUILD_FACTORY) + .value("BUILD_FLEETBEACON", sc2::ABILITY_ID::BUILD_FLEETBEACON) + .value("BUILD_FORGE", sc2::ABILITY_ID::BUILD_FORGE) + .value("BUILD_FUSIONCORE", sc2::ABILITY_ID::BUILD_FUSIONCORE) + .value("BUILD_ = 275,GATEWAY", sc2::ABILITY_ID::BUILD_GATEWAY) + .value("BUILD_GHOSTACADEMY", sc2::ABILITY_ID::BUILD_GHOSTACADEMY) + .value("BUILD_HATCHERY", sc2::ABILITY_ID::BUILD_HATCHERY) + .value("BUILD_HYDRALISKDEN", sc2::ABILITY_ID::BUILD_HYDRALISKDEN) + .value("BUILD_INFESTATIONPIT", sc2::ABILITY_ID::BUILD_INFESTATIONPIT) + .value("BUILD_INTERCEPTORS", sc2::ABILITY_ID::BUILD_INTERCEPTORS) + .value("BUILD_MISSILETURRET", sc2::ABILITY_ID::BUILD_MISSILETURRET) + .value("BUILD_NEXUS", sc2::ABILITY_ID::BUILD_NEXUS) + .value("BUILD_NUKE", sc2::ABILITY_ID::BUILD_NUKE) + .value("BUILD_NYDUSNETWORK", sc2::ABILITY_ID::BUILD_NYDUSNETWORK) + .value("BUILD_NYDUSWORM", sc2::ABILITY_ID::BUILD_NYDUSWORM) + .value("BUILD_PHOTONCANNON", sc2::ABILITY_ID::BUILD_PHOTONCANNON) + .value("BUILD_PYLON", sc2::ABILITY_ID::BUILD_PYLON) + .value("BUILD_REACTOR", sc2::ABILITY_ID::BUILD_REACTOR) + .value("BUILD_REACTOR_BARRACKS", sc2::ABILITY_ID::BUILD_REACTOR_BARRACKS) + .value("BUILD_REACTOR_FACTORY", sc2::ABILITY_ID::BUILD_REACTOR_FACTORY) + .value("BUILD_REACTOR_STARPORT", sc2::ABILITY_ID::BUILD_REACTOR_STARPORT) + .value("BUILD_REFINERY", sc2::ABILITY_ID::BUILD_REFINERY) + .value("BUILD_ROACHWARREN", sc2::ABILITY_ID::BUILD_ROACHWARREN) + .value("BUILD_ROBOTICSBAY", sc2::ABILITY_ID::BUILD_ROBOTICSBAY) + .value("BUILD_ROBOTICSFACILITY", sc2::ABILITY_ID::BUILD_ROBOTICSFACILITY) + .value("BUILD_SENSORTOWER", sc2::ABILITY_ID::BUILD_SENSORTOWER) + .value("BUILD_SHIELDBATTERY", sc2::ABILITY_ID::BUILD_SHIELDBATTERY) + .value("BUILD_SPAWNINGPOOL", sc2::ABILITY_ID::BUILD_SPAWNINGPOOL) + .value("BUILD_SPINECRAWLER", sc2::ABILITY_ID::BUILD_SPINECRAWLER) + .value("BUILD_SPIRE", sc2::ABILITY_ID::BUILD_SPIRE) + .value("BUILD_SPORECRAWLER", sc2::ABILITY_ID::BUILD_SPORECRAWLER) + .value("BUILD_STARGATE", sc2::ABILITY_ID::BUILD_STARGATE) + .value("BUILD_STARPORT", sc2::ABILITY_ID::BUILD_STARPORT) + .value("BUILD_STASISTRAP", sc2::ABILITY_ID::BUILD_STASISTRAP) + .value("BUILD_SUPPLYDEPOT", sc2::ABILITY_ID::BUILD_SUPPLYDEPOT) + .value("BUILD_TECHLAB", sc2::ABILITY_ID::BUILD_TECHLAB) + .value("BUILD_TECHLAB_BARRACKS", sc2::ABILITY_ID::BUILD_TECHLAB_BARRACKS) + .value("BUILD_TECHLAB_FACTORY", sc2::ABILITY_ID::BUILD_TECHLAB_FACTORY) + .value("BUILD_TECHLAB_STARPORT", sc2::ABILITY_ID::BUILD_TECHLAB_STARPORT) + .value("BUILD_TEMPLARARCHIVE", sc2::ABILITY_ID::BUILD_TEMPLARARCHIVE) + .value("BUILD_TWILIGHTCOUNCIL", sc2::ABILITY_ID::BUILD_TWILIGHTCOUNCIL) + .value("BUILD_ULTRALISKCAVERN", sc2::ABILITY_ID::BUILD_ULTRALISKCAVERN) + .value("BURROWDOWN", sc2::ABILITY_ID::BURROWDOWN) + .value("BURROWDOWN_BANELING", sc2::ABILITY_ID::BURROWDOWN_BANELING) + .value("BURROWDOWN_DRONE", sc2::ABILITY_ID::BURROWDOWN_DRONE) + .value("BURROWDOWN_HYDRALISK", sc2::ABILITY_ID::BURROWDOWN_HYDRALISK) + .value("BURROWDOWN_INFESTOR", sc2::ABILITY_ID::BURROWDOWN_INFESTOR) + .value("BURROWDOWN_LURKER", sc2::ABILITY_ID::BURROWDOWN_LURKER) + .value("BURROWDOWN_QUEEN", sc2::ABILITY_ID::BURROWDOWN_QUEEN) + .value("BURROWDOWN_RAVAGER", sc2::ABILITY_ID::BURROWDOWN_RAVAGER) + .value("BURROWDOWN_ROACH", sc2::ABILITY_ID::BURROWDOWN_ROACH) + .value("BURROWDOWN_SWARMHOST", sc2::ABILITY_ID::BURROWDOWN_SWARMHOST) + .value("BURROWDOWN_WIDOWMINE", sc2::ABILITY_ID::BURROWDOWN_WIDOWMINE) + .value("BURROWDOWN_ZERGLING", sc2::ABILITY_ID::BURROWDOWN_ZERGLING) + .value("BURROWUP", sc2::ABILITY_ID::BURROWUP) + .value("BURROWUP_BANELING", sc2::ABILITY_ID::BURROWUP_BANELING) + .value("BURROWUP_DRONE", sc2::ABILITY_ID::BURROWUP_DRONE) + .value("BURROWUP_HYDRALISK", sc2::ABILITY_ID::BURROWUP_HYDRALISK) + .value("BURROWUP_INFESTOR", sc2::ABILITY_ID::BURROWUP_INFESTOR) + .value("BURROWUP_LURKER", sc2::ABILITY_ID::BURROWUP_LURKER) + .value("BURROWUP_QUEEN", sc2::ABILITY_ID::BURROWUP_QUEEN) + .value("BURROWUP_RAVAGER", sc2::ABILITY_ID::BURROWUP_RAVAGER) + .value("BURROWUP_ROACH", sc2::ABILITY_ID::BURROWUP_ROACH) + .value("BURROWUP_SWARMHOST", sc2::ABILITY_ID::BURROWUP_SWARMHOST) + .value("BURROWUP_WIDOWMINE", sc2::ABILITY_ID::BURROWUP_WIDOWMINE) + .value("BURROWUP_ZERGLING", sc2::ABILITY_ID::BURROWUP_ZERGLING) + .value("CANCEL", sc2::ABILITY_ID::CANCEL) + .value("CANCELSLOT_ADDON", sc2::ABILITY_ID::CANCELSLOT_ADDON) + .value("CANCELSLOT_QUEUE1", sc2::ABILITY_ID::CANCELSLOT_QUEUE1) + .value("CANCELSLOT_QUEUE5", sc2::ABILITY_ID::CANCELSLOT_QUEUE5) + .value("CANCELSLOT_QUEUECANCELTOSELECTION", sc2::ABILITY_ID::CANCELSLOT_QUEUECANCELTOSELECTION) + .value("CANCELSLOT_QUEUEPASSIVE", sc2::ABILITY_ID::CANCELSLOT_QUEUEPASSIVE) + .value("CANCEL_ADEPTPHASESHIFT", sc2::ABILITY_ID::CANCEL_ADEPTPHASESHIFT) + .value("CANCEL_ADEPTSHADEPHASESHIFT", sc2::ABILITY_ID::CANCEL_ADEPTSHADEPHASESHIFT) + .value("CANCEL_BARRACKSADDON", sc2::ABILITY_ID::CANCEL_BARRACKSADDON) + .value("CANCEL_BUILDINPROGRESS", sc2::ABILITY_ID::CANCEL_BUILDINPROGRESS) + .value("CANCEL_CREEPTUMOR", sc2::ABILITY_ID::CANCEL_CREEPTUMOR) + .value("CANCEL_FACTORYADDON", sc2::ABILITY_ID::CANCEL_FACTORYADDON) + .value("CANCEL_GRAVITONBEAM", sc2::ABILITY_ID::CANCEL_GRAVITONBEAM) + .value("CANCEL_LAST", sc2::ABILITY_ID::CANCEL_LAST) + .value("CANCEL_MORPHBROODLORD", sc2::ABILITY_ID::CANCEL_MORPHBROODLORD) + .value("CANCEL_MORPHLAIR", sc2::ABILITY_ID::CANCEL_MORPHLAIR) + .value("CANCEL_MORPHLURKER", sc2::ABILITY_ID::CANCEL_MORPHLURKER) + .value("CANCEL_MORPHLURKERDEN", sc2::ABILITY_ID::CANCEL_MORPHLURKERDEN) + .value("CANCEL_MORPHMOTHERSHIP", sc2::ABILITY_ID::CANCEL_MORPHMOTHERSHIP) + .value("CANCEL_MORPHORBITAL", sc2::ABILITY_ID::CANCEL_MORPHORBITAL) + .value("CANCEL_MORPHOVERLORDTRANSPORT", sc2::ABILITY_ID::CANCEL_MORPHOVERLORDTRANSPORT) + .value("CANCEL_MORPHOVERSEER", sc2::ABILITY_ID::CANCEL_MORPHOVERSEER) + .value("CANCEL_MORPHPLANETARYFORTRESS", sc2::ABILITY_ID::CANCEL_MORPHPLANETARYFORTRESS) + .value("CANCEL_MORPHRAVAGER", sc2::ABILITY_ID::CANCEL_MORPHRAVAGER) + .value("CANCEL_QUEUE1", sc2::ABILITY_ID::CANCEL_QUEUE1) + .value("CANCEL_QUEUE5", sc2::ABILITY_ID::CANCEL_QUEUE5) + .value("CANCEL_QUEUEADDON", sc2::ABILITY_ID::CANCEL_QUEUEADDON) + .value("CANCEL_QUEUECANCELTOSELECTION", sc2::ABILITY_ID::CANCEL_QUEUECANCELTOSELECTION) + .value("CANCEL_QUEUEPASIVE", sc2::ABILITY_ID::CANCEL_QUEUEPASIVE) + .value("CANCEL_QUEUEPASSIVECANCELTOSELECTION", sc2::ABILITY_ID::CANCEL_QUEUEPASSIVECANCELTOSELECTION) + .value("CANCEL_SPINECRAWLERROOT", sc2::ABILITY_ID::CANCEL_SPINECRAWLERROOT) + .value("CANCEL_STARPORTADDON", sc2::ABILITY_ID::CANCEL_STARPORTADDON) + .value("EFFECT_ABDUCT", sc2::ABILITY_ID::EFFECT_ABDUCT) + .value("EFFECT_ADEPTPHASESHIFT", sc2::ABILITY_ID::EFFECT_ADEPTPHASESHIFT) + .value("EFFECT_AUTOTURRET", sc2::ABILITY_ID::EFFECT_AUTOTURRET) + .value("EFFECT_BLINDINGCLOUD", sc2::ABILITY_ID::EFFECT_BLINDINGCLOUD) + .value("EFFECT_BLINK", sc2::ABILITY_ID::EFFECT_BLINK) + .value("EFFECT_BLINK_STALKER", sc2::ABILITY_ID::EFFECT_BLINK_STALKER) + .value("EFFECT_CALLDOWNMULE", sc2::ABILITY_ID::EFFECT_CALLDOWNMULE) + .value("EFFECT_CAUSTICSPRAY", sc2::ABILITY_ID::EFFECT_CAUSTICSPRAY) + .value("EFFECT_CHARGE", sc2::ABILITY_ID::EFFECT_CHARGE) + .value("EFFECT_CHRONOBOOST", sc2::ABILITY_ID::EFFECT_CHRONOBOOST) + .value("EFFECT_CONTAMINATE", sc2::ABILITY_ID::EFFECT_CONTAMINATE) + .value("EFFECT_CORROSIVEBILE", sc2::ABILITY_ID::EFFECT_CORROSIVEBILE) + .value("EFFECT_EMP", sc2::ABILITY_ID::EFFECT_EMP) + .value("EFFECT_EXPLODE", sc2::ABILITY_ID::EFFECT_EXPLODE) + .value("EFFECT_FEEDBACK", sc2::ABILITY_ID::EFFECT_FEEDBACK) + .value("EFFECT_FORCEFIELD", sc2::ABILITY_ID::EFFECT_FORCEFIELD) + .value("EFFECT_FUNGALGROWTH", sc2::ABILITY_ID::EFFECT_FUNGALGROWTH) + .value("EFFECT_GHOSTSNIPE", sc2::ABILITY_ID::EFFECT_GHOSTSNIPE) + .value("EFFECT_GRAVITONBEAM", sc2::ABILITY_ID::EFFECT_GRAVITONBEAM) + .value("EFFECT_GUARDIANSHIELD", sc2::ABILITY_ID::EFFECT_GUARDIANSHIELD) + .value("EFFECT_HEAL", sc2::ABILITY_ID::EFFECT_HEAL) + .value("EFFECT_HUNTERSEEKERMISSILE", sc2::ABILITY_ID::EFFECT_HUNTERSEEKERMISSILE) + .value("EFFECT_IMMORTALBARRIER", sc2::ABILITY_ID::EFFECT_IMMORTALBARRIER) + .value("EFFECT_INFESTEDTERRANS", sc2::ABILITY_ID::EFFECT_INFESTEDTERRANS) + .value("EFFECT_INJECTLARVA", sc2::ABILITY_ID::EFFECT_INJECTLARVA) + .value("EFFECT_KD8CHARGE", sc2::ABILITY_ID::EFFECT_KD8CHARGE) + .value("EFFECT_LOCKON", sc2::ABILITY_ID::EFFECT_LOCKON) + .value("EFFECT_LOCUSTSWOOP", sc2::ABILITY_ID::EFFECT_LOCUSTSWOOP) + .value("EFFECT_MASSRECALL", sc2::ABILITY_ID::EFFECT_MASSRECALL) + .value("EFFECT_MASSRECALL_MOTHERSHIP", sc2::ABILITY_ID::EFFECT_MASSRECALL_MOTHERSHIP) + .value("EFFECT_MASSRECALL_MOTHERSHIPCORE", sc2::ABILITY_ID::EFFECT_MASSRECALL_MOTHERSHIPCORE) + .value("EFFECT_MEDIVACIGNITEAFTERBURNERS", sc2::ABILITY_ID::EFFECT_MEDIVACIGNITEAFTERBURNERS) + .value("EFFECT_NEURALPARASITE", sc2::ABILITY_ID::EFFECT_NEURALPARASITE) + .value("EFFECT_NUKECALLDOWN", sc2::ABILITY_ID::EFFECT_NUKECALLDOWN) + .value("EFFECT_ORACLEREVELATION", sc2::ABILITY_ID::EFFECT_ORACLEREVELATION) + .value("EFFECT_PARASITICBOMB", sc2::ABILITY_ID::EFFECT_PARASITICBOMB) + .value("EFFECT_PHOTONOVERCHARGE", sc2::ABILITY_ID::EFFECT_PHOTONOVERCHARGE) + .value("EFFECT_POINTDEFENSEDRONE", sc2::ABILITY_ID::EFFECT_POINTDEFENSEDRONE) + .value("EFFECT_PSISTORM", sc2::ABILITY_ID::EFFECT_PSISTORM) + .value("EFFECT_PURIFICATIONNOVA", sc2::ABILITY_ID::EFFECT_PURIFICATIONNOVA) + .value("EFFECT_REPAIR", sc2::ABILITY_ID::EFFECT_REPAIR) + .value("EFFECT_REPAIR_MULE", sc2::ABILITY_ID::EFFECT_REPAIR_MULE) + .value("EFFECT_REPAIR_SCV", sc2::ABILITY_ID::EFFECT_REPAIR_SCV) + .value("EFFECT_RESTORE", sc2::ABILITY_ID::EFFECT_RESTORE) + .value("EFFECT_SALVAGE", sc2::ABILITY_ID::EFFECT_SALVAGE) + .value("EFFECT_SCAN", sc2::ABILITY_ID::EFFECT_SCAN) + .value("EFFECT_SHADOWSTRIDE", sc2::ABILITY_ID::EFFECT_SHADOWSTRIDE) + .value("EFFECT_SPAWNCHANGELING", sc2::ABILITY_ID::EFFECT_SPAWNCHANGELING) + .value("EFFECT_SPAWNLOCUSTS", sc2::ABILITY_ID::EFFECT_SPAWNLOCUSTS) + .value("EFFECT_SPRAY", sc2::ABILITY_ID::EFFECT_SPRAY) + .value("EFFECT_SPRAY_PROTOSS", sc2::ABILITY_ID::EFFECT_SPRAY_PROTOSS) + .value("EFFECT_SPRAY_TERRAN", sc2::ABILITY_ID::EFFECT_SPRAY_TERRAN) + .value("EFFECT_SPRAY_ZERG", sc2::ABILITY_ID::EFFECT_SPRAY_ZERG) + .value("EFFECT_STIM", sc2::ABILITY_ID::EFFECT_STIM) + .value("EFFECT_STIM_MARAUDER", sc2::ABILITY_ID::EFFECT_STIM_MARAUDER) + .value("EFFECT_STIM_MARINE", sc2::ABILITY_ID::EFFECT_STIM_MARINE) + .value("EFFECT_STIM_MARINE_REDIRECT", sc2::ABILITY_ID::EFFECT_STIM_MARINE_REDIRECT) + .value("EFFECT_SUPPLYDROP", sc2::ABILITY_ID::EFFECT_SUPPLYDROP) + .value("EFFECT_TACTICALJUMP", sc2::ABILITY_ID::EFFECT_TACTICALJUMP) + .value("EFFECT_TEMPESTDISRUPTIONBLAST", sc2::ABILITY_ID::EFFECT_TEMPESTDISRUPTIONBLAST) + .value("EFFECT_TIMEWARP", sc2::ABILITY_ID::EFFECT_TIMEWARP) + .value("EFFECT_TRANSFUSION", sc2::ABILITY_ID::EFFECT_TRANSFUSION) + .value("EFFECT_VIPERCONSUME", sc2::ABILITY_ID::EFFECT_VIPERCONSUME) + .value("EFFECT_VOIDRAYPRISMATICALIGNMENT", sc2::ABILITY_ID::EFFECT_VOIDRAYPRISMATICALIGNMENT) + .value("EFFECT_WIDOWMINEATTACK", sc2::ABILITY_ID::EFFECT_WIDOWMINEATTACK) + .value("EFFECT_YAMATOGUN", sc2::ABILITY_ID::EFFECT_YAMATOGUN) + .value("HALLUCINATION_ADEPT", sc2::ABILITY_ID::HALLUCINATION_ADEPT) + .value("HALLUCINATION_ARCHON", sc2::ABILITY_ID::HALLUCINATION_ARCHON) + .value("HALLUCINATION_COLOSSUS", sc2::ABILITY_ID::HALLUCINATION_COLOSSUS) + .value("HALLUCINATION_DISRUPTOR", sc2::ABILITY_ID::HALLUCINATION_DISRUPTOR) + .value("HALLUCINATION_HIGHTEMPLAR", sc2::ABILITY_ID::HALLUCINATION_HIGHTEMPLAR) + .value("HALLUCINATION_IMMORTAL", sc2::ABILITY_ID::HALLUCINATION_IMMORTAL) + .value("HALLUCINATION_ORACLE", sc2::ABILITY_ID::HALLUCINATION_ORACLE) + .value("HALLUCINATION_PHOENIX", sc2::ABILITY_ID::HALLUCINATION_PHOENIX) + .value("HALLUCINATION_PROBE", sc2::ABILITY_ID::HALLUCINATION_PROBE) + .value("HALLUCINATION_STALKER", sc2::ABILITY_ID::HALLUCINATION_STALKER) + .value("HALLUCINATION_VOIDRAY", sc2::ABILITY_ID::HALLUCINATION_VOIDRAY) + .value("HALLUCINATION_WARPPRISM", sc2::ABILITY_ID::HALLUCINATION_WARPPRISM) + .value("HALLUCINATION_ZEALOT", sc2::ABILITY_ID::HALLUCINATION_ZEALOT) + .value("HALT", sc2::ABILITY_ID::HALT) + .value("HALT_BUILDING", sc2::ABILITY_ID::HALT_BUILDING) + .value("HALT_TERRANBUILD", sc2::ABILITY_ID::HALT_TERRANBUILD) + .value("HARVEST_GATHER", sc2::ABILITY_ID::HARVEST_GATHER) + .value("HARVEST_GATHER_DRONE", sc2::ABILITY_ID::HARVEST_GATHER_DRONE) + .value("HARVEST_GATHER_PROBE", sc2::ABILITY_ID::HARVEST_GATHER_PROBE) + .value("HARVEST_GATHER_SCV", sc2::ABILITY_ID::HARVEST_GATHER_SCV) + .value("HARVEST_RETURN", sc2::ABILITY_ID::HARVEST_RETURN) + .value("HARVEST_RETURN_DRONE", sc2::ABILITY_ID::HARVEST_RETURN_DRONE) + .value("HARVEST_RETURN_MULE", sc2::ABILITY_ID::HARVEST_RETURN_MULE) + .value("HARVEST_RETURN_PROBE", sc2::ABILITY_ID::HARVEST_RETURN_PROBE) + .value("HARVEST_RETURN_SCV", sc2::ABILITY_ID::HARVEST_RETURN_SCV) + .value("HOLDPOSITION", sc2::ABILITY_ID::HOLDPOSITION) + .value("LAND", sc2::ABILITY_ID::LAND) + .value("LAND_BARRACKS", sc2::ABILITY_ID::LAND_BARRACKS) + .value("LAND_COMMANDCENTER", sc2::ABILITY_ID::LAND_COMMANDCENTER) + .value("LAND_FACTORY", sc2::ABILITY_ID::LAND_FACTORY) + .value("LAND_ORBITALCOMMAND", sc2::ABILITY_ID::LAND_ORBITALCOMMAND) + .value("LAND_STARPORT", sc2::ABILITY_ID::LAND_STARPORT) + .value("LIFT", sc2::ABILITY_ID::LIFT) + .value("LIFT_BARRACKS", sc2::ABILITY_ID::LIFT_BARRACKS) + .value("LIFT_COMMANDCENTER", sc2::ABILITY_ID::LIFT_COMMANDCENTER) + .value("LIFT_FACTORY", sc2::ABILITY_ID::LIFT_FACTORY) + .value("LIFT_ORBITALCOMMAND", sc2::ABILITY_ID::LIFT_ORBITALCOMMAND) + .value("LIFT_STARPORT", sc2::ABILITY_ID::LIFT_STARPORT) + .value("LOAD", sc2::ABILITY_ID::LOAD) + .value("LOADALL", sc2::ABILITY_ID::LOADALL) + .value("LOADALL_COMMANDCENTER", sc2::ABILITY_ID::LOADALL_COMMANDCENTER) + .value("LOAD_BUNKER", sc2::ABILITY_ID::LOAD_BUNKER) + .value("LOAD_MEDIVAC", sc2::ABILITY_ID::LOAD_MEDIVAC) + .value("MORPH_ARCHON", sc2::ABILITY_ID::MORPH_ARCHON) + .value("MORPH_BROODLORD", sc2::ABILITY_ID::MORPH_BROODLORD) + .value("MORPH_GATEWAY", sc2::ABILITY_ID::MORPH_GATEWAY) + .value("MORPH_GREATERSPIRE", sc2::ABILITY_ID::MORPH_GREATERSPIRE) + .value("MORPH_HELLBAT", sc2::ABILITY_ID::MORPH_HELLBAT) + .value("MORPH_HELLION", sc2::ABILITY_ID::MORPH_HELLION) + .value("MORPH_HIVE", sc2::ABILITY_ID::MORPH_HIVE) + .value("MORPH_LAIR", sc2::ABILITY_ID::MORPH_LAIR) + .value("MORPH_LIBERATORAAMODE", sc2::ABILITY_ID::MORPH_LIBERATORAAMODE) + .value("MORPH_LIBERATORAGMODE", sc2::ABILITY_ID::MORPH_LIBERATORAGMODE) + .value("MORPH_LURKER", sc2::ABILITY_ID::MORPH_LURKER) + .value("MORPH_LURKERDEN", sc2::ABILITY_ID::MORPH_LURKERDEN) + .value("MORPH_MOTHERSHIP", sc2::ABILITY_ID::MORPH_MOTHERSHIP) + .value("MORPH_ORBITALCOMMAND", sc2::ABILITY_ID::MORPH_ORBITALCOMMAND) + .value("MORPH_OVERLORDTRANSPORT", sc2::ABILITY_ID::MORPH_OVERLORDTRANSPORT) + .value("MORPH_OVERSEER", sc2::ABILITY_ID::MORPH_OVERSEER) + .value("MORPH_PLANETARYFORTRESS", sc2::ABILITY_ID::MORPH_PLANETARYFORTRESS) + .value("MORPH_RAVAGER", sc2::ABILITY_ID::MORPH_RAVAGER) + .value("MORPH_ROOT", sc2::ABILITY_ID::MORPH_ROOT) + .value("MORPH_SIEGEMODE", sc2::ABILITY_ID::MORPH_SIEGEMODE) + .value("MORPH_SPINECRAWLERROOT", sc2::ABILITY_ID::MORPH_SPINECRAWLERROOT) + .value("MORPH_SPINECRAWLERUPROOT", sc2::ABILITY_ID::MORPH_SPINECRAWLERUPROOT) + .value("MORPH_SPORECRAWLERROOT", sc2::ABILITY_ID::MORPH_SPORECRAWLERROOT) + .value("MORPH_SPORECRAWLERUPROOT", sc2::ABILITY_ID::MORPH_SPORECRAWLERUPROOT) + .value("MORPH_SUPPLYDEPOT_LOWER", sc2::ABILITY_ID::MORPH_SUPPLYDEPOT_LOWER) + .value("MORPH_SUPPLYDEPOT_RAISE", sc2::ABILITY_ID::MORPH_SUPPLYDEPOT_RAISE) + .value("MORPH_THOREXPLOSIVEMODE", sc2::ABILITY_ID::MORPH_THOREXPLOSIVEMODE) + .value("MORPH_THORHIGHIMPACTMODE", sc2::ABILITY_ID::MORPH_THORHIGHIMPACTMODE) + .value("MORPH_UNSIEGE", sc2::ABILITY_ID::MORPH_UNSIEGE) + .value("MORPH_UPROOT", sc2::ABILITY_ID::MORPH_UPROOT) + .value("MORPH_VIKINGASSAULTMODE", sc2::ABILITY_ID::MORPH_VIKINGASSAULTMODE) + .value("MORPH_VIKINGFIGHTERMODE", sc2::ABILITY_ID::MORPH_VIKINGFIGHTERMODE) + .value("MORPH_WARPGATE", sc2::ABILITY_ID::MORPH_WARPGATE) + .value("MORPH_WARPPRISMPHASINGMODE", sc2::ABILITY_ID::MORPH_WARPPRISMPHASINGMODE) + .value("MORPH_WARPPRISMTRANSPORTMODE", sc2::ABILITY_ID::MORPH_WARPPRISMTRANSPORTMODE) + .value("MOVE", sc2::ABILITY_ID::MOVE) + .value("PATROL", sc2::ABILITY_ID::PATROL) + .value("RALLY_BUILDING", sc2::ABILITY_ID::RALLY_BUILDING) + .value("RALLY_COMMANDCENTER", sc2::ABILITY_ID::RALLY_COMMANDCENTER) + .value("RALLY_HATCHERY_UNITS", sc2::ABILITY_ID::RALLY_HATCHERY_UNITS) + .value("RALLY_HATCHERY_WORKERS", sc2::ABILITY_ID::RALLY_HATCHERY_WORKERS) + .value("RALLY_MORPHING_UNIT", sc2::ABILITY_ID::RALLY_MORPHING_UNIT) + .value("RALLY_NEXUS", sc2::ABILITY_ID::RALLY_NEXUS) + .value("RALLY_UNITS", sc2::ABILITY_ID::RALLY_UNITS) + .value("RALLY_WORKERS", sc2::ABILITY_ID::RALLY_WORKERS) + .value("RESEARCH_ADEPTRESONATINGGLAIVES", sc2::ABILITY_ID::RESEARCH_ADEPTRESONATINGGLAIVES) + .value("RESEARCH_ADVANCEDBALLISTICS", sc2::ABILITY_ID::RESEARCH_ADVANCEDBALLISTICS) + .value("RESEARCH_BANSHEECLOAKINGFIELD", sc2::ABILITY_ID::RESEARCH_BANSHEECLOAKINGFIELD) + .value("RESEARCH_BANSHEEHYPERFLIGHTROTORS", sc2::ABILITY_ID::RESEARCH_BANSHEEHYPERFLIGHTROTORS) + .value("RESEARCH_BATTLECRUISERWEAPONREFIT", sc2::ABILITY_ID::RESEARCH_BATTLECRUISERWEAPONREFIT) + .value("RESEARCH_BLINK", sc2::ABILITY_ID::RESEARCH_BLINK) + .value("RESEARCH_BURROW", sc2::ABILITY_ID::RESEARCH_BURROW) + .value("RESEARCH_CENTRIFUGALHOOKS", sc2::ABILITY_ID::RESEARCH_CENTRIFUGALHOOKS) + .value("RESEARCH_CHARGE", sc2::ABILITY_ID::RESEARCH_CHARGE) + .value("RESEARCH_CHITINOUSPLATING", sc2::ABILITY_ID::RESEARCH_CHITINOUSPLATING) + .value("RESEARCH_COMBATSHIELD", sc2::ABILITY_ID::RESEARCH_COMBATSHIELD) + .value("RESEARCH_CONCUSSIVESHELLS", sc2::ABILITY_ID::RESEARCH_CONCUSSIVESHELLS) + .value("RESEARCH_DRILLINGCLAWS", sc2::ABILITY_ID::RESEARCH_DRILLINGCLAWS) + .value("RESEARCH_ENHANCEDMUNITIONS", sc2::ABILITY_ID::RESEARCH_ENHANCEDMUNITIONS) + .value("RESEARCH_EXTENDEDTHERMALLANCE", sc2::ABILITY_ID::RESEARCH_EXTENDEDTHERMALLANCE) + .value("RESEARCH_GLIALREGENERATION", sc2::ABILITY_ID::RESEARCH_GLIALREGENERATION) + .value("RESEARCH_GRAVITICBOOSTER", sc2::ABILITY_ID::RESEARCH_GRAVITICBOOSTER) + .value("RESEARCH_GRAVITICDRIVE", sc2::ABILITY_ID::RESEARCH_GRAVITICDRIVE) + .value("RESEARCH_GROOVEDSPINES", sc2::ABILITY_ID::RESEARCH_GROOVEDSPINES) + .value("RESEARCH_HIGHCAPACITYFUELTANKS", sc2::ABILITY_ID::RESEARCH_HIGHCAPACITYFUELTANKS) + .value("RESEARCH_HISECAUTOTRACKING", sc2::ABILITY_ID::RESEARCH_HISECAUTOTRACKING) + .value("RESEARCH_INFERNALPREIGNITER", sc2::ABILITY_ID::RESEARCH_INFERNALPREIGNITER) + .value("RESEARCH_INTERCEPTORGRAVITONCATAPULT", sc2::ABILITY_ID::RESEARCH_INTERCEPTORGRAVITONCATAPULT) + .value("RESEARCH_MAGFIELDLAUNCHERS", sc2::ABILITY_ID::RESEARCH_MAGFIELDLAUNCHERS) + .value("RESEARCH_MUSCULARAUGMENTS", sc2::ABILITY_ID::RESEARCH_MUSCULARAUGMENTS) + .value("RESEARCH_NEOSTEELFRAME", sc2::ABILITY_ID::RESEARCH_NEOSTEELFRAME) + .value("RESEARCH_NEURALPARASITE", sc2::ABILITY_ID::RESEARCH_NEURALPARASITE) + .value("RESEARCH_PATHOGENGLANDS", sc2::ABILITY_ID::RESEARCH_PATHOGENGLANDS) + .value("RESEARCH_PERSONALCLOAKING", sc2::ABILITY_ID::RESEARCH_PERSONALCLOAKING) + .value("RESEARCH_PHOENIXANIONPULSECRYSTALS", sc2::ABILITY_ID::RESEARCH_PHOENIXANIONPULSECRYSTALS) + .value("RESEARCH_PNEUMATIZEDCARAPACE", sc2::ABILITY_ID::RESEARCH_PNEUMATIZEDCARAPACE) + .value("RESEARCH_PROTOSSAIRARMOR", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRARMOR) + .value("RESEARCH_PROTOSSAIRARMORLEVEL1", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRARMORLEVEL1) + .value("RESEARCH_PROTOSSAIRARMORLEVEL2", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRARMORLEVEL2) + .value("RESEARCH_PROTOSSAIRARMORLEVEL3", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRARMORLEVEL3) + .value("RESEARCH_PROTOSSAIRWEAPONS", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRWEAPONS) + .value("RESEARCH_PROTOSSAIRWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRWEAPONSLEVEL1) + .value("RESEARCH_PROTOSSAIRWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRWEAPONSLEVEL2) + .value("RESEARCH_PROTOSSAIRWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_PROTOSSAIRWEAPONSLEVEL3) + .value("RESEARCH_PROTOSSGROUNDARMOR", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDARMOR) + .value("RESEARCH_PROTOSSGROUNDARMORLEVEL1", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDARMORLEVEL1) + .value("RESEARCH_PROTOSSGROUNDARMORLEVEL2", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDARMORLEVEL2) + .value("RESEARCH_PROTOSSGROUNDARMORLEVEL3", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDARMORLEVEL3) + .value("RESEARCH_PROTOSSGROUNDWEAPONS", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDWEAPONS) + .value("RESEARCH_PROTOSSGROUNDWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDWEAPONSLEVEL1) + .value("RESEARCH_PROTOSSGROUNDWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDWEAPONSLEVEL2) + .value("RESEARCH_PROTOSSGROUNDWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_PROTOSSGROUNDWEAPONSLEVEL3) + .value("RESEARCH_PROTOSSSHIELDS", sc2::ABILITY_ID::RESEARCH_PROTOSSSHIELDS) + .value("RESEARCH_PROTOSSSHIELDSLEVEL1", sc2::ABILITY_ID::RESEARCH_PROTOSSSHIELDSLEVEL1) + .value("RESEARCH_PROTOSSSHIELDSLEVEL2", sc2::ABILITY_ID::RESEARCH_PROTOSSSHIELDSLEVEL2) + .value("RESEARCH_PROTOSSSHIELDSLEVEL3", sc2::ABILITY_ID::RESEARCH_PROTOSSSHIELDSLEVEL3) + .value("RESEARCH_PSISTORM", sc2::ABILITY_ID::RESEARCH_PSISTORM) + .value("RESEARCH_RAPIDFIRELAUNCHERS", sc2::ABILITY_ID::RESEARCH_RAPIDFIRELAUNCHERS) + .value("RESEARCH_RAVENCORVIDREACTOR", sc2::ABILITY_ID::RESEARCH_RAVENCORVIDREACTOR) + .value("RESEARCH_RAVENRECALIBRATEDEXPLOSIVES", sc2::ABILITY_ID::RESEARCH_RAVENRECALIBRATEDEXPLOSIVES) + .value("RESEARCH_SHADOWSTRIKE", sc2::ABILITY_ID::RESEARCH_SHADOWSTRIKE) + .value("RESEARCH_SMARTSERVOS", sc2::ABILITY_ID::RESEARCH_SMARTSERVOS) + .value("RESEARCH_STIMPACK", sc2::ABILITY_ID::RESEARCH_STIMPACK) + .value("RESEARCH_TERRANINFANTRYARMOR", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYARMOR) + .value("RESEARCH_TERRANINFANTRYARMORLEVEL1", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYARMORLEVEL1) + .value("RESEARCH_TERRANINFANTRYARMORLEVEL2", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYARMORLEVEL2) + .value("RESEARCH_TERRANINFANTRYARMORLEVEL3", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYARMORLEVEL3) + .value("RESEARCH_TERRANINFANTRYWEAPONS", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYWEAPONS) + .value("RESEARCH_TERRANINFANTRYWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYWEAPONSLEVEL1) + .value("RESEARCH_TERRANINFANTRYWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYWEAPONSLEVEL2) + .value("RESEARCH_TERRANINFANTRYWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_TERRANINFANTRYWEAPONSLEVEL3) + .value("RESEARCH_TERRANSHIPWEAPONS", sc2::ABILITY_ID::RESEARCH_TERRANSHIPWEAPONS) + .value("RESEARCH_TERRANSHIPWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_TERRANSHIPWEAPONSLEVEL1) + .value("RESEARCH_TERRANSHIPWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_TERRANSHIPWEAPONSLEVEL2) + .value("RESEARCH_TERRANSHIPWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_TERRANSHIPWEAPONSLEVEL3) + .value("RESEARCH_TERRANSTRUCTUREARMORUPGRADE", sc2::ABILITY_ID::RESEARCH_TERRANSTRUCTUREARMORUPGRADE) + .value("RESEARCH_TERRANVEHICLEANDSHIPPLATING", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEANDSHIPPLATING) + .value("RESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL1", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL1) + .value("RESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL2", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL2) + .value("RESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL3", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEANDSHIPPLATINGLEVEL3) + .value("RESEARCH_TERRANVEHICLEWEAPONS", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEWEAPONS) + .value("RESEARCH_TERRANVEHICLEWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEWEAPONSLEVEL1) + .value("RESEARCH_TERRANVEHICLEWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEWEAPONSLEVEL2) + .value("RESEARCH_TERRANVEHICLEWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_TERRANVEHICLEWEAPONSLEVEL3) + .value("RESEARCH_TUNNELINGCLAWS", sc2::ABILITY_ID::RESEARCH_TUNNELINGCLAWS) + .value("RESEARCH_WARPGATE", sc2::ABILITY_ID::RESEARCH_WARPGATE) + .value("RESEARCH_ZERGFLYERARMOR", sc2::ABILITY_ID::RESEARCH_ZERGFLYERARMOR) + .value("RESEARCH_ZERGFLYERARMORLEVEL1", sc2::ABILITY_ID::RESEARCH_ZERGFLYERARMORLEVEL1) + .value("RESEARCH_ZERGFLYERARMORLEVEL2", sc2::ABILITY_ID::RESEARCH_ZERGFLYERARMORLEVEL2) + .value("RESEARCH_ZERGFLYERARMORLEVEL3", sc2::ABILITY_ID::RESEARCH_ZERGFLYERARMORLEVEL3) + .value("RESEARCH_ZERGFLYERATTACK", sc2::ABILITY_ID::RESEARCH_ZERGFLYERATTACK) + .value("RESEARCH_ZERGFLYERATTACKLEVEL1", sc2::ABILITY_ID::RESEARCH_ZERGFLYERATTACKLEVEL1) + .value("RESEARCH_ZERGFLYERATTACKLEVEL2", sc2::ABILITY_ID::RESEARCH_ZERGFLYERATTACKLEVEL2) + .value("RESEARCH_ZERGFLYERATTACKLEVEL3", sc2::ABILITY_ID::RESEARCH_ZERGFLYERATTACKLEVEL3) + .value("RESEARCH_ZERGGROUNDARMOR", sc2::ABILITY_ID::RESEARCH_ZERGGROUNDARMOR) + .value("RESEARCH_ZERGGROUNDARMORLEVEL1", sc2::ABILITY_ID::RESEARCH_ZERGGROUNDARMORLEVEL1) + .value("RESEARCH_ZERGGROUNDARMORLEVEL2", sc2::ABILITY_ID::RESEARCH_ZERGGROUNDARMORLEVEL2) + .value("RESEARCH_ZERGGROUNDARMORLEVEL3", sc2::ABILITY_ID::RESEARCH_ZERGGROUNDARMORLEVEL3) + .value("RESEARCH_ZERGLINGADRENALGLANDS", sc2::ABILITY_ID::RESEARCH_ZERGLINGADRENALGLANDS) + .value("RESEARCH_ZERGLINGMETABOLICBOOST", sc2::ABILITY_ID::RESEARCH_ZERGLINGMETABOLICBOOST) + .value("RESEARCH_ZERGMELEEWEAPONS", sc2::ABILITY_ID::RESEARCH_ZERGMELEEWEAPONS) + .value("RESEARCH_ZERGMELEEWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_ZERGMELEEWEAPONSLEVEL1) + .value("RESEARCH_ZERGMELEEWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_ZERGMELEEWEAPONSLEVEL2) + .value("RESEARCH_ZERGMELEEWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_ZERGMELEEWEAPONSLEVEL3) + .value("RESEARCH_ZERGMISSILEWEAPONS", sc2::ABILITY_ID::RESEARCH_ZERGMISSILEWEAPONS) + .value("RESEARCH_ZERGMISSILEWEAPONSLEVEL1", sc2::ABILITY_ID::RESEARCH_ZERGMISSILEWEAPONSLEVEL1) + .value("RESEARCH_ZERGMISSILEWEAPONSLEVEL2", sc2::ABILITY_ID::RESEARCH_ZERGMISSILEWEAPONSLEVEL2) + .value("RESEARCH_ZERGMISSILEWEAPONSLEVEL3", sc2::ABILITY_ID::RESEARCH_ZERGMISSILEWEAPONSLEVEL3) + .value("SCAN_MOVE", sc2::ABILITY_ID::SCAN_MOVE) + .value("STOP", sc2::ABILITY_ID::STOP) + .value("STOP_BUILDING", sc2::ABILITY_ID::STOP_BUILDING) + .value("STOP_CHEER", sc2::ABILITY_ID::STOP_CHEER) + .value("STOP_DANCE", sc2::ABILITY_ID::STOP_DANCE) + .value("STOP_REDIRECT", sc2::ABILITY_ID::STOP_REDIRECT) + .value("STOP_STOP", sc2::ABILITY_ID::STOP_STOP) + .value("TRAINWARP_ADEPT", sc2::ABILITY_ID::TRAINWARP_ADEPT) + .value("TRAINWARP_DARKTEMPLAR", sc2::ABILITY_ID::TRAINWARP_DARKTEMPLAR) + .value("TRAINWARP_HIGHTEMPLAR", sc2::ABILITY_ID::TRAINWARP_HIGHTEMPLAR) + .value("TRAINWARP_SENTRY", sc2::ABILITY_ID::TRAINWARP_SENTRY) + .value("TRAINWARP_STALKER", sc2::ABILITY_ID::TRAINWARP_STALKER) + .value("TRAINWARP_ZEALOT", sc2::ABILITY_ID::TRAINWARP_ZEALOT) + .value("TRAIN_ADEPT", sc2::ABILITY_ID::TRAIN_ADEPT) + .value("TRAIN_BANELING", sc2::ABILITY_ID::TRAIN_BANELING) + .value("TRAIN_BANSHEE", sc2::ABILITY_ID::TRAIN_BANSHEE) + .value("TRAIN_BATTLECRUISER", sc2::ABILITY_ID::TRAIN_BATTLECRUISER) + .value("TRAIN_CARRIER", sc2::ABILITY_ID::TRAIN_CARRIER) + .value("TRAIN_COLOSSUS", sc2::ABILITY_ID::TRAIN_COLOSSUS) + .value("TRAIN_CORRUPTOR", sc2::ABILITY_ID::TRAIN_CORRUPTOR) + .value("TRAIN_CYCLONE", sc2::ABILITY_ID::TRAIN_CYCLONE) + .value("TRAIN_DARKTEMPLAR", sc2::ABILITY_ID::TRAIN_DARKTEMPLAR) + .value("TRAIN_DISRUPTOR", sc2::ABILITY_ID::TRAIN_DISRUPTOR) + .value("TRAIN_DRONE", sc2::ABILITY_ID::TRAIN_DRONE) + .value("TRAIN_GHOST", sc2::ABILITY_ID::TRAIN_GHOST) + .value("TRAIN_HELLBAT", sc2::ABILITY_ID::TRAIN_HELLBAT) + .value("TRAIN_HELLION", sc2::ABILITY_ID::TRAIN_HELLION) + .value("TRAIN_HIGHTEMPLAR", sc2::ABILITY_ID::TRAIN_HIGHTEMPLAR) + .value("TRAIN_HYDRALISK", sc2::ABILITY_ID::TRAIN_HYDRALISK) + .value("TRAIN_IMMORTAL", sc2::ABILITY_ID::TRAIN_IMMORTAL) + .value("TRAIN_INFESTOR", sc2::ABILITY_ID::TRAIN_INFESTOR) + .value("TRAIN_LIBERATOR", sc2::ABILITY_ID::TRAIN_LIBERATOR) + .value("TRAIN_MARAUDER", sc2::ABILITY_ID::TRAIN_MARAUDER) + .value("TRAIN_MARINE", sc2::ABILITY_ID::TRAIN_MARINE) + .value("TRAIN_MEDIVAC", sc2::ABILITY_ID::TRAIN_MEDIVAC) + .value("TRAIN_MOTHERSHIP", sc2::ABILITY_ID::TRAIN_MOTHERSHIP) + .value("TRAIN_MOTHERSHIPCORE", sc2::ABILITY_ID::TRAIN_MOTHERSHIPCORE) + .value("TRAIN_MUTALISK", sc2::ABILITY_ID::TRAIN_MUTALISK) + .value("TRAIN_OBSERVER", sc2::ABILITY_ID::TRAIN_OBSERVER) + .value("TRAIN_ORACLE", sc2::ABILITY_ID::TRAIN_ORACLE) + .value("TRAIN_OVERLORD", sc2::ABILITY_ID::TRAIN_OVERLORD) + .value("TRAIN_PHOENIX", sc2::ABILITY_ID::TRAIN_PHOENIX) + .value("TRAIN_PROBE", sc2::ABILITY_ID::TRAIN_PROBE) + .value("TRAIN_QUEEN", sc2::ABILITY_ID::TRAIN_QUEEN) + .value("TRAIN_RAVEN", sc2::ABILITY_ID::TRAIN_RAVEN) + .value("TRAIN_REAPER", sc2::ABILITY_ID::TRAIN_REAPER) + .value("TRAIN_ROACH", sc2::ABILITY_ID::TRAIN_ROACH) + .value("TRAIN_SCV", sc2::ABILITY_ID::TRAIN_SCV) + .value("TRAIN_SENTRY", sc2::ABILITY_ID::TRAIN_SENTRY) + .value("TRAIN_SIEGETANK", sc2::ABILITY_ID::TRAIN_SIEGETANK) + .value("TRAIN_STALKER", sc2::ABILITY_ID::TRAIN_STALKER) + .value("TRAIN_SWARMHOST", sc2::ABILITY_ID::TRAIN_SWARMHOST) + .value("TRAIN_TEMPEST", sc2::ABILITY_ID::TRAIN_TEMPEST) + .value("TRAIN_THOR", sc2::ABILITY_ID::TRAIN_THOR) + .value("TRAIN_ULTRALISK", sc2::ABILITY_ID::TRAIN_ULTRALISK) + .value("TRAIN_VIKINGFIGHTER", sc2::ABILITY_ID::TRAIN_VIKINGFIGHTER) + .value("TRAIN_VIPER", sc2::ABILITY_ID::TRAIN_VIPER) + .value("TRAIN_VOIDRAY", sc2::ABILITY_ID::TRAIN_VOIDRAY) + .value("TRAIN_WARPPRISM", sc2::ABILITY_ID::TRAIN_WARPPRISM) + .value("TRAIN_WIDOWMINE", sc2::ABILITY_ID::TRAIN_WIDOWMINE) + .value("TRAIN_ZEALOT", sc2::ABILITY_ID::TRAIN_ZEALOT) + .value("TRAIN_ZERGLING", sc2::ABILITY_ID::TRAIN_ZERGLING) + .value("UNLOADALL", sc2::ABILITY_ID::UNLOADALL) + .value("UNLOADALLAT", sc2::ABILITY_ID::UNLOADALLAT) + .value("UNLOADALLAT_MEDIVAC", sc2::ABILITY_ID::UNLOADALLAT_MEDIVAC) + .value("UNLOADALLAT_OVERLORD", sc2::ABILITY_ID::UNLOADALLAT_OVERLORD) + .value("UNLOADALLAT_WARPPRISM", sc2::ABILITY_ID::UNLOADALLAT_WARPPRISM) + .value("UNLOADALL_BUNKER", sc2::ABILITY_ID::UNLOADALL_BUNKER) + .value("UNLOADALL_COMMANDCENTER", sc2::ABILITY_ID::UNLOADALL_COMMANDCENTER) + .value("UNLOADALL_NYDASNETWORK", sc2::ABILITY_ID::UNLOADALL_NYDASNETWORK) + .value("UNLOADALL_NYDUSWORM", sc2::ABILITY_ID::UNLOADALL_NYDUSWORM) + .value("UNLOADUNIT_BUNKER", sc2::ABILITY_ID::UNLOADUNIT_BUNKER) + .value("UNLOADUNIT_COMMANDCENTER", sc2::ABILITY_ID::UNLOADUNIT_COMMANDCENTER) + .value("UNLOADUNIT_MEDIVAC", sc2::ABILITY_ID::UNLOADUNIT_MEDIVAC) + .value("UNLOADUNIT_NYDASNETWORK", sc2::ABILITY_ID::UNLOADUNIT_NYDASNETWORK) + .value("UNLOADUNIT_OVERLORD", sc2::ABILITY_ID::UNLOADUNIT_OVERLORD) + .value("UNLOADUNIT_WARPPRISM", sc2::ABILITY_ID::UNLOADUNIT_WARPPRISM); + + py::enum_<sc2::UPGRADE_ID>(m, "UPGRADE_ID") + .value("INVALID", sc2::UPGRADE_ID::INVALID) + .value("CARRIERLAUNCHSPEEDUPGRADE", sc2::UPGRADE_ID::CARRIERLAUNCHSPEEDUPGRADE) + .value("GLIALRECONSTITUTION", sc2::UPGRADE_ID::GLIALRECONSTITUTION) + .value("TUNNELINGCLAWS", sc2::UPGRADE_ID::TUNNELINGCLAWS) + .value("CHITINOUSPLATING", sc2::UPGRADE_ID::CHITINOUSPLATING) + .value("HISECAUTOTRACKING", sc2::UPGRADE_ID::HISECAUTOTRACKING) + .value("TERRANBUILDINGARMOR", sc2::UPGRADE_ID::TERRANBUILDINGARMOR) + .value("TERRANINFANTRYWEAPONSLEVEL1", sc2::UPGRADE_ID::TERRANINFANTRYWEAPONSLEVEL1) + .value("TERRANINFANTRYWEAPONSLEVEL2", sc2::UPGRADE_ID::TERRANINFANTRYWEAPONSLEVEL2) + .value("TERRANINFANTRYWEAPONSLEVEL3", sc2::UPGRADE_ID::TERRANINFANTRYWEAPONSLEVEL3) + .value("NEOSTEELFRAME", sc2::UPGRADE_ID::NEOSTEELFRAME) + .value("TERRANINFANTRYARMORSLEVEL1", sc2::UPGRADE_ID::TERRANINFANTRYARMORSLEVEL1) + .value("TERRANINFANTRYARMORSLEVEL2", sc2::UPGRADE_ID::TERRANINFANTRYARMORSLEVEL2) + .value("TERRANINFANTRYARMORSLEVEL3", sc2::UPGRADE_ID::TERRANINFANTRYARMORSLEVEL3) + .value("STIMPACK", sc2::UPGRADE_ID::STIMPACK) + .value("SHIELDWALL", sc2::UPGRADE_ID::SHIELDWALL) + .value("PUNISHERGRENADES", sc2::UPGRADE_ID::PUNISHERGRENADES) + .value("HIGHCAPACITYBARRELS", sc2::UPGRADE_ID::HIGHCAPACITYBARRELS) + .value("BANSHEECLOAK", sc2::UPGRADE_ID::BANSHEECLOAK) + .value("RAVENCORVIDREACTOR", sc2::UPGRADE_ID::RAVENCORVIDREACTOR) + .value("PERSONALCLOAKING", sc2::UPGRADE_ID::PERSONALCLOAKING) + .value("TERRANVEHICLEWEAPONSLEVEL1", sc2::UPGRADE_ID::TERRANVEHICLEWEAPONSLEVEL1) + .value("TERRANVEHICLEWEAPONSLEVEL2", sc2::UPGRADE_ID::TERRANVEHICLEWEAPONSLEVEL2) + .value("TERRANVEHICLEWEAPONSLEVEL3", sc2::UPGRADE_ID::TERRANVEHICLEWEAPONSLEVEL3) + .value("TERRANSHIPWEAPONSLEVEL1", sc2::UPGRADE_ID::TERRANSHIPWEAPONSLEVEL1) + .value("TERRANSHIPWEAPONSLEVEL2", sc2::UPGRADE_ID::TERRANSHIPWEAPONSLEVEL2) + .value("TERRANSHIPWEAPONSLEVEL3", sc2::UPGRADE_ID::TERRANSHIPWEAPONSLEVEL3) + .value("PROTOSSGROUNDWEAPONSLEVEL1", sc2::UPGRADE_ID::PROTOSSGROUNDWEAPONSLEVEL1) + .value("PROTOSSGROUNDWEAPONSLEVEL2", sc2::UPGRADE_ID::PROTOSSGROUNDWEAPONSLEVEL2) + .value("PROTOSSGROUNDWEAPONSLEVEL3", sc2::UPGRADE_ID::PROTOSSGROUNDWEAPONSLEVEL3) + .value("PROTOSSGROUNDARMORSLEVEL1", sc2::UPGRADE_ID::PROTOSSGROUNDARMORSLEVEL1) + .value("PROTOSSGROUNDARMORSLEVEL2", sc2::UPGRADE_ID::PROTOSSGROUNDARMORSLEVEL2) + .value("PROTOSSGROUNDARMORSLEVEL3", sc2::UPGRADE_ID::PROTOSSGROUNDARMORSLEVEL3) + .value("PROTOSSSHIELDSLEVEL1", sc2::UPGRADE_ID::PROTOSSSHIELDSLEVEL1) + .value("PROTOSSSHIELDSLEVEL2", sc2::UPGRADE_ID::PROTOSSSHIELDSLEVEL2) + .value("PROTOSSSHIELDSLEVEL3", sc2::UPGRADE_ID::PROTOSSSHIELDSLEVEL3) + .value("OBSERVERGRAVITICBOOSTER", sc2::UPGRADE_ID::OBSERVERGRAVITICBOOSTER) + .value("GRAVITICDRIVE", sc2::UPGRADE_ID::GRAVITICDRIVE) + .value("EXTENDEDTHERMALLANCE", sc2::UPGRADE_ID::EXTENDEDTHERMALLANCE) + .value("PSISTORMTECH", sc2::UPGRADE_ID::PSISTORMTECH) + .value("ZERGMELEEWEAPONSLEVEL1", sc2::UPGRADE_ID::ZERGMELEEWEAPONSLEVEL1) + .value("ZERGMELEEWEAPONSLEVEL2", sc2::UPGRADE_ID::ZERGMELEEWEAPONSLEVEL2) + .value("ZERGMELEEWEAPONSLEVEL3", sc2::UPGRADE_ID::ZERGMELEEWEAPONSLEVEL3) + .value("ZERGGROUNDARMORSLEVEL1", sc2::UPGRADE_ID::ZERGGROUNDARMORSLEVEL1) + .value("ZERGGROUNDARMORSLEVEL2", sc2::UPGRADE_ID::ZERGGROUNDARMORSLEVEL2) + .value("ZERGGROUNDARMORSLEVEL3", sc2::UPGRADE_ID::ZERGGROUNDARMORSLEVEL3) + .value("ZERGMISSILEWEAPONSLEVEL1", sc2::UPGRADE_ID::ZERGMISSILEWEAPONSLEVEL1) + .value("ZERGMISSILEWEAPONSLEVEL2", sc2::UPGRADE_ID::ZERGMISSILEWEAPONSLEVEL2) + .value("ZERGMISSILEWEAPONSLEVEL3", sc2::UPGRADE_ID::ZERGMISSILEWEAPONSLEVEL3) + .value("OVERLORDSPEED", sc2::UPGRADE_ID::OVERLORDSPEED) + .value("BURROW", sc2::UPGRADE_ID::BURROW) + .value("ZERGLINGATTACKSPEED", sc2::UPGRADE_ID::ZERGLINGATTACKSPEED) + .value("ZERGLINGMOVEMENTSPEED", sc2::UPGRADE_ID::ZERGLINGMOVEMENTSPEED) + .value("ZERGFLYERWEAPONSLEVEL1", sc2::UPGRADE_ID::ZERGFLYERWEAPONSLEVEL1) + .value("ZERGFLYERWEAPONSLEVEL2", sc2::UPGRADE_ID::ZERGFLYERWEAPONSLEVEL2) + .value("ZERGFLYERWEAPONSLEVEL3", sc2::UPGRADE_ID::ZERGFLYERWEAPONSLEVEL3) + .value("ZERGFLYERARMORSLEVEL1", sc2::UPGRADE_ID::ZERGFLYERARMORSLEVEL1) + .value("ZERGFLYERARMORSLEVEL2", sc2::UPGRADE_ID::ZERGFLYERARMORSLEVEL2) + .value("ZERGFLYERARMORSLEVEL3", sc2::UPGRADE_ID::ZERGFLYERARMORSLEVEL3) + .value("INFESTORENERGYUPGRADE", sc2::UPGRADE_ID::INFESTORENERGYUPGRADE) + .value("CENTRIFICALHOOKS", sc2::UPGRADE_ID::CENTRIFICALHOOKS) + .value("BATTLECRUISERENABLESPECIALIZATIONS", sc2::UPGRADE_ID::BATTLECRUISERENABLESPECIALIZATIONS) + .value("PROTOSSAIRWEAPONSLEVEL1", sc2::UPGRADE_ID::PROTOSSAIRWEAPONSLEVEL1) + .value("PROTOSSAIRWEAPONSLEVEL2", sc2::UPGRADE_ID::PROTOSSAIRWEAPONSLEVEL2) + .value("PROTOSSAIRWEAPONSLEVEL3", sc2::UPGRADE_ID::PROTOSSAIRWEAPONSLEVEL3) + .value("PROTOSSAIRARMORSLEVEL1", sc2::UPGRADE_ID::PROTOSSAIRARMORSLEVEL1) + .value("PROTOSSAIRARMORSLEVEL2", sc2::UPGRADE_ID::PROTOSSAIRARMORSLEVEL2) + .value("PROTOSSAIRARMORSLEVEL3", sc2::UPGRADE_ID::PROTOSSAIRARMORSLEVEL3) + .value("WARPGATERESEARCH", sc2::UPGRADE_ID::WARPGATERESEARCH) + .value("CHARGE", sc2::UPGRADE_ID::CHARGE) + .value("BLINKTECH", sc2::UPGRADE_ID::BLINKTECH) + .value("PHOENIXRANGEUPGRADE", sc2::UPGRADE_ID::PHOENIXRANGEUPGRADE) + .value("NEURALPARASITE", sc2::UPGRADE_ID::NEURALPARASITE) + .value("TERRANVEHICLEANDSHIPARMORSLEVEL1", sc2::UPGRADE_ID::TERRANVEHICLEANDSHIPARMORSLEVEL1) + .value("TERRANVEHICLEANDSHIPARMORSLEVEL2", sc2::UPGRADE_ID::TERRANVEHICLEANDSHIPARMORSLEVEL2) + .value("TERRANVEHICLEANDSHIPARMORSLEVEL3", sc2::UPGRADE_ID::TERRANVEHICLEANDSHIPARMORSLEVEL3) + .value("DRILLCLAWS", sc2::UPGRADE_ID::DRILLCLAWS) + .value("ADEPTPIERCINGATTACK", sc2::UPGRADE_ID::ADEPTPIERCINGATTACK) + .value("MAGFIELDLAUNCHERS", sc2::UPGRADE_ID::MAGFIELDLAUNCHERS) + .value("EVOLVEGROOVEDSPINES", sc2::UPGRADE_ID::EVOLVEGROOVEDSPINES) + .value("EVOLVEMUSCULARAUGMENTS", sc2::UPGRADE_ID::EVOLVEMUSCULARAUGMENTS) + .value("BANSHEESPEED", sc2::UPGRADE_ID::BANSHEESPEED) + .value("RAVENRECALIBRATEDEXPLOSIVES", sc2::UPGRADE_ID::RAVENRECALIBRATEDEXPLOSIVES) + .value("MEDIVACINCREASESPEEDBOOST", sc2::UPGRADE_ID::MEDIVACINCREASESPEEDBOOST) + .value("LIBERATORAGRANGEUPGRADE", sc2::UPGRADE_ID::LIBERATORAGRANGEUPGRADE) + .value("DARKTEMPLARBLINKUPGRADE", sc2::UPGRADE_ID::DARKTEMPLARBLINKUPGRADE) + .value("SMARTSERVOS", sc2::UPGRADE_ID::SMARTSERVOS) + .value("RAPIDFIRELAUNCHERS", sc2::UPGRADE_ID::RAPIDFIRELAUNCHERS) + .value("ENHANCEDMUNITIONS", sc2::UPGRADE_ID::ENHANCEDMUNITIONS); + + py::enum_<sc2::BUFF_ID>(m, "BUFF_ID") + .value("INVALID", sc2::BUFF_ID::INVALID) + .value("GRAVITONBEAM", sc2::BUFF_ID::GRAVITONBEAM) + .value("GHOSTCLOAK", sc2::BUFF_ID::GHOSTCLOAK) + .value("BANSHEECLOAK", sc2::BUFF_ID::BANSHEECLOAK) + .value("POWERUSERWARPABLE", sc2::BUFF_ID::POWERUSERWARPABLE) + .value("QUEENSPAWNLARVATIMER", sc2::BUFF_ID::QUEENSPAWNLARVATIMER) + .value("GHOSTHOLDFIRE", sc2::BUFF_ID::GHOSTHOLDFIRE) + .value("GHOSTHOLDFIREB", sc2::BUFF_ID::GHOSTHOLDFIREB) + .value("EMPDECLOAK", sc2::BUFF_ID::EMPDECLOAK) + .value("FUNGALGROWTH", sc2::BUFF_ID::FUNGALGROWTH) + .value("GUARDIANSHIELD", sc2::BUFF_ID::GUARDIANSHIELD) + .value("TIMEWARPPRODUCTION", sc2::BUFF_ID::TIMEWARPPRODUCTION) + .value("NEURALPARASITE", sc2::BUFF_ID::NEURALPARASITE) + .value("STIMPACKMARAUDER", sc2::BUFF_ID::STIMPACKMARAUDER) + .value("SUPPLYDROP", sc2::BUFF_ID::SUPPLYDROP) + .value("STIMPACK", sc2::BUFF_ID::STIMPACK) + .value("PSISTORM", sc2::BUFF_ID::PSISTORM) + .value("CLOAKFIELDEFFECT", sc2::BUFF_ID::CLOAKFIELDEFFECT) + .value("CHARGING", sc2::BUFF_ID::CHARGING) + .value("SLOW", sc2::BUFF_ID::SLOW) + .value("CONTAMINATED", sc2::BUFF_ID::CONTAMINATED) + .value("BLINDINGCLOUDSTRUCTURE", sc2::BUFF_ID::BLINDINGCLOUDSTRUCTURE) + .value("ORACLEREVELATION", sc2::BUFF_ID::ORACLEREVELATION) + .value("VIPERCONSUMESTRUCTURE", sc2::BUFF_ID::VIPERCONSUMESTRUCTURE) + .value("BLINDINGCLOUD", sc2::BUFF_ID::BLINDINGCLOUD) + .value("MEDIVACSPEEDBOOST", sc2::BUFF_ID::MEDIVACSPEEDBOOST) + .value("PURIFY", sc2::BUFF_ID::PURIFY) + .value("ORACLEWEAPON", sc2::BUFF_ID::ORACLEWEAPON) + .value("IMMORTALOVERLOAD", sc2::BUFF_ID::IMMORTALOVERLOAD) + .value("LOCKON", sc2::BUFF_ID::LOCKON) + .value("SEEKERMISSILE", sc2::BUFF_ID::SEEKERMISSILE) + .value("TEMPORALFIELD", sc2::BUFF_ID::TEMPORALFIELD) + .value("VOIDRAYSWARMDAMAGEBOOST", sc2::BUFF_ID::VOIDRAYSWARMDAMAGEBOOST) + .value("ORACLESTASISTRAPTARGET", sc2::BUFF_ID::ORACLESTASISTRAPTARGET) + .value("PARASITICBOMB", sc2::BUFF_ID::PARASITICBOMB) + .value("PARASITICBOMBUNITKU", sc2::BUFF_ID::PARASITICBOMBUNITKU) + .value("PARASITICBOMBSECONDARYUNITSEARCH", sc2::BUFF_ID::PARASITICBOMBSECONDARYUNITSEARCH) + .value("LURKERHOLDFIREB", sc2::BUFF_ID::LURKERHOLDFIREB) + .value("CHANNELSNIPECOMBAT", sc2::BUFF_ID::CHANNELSNIPECOMBAT) + .value("TEMPESTDISRUPTIONBLASTSTUNBEHAVIOR", sc2::BUFF_ID::TEMPESTDISRUPTIONBLASTSTUNBEHAVIOR) + .value("CARRYMINERALFIELDMINERALS", sc2::BUFF_ID::CARRYMINERALFIELDMINERALS) + .value("CARRYHIGHYIELDMINERALFIELDMINERALS", sc2::BUFF_ID::CARRYHIGHYIELDMINERALFIELDMINERALS) + .value("CARRYHARVESTABLEVESPENEGEYSERGAS", sc2::BUFF_ID::CARRYHARVESTABLEVESPENEGEYSERGAS) + .value("CARRYHARVESTABLEVESPENEGEYSERGASPROTOSS", sc2::BUFF_ID::CARRYHARVESTABLEVESPENEGEYSERGASPROTOSS) + .value("CARRYHARVESTABLEVESPENEGEYSERGASZERG", sc2::BUFF_ID::CARRYHARVESTABLEVESPENEGEYSERGASZERG); +}; diff --git a/python-api-src/library.cpp b/python-api-src/library.cpp new file mode 100644 index 0000000..3ea3049 --- /dev/null +++ b/python-api-src/library.cpp @@ -0,0 +1,46 @@ +#include "library.h" + +namespace py = pybind11; + +PYBIND11_MODULE(library, m) +{ + m.doc() = "pybind11 example plugin"; + + py::class_<Coordinator>(m, "Coordinator") + .def(py::init()) + .def("SetParticipants", &sc2::Coordinator::SetParticipants) + .def("LaunchStarcraft", &sc2::Coordinator::LaunchStarcraft) + .def("StartGame", &sc2::Coordinator::StartGame) + .def("Update", &sc2::Coordinator::Update); + + py::enum_<sc2::Race>(m, "Race") + .value("Terran", sc2::Race::Terran) + .value("Zerg", sc2::Race::Zerg) + .value("Protoss", sc2::Race::Protoss) + .value("Random", sc2::Race::Random); + + py::class_<sc2::Agent>(m, "Agent") + .def(py::init()); + + // IDABot is a specialization of Agent + py::class_<IDABot, sc2::Agent>(m, "IDABot") + .def(py::init()); + + py::class_<sc2::PlayerSetup>(m, "PlayerSetup"); + + py::enum_<sc2::Difficulty>(m, "Difficulty") + .value("VeryEasy", sc2::Difficulty::VeryEasy) + .value("Easy", sc2::Difficulty::Easy) + .value("Medium", sc2::Difficulty::Medium) + .value("MediumHard", sc2::Difficulty::MediumHard) + .value("Hard", sc2::Difficulty::Hard) + .value("HardVeryHard", sc2::Difficulty::HardVeryHard) + .value("VeryHard", sc2::Difficulty::VeryHard) + .value("CheatVision", sc2::Difficulty::CheatVision) + .value("CheatMoney", sc2::Difficulty::CheatMoney) + .value("CheatInsane", sc2::Difficulty::CheatInsane); + + m.def("CreateParticipant", &sc2::CreateParticipant, "Create participant from agent"); + + m.def("CreateComputer", &sc2::CreateComputer, "Create participant from built-in Starcraft computer"); +} diff --git a/library.h b/python-api-src/library.h similarity index 71% rename from library.h rename to python-api-src/library.h index 1b3abdd..3720542 100644 --- a/library.h +++ b/python-api-src/library.h @@ -2,10 +2,11 @@ #include <pybind11/pybind11.h> #include <sc2api/sc2_api.h> -#include "src/IDABot.h" +#include "../src/IDABot.h" #include <iostream> #include <pybind11/stl.h> /* Automatic conversion from std::vector to Python lists */ +// Wrapper class since the initialization uses pure argc/argv and these cannot be wrapped into Python correctly class Coordinator : public sc2::Coordinator { public: @@ -16,4 +17,7 @@ public: int argc = sizeof(argv) / sizeof(char*) - 1; LoadSettings(argc, argv); } -}; \ No newline at end of file +}; + +// Defined +void define_typeenums(pybind11::module & m); \ No newline at end of file -- GitLab