Add custom tech requirement because the on in the API does not work reliably (thor and ghost are not correct)
@@ -4,7 +4,8 @@ from .ids.buff_id import *
from .ids.effect_id import *
from .ids.unit_typeid import *
from .ids.upgrade_id import *
-from typing import Dict
+from collections import defaultdict
+from typing import Dict, List
mineral_ids = {
RICHMINERALFIELD.value,
@@ -228,3 +229,81 @@ FakeEffectID: Dict[int, str] = {
UnitTypeId.PARASITICBOMBDUMMY.value: "PARASITICBOMB",
UnitTypeId.FORCEFIELD.value: "FORCEFIELD",
}
+
+
+TERRAN_TECH_REQUIREMENT: Dict[UnitTypeId, UnitTypeId] = defaultdict(
+ list,
+ {
+ MISSILETURRET: ENGINEERINGBAY,
+ SENSORTOWER: ENGINEERINGBAY,
+ PLANETARYFORTRESS: ENGINEERINGBAY,
+ BARRACKS: SUPPLYDEPOT,
+ ORBITALCOMMAND: BARRACKS,
+ BUNKER: BARRACKS,
+ GHOST: GHOSTACADEMY,
+ GHOSTACADEMY: BARRACKS,
+ FACTORY: BARRACKS,
+ ARMORY: FACTORY,
+ HELLIONTANK: ARMORY,
+ THOR: ARMORY,
+ STARPORT: FACTORY,
+ FUSIONCORE: STARPORT,
+ BATTLECRUISER: FUSIONCORE,
+ },
+)
+PROTOSS_TECH_REQUIREMENT: Dict[UnitTypeId, UnitTypeId] = defaultdict(
+ list,
+ {
+ PHOTONCANNON: FORGE,
+ CYBERNETICSCORE: GATEWAY,
+ SENTRY: CYBERNETICSCORE,
+ STALKER: CYBERNETICSCORE,
+ ADEPT: CYBERNETICSCORE,
+ TWILIGHTCOUNCIL: CYBERNETICSCORE,
+ SHIELDBATTERY: CYBERNETICSCORE,
+ TEMPLARARCHIVE: TWILIGHTCOUNCIL,
+ DARKSHRINE: TWILIGHTCOUNCIL,
+ HIGHTEMPLAR: TEMPLARARCHIVE,
+ DARKTEMPLAR: DARKSHRINE,
+ STARGATE: CYBERNETICSCORE,
+ TEMPEST: FLEETBEACON,
+ CARRIER: FLEETBEACON,
+ MOTHERSHIP: FLEETBEACON,
+ ROBOTICSFACILITY: CYBERNETICSCORE,
+ ROBOTICSBAY: ROBOTICSFACILITY,
+ COLOSSUS: ROBOTICSBAY,
+ DISRUPTOR: ROBOTICSBAY,
+ },
+)
+ZERG_TECH_REQUIREMENT: Dict[UnitTypeId, UnitTypeId] = defaultdict(
+ list,
+ {
+ ZERGLING: SPAWNINGPOOL,
+ QUEEN: SPAWNINGPOOL,
+ ROACHWARREN: SPAWNINGPOOL,
+ BANELINGNEST: SPAWNINGPOOL,
+ SPINECRAWLER: SPAWNINGPOOL,
+ SPORECRAWLER: SPAWNINGPOOL,
+ ROACH: ROACHWARREN,
+ BANELING: BANELINGNEST,
+ LAIR: SPAWNINGPOOL,
+ OVERSEER: LAIR,
+ OVERLORDTRANSPORT: LAIR,
+ INFESTATIONPIT: LAIR,
+ INFESTOR: INFESTATIONPIT,
+ SWARMHOSTMP: INFESTATIONPIT,
+ HYDRALISKDEN: LAIR,
+ HYDRALISK: HYDRALISKDEN,
+ LURKERDENMP: HYDRALISKDEN,
+ LURKERMP: LURKERDENMP,
+ SPIRE: LAIR,
+ MUTALISK: SPIRE,
+ CORRUPTOR: SPIRE,
+ NYDUSNETWORK: LAIR,
+ HIVE: INFESTATIONPIT,
+ VIPER: HIVE,
+ ULTRALISKCAVERN: HIVE,
+ GREATERSPIRE: HIVE,
+ BROODLORD: GREATERSPIRE,
+ },
+)
