DrInfy / sharpy-sc2

Python framework for rapid development of Starcraft 2 AI bots
MIT License
69 stars 28 forks source link

ActTech no longer requires building type #13

Closed merfolk closed 4 years ago

merfolk commented 4 years ago

from_building parameter can still be provided for backwards compatibility and possible SC2 version mismatches.

There may be some problems with eg. upgrades from SPIRE and GREATERSPIRE. But again, if problems occur, the building type can always be explicitly specified.

DrInfy commented 4 years ago

might as well solve the morph problem too with upgrades something like this:

equiv_structures = {
            UnitTypeId.SPIRE: {UnitTypeId.SPIRE, UnitTypeId.GREATERSPIRE},
            UnitTypeId.GREATERSPIRE: {UnitTypeId.SPIRE, UnitTypeId.GREATERSPIRE},
            UnitTypeId.HATCHERY: {UnitTypeId.HATCHERY, UnitTypeId.LAIR, UnitTypeId.HIVE},
            UnitTypeId.LAIR: {UnitTypeId.HATCHERY, UnitTypeId.LAIR, UnitTypeId.HIVE},
            UnitTypeId.HIVE: {UnitTypeId.HATCHERY, UnitTypeId.LAIR, UnitTypeId.HIVE},
        }
merfolk commented 4 years ago

Could also use the BotAI.research(self, upgrade_type: UpgradeId) -> bool method in Burny's python-sc2 to take care of that.