code
stringlengths
501
5.19M
package
stringlengths
2
81
path
stringlengths
9
304
filename
stringlengths
4
145
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 451, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1153, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 452, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 184, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 185, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 381, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 446, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 448, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 683, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 447, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 548, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 449, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 443, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 188, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 178, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 181, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 189, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 177, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 172, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 453, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 678, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 907, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1034, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 187, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 454, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 404, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 180, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/73620/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 699: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 703: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 706: {'ability_name': 'DarkShrineResearch'}, 707: {'ability_name': 'LurkerDenMPResearch'}, 708: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 709: {'ability_name': 'ObserverMorphtoObserverSiege'}, 712: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 715: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 716: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 717: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/73620/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 550, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/19458/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/19458/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 773, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 772, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 541, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 542, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 277, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 527, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 544, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 546, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 770, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 769, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 766, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 819, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 176, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 765, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 948, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 949, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 548, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 547, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 549, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 540, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 535, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 771, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 851, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 545, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 300, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 764, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/19458/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 60: {'ability_name': 'GhostHoldFire'}, 61: {'ability_name': 'GhostWeaponsFree'}, 63: {'ability_name': 'Explode'}, 65: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 66: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 70: {'ability_name': 'Feedback', 'energy_cost': 50}, 73: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 74: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 75: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 76: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 77: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 78: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 85: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 86: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 90: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 97: {'ability_name': 'Rally'}, 99: {'ability_name': 'RallyCommand'}, 101: {'ability_name': 'RallyHatchery'}, 105: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 106: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 107: {'ability_name': 'StimpackMarauder'}, 108: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 126: {'ability_name': 'Stimpack'}, 127: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 130: {'ability_name': 'SiegeMode'}, 131: {'ability_name': 'Unsiege'}, 132: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 133: {'ability_name': 'MedivacTransport'}, 134: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 135: {'ability_name': 'Yamato'}, 136: {'ability_name': 'AssaultMode'}, 137: {'ability_name': 'FighterMode'}, 139: {'ability_name': 'CommandCenterTransport'}, 140: {'ability_name': 'CommandCenterLiftOff'}, 141: {'ability_name': 'CommandCenterLand'}, 143: {'ability_name': 'BarracksLiftOff'}, 145: {'ability_name': 'FactoryLiftOff'}, 147: {'ability_name': 'StarportLiftOff'}, 148: {'ability_name': 'FactoryLand'}, 149: {'ability_name': 'StarportLand'}, 151: {'ability_name': 'BarracksLand'}, 152: {'ability_name': 'SupplyDepotLower'}, 153: {'ability_name': 'SupplyDepotRaise'}, 166: {'ability_name': 'WarpPrismTransport'}, 171: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 181: {'ability_name': 'UpgradeToLair'}, 182: {'ability_name': 'UpgradeToHive'}, 183: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'MorphToBroodLord'}, 190: {'ability_name': 'BurrowBanelingDown'}, 191: {'ability_name': 'BurrowBanelingUp'}, 192: {'ability_name': 'BurrowDroneDown'}, 193: {'ability_name': 'BurrowDroneUp'}, 194: {'ability_name': 'BurrowHydraliskDown'}, 195: {'ability_name': 'BurrowHydraliskUp'}, 196: {'ability_name': 'BurrowRoachDown'}, 197: {'ability_name': 'BurrowRoachUp'}, 198: {'ability_name': 'BurrowZerglingDown'}, 199: {'ability_name': 'BurrowZerglingUp'}, 206: {'ability_name': 'OverlordTransport'}, 210: {'ability_name': 'BurrowQueenDown'}, 211: {'ability_name': 'BurrowQueenUp'}, 212: {'ability_name': 'NydusCanalTransport'}, 213: {'ability_name': 'Blink'}, 214: {'ability_name': 'BurrowInfestorDown'}, 215: {'ability_name': 'BurrowInfestorUp'}, 217: {'ability_name': 'UpgradeToPlanetaryFortress'}, 220: {'ability_name': 'BurrowUltraliskDown'}, 221: {'ability_name': 'BurrowUltraliskUp'}, 222: {'ability_name': 'UpgradeToOrbital'}, 225: {'ability_name': 'OrbitalLiftOff'}, 226: {'ability_name': 'OrbitalCommandLand'}, 227: {'ability_name': 'ForceField', 'energy_cost': 50}, 228: {'ability_name': 'PhasingMode'}, 229: {'ability_name': 'TransportMode'}, 233: {'ability_name': 'TacNukeStrike'}, 236: {'ability_name': 'EMP', 'energy_cost': 75}, 240: {'ability_name': 'Transfusion', 'energy_cost': 50}, 249: {'ability_name': 'AttackRedirect'}, 250: {'ability_name': 'StimpackRedirect'}, 251: {'ability_name': 'StimpackMarauderRedirect'}, 253: {'ability_name': 'StopRedirect'}, 254: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 256: {'ability_name': 'SpineCrawlerUproot'}, 257: {'ability_name': 'SporeCrawlerUproot'}, 258: {'ability_name': 'SpineCrawlerRoot'}, 259: {'ability_name': 'SporeCrawlerRoot'}, 261: {'ability_name': 'BuildAutoTurret'}, 265: {'ability_name': 'Charge'}, 269: {'ability_name': 'Contaminate', 'energy_cost': 125}, 341: {'ability_name': 'MorphToHellion'}, 351: {'ability_name': 'MorphToHellionTank'}, 365: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 367: {'ability_name': 'Yoink', 'energy_cost': 75}, 370: {'ability_name': 'ViperConsumeStructure'}, 374: {'ability_name': 'VolatileBurstBuilding'}, 381: {'ability_name': 'WidowMineBurrow'}, 382: {'ability_name': 'WidowMineUnburrow'}, 383: {'ability_name': 'WidowMineAttack'}, 384: {'ability_name': 'TornadoMissile'}, 388: {'ability_name': 'BurrowLurkerMPDown'}, 389: {'ability_name': 'BurrowLurkerMPUp'}, 391: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 392: {'ability_name': 'MedivacSpeedBoost'}, 407: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 456: {'ability_name': 'TemporalField', 'energy_cost': 100}, 500: {'ability_name': 'MorphToRavager'}, 501: {'ability_name': 'MorphToLurker'}, 504: {'ability_name': 'RavagerCorrosiveBile'}, 505: {'ability_name': 'BurrowRavagerDown'}, 506: {'ability_name': 'BurrowRavagerUp'}, 508: {'ability_name': 'PurificationNovaTargeted'}, 510: {'ability_name': 'LockOn'}, 514: {'ability_name': 'Hyperjump'}, 516: {'ability_name': 'ThorAPMode'}, 517: {'ability_name': 'ThorNormalMode'}, 520: {'ability_name': 'NydusWormTransport'}, 521: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 528: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 529: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 530: {'ability_name': 'VoidRaySwarmDamageBoost'}, 590: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 591: {'ability_name': 'AdeptPhaseShift'}, 594: {'ability_name': 'LurkerHoldFire'}, 595: {'ability_name': 'LurkerRemoveHoldFire'}, 598: {'ability_name': 'LiberatorAGTarget'}, 599: {'ability_name': 'LiberatorAATarget'}, 613: {'ability_name': 'KD8Charge'}, 616: {'ability_name': 'AdeptPhaseShiftCancel'}, 617: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 625: {'ability_name': 'MorphToTransportOverlord'}, 628: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/19458/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 1094, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 625, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/55958/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/55958/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 404, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1098, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 408, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 409, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 411, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 339, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 397, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 407, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 622, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 406, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 849, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 398, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 399, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 177, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 402, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 1095, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 1099, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 1096, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 400, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 623, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 624, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 401, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 616, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 850, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 975, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 403, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 362, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 846, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/55958/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 150: {'ability_name': 'FactoryLiftOff'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 346: {'ability_name': 'MorphToHellion'}, 356: {'ability_name': 'MorphToHellionTank'}, 370: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 372: {'ability_name': 'Yoink', 'energy_cost': 75}, 375: {'ability_name': 'ViperConsumeStructure'}, 379: {'ability_name': 'VolatileBurstBuilding'}, 386: {'ability_name': 'WidowMineBurrow'}, 387: {'ability_name': 'WidowMineUnburrow'}, 388: {'ability_name': 'WidowMineAttack'}, 389: {'ability_name': 'TornadoMissile'}, 393: {'ability_name': 'BurrowLurkerMPDown'}, 394: {'ability_name': 'BurrowLurkerMPUp'}, 396: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 397: {'ability_name': 'MedivacSpeedBoost'}, 412: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 461: {'ability_name': 'TemporalField', 'energy_cost': 100}, 513: {'ability_name': 'MorphToRavager'}, 514: {'ability_name': 'MorphToLurker'}, 517: {'ability_name': 'RavagerCorrosiveBile'}, 518: {'ability_name': 'BurrowRavagerDown'}, 519: {'ability_name': 'BurrowRavagerUp'}, 521: {'ability_name': 'PurificationNovaTargeted'}, 523: {'ability_name': 'LockOn'}, 527: {'ability_name': 'Hyperjump'}, 529: {'ability_name': 'ThorAPMode'}, 530: {'ability_name': 'ThorNormalMode'}, 533: {'ability_name': 'NydusWormTransport'}, 534: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 541: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 542: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 543: {'ability_name': 'VoidRaySwarmDamageBoost'}, 603: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 604: {'ability_name': 'AdeptPhaseShift'}, 607: {'ability_name': 'LurkerHoldFire'}, 608: {'ability_name': 'LurkerRemoveHoldFire'}, 611: {'ability_name': 'LiberatorAGTarget'}, 612: {'ability_name': 'LiberatorAATarget'}, 626: {'ability_name': 'KD8Charge'}, 629: {'ability_name': 'AdeptPhaseShiftCancel'}, 630: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 683: {'ability_name': 'DarkTemplarBlink'}, 688: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 690: {'ability_name': 'MorphToTransportOverlord'}, 693: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 696: {'ability_name': 'DarkShrineResearch'}, 697: {'ability_name': 'LurkerDenMPResearch'}, 698: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 699: {'ability_name': 'ObserverMorphtoObserverSiege'}, 702: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 705: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 706: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 707: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/55958/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 455, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 174, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76052/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76052/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 451, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1153, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 452, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 184, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 185, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 381, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 446, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 448, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 683, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 447, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 548, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 449, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 443, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 188, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 178, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 181, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 189, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 177, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 172, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 453, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 678, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 907, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1034, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 187, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 454, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 404, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 180, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76052/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 699: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 703: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 706: {'ability_name': 'DarkShrineResearch'}, 707: {'ability_name': 'LurkerDenMPResearch'}, 708: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 709: {'ability_name': 'ObserverMorphtoObserverSiege'}, 712: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 715: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 716: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 717: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76052/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 455, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 174, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/75800/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/75800/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 451, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1153, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 452, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 184, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 185, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 381, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 446, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 448, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 683, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 447, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 548, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 449, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 443, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 188, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 178, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 181, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 189, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 177, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 172, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 453, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 678, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 907, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1034, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 187, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 454, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 404, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 180, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/75800/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 699: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 703: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 706: {'ability_name': 'DarkShrineResearch'}, 707: {'ability_name': 'LurkerDenMPResearch'}, 708: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 709: {'ability_name': 'ObserverMorphtoObserverSiege'}, 712: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 715: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 716: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 717: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/75800/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 82, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 83, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 84, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 85, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 156, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 86, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 95, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 89, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 468, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 94, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 90, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 88, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 93, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 87, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 92, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 59, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 155, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 157, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 153, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 70, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 69, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 47, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 48, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 49, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 66, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 50, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 67, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 52, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 53, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 60, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 62, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 64, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 61, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 63, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 65, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 109, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 111, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 112, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 122, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 113, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 120, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 119, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 123, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 114, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 175, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 115, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 125, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 118, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 165, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 117, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 124, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 116, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 110, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 161, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76811/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76811/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 107, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 96, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 97, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 100, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 464, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 98, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 99, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 164, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 105, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1169, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 104, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 159, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 106, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 465, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 101, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 103, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 185, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 186, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 102, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 108, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 68, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 394, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 71, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 72, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 74, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 73, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 76, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 459, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 461, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 699, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 460, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 56, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 75, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 564, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 58, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 77, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 462, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 456, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 79, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 54, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 78, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 80, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 189, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 126, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 127, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 129, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 149, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 128, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 133, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 179, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 182, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 151, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 152, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 190, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 178, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 130, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 174, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 131, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 135, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 466, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 694, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 923, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1050, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 134, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 188, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 467, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 132, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 137, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 166, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 417, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 181, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 136, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76811/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 700: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 704: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 707: {'ability_name': 'DarkShrineResearch'}, 708: {'ability_name': 'LurkerDenMPResearch'}, 709: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 710: {'ability_name': 'ObserverMorphtoObserverSiege'}, 713: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 716: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 717: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 718: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/76811/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 1122, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 655, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65895/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65895/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 429, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1125, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 430, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 431, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 432, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 358, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 425, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 427, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 652, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 426, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 516, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 428, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 420, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 177, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 433, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 1123, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 178, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 422, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 421, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 653, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 654, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 434, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 646, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 879, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1004, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 435, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 381, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 876, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65895/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 150: {'ability_name': 'FactoryLiftOff'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 302: {'ability_name': 'ThorNormalMode'}, 347: {'ability_name': 'MorphToHellion'}, 357: {'ability_name': 'MorphToHellionTank'}, 371: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 373: {'ability_name': 'Yoink', 'energy_cost': 75}, 376: {'ability_name': 'ViperConsumeStructure'}, 380: {'ability_name': 'VolatileBurstBuilding'}, 387: {'ability_name': 'WidowMineBurrow'}, 388: {'ability_name': 'WidowMineUnburrow'}, 389: {'ability_name': 'WidowMineAttack'}, 390: {'ability_name': 'TornadoMissile'}, 394: {'ability_name': 'BurrowLurkerMPDown'}, 395: {'ability_name': 'BurrowLurkerMPUp'}, 397: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 398: {'ability_name': 'MedivacSpeedBoost'}, 413: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 462: {'ability_name': 'TemporalField', 'energy_cost': 100}, 514: {'ability_name': 'MorphToRavager'}, 515: {'ability_name': 'MorphToLurker'}, 518: {'ability_name': 'RavagerCorrosiveBile'}, 519: {'ability_name': 'BurrowRavagerDown'}, 520: {'ability_name': 'BurrowRavagerUp'}, 522: {'ability_name': 'PurificationNovaTargeted'}, 524: {'ability_name': 'LockOn'}, 528: {'ability_name': 'Hyperjump'}, 530: {'ability_name': 'ThorAPMode'}, 533: {'ability_name': 'NydusWormTransport'}, 534: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 541: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 542: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 543: {'ability_name': 'VoidRaySwarmDamageBoost'}, 603: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 604: {'ability_name': 'AdeptPhaseShift'}, 607: {'ability_name': 'LurkerHoldFire'}, 608: {'ability_name': 'LurkerRemoveHoldFire'}, 611: {'ability_name': 'LiberatorAGTarget'}, 612: {'ability_name': 'LiberatorAATarget'}, 626: {'ability_name': 'KD8Charge'}, 629: {'ability_name': 'AdeptPhaseShiftCancel'}, 630: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 683: {'ability_name': 'DarkTemplarBlink'}, 691: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 693: {'ability_name': 'MorphToTransportOverlord'}, 696: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 699: {'ability_name': 'DarkShrineResearch'}, 700: {'ability_name': 'LurkerDenMPResearch'}, 701: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 702: {'ability_name': 'ObserverMorphtoObserverSiege'}, 705: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 708: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 709: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 710: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65895/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 455, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 174, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74456/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74456/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 451, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1153, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 452, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 184, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 185, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 381, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 446, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 448, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 683, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 447, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 548, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 449, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 443, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 188, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 178, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 181, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 189, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 177, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 172, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 453, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 678, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 907, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1034, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 187, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 454, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 404, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 180, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74456/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 699: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 703: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 706: {'ability_name': 'DarkShrineResearch'}, 707: {'ability_name': 'LurkerDenMPResearch'}, 708: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 709: {'ability_name': 'ObserverMorphtoObserverSiege'}, 712: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 715: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 716: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 717: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74456/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 550, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18092/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18092/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 773, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 772, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 541, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 542, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 277, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 527, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 544, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 546, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 770, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 769, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 766, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 819, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 176, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 765, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 948, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 949, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 548, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 547, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 549, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 540, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 535, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 771, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 851, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 545, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 300, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 764, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18092/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 60: {'ability_name': 'GhostHoldFire'}, 61: {'ability_name': 'GhostWeaponsFree'}, 63: {'ability_name': 'Explode'}, 65: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 66: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 70: {'ability_name': 'Feedback', 'energy_cost': 50}, 73: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 74: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 75: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 76: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 77: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 78: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 85: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 86: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 90: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 97: {'ability_name': 'Rally'}, 99: {'ability_name': 'RallyCommand'}, 101: {'ability_name': 'RallyHatchery'}, 105: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 106: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 107: {'ability_name': 'StimpackMarauder'}, 108: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 126: {'ability_name': 'Stimpack'}, 127: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 130: {'ability_name': 'SiegeMode'}, 131: {'ability_name': 'Unsiege'}, 132: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 133: {'ability_name': 'MedivacTransport'}, 134: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 135: {'ability_name': 'Yamato'}, 136: {'ability_name': 'AssaultMode'}, 137: {'ability_name': 'FighterMode'}, 139: {'ability_name': 'CommandCenterTransport'}, 140: {'ability_name': 'CommandCenterLiftOff'}, 141: {'ability_name': 'CommandCenterLand'}, 143: {'ability_name': 'BarracksLiftOff'}, 145: {'ability_name': 'FactoryLiftOff'}, 147: {'ability_name': 'StarportLiftOff'}, 148: {'ability_name': 'FactoryLand'}, 149: {'ability_name': 'StarportLand'}, 151: {'ability_name': 'BarracksLand'}, 152: {'ability_name': 'SupplyDepotLower'}, 153: {'ability_name': 'SupplyDepotRaise'}, 166: {'ability_name': 'WarpPrismTransport'}, 171: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 181: {'ability_name': 'UpgradeToLair'}, 182: {'ability_name': 'UpgradeToHive'}, 183: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'MorphToBroodLord'}, 190: {'ability_name': 'BurrowBanelingDown'}, 191: {'ability_name': 'BurrowBanelingUp'}, 192: {'ability_name': 'BurrowDroneDown'}, 193: {'ability_name': 'BurrowDroneUp'}, 194: {'ability_name': 'BurrowHydraliskDown'}, 195: {'ability_name': 'BurrowHydraliskUp'}, 196: {'ability_name': 'BurrowRoachDown'}, 197: {'ability_name': 'BurrowRoachUp'}, 198: {'ability_name': 'BurrowZerglingDown'}, 199: {'ability_name': 'BurrowZerglingUp'}, 206: {'ability_name': 'OverlordTransport'}, 210: {'ability_name': 'BurrowQueenDown'}, 211: {'ability_name': 'BurrowQueenUp'}, 212: {'ability_name': 'NydusCanalTransport'}, 213: {'ability_name': 'Blink'}, 214: {'ability_name': 'BurrowInfestorDown'}, 215: {'ability_name': 'BurrowInfestorUp'}, 217: {'ability_name': 'UpgradeToPlanetaryFortress'}, 220: {'ability_name': 'BurrowUltraliskDown'}, 221: {'ability_name': 'BurrowUltraliskUp'}, 222: {'ability_name': 'UpgradeToOrbital'}, 225: {'ability_name': 'OrbitalLiftOff'}, 226: {'ability_name': 'OrbitalCommandLand'}, 227: {'ability_name': 'ForceField', 'energy_cost': 50}, 228: {'ability_name': 'PhasingMode'}, 229: {'ability_name': 'TransportMode'}, 233: {'ability_name': 'TacNukeStrike'}, 236: {'ability_name': 'EMP', 'energy_cost': 75}, 240: {'ability_name': 'Transfusion', 'energy_cost': 50}, 249: {'ability_name': 'AttackRedirect'}, 250: {'ability_name': 'StimpackRedirect'}, 251: {'ability_name': 'StimpackMarauderRedirect'}, 253: {'ability_name': 'StopRedirect'}, 254: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 256: {'ability_name': 'SpineCrawlerUproot'}, 257: {'ability_name': 'SporeCrawlerUproot'}, 258: {'ability_name': 'SpineCrawlerRoot'}, 259: {'ability_name': 'SporeCrawlerRoot'}, 261: {'ability_name': 'BuildAutoTurret'}, 265: {'ability_name': 'Charge'}, 269: {'ability_name': 'Contaminate', 'energy_cost': 125}, 341: {'ability_name': 'MorphToHellion'}, 351: {'ability_name': 'MorphToHellionTank'}, 365: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 367: {'ability_name': 'Yoink', 'energy_cost': 75}, 370: {'ability_name': 'ViperConsumeStructure'}, 374: {'ability_name': 'VolatileBurstBuilding'}, 381: {'ability_name': 'WidowMineBurrow'}, 382: {'ability_name': 'WidowMineUnburrow'}, 383: {'ability_name': 'WidowMineAttack'}, 384: {'ability_name': 'TornadoMissile'}, 388: {'ability_name': 'BurrowLurkerMPDown'}, 389: {'ability_name': 'BurrowLurkerMPUp'}, 391: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 392: {'ability_name': 'MedivacSpeedBoost'}, 407: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 456: {'ability_name': 'TemporalField', 'energy_cost': 100}, 500: {'ability_name': 'MorphToRavager'}, 501: {'ability_name': 'MorphToLurker'}, 504: {'ability_name': 'RavagerCorrosiveBile'}, 505: {'ability_name': 'BurrowRavagerDown'}, 506: {'ability_name': 'BurrowRavagerUp'}, 508: {'ability_name': 'PurificationNovaTargeted'}, 510: {'ability_name': 'LockOn'}, 514: {'ability_name': 'Hyperjump'}, 516: {'ability_name': 'ThorAPMode'}, 517: {'ability_name': 'ThorNormalMode'}, 520: {'ability_name': 'NydusWormTransport'}, 521: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 528: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 529: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 530: {'ability_name': 'VoidRaySwarmDamageBoost'}, 590: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 591: {'ability_name': 'AdeptPhaseShift'}, 594: {'ability_name': 'LurkerHoldFire'}, 595: {'ability_name': 'LurkerRemoveHoldFire'}, 598: {'ability_name': 'LiberatorAGTarget'}, 599: {'ability_name': 'LiberatorAATarget'}, 613: {'ability_name': 'KD8Charge'}, 616: {'ability_name': 'AdeptPhaseShiftCancel'}, 617: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 625: {'ability_name': 'MorphToTransportOverlord'}, 628: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18092/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 550, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/15405/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/15405/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 773, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 772, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 541, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 542, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 277, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 527, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 544, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 546, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 770, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 769, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 766, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 819, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 176, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 765, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 948, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 949, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 548, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 547, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 549, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 540, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 535, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 771, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 851, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 545, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 300, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 764, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/15405/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 60: {'ability_name': 'GhostHoldFire'}, 61: {'ability_name': 'GhostWeaponsFree'}, 63: {'ability_name': 'Explode'}, 65: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 66: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 70: {'ability_name': 'Feedback', 'energy_cost': 50}, 73: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 74: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 75: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 76: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 77: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 78: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 85: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 86: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 90: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 97: {'ability_name': 'Rally'}, 99: {'ability_name': 'RallyCommand'}, 101: {'ability_name': 'RallyHatchery'}, 105: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 106: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 107: {'ability_name': 'StimpackMarauder'}, 108: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 126: {'ability_name': 'Stimpack'}, 127: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 130: {'ability_name': 'SiegeMode'}, 131: {'ability_name': 'Unsiege'}, 132: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 133: {'ability_name': 'MedivacTransport'}, 134: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 135: {'ability_name': 'Yamato'}, 136: {'ability_name': 'AssaultMode'}, 137: {'ability_name': 'FighterMode'}, 139: {'ability_name': 'CommandCenterTransport'}, 140: {'ability_name': 'CommandCenterLiftOff'}, 141: {'ability_name': 'CommandCenterLand'}, 143: {'ability_name': 'BarracksLiftOff'}, 145: {'ability_name': 'FactoryLiftOff'}, 147: {'ability_name': 'StarportLiftOff'}, 148: {'ability_name': 'FactoryLand'}, 149: {'ability_name': 'StarportLand'}, 151: {'ability_name': 'BarracksLand'}, 152: {'ability_name': 'SupplyDepotLower'}, 153: {'ability_name': 'SupplyDepotRaise'}, 166: {'ability_name': 'WarpPrismTransport'}, 171: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 181: {'ability_name': 'UpgradeToLair'}, 182: {'ability_name': 'UpgradeToHive'}, 183: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'MorphToBroodLord'}, 190: {'ability_name': 'BurrowBanelingDown'}, 191: {'ability_name': 'BurrowBanelingUp'}, 192: {'ability_name': 'BurrowDroneDown'}, 193: {'ability_name': 'BurrowDroneUp'}, 194: {'ability_name': 'BurrowHydraliskDown'}, 195: {'ability_name': 'BurrowHydraliskUp'}, 196: {'ability_name': 'BurrowRoachDown'}, 197: {'ability_name': 'BurrowRoachUp'}, 198: {'ability_name': 'BurrowZerglingDown'}, 199: {'ability_name': 'BurrowZerglingUp'}, 206: {'ability_name': 'OverlordTransport'}, 210: {'ability_name': 'BurrowQueenDown'}, 211: {'ability_name': 'BurrowQueenUp'}, 212: {'ability_name': 'NydusCanalTransport'}, 213: {'ability_name': 'Blink'}, 214: {'ability_name': 'BurrowInfestorDown'}, 215: {'ability_name': 'BurrowInfestorUp'}, 217: {'ability_name': 'UpgradeToPlanetaryFortress'}, 220: {'ability_name': 'BurrowUltraliskDown'}, 221: {'ability_name': 'BurrowUltraliskUp'}, 222: {'ability_name': 'UpgradeToOrbital'}, 225: {'ability_name': 'OrbitalLiftOff'}, 226: {'ability_name': 'OrbitalCommandLand'}, 227: {'ability_name': 'ForceField', 'energy_cost': 50}, 228: {'ability_name': 'PhasingMode'}, 229: {'ability_name': 'TransportMode'}, 233: {'ability_name': 'TacNukeStrike'}, 236: {'ability_name': 'EMP', 'energy_cost': 75}, 240: {'ability_name': 'Transfusion', 'energy_cost': 50}, 249: {'ability_name': 'AttackRedirect'}, 250: {'ability_name': 'StimpackRedirect'}, 251: {'ability_name': 'StimpackMarauderRedirect'}, 253: {'ability_name': 'StopRedirect'}, 254: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 256: {'ability_name': 'SpineCrawlerUproot'}, 257: {'ability_name': 'SporeCrawlerUproot'}, 258: {'ability_name': 'SpineCrawlerRoot'}, 259: {'ability_name': 'SporeCrawlerRoot'}, 261: {'ability_name': 'BuildAutoTurret'}, 265: {'ability_name': 'Charge'}, 269: {'ability_name': 'Contaminate', 'energy_cost': 125}, 341: {'ability_name': 'MorphToHellion'}, 351: {'ability_name': 'MorphToHellionTank'}, 365: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 367: {'ability_name': 'Yoink', 'energy_cost': 75}, 370: {'ability_name': 'ViperConsumeStructure'}, 374: {'ability_name': 'VolatileBurstBuilding'}, 381: {'ability_name': 'WidowMineBurrow'}, 382: {'ability_name': 'WidowMineUnburrow'}, 383: {'ability_name': 'WidowMineAttack'}, 384: {'ability_name': 'TornadoMissile'}, 388: {'ability_name': 'BurrowLurkerMPDown'}, 389: {'ability_name': 'BurrowLurkerMPUp'}, 391: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 392: {'ability_name': 'MedivacSpeedBoost'}, 407: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 456: {'ability_name': 'TemporalField', 'energy_cost': 100}, 500: {'ability_name': 'MorphToRavager'}, 501: {'ability_name': 'MorphToLurker'}, 504: {'ability_name': 'RavagerCorrosiveBile'}, 505: {'ability_name': 'BurrowRavagerDown'}, 506: {'ability_name': 'BurrowRavagerUp'}, 508: {'ability_name': 'PurificationNovaTargeted'}, 510: {'ability_name': 'LockOn'}, 514: {'ability_name': 'Hyperjump'}, 516: {'ability_name': 'ThorAPMode'}, 517: {'ability_name': 'ThorNormalMode'}, 520: {'ability_name': 'NydusWormTransport'}, 521: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 528: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 529: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 530: {'ability_name': 'VoidRaySwarmDamageBoost'}, 590: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 591: {'ability_name': 'AdeptPhaseShift'}, 594: {'ability_name': 'LurkerHoldFire'}, 595: {'ability_name': 'LurkerRemoveHoldFire'}, 598: {'ability_name': 'LiberatorAGTarget'}, 599: {'ability_name': 'LiberatorAATarget'}, 613: {'ability_name': 'KD8Charge'}, 616: {'ability_name': 'AdeptPhaseShiftCancel'}, 617: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 625: {'ability_name': 'MorphToTransportOverlord'}, 628: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/15405/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 1122, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 655, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65094/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65094/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 429, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1125, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 430, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 431, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 432, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 358, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 425, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 427, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 652, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 426, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 516, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 428, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 420, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 177, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 433, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 1123, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 178, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 422, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 421, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 653, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 654, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 434, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 646, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 879, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1004, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 435, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 381, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 876, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65094/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 150: {'ability_name': 'FactoryLiftOff'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 302: {'ability_name': 'ThorNormalMode'}, 347: {'ability_name': 'MorphToHellion'}, 357: {'ability_name': 'MorphToHellionTank'}, 371: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 373: {'ability_name': 'Yoink', 'energy_cost': 75}, 376: {'ability_name': 'ViperConsumeStructure'}, 380: {'ability_name': 'VolatileBurstBuilding'}, 387: {'ability_name': 'WidowMineBurrow'}, 388: {'ability_name': 'WidowMineUnburrow'}, 389: {'ability_name': 'WidowMineAttack'}, 390: {'ability_name': 'TornadoMissile'}, 394: {'ability_name': 'BurrowLurkerMPDown'}, 395: {'ability_name': 'BurrowLurkerMPUp'}, 397: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 398: {'ability_name': 'MedivacSpeedBoost'}, 413: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 462: {'ability_name': 'TemporalField', 'energy_cost': 100}, 514: {'ability_name': 'MorphToRavager'}, 515: {'ability_name': 'MorphToLurker'}, 518: {'ability_name': 'RavagerCorrosiveBile'}, 519: {'ability_name': 'BurrowRavagerDown'}, 520: {'ability_name': 'BurrowRavagerUp'}, 522: {'ability_name': 'PurificationNovaTargeted'}, 524: {'ability_name': 'LockOn'}, 528: {'ability_name': 'Hyperjump'}, 530: {'ability_name': 'ThorAPMode'}, 533: {'ability_name': 'NydusWormTransport'}, 534: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 541: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 542: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 543: {'ability_name': 'VoidRaySwarmDamageBoost'}, 603: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 604: {'ability_name': 'AdeptPhaseShift'}, 607: {'ability_name': 'LurkerHoldFire'}, 608: {'ability_name': 'LurkerRemoveHoldFire'}, 611: {'ability_name': 'LiberatorAGTarget'}, 612: {'ability_name': 'LiberatorAATarget'}, 626: {'ability_name': 'KD8Charge'}, 629: {'ability_name': 'AdeptPhaseShiftCancel'}, 630: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 683: {'ability_name': 'DarkTemplarBlink'}, 691: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 693: {'ability_name': 'MorphToTransportOverlord'}, 696: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 699: {'ability_name': 'DarkShrineResearch'}, 700: {'ability_name': 'LurkerDenMPResearch'}, 701: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 702: {'ability_name': 'ObserverMorphtoObserverSiege'}, 705: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 708: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 709: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 710: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/65094/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 550, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/16561/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/16561/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 773, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 772, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 541, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 542, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 277, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 527, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 544, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 546, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 770, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 769, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 766, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 819, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 176, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 765, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 948, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 949, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 548, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 547, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 549, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 540, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 535, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 771, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 851, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 545, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 300, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 764, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/16561/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 60: {'ability_name': 'GhostHoldFire'}, 61: {'ability_name': 'GhostWeaponsFree'}, 63: {'ability_name': 'Explode'}, 65: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 66: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 70: {'ability_name': 'Feedback', 'energy_cost': 50}, 73: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 74: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 75: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 76: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 77: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 78: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 85: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 86: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 90: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 97: {'ability_name': 'Rally'}, 99: {'ability_name': 'RallyCommand'}, 101: {'ability_name': 'RallyHatchery'}, 105: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 106: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 107: {'ability_name': 'StimpackMarauder'}, 108: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 126: {'ability_name': 'Stimpack'}, 127: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 130: {'ability_name': 'SiegeMode'}, 131: {'ability_name': 'Unsiege'}, 132: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 133: {'ability_name': 'MedivacTransport'}, 134: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 135: {'ability_name': 'Yamato'}, 136: {'ability_name': 'AssaultMode'}, 137: {'ability_name': 'FighterMode'}, 139: {'ability_name': 'CommandCenterTransport'}, 140: {'ability_name': 'CommandCenterLiftOff'}, 141: {'ability_name': 'CommandCenterLand'}, 143: {'ability_name': 'BarracksLiftOff'}, 145: {'ability_name': 'FactoryLiftOff'}, 147: {'ability_name': 'StarportLiftOff'}, 148: {'ability_name': 'FactoryLand'}, 149: {'ability_name': 'StarportLand'}, 151: {'ability_name': 'BarracksLand'}, 152: {'ability_name': 'SupplyDepotLower'}, 153: {'ability_name': 'SupplyDepotRaise'}, 166: {'ability_name': 'WarpPrismTransport'}, 171: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 181: {'ability_name': 'UpgradeToLair'}, 182: {'ability_name': 'UpgradeToHive'}, 183: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'MorphToBroodLord'}, 190: {'ability_name': 'BurrowBanelingDown'}, 191: {'ability_name': 'BurrowBanelingUp'}, 192: {'ability_name': 'BurrowDroneDown'}, 193: {'ability_name': 'BurrowDroneUp'}, 194: {'ability_name': 'BurrowHydraliskDown'}, 195: {'ability_name': 'BurrowHydraliskUp'}, 196: {'ability_name': 'BurrowRoachDown'}, 197: {'ability_name': 'BurrowRoachUp'}, 198: {'ability_name': 'BurrowZerglingDown'}, 199: {'ability_name': 'BurrowZerglingUp'}, 206: {'ability_name': 'OverlordTransport'}, 210: {'ability_name': 'BurrowQueenDown'}, 211: {'ability_name': 'BurrowQueenUp'}, 212: {'ability_name': 'NydusCanalTransport'}, 213: {'ability_name': 'Blink'}, 214: {'ability_name': 'BurrowInfestorDown'}, 215: {'ability_name': 'BurrowInfestorUp'}, 217: {'ability_name': 'UpgradeToPlanetaryFortress'}, 220: {'ability_name': 'BurrowUltraliskDown'}, 221: {'ability_name': 'BurrowUltraliskUp'}, 222: {'ability_name': 'UpgradeToOrbital'}, 225: {'ability_name': 'OrbitalLiftOff'}, 226: {'ability_name': 'OrbitalCommandLand'}, 227: {'ability_name': 'ForceField', 'energy_cost': 50}, 228: {'ability_name': 'PhasingMode'}, 229: {'ability_name': 'TransportMode'}, 233: {'ability_name': 'TacNukeStrike'}, 236: {'ability_name': 'EMP', 'energy_cost': 75}, 240: {'ability_name': 'Transfusion', 'energy_cost': 50}, 249: {'ability_name': 'AttackRedirect'}, 250: {'ability_name': 'StimpackRedirect'}, 251: {'ability_name': 'StimpackMarauderRedirect'}, 253: {'ability_name': 'StopRedirect'}, 254: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 256: {'ability_name': 'SpineCrawlerUproot'}, 257: {'ability_name': 'SporeCrawlerUproot'}, 258: {'ability_name': 'SpineCrawlerRoot'}, 259: {'ability_name': 'SporeCrawlerRoot'}, 261: {'ability_name': 'BuildAutoTurret'}, 265: {'ability_name': 'Charge'}, 269: {'ability_name': 'Contaminate', 'energy_cost': 125}, 341: {'ability_name': 'MorphToHellion'}, 351: {'ability_name': 'MorphToHellionTank'}, 365: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 367: {'ability_name': 'Yoink', 'energy_cost': 75}, 370: {'ability_name': 'ViperConsumeStructure'}, 374: {'ability_name': 'VolatileBurstBuilding'}, 381: {'ability_name': 'WidowMineBurrow'}, 382: {'ability_name': 'WidowMineUnburrow'}, 383: {'ability_name': 'WidowMineAttack'}, 384: {'ability_name': 'TornadoMissile'}, 388: {'ability_name': 'BurrowLurkerMPDown'}, 389: {'ability_name': 'BurrowLurkerMPUp'}, 391: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 392: {'ability_name': 'MedivacSpeedBoost'}, 407: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 456: {'ability_name': 'TemporalField', 'energy_cost': 100}, 500: {'ability_name': 'MorphToRavager'}, 501: {'ability_name': 'MorphToLurker'}, 504: {'ability_name': 'RavagerCorrosiveBile'}, 505: {'ability_name': 'BurrowRavagerDown'}, 506: {'ability_name': 'BurrowRavagerUp'}, 508: {'ability_name': 'PurificationNovaTargeted'}, 510: {'ability_name': 'LockOn'}, 514: {'ability_name': 'Hyperjump'}, 516: {'ability_name': 'ThorAPMode'}, 517: {'ability_name': 'ThorNormalMode'}, 520: {'ability_name': 'NydusWormTransport'}, 521: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 528: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 529: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 530: {'ability_name': 'VoidRaySwarmDamageBoost'}, 590: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 591: {'ability_name': 'AdeptPhaseShift'}, 594: {'ability_name': 'LurkerHoldFire'}, 595: {'ability_name': 'LurkerRemoveHoldFire'}, 598: {'ability_name': 'LiberatorAGTarget'}, 599: {'ability_name': 'LiberatorAATarget'}, 613: {'ability_name': 'KD8Charge'}, 616: {'ability_name': 'AdeptPhaseShiftCancel'}, 617: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 625: {'ability_name': 'MorphToTransportOverlord'}, 628: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/16561/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 82, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 83, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 84, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 85, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 156, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 86, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 95, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 89, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 482, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 94, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 90, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 88, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 93, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 87, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 92, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 59, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 155, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 157, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 153, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 70, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 69, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 47, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 48, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 49, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 66, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 50, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 67, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 52, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 53, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 60, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 62, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 64, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 61, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 63, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 65, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 109, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 111, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 112, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 122, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 113, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 120, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 119, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 123, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 114, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 175, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 115, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 125, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 118, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 165, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 117, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 124, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 116, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 110, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 161, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/81102/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/81102/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 107, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 96, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 97, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 100, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 478, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 98, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 99, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 164, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 105, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1192, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 104, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 159, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 106, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 479, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 101, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 103, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 185, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 186, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 102, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 108, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 68, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 408, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 71, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 72, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 74, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 73, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 76, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 473, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 475, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 722, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 474, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 56, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 75, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 587, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 58, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 77, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 476, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 470, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 79, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 54, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 78, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 80, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 189, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 126, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 127, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 129, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 149, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 128, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 133, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 179, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 182, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 151, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 152, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 190, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 178, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 130, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 174, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 131, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 135, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 480, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 717, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 946, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1073, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 134, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 188, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 481, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 132, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 137, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 166, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 431, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 181, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 136, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/81102/unit_data.py
unit_data.py
abilities = {41: {'ability_name': 'stop'}, 43: {'ability_name': 'move'}, 46: {'ability_name': 'attack'}, 67: {'ability_name': 'GhostHoldFire'}, 68: {'ability_name': 'GhostWeaponsFree'}, 70: {'ability_name': 'Explode'}, 72: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 73: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 75: {'ability_name': 'ZerglingTrain'}, 77: {'ability_name': 'Feedback', 'energy_cost': 50}, 80: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 88: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 89: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 92: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 93: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 97: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 104: {'ability_name': 'Rally'}, 106: {'ability_name': 'RallyCommand'}, 108: {'ability_name': 'RallyHatchery'}, 109: {'ability_name': 'RoachWarrenResearch'}, 112: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 113: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 114: {'ability_name': 'StimpackMarauder'}, 115: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 119: {'ability_name': 'UltraliskCavernResearch'}, 133: {'ability_name': 'Stimpack'}, 134: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 137: {'ability_name': 'SiegeMode'}, 138: {'ability_name': 'Unsiege'}, 139: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 140: {'ability_name': 'MedivacTransport'}, 141: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 142: {'ability_name': 'Yamato'}, 143: {'ability_name': 'AssaultMode'}, 144: {'ability_name': 'FighterMode'}, 146: {'ability_name': 'CommandCenterTransport'}, 147: {'ability_name': 'CommandCenterLiftOff'}, 148: {'ability_name': 'CommandCenterLand'}, 149: {'ability_name': 'BarracksFlyingBuild'}, 150: {'ability_name': 'BarracksLiftOff'}, 151: {'ability_name': 'FactoryFlyingBuild'}, 152: {'ability_name': 'FactoryLiftOff'}, 153: {'ability_name': 'StarportFlyingBuild'}, 154: {'ability_name': 'StarportLiftOff'}, 155: {'ability_name': 'FactoryLand'}, 156: {'ability_name': 'StarportLand'}, 158: {'ability_name': 'BarracksLand'}, 159: {'ability_name': 'SupplyDepotLower'}, 160: {'ability_name': 'SupplyDepotRaise'}, 161: {'ability_name': 'BarracksTrain'}, 162: {'ability_name': 'FactoryTrain'}, 163: {'ability_name': 'StarportTrain'}, 164: {'ability_name': 'EngineeringBayResearch'}, 166: {'ability_name': 'GhostAcademyTrain'}, 167: {'ability_name': 'BarracksTechLabResearch'}, 168: {'ability_name': 'FactoryTechLabResearch'}, 169: {'ability_name': 'StarportTechLabResearch'}, 170: {'ability_name': 'GhostAcademyResearch'}, 171: {'ability_name': 'ArmoryResearch'}, 173: {'ability_name': 'WarpPrismTransport'}, 174: {'ability_name': 'GatewayTrain'}, 175: {'ability_name': 'StargateTrain'}, 176: {'ability_name': 'RoboticsFacilityTrain'}, 177: {'ability_name': 'NexusTrain'}, 178: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 182: {'ability_name': 'ForgeResearch'}, 183: {'ability_name': 'RoboticsBayResearch'}, 184: {'ability_name': 'TemplarArchiveResearch'}, 185: {'ability_name': 'ZergBuild'}, 187: {'ability_name': 'EvolutionChamberResearch'}, 188: {'ability_name': 'UpgradeToLair'}, 189: {'ability_name': 'UpgradeToHive'}, 190: {'ability_name': 'UpgradeToGreaterSpire'}, 192: {'ability_name': 'SpawningPoolResearch'}, 193: {'ability_name': 'HydraliskDenResearch'}, 195: {'ability_name': 'LarvaTrain'}, 196: {'ability_name': 'MorphToBroodLord'}, 197: {'ability_name': 'BurrowBanelingDown'}, 198: {'ability_name': 'BurrowBanelingUp'}, 199: {'ability_name': 'BurrowDroneDown'}, 200: {'ability_name': 'BurrowDroneUp'}, 201: {'ability_name': 'BurrowHydraliskDown'}, 202: {'ability_name': 'BurrowHydraliskUp'}, 203: {'ability_name': 'BurrowRoachDown'}, 204: {'ability_name': 'BurrowRoachUp'}, 205: {'ability_name': 'BurrowZerglingDown'}, 206: {'ability_name': 'BurrowZerglingUp'}, 213: {'ability_name': 'OverlordTransport'}, 216: {'ability_name': 'WarpGateTrain'}, 217: {'ability_name': 'BurrowQueenDown'}, 218: {'ability_name': 'BurrowQueenUp'}, 219: {'ability_name': 'NydusCanalTransport'}, 220: {'ability_name': 'Blink'}, 221: {'ability_name': 'BurrowInfestorDown'}, 222: {'ability_name': 'BurrowInfestorUp'}, 224: {'ability_name': 'UpgradeToPlanetaryFortress'}, 225: {'ability_name': 'InfestationPitResearch'}, 227: {'ability_name': 'BurrowUltraliskDown'}, 228: {'ability_name': 'BurrowUltraliskUp'}, 229: {'ability_name': 'UpgradeToOrbital'}, 232: {'ability_name': 'OrbitalLiftOff'}, 233: {'ability_name': 'OrbitalCommandLand'}, 234: {'ability_name': 'ForceField', 'energy_cost': 50}, 235: {'ability_name': 'PhasingMode'}, 236: {'ability_name': 'TransportMode'}, 237: {'ability_name': 'FusionCoreResearch'}, 238: {'ability_name': 'CyberneticsCoreResearch'}, 239: {'ability_name': 'TwilightCouncilResearch'}, 240: {'ability_name': 'TacNukeStrike'}, 243: {'ability_name': 'EMP', 'energy_cost': 75}, 247: {'ability_name': 'Transfusion', 'energy_cost': 50}, 256: {'ability_name': 'AttackRedirect'}, 257: {'ability_name': 'StimpackRedirect'}, 258: {'ability_name': 'StimpackMarauderRedirect'}, 260: {'ability_name': 'StopRedirect'}, 261: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 262: {'ability_name': 'QueenBuild'}, 263: {'ability_name': 'SpineCrawlerUproot'}, 264: {'ability_name': 'SporeCrawlerUproot'}, 265: {'ability_name': 'SpineCrawlerRoot'}, 266: {'ability_name': 'SporeCrawlerRoot'}, 267: {'ability_name': 'CreepTumorBurrowedBuild'}, 268: {'ability_name': 'BuildAutoTurret'}, 270: {'ability_name': 'NydusNetworkBuild'}, 272: {'ability_name': 'Charge'}, 276: {'ability_name': 'Contaminate', 'energy_cost': 125}, 283: {'ability_name': 'RavagerCorrosiveBile'}, 305: {'ability_name': 'BurrowLurkerMPDown'}, 306: {'ability_name': 'BurrowLurkerMPUp'}, 309: {'ability_name': 'BurrowRavagerDown'}, 310: {'ability_name': 'BurrowRavagerUp'}, 311: {'ability_name': 'MorphToRavager'}, 312: {'ability_name': 'MorphToTransportOverlord'}, 314: {'ability_name': 'ThorNormalMode'}, 359: {'ability_name': 'MorphToHellion'}, 369: {'ability_name': 'MorphToHellionTank'}, 383: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 385: {'ability_name': 'Yoink', 'energy_cost': 75}, 388: {'ability_name': 'ViperConsumeStructure'}, 392: {'ability_name': 'VolatileBurstBuilding'}, 399: {'ability_name': 'WidowMineBurrow'}, 400: {'ability_name': 'WidowMineUnburrow'}, 401: {'ability_name': 'WidowMineAttack'}, 402: {'ability_name': 'TornadoMissile'}, 405: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 406: {'ability_name': 'MedivacSpeedBoost'}, 421: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 470: {'ability_name': 'TemporalField', 'energy_cost': 100}, 524: {'ability_name': 'MorphToLurker'}, 528: {'ability_name': 'PurificationNovaTargeted'}, 530: {'ability_name': 'LockOn'}, 534: {'ability_name': 'Hyperjump'}, 536: {'ability_name': 'ThorAPMode'}, 539: {'ability_name': 'NydusWormTransport'}, 540: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 547: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 548: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 549: {'ability_name': 'VoidRaySwarmDamageBoost'}, 609: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 610: {'ability_name': 'AdeptPhaseShift'}, 613: {'ability_name': 'LurkerHoldFire'}, 614: {'ability_name': 'LurkerRemoveHoldFire'}, 617: {'ability_name': 'LiberatorAGTarget'}, 618: {'ability_name': 'LiberatorAATarget'}, 632: {'ability_name': 'KD8Charge'}, 635: {'ability_name': 'AdeptPhaseShiftCancel'}, 636: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 689: {'ability_name': 'DarkTemplarBlink'}, 693: {'ability_name': 'BattlecruiserAttack'}, 695: {'ability_name': 'BattlecruiserMove'}, 697: {'ability_name': 'BattlecruiserStop'}, 698: {'ability_name': 'BatteryOvercharge', 'energy_cost': 50}, 705: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 709: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 712: {'ability_name': 'DarkShrineResearch'}, 713: {'ability_name': 'LurkerDenMPResearch'}, 714: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 715: {'ability_name': 'ObserverMorphtoObserverSiege'}, 718: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 721: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 722: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 723: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/81102/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 590, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/51702/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/51702/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 372, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 819, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 581, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 582, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 314, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 567, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 584, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 586, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 817, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 816, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 813, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 865, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 177, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 373, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 1064, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 1065, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 588, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 587, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 589, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 580, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 575, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 818, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 945, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 585, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 337, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 812, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/51702/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'LurkerDenMPResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 346: {'ability_name': 'MorphToHellion'}, 356: {'ability_name': 'MorphToHellionTank'}, 370: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 372: {'ability_name': 'Yoink', 'energy_cost': 75}, 375: {'ability_name': 'ViperConsumeStructure'}, 379: {'ability_name': 'VolatileBurstBuilding'}, 386: {'ability_name': 'WidowMineBurrow'}, 387: {'ability_name': 'WidowMineUnburrow'}, 388: {'ability_name': 'WidowMineAttack'}, 389: {'ability_name': 'TornadoMissile'}, 393: {'ability_name': 'BurrowLurkerMPDown'}, 394: {'ability_name': 'BurrowLurkerMPUp'}, 396: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 397: {'ability_name': 'MedivacSpeedBoost'}, 412: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 461: {'ability_name': 'TemporalField', 'energy_cost': 100}, 513: {'ability_name': 'MorphToRavager'}, 514: {'ability_name': 'MorphToLurker'}, 517: {'ability_name': 'RavagerCorrosiveBile'}, 518: {'ability_name': 'BurrowRavagerDown'}, 519: {'ability_name': 'BurrowRavagerUp'}, 521: {'ability_name': 'PurificationNovaTargeted'}, 523: {'ability_name': 'LockOn'}, 527: {'ability_name': 'Hyperjump'}, 529: {'ability_name': 'ThorAPMode'}, 530: {'ability_name': 'ThorNormalMode'}, 533: {'ability_name': 'NydusWormTransport'}, 534: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 541: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 542: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 543: {'ability_name': 'VoidRaySwarmDamageBoost'}, 603: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 604: {'ability_name': 'AdeptPhaseShift'}, 607: {'ability_name': 'LurkerHoldFire'}, 608: {'ability_name': 'LurkerRemoveHoldFire'}, 611: {'ability_name': 'LiberatorAGTarget'}, 612: {'ability_name': 'LiberatorAATarget'}, 626: {'ability_name': 'KD8Charge'}, 629: {'ability_name': 'AdeptPhaseShiftCancel'}, 630: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 683: {'ability_name': 'DarkTemplarBlink'}, 688: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 690: {'ability_name': 'MorphToTransportOverlord'}, 693: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 696: {'ability_name': 'DarkShrineResearch'}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/51702/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 1122, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 655, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/60196/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/60196/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 429, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1125, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 430, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 431, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 432, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 358, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 425, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 427, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 652, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 426, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 516, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 428, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 420, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 177, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 433, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 1123, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 178, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 422, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 421, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 653, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 654, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 434, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 646, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 879, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1004, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 435, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 381, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 876, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/60196/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 150: {'ability_name': 'FactoryLiftOff'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 302: {'ability_name': 'ThorNormalMode'}, 347: {'ability_name': 'MorphToHellion'}, 357: {'ability_name': 'MorphToHellionTank'}, 371: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 373: {'ability_name': 'Yoink', 'energy_cost': 75}, 376: {'ability_name': 'ViperConsumeStructure'}, 380: {'ability_name': 'VolatileBurstBuilding'}, 387: {'ability_name': 'WidowMineBurrow'}, 388: {'ability_name': 'WidowMineUnburrow'}, 389: {'ability_name': 'WidowMineAttack'}, 390: {'ability_name': 'TornadoMissile'}, 394: {'ability_name': 'BurrowLurkerMPDown'}, 395: {'ability_name': 'BurrowLurkerMPUp'}, 397: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 398: {'ability_name': 'MedivacSpeedBoost'}, 413: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 462: {'ability_name': 'TemporalField', 'energy_cost': 100}, 514: {'ability_name': 'MorphToRavager'}, 515: {'ability_name': 'MorphToLurker'}, 518: {'ability_name': 'RavagerCorrosiveBile'}, 519: {'ability_name': 'BurrowRavagerDown'}, 520: {'ability_name': 'BurrowRavagerUp'}, 522: {'ability_name': 'PurificationNovaTargeted'}, 524: {'ability_name': 'LockOn'}, 528: {'ability_name': 'Hyperjump'}, 530: {'ability_name': 'ThorAPMode'}, 533: {'ability_name': 'NydusWormTransport'}, 534: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 541: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 542: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 543: {'ability_name': 'VoidRaySwarmDamageBoost'}, 603: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 604: {'ability_name': 'AdeptPhaseShift'}, 607: {'ability_name': 'LurkerHoldFire'}, 608: {'ability_name': 'LurkerRemoveHoldFire'}, 611: {'ability_name': 'LiberatorAGTarget'}, 612: {'ability_name': 'LiberatorAATarget'}, 626: {'ability_name': 'KD8Charge'}, 629: {'ability_name': 'AdeptPhaseShiftCancel'}, 630: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 683: {'ability_name': 'DarkTemplarBlink'}, 691: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 693: {'ability_name': 'MorphToTransportOverlord'}, 696: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 699: {'ability_name': 'DarkShrineResearch'}, 700: {'ability_name': 'LurkerDenMPResearch'}, 701: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 702: {'ability_name': 'ObserverMorphtoObserverSiege'}, 705: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 708: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 709: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 710: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/60196/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 455, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 174, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74071/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74071/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 451, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1153, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 452, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 184, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 185, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 381, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 446, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 448, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 683, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 447, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 548, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 449, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 443, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 188, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 178, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 181, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 189, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 177, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 172, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 453, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 678, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 907, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1034, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 187, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 454, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 404, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 180, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74071/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 699: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 703: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 706: {'ability_name': 'DarkShrineResearch'}, 707: {'ability_name': 'LurkerDenMPResearch'}, 708: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 709: {'ability_name': 'ObserverMorphtoObserverSiege'}, 712: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 715: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 716: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 717: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74071/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 550, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18468/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18468/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 773, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 772, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 541, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 542, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 277, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 527, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 544, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 546, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 770, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 769, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 766, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 819, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 176, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 765, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 948, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 949, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 548, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 547, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 549, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 540, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 535, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 771, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 851, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 545, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 300, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 764, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18468/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 60: {'ability_name': 'GhostHoldFire'}, 61: {'ability_name': 'GhostWeaponsFree'}, 63: {'ability_name': 'Explode'}, 65: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 66: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 70: {'ability_name': 'Feedback', 'energy_cost': 50}, 73: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 74: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 75: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 76: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 77: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 78: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 85: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 86: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 90: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 97: {'ability_name': 'Rally'}, 99: {'ability_name': 'RallyCommand'}, 101: {'ability_name': 'RallyHatchery'}, 105: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 106: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 107: {'ability_name': 'StimpackMarauder'}, 108: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 126: {'ability_name': 'Stimpack'}, 127: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 130: {'ability_name': 'SiegeMode'}, 131: {'ability_name': 'Unsiege'}, 132: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 133: {'ability_name': 'MedivacTransport'}, 134: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 135: {'ability_name': 'Yamato'}, 136: {'ability_name': 'AssaultMode'}, 137: {'ability_name': 'FighterMode'}, 139: {'ability_name': 'CommandCenterTransport'}, 140: {'ability_name': 'CommandCenterLiftOff'}, 141: {'ability_name': 'CommandCenterLand'}, 143: {'ability_name': 'BarracksLiftOff'}, 145: {'ability_name': 'FactoryLiftOff'}, 147: {'ability_name': 'StarportLiftOff'}, 148: {'ability_name': 'FactoryLand'}, 149: {'ability_name': 'StarportLand'}, 151: {'ability_name': 'BarracksLand'}, 152: {'ability_name': 'SupplyDepotLower'}, 153: {'ability_name': 'SupplyDepotRaise'}, 166: {'ability_name': 'WarpPrismTransport'}, 171: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 181: {'ability_name': 'UpgradeToLair'}, 182: {'ability_name': 'UpgradeToHive'}, 183: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'MorphToBroodLord'}, 190: {'ability_name': 'BurrowBanelingDown'}, 191: {'ability_name': 'BurrowBanelingUp'}, 192: {'ability_name': 'BurrowDroneDown'}, 193: {'ability_name': 'BurrowDroneUp'}, 194: {'ability_name': 'BurrowHydraliskDown'}, 195: {'ability_name': 'BurrowHydraliskUp'}, 196: {'ability_name': 'BurrowRoachDown'}, 197: {'ability_name': 'BurrowRoachUp'}, 198: {'ability_name': 'BurrowZerglingDown'}, 199: {'ability_name': 'BurrowZerglingUp'}, 206: {'ability_name': 'OverlordTransport'}, 210: {'ability_name': 'BurrowQueenDown'}, 211: {'ability_name': 'BurrowQueenUp'}, 212: {'ability_name': 'NydusCanalTransport'}, 213: {'ability_name': 'Blink'}, 214: {'ability_name': 'BurrowInfestorDown'}, 215: {'ability_name': 'BurrowInfestorUp'}, 217: {'ability_name': 'UpgradeToPlanetaryFortress'}, 220: {'ability_name': 'BurrowUltraliskDown'}, 221: {'ability_name': 'BurrowUltraliskUp'}, 222: {'ability_name': 'UpgradeToOrbital'}, 225: {'ability_name': 'OrbitalLiftOff'}, 226: {'ability_name': 'OrbitalCommandLand'}, 227: {'ability_name': 'ForceField', 'energy_cost': 50}, 228: {'ability_name': 'PhasingMode'}, 229: {'ability_name': 'TransportMode'}, 233: {'ability_name': 'TacNukeStrike'}, 236: {'ability_name': 'EMP', 'energy_cost': 75}, 240: {'ability_name': 'Transfusion', 'energy_cost': 50}, 249: {'ability_name': 'AttackRedirect'}, 250: {'ability_name': 'StimpackRedirect'}, 251: {'ability_name': 'StimpackMarauderRedirect'}, 253: {'ability_name': 'StopRedirect'}, 254: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 256: {'ability_name': 'SpineCrawlerUproot'}, 257: {'ability_name': 'SporeCrawlerUproot'}, 258: {'ability_name': 'SpineCrawlerRoot'}, 259: {'ability_name': 'SporeCrawlerRoot'}, 261: {'ability_name': 'BuildAutoTurret'}, 265: {'ability_name': 'Charge'}, 269: {'ability_name': 'Contaminate', 'energy_cost': 125}, 341: {'ability_name': 'MorphToHellion'}, 351: {'ability_name': 'MorphToHellionTank'}, 365: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 367: {'ability_name': 'Yoink', 'energy_cost': 75}, 370: {'ability_name': 'ViperConsumeStructure'}, 374: {'ability_name': 'VolatileBurstBuilding'}, 381: {'ability_name': 'WidowMineBurrow'}, 382: {'ability_name': 'WidowMineUnburrow'}, 383: {'ability_name': 'WidowMineAttack'}, 384: {'ability_name': 'TornadoMissile'}, 388: {'ability_name': 'BurrowLurkerMPDown'}, 389: {'ability_name': 'BurrowLurkerMPUp'}, 391: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 392: {'ability_name': 'MedivacSpeedBoost'}, 407: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 456: {'ability_name': 'TemporalField', 'energy_cost': 100}, 500: {'ability_name': 'MorphToRavager'}, 501: {'ability_name': 'MorphToLurker'}, 504: {'ability_name': 'RavagerCorrosiveBile'}, 505: {'ability_name': 'BurrowRavagerDown'}, 506: {'ability_name': 'BurrowRavagerUp'}, 508: {'ability_name': 'PurificationNovaTargeted'}, 510: {'ability_name': 'LockOn'}, 514: {'ability_name': 'Hyperjump'}, 516: {'ability_name': 'ThorAPMode'}, 517: {'ability_name': 'ThorNormalMode'}, 520: {'ability_name': 'NydusWormTransport'}, 521: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 528: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 529: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 530: {'ability_name': 'VoidRaySwarmDamageBoost'}, 590: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 591: {'ability_name': 'AdeptPhaseShift'}, 594: {'ability_name': 'LurkerHoldFire'}, 595: {'ability_name': 'LurkerRemoveHoldFire'}, 598: {'ability_name': 'LiberatorAGTarget'}, 599: {'ability_name': 'LiberatorAATarget'}, 613: {'ability_name': 'KD8Charge'}, 616: {'ability_name': 'AdeptPhaseShiftCancel'}, 617: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 625: {'ability_name': 'MorphToTransportOverlord'}, 628: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/18468/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': [443], 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 591, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/54724/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/54724/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 372, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': [1169], 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 820, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 582, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 583, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 314, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 568, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 585, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 587, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 818, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 817, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 814, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 866, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 177, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 373, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 1065, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': [151], 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 1066, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 589, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 588, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 590, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 581, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 576, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 819, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 946, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 176, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 586, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 337, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 813, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/54724/unit_data.py
unit_data.py
abilities = {36: {'ability_name': 'stop'}, 38: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'LurkerDenMPResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 346: {'ability_name': 'MorphToHellion'}, 356: {'ability_name': 'MorphToHellionTank'}, 370: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 372: {'ability_name': 'Yoink', 'energy_cost': 75}, 375: {'ability_name': 'ViperConsumeStructure'}, 379: {'ability_name': 'VolatileBurstBuilding'}, 386: {'ability_name': 'WidowMineBurrow'}, 387: {'ability_name': 'WidowMineUnburrow'}, 388: {'ability_name': 'WidowMineAttack'}, 389: {'ability_name': 'TornadoMissile'}, 393: {'ability_name': 'BurrowLurkerMPDown'}, 394: {'ability_name': 'BurrowLurkerMPUp'}, 396: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 397: {'ability_name': 'MedivacSpeedBoost'}, 412: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 461: {'ability_name': 'TemporalField', 'energy_cost': 100}, 513: {'ability_name': 'MorphToRavager'}, 514: {'ability_name': 'MorphToLurker'}, 517: {'ability_name': 'RavagerCorrosiveBile'}, 518: {'ability_name': 'BurrowRavagerDown'}, 519: {'ability_name': 'BurrowRavagerUp'}, 521: {'ability_name': 'PurificationNovaTargeted'}, 523: {'ability_name': 'LockOn'}, 527: {'ability_name': 'Hyperjump'}, 529: {'ability_name': 'ThorAPMode'}, 530: {'ability_name': 'ThorNormalMode'}, 533: {'ability_name': 'NydusWormTransport'}, 534: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 541: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 542: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 543: {'ability_name': 'VoidRaySwarmDamageBoost'}, 603: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 604: {'ability_name': 'AdeptPhaseShift'}, 607: {'ability_name': 'LurkerHoldFire'}, 608: {'ability_name': 'LurkerRemoveHoldFire'}, 611: {'ability_name': 'LiberatorAGTarget'}, 612: {'ability_name': 'LiberatorAATarget'}, 626: {'ability_name': 'KD8Charge'}, 629: {'ability_name': 'AdeptPhaseShiftCancel'}, 630: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 683: {'ability_name': 'DarkTemplarBlink'}, 688: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 690: {'ability_name': 'MorphToTransportOverlord'}, 693: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 696: {'ability_name': 'DarkShrineResearch'}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/54724/ability_data.py
ability_data.py
buildings = {'Protoss': {'Nexus': {'obj_id': 81, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15, 'energy': 50}, 'Pylon': {'obj_id': 82, 'priority': 1, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'Assimilator': {'obj_id': 83, 'priority': 3, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Gateway': {'obj_id': 84, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'WarpGate': {'obj_id': 155, 'priority': 30, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Forge': {'obj_id': 85, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'CyberneticsCore': {'obj_id': 94, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'PhotonCannon': {'obj_id': 88, 'priority': 4, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'ShieldBattery': {'obj_id': 455, 'priority': 5, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0, 'energy': 100}, 'RoboticsFacility': {'obj_id': 93, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Stargate': {'obj_id': 89, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'TwilightCouncil': {'obj_id': 87, 'priority': 12, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'RoboticsBay': {'obj_id': 92, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'FleetBeacon': {'obj_id': 86, 'priority': 14, 'type': ['building'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 0}, 'TemplarArchives': {'obj_id': [90], 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'DarkShrine': {'obj_id': 91, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}}, 'Terran': {'CommandCenter': {'obj_id': 39, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'CommandCenterFlying': {'obj_id': 58, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 400, 'gas_cost': 0, 'supply': 15}, 'OrbitalCommand': {'obj_id': 154, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'OrbitalCommandFlying': {'obj_id': 156, 'priority': 34, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0, 'energy': 50}, 'PlanetaryFortress': {'obj_id': 152, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'SupplyDepot': {'obj_id': 40, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 8}, 'SupplyDepotLowered': {'obj_id': 69, 'priority': 26, 'type': ['building', 'supply'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Refinery': {'obj_id': 41, 'priority': 1, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'Barracks': {'obj_id': 42, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BarracksFlying': {'obj_id': 68, 'priority': 24, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'EngineeringBay': {'obj_id': 43, 'priority': 18, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'Bunker': {'obj_id': 45, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'MissileTurret': {'obj_id': 44, 'priority': 14, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SensorTower': {'obj_id': 46, 'priority': 10, 'type': ['building'], 'mineral_cost': 125, 'gas_cost': 100, 'supply': 0}, 'GhostAcademy': {'obj_id': 47, 'priority': 8, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Factory': {'obj_id': 48, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FactoryFlying': {'obj_id': 65, 'priority': 22, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Starport': {'obj_id': 49, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'StarportFlying': {'obj_id': 66, 'priority': 20, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'Armory': {'obj_id': 51, 'priority': 16, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'FusionCore': {'obj_id': 52, 'priority': 7, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'BarracksTechLab': {'obj_id': 59, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'FactoryTechLab': {'obj_id': 61, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'StarportTechLab': {'obj_id': 63, 'priority': 2, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0}, 'BarracksReactor': {'obj_id': 60, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'FactoryReactor': {'obj_id': 62, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'StarportReactor': {'obj_id': 64, 'priority': 1, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}}, 'Zerg': {'Hatchery': {'obj_id': 108, 'priority': 32, 'type': ['building', 'supply'], 'mineral_cost': 300, 'gas_cost': 0, 'supply': 6}, 'Extractor': {'obj_id': 110, 'priority': 1, 'type': ['building'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0}, 'SpawningPool': {'obj_id': 111, 'priority': 20, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 0, 'supply': 0}, 'SpineCrawler': {'obj_id': 120, 'priority': 4, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'SporeCrawler': {'obj_id': 121, 'priority': 4, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'EvolutionChamber': {'obj_id': 112, 'priority': 26, 'type': ['building'], 'mineral_cost': 75, 'gas_cost': 0, 'supply': 0}, 'RoachWarren': {'obj_id': 119, 'priority': 6, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 0}, 'BanelingNest': {'obj_id': 118, 'priority': 8, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 0}, 'Lair': {'obj_id': 122, 'priority': 30, 'type': ['building', 'supply'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 0}, 'HydraliskDen': {'obj_id': 113, 'priority': 18, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'LurkerDenMP': {'obj_id': 174, 'priority': 16, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'Spire': {'obj_id': 114, 'priority': 24, 'type': ['building'], 'mineral_cost': 200, 'gas_cost': 200, 'supply': 0}, 'GreaterSpire': {'obj_id': 124, 'priority': 22, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 0}, 'NydusNetwork': {'obj_id': 117, 'priority': 10, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 0}, 'NydusCanal': {'obj_id': 164, 'priority': 10, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'NydusWorm': {'obj_id': [164], 'priority': 10, 'type': ['building'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 0}, 'InfestationPit': {'obj_id': 116, 'priority': 12, 'type': ['building'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 0}, 'Hive': {'obj_id': 123, 'priority': 28, 'type': ['building', 'supply'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 0}, 'UltraliskCavern': {'obj_id': 115, 'priority': 14, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumor': {'obj_id': 109, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'CreepTumorBurrowed': {'obj_id': 159, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}, 'CreepTumorQueen': {'obj_id': 160, 'priority': 2, 'type': ['building'], 'mineral_cost': 150, 'gas_cost': 200, 'supply': 0}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74741/building_data.py
building_data.py
upgrades = {'Protoss': {'ObserverGraviticBooster': {'mineral_cost': 100, 'gas_cost': 100}, 'GraviticDrive': {'mineral_cost': 100, 'gas_cost': 100}, 'ExtendedThermalLance': {'mineral_cost': 150, 'gas_cost': 150}, 'PsiStormTech': {'mineral_cost': 200, 'gas_cost': 200}, 'WarpGateResearch': {'mineral_cost': 50, 'gas_cost': 50}, 'Charge': {'mineral_cost': 100, 'gas_cost': 100}, 'BlinkTech': {'mineral_cost': 150, 'gas_cost': 150}, 'PhoenixRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'AdeptPiercingAttack': {'mineral_cost': 100, 'gas_cost': 100}, 'DarkTemplarBlinkUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'FluxVanes': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ProtossShieldsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossShieldsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossShieldsLevel3': {'mineral_cost': 300, 'gas_cost': 300}, 'ProtossAirWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ProtossAirWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ProtossAirWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ProtossAirArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ProtossAirArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ProtossAirArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}, 'Terran': {'Stimpack': {'mineral_cost': 100, 'gas_cost': 100}, 'CombatShields': {'mineral_cost': 100, 'gas_cost': 100}, 'PunisherGrenades': {'mineral_cost': 50, 'gas_cost': 50}, 'PersonalCloaking': {'mineral_cost': 150, 'gas_cost': 150}, 'EnhancedShockwaves': {'mineral_cost': 150, 'gas_cost': 150}, 'BansheeCloak': {'mineral_cost': 100, 'gas_cost': 100}, 'RavenCorvidReactor': {'mineral_cost': 150, 'gas_cost': 150}, 'BattlecruiserEnableSpecializations': {'mineral_cost': 150, 'gas_cost': 150}, 'DrillClaws': {'mineral_cost': 75, 'gas_cost': 75}, 'HighCapacityBarrels': {'mineral_cost': 100, 'gas_cost': 100}, 'CycloneLockOnDamageUpgrade': {'mineral_cost': 100, 'gas_cost': 100}, 'BansheeSpeed': {'mineral_cost': 150, 'gas_cost': 150}, 'LiberatorAGRangeUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'SmartServos': {'mineral_cost': 100, 'gas_cost': 100}, 'MedivacIncreaseSpeedBoost': {'mineral_cost': 100, 'gas_cost': 100}, 'HiSecAutoTracking': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranBuildingArmor': {'mineral_cost': 150, 'gas_cost': 150}, 'TerranInfantryWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranInfantryArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranInfantryArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranInfantryArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranVehicleAndShipArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranVehicleAndShipArmorsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranVehicleAndShipArmorsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'TerranShipWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'TerranShipWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'TerranShipWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}}, 'Zerg': {'GlialReconstitution': {'mineral_cost': 100, 'gas_cost': 100}, 'TunnelingClaws': {'mineral_cost': 100, 'gas_cost': 100}, 'ChitinousPlating': {'mineral_cost': 150, 'gas_cost': 150}, 'AnabolicSynthesis': {'mineral_cost': 150, 'gas_cost': 150}, 'DiggingClaws': {'mineral_cost': 150, 'gas_cost': 150}, 'LurkerRange': {'mineral_cost': 150, 'gas_cost': 150}, 'OverlordSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'Burrow': {'mineral_cost': 100, 'gas_cost': 100}, 'ZerglingAttackSpeed': {'mineral_cost': 200, 'gas_cost': 200}, 'ZerglingMovementSpeed': {'mineral_cost': 100, 'gas_cost': 100}, 'CentrificalHooks': {'mineral_cost': 150, 'gas_cost': 150}, 'EvolveGroovedSpines': {'mineral_cost': 100, 'gas_cost': 100}, 'EvolveMuscularAugments': {'mineral_cost': 100, 'gas_cost': 100}, 'NeuralParasite': {'mineral_cost': 150, 'gas_cost': 150}, 'InfestorEnergyUpgrade': {'mineral_cost': 150, 'gas_cost': 150}, 'MicrobialShroud': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMeleeWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMeleeWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergMissileWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergMissileWeaponsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergMissileWeaponsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergGroundArmorsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergGroundArmorsLevel2': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergGroundArmorsLevel3': {'mineral_cost': 200, 'gas_cost': 200}, 'ZergFlyerWeaponsLevel1': {'mineral_cost': 100, 'gas_cost': 100}, 'ZergFlyerWeaponsLevel2': {'mineral_cost': 175, 'gas_cost': 175}, 'ZergFlyerWeaponsLevel3': {'mineral_cost': 250, 'gas_cost': 250}, 'ZergFlyerArmorsLevel1': {'mineral_cost': 150, 'gas_cost': 150}, 'ZergFlyerArmorsLevel2': {'mineral_cost': 225, 'gas_cost': 225}, 'ZergFlyerArmorsLevel3': {'mineral_cost': 300, 'gas_cost': 300}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74741/upgrade_data.py
upgrade_data.py
units = {'Protoss': {'Probe': {'obj_id': 106, 'priority': 33, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Zealot': {'obj_id': 95, 'priority': 39, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2, 'cooldown': 446}, 'Stalker': {'obj_id': 96, 'priority': 60, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 50, 'supply': 2, 'cooldown': 512}, 'Sentry': {'obj_id': 99, 'priority': 87, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 100, 'supply': 2, 'energy': 50, 'cooldown': 512}, 'Adept': {'obj_id': 451, 'priority': 57, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2, 'cooldown': 446}, 'HighTemplar': {'obj_id': 97, 'priority': 93, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 150, 'supply': 2, 'energy': 50, 'cooldown': 714}, 'DarkTemplar': {'obj_id': 98, 'priority': 56, 'type': ['unit'], 'mineral_cost': 125, 'gas_cost': 125, 'supply': 2, 'cooldown': 714}, 'Archon': {'obj_id': 163, 'priority': 45, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 300, 'supply': 4}, 'Observer': {'obj_id': 104, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'ObserverSiegeMode': {'obj_id': 1153, 'priority': 36, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 75, 'supply': 1}, 'WarpPrism': {'obj_id': 103, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'WarpPrismPhasing': {'obj_id': 158, 'priority': 69, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 0, 'supply': 2}, 'Immortal': {'obj_id': 105, 'priority': 44, 'type': ['unit'], 'mineral_cost': 275, 'gas_cost': 100, 'supply': 4}, 'Colossus': {'obj_id': 23, 'priority': 48, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'Disruptor': {'obj_id': 452, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Phoenix': {'obj_id': 100, 'priority': 81, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'VoidRay': {'obj_id': 102, 'priority': 78, 'type': ['unit'], 'mineral_cost': 200, 'gas_cost': 150, 'supply': 4}, 'Oracle': {'obj_id': 184, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3, 'energy': 50}, 'Tempest': {'obj_id': 185, 'priority': 50, 'type': ['unit'], 'mineral_cost': 250, 'gas_cost': 175, 'supply': 5}, 'Carrier': {'obj_id': 101, 'priority': 51, 'type': ['unit'], 'mineral_cost': 350, 'gas_cost': 250, 'supply': 6}, 'Interceptor': {'obj_id': 107, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Mothership': {'obj_id': 30, 'priority': 96, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 400, 'supply': 8, 'energy': 50}}, 'Terran': {'SCV': {'obj_id': 67, 'priority': 58, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'MULE': {'obj_id': 381, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Marine': {'obj_id': 70, 'priority': 78, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Reaper': {'obj_id': 71, 'priority': 70, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 50, 'supply': 1}, 'Marauder': {'obj_id': 73, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 25, 'supply': 2}, 'Ghost': {'obj_id': 72, 'priority': 82, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 2, 'energy': 75}, 'Hellion': {'obj_id': 75, 'priority': 66, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'HellionTank': {'obj_id': 446, 'priority': 6, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 2}, 'WidowMine': {'obj_id': 448, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'WidowMineBurrowed': {'obj_id': 683, 'priority': 54, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Cyclone': {'obj_id': 447, 'priority': 71, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3}, 'SiegeTank': {'obj_id': 55, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'SiegeTankSieged': {'obj_id': 54, 'priority': 74, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 125, 'supply': 3}, 'Thor': {'obj_id': 74, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'ThorAP': {'obj_id': 548, 'priority': 52, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'VikingFighter': {'obj_id': 57, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'VikingAssault': {'obj_id': 56, 'priority': 68, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 75, 'supply': 2}, 'Medivac': {'obj_id': 76, 'priority': 60, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2, 'energy': 50}, 'Liberator': {'obj_id': 449, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LiberatorAG': {'obj_id': 443, 'priority': 72, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Raven': {'obj_id': 78, 'priority': 84, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 2, 'energy': 50}, 'AutoTurret': {'obj_id': 53, 'priority': 2, 'type': ['building'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Banshee': {'obj_id': 77, 'priority': 64, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 3, 'energy': 50}, 'Battlecruiser': {'obj_id': 79, 'priority': 80, 'type': ['unit'], 'mineral_cost': 400, 'gas_cost': 300, 'supply': 6}}, 'Zerg': {'Larva': {'obj_id': 188, 'priority': 58, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Egg': {'obj_id': 125, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Drone': {'obj_id': 126, 'priority': 60, 'type': ['unit', 'worker'], 'mineral_cost': 50, 'gas_cost': 0, 'supply': 1}, 'Overlord': {'obj_id': 128, 'priority': 72, 'type': ['unit', 'supply'], 'mineral_cost': 100, 'gas_cost': 0, 'supply': 0}, 'Queen': {'obj_id': 148, 'priority': 101, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 0, 'supply': 2, 'energy': 25}, 'Zergling': {'obj_id': 127, 'priority': 68, 'type': ['unit'], 'mineral_cost': 25, 'gas_cost': 0, 'supply': 0.5}, 'Baneling': {'obj_id': 29, 'priority': 82, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'Roach': {'obj_id': 132, 'priority': 80, 'type': ['unit'], 'mineral_cost': 75, 'gas_cost': 25, 'supply': 2}, 'Ravager': {'obj_id': 178, 'priority': 92, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'TransportOverlordCocoon': {'obj_id': 181, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'OverlordCocoon': {'obj_id': 150, 'priority': 1, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0}, 'Overseer': {'obj_id': 151, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverseerSiegeMode': {'obj_id': 189, 'priority': 74, 'type': ['unit', 'supply'], 'mineral_cost': 150, 'gas_cost': 50, 'supply': 0, 'energy': 50}, 'OverlordTransport': {'obj_id': 177, 'priority': 73, 'type': ['unit', 'supply'], 'mineral_cost': 125, 'gas_cost': 25, 'supply': 0}, 'Hydralisk': {'obj_id': 129, 'priority': 70, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 50, 'supply': 2}, 'LurkerMP': {'obj_id': 173, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPEgg': {'obj_id': 175, 'priority': 54, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'LurkerMPBurrowed': {'obj_id': 172, 'priority': 90, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 150, 'supply': 3}, 'Mutalisk': {'obj_id': 130, 'priority': 76, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 2}, 'Corruptor': {'obj_id': 134, 'priority': 84, 'type': ['unit'], 'mineral_cost': 150, 'gas_cost': 100, 'supply': 2}, 'SwarmHostMP': {'obj_id': 453, 'priority': 86, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 75, 'supply': 3}, 'LocustMP': {'obj_id': 678, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPFlying': {'obj_id': 907, 'priority': 56, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'LocustMPPrecursor': {'obj_id': 1034, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Infestor': {'obj_id': 133, 'priority': 94, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 150, 'supply': 2, 'energy': 50}, 'InfestedTerransEgg': {'obj_id': 187, 'priority': 54, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'InfestorTerran': {'obj_id': 27, 'priority': 66, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Viper': {'obj_id': 454, 'priority': 96, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 200, 'supply': 3, 'energy': 50}, 'Ultralisk': {'obj_id': 131, 'priority': 88, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 200, 'supply': 6}, 'BroodLord': {'obj_id': 136, 'priority': 78, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 4}, 'BroodlingEscort': {'obj_id': 165, 'priority': None, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'Broodling': {'obj_id': 404, 'priority': 62, 'type': ['unit'], 'mineral_cost': 0, 'gas_cost': 0, 'supply': 0}, 'RavagerCocoon': {'obj_id': 180, 'priority': 54, 'type': ['unit'], 'mineral_cost': 100, 'gas_cost': 100, 'supply': 3}, 'BanelingCocoon': {'obj_id': 28, 'priority': 54, 'type': ['unit'], 'mineral_cost': 50, 'gas_cost': 25, 'supply': 0.5}, 'BroodLordCocoon': {'obj_id': 135, 'priority': 1, 'type': ['unit'], 'mineral_cost': 300, 'gas_cost': 250, 'supply': 3}}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74741/unit_data.py
unit_data.py
abilities = {40: {'ability_name': 'stop'}, 42: {'ability_name': 'move'}, 45: {'ability_name': 'attack'}, 65: {'ability_name': 'GhostHoldFire'}, 66: {'ability_name': 'GhostWeaponsFree'}, 68: {'ability_name': 'Explode'}, 70: {'ability_name': 'FungalGrowth', 'energy_cost': 75}, 71: {'ability_name': 'GuardianShield', 'energy_cost': 75}, 73: {'ability_name': 'ZerglingTrain'}, 75: {'ability_name': 'Feedback', 'energy_cost': 50}, 78: {'ability_name': 'HallucinationArchon', 'energy_cost': 75}, 79: {'ability_name': 'HallucinationColossus', 'energy_cost': 75}, 80: {'ability_name': 'HallucinationHighTemplar', 'energy_cost': 75}, 81: {'ability_name': 'HallucinationImmortal', 'energy_cost': 75}, 82: {'ability_name': 'HallucinationPhoenix', 'energy_cost': 75}, 83: {'ability_name': 'HallucinationProbe', 'energy_cost': 75}, 84: {'ability_name': 'HallucinationStalker', 'energy_cost': 75}, 85: {'ability_name': 'HallucinationVoidRay', 'energy_cost': 75}, 86: {'ability_name': 'HallucinationWarpPrism', 'energy_cost': 75}, 87: {'ability_name': 'HallucinationZealot', 'energy_cost': 75}, 90: {'ability_name': 'CalldownMULE', 'energy_cost': 50}, 91: {'ability_name': 'GravitonBeam', 'energy_cost': 50}, 95: {'ability_name': 'SpawnChangeling', 'energy_cost': 50}, 102: {'ability_name': 'Rally'}, 104: {'ability_name': 'RallyCommand'}, 106: {'ability_name': 'RallyHatchery'}, 107: {'ability_name': 'RoachWarrenResearch'}, 110: {'ability_name': 'NeuralParasite', 'energy_cost': 100}, 111: {'ability_name': 'SpawnLarva', 'energy_cost': 25}, 112: {'ability_name': 'StimpackMarauder'}, 113: {'ability_name': 'SupplyDrop', 'energy_cost': 50}, 117: {'ability_name': 'UltraliskCavernResearch'}, 131: {'ability_name': 'Stimpack'}, 132: {'ability_name': 'GhostCloak', 'energy_cost': 25}, 135: {'ability_name': 'SiegeMode'}, 136: {'ability_name': 'Unsiege'}, 137: {'ability_name': 'BansheeCloak', 'energy_cost': 25}, 138: {'ability_name': 'MedivacTransport'}, 139: {'ability_name': 'ScannerSweep', 'energy_cost': 50}, 140: {'ability_name': 'Yamato'}, 141: {'ability_name': 'AssaultMode'}, 142: {'ability_name': 'FighterMode'}, 144: {'ability_name': 'CommandCenterTransport'}, 145: {'ability_name': 'CommandCenterLiftOff'}, 146: {'ability_name': 'CommandCenterLand'}, 147: {'ability_name': 'BarracksFlyingBuild'}, 148: {'ability_name': 'BarracksLiftOff'}, 149: {'ability_name': 'FactoryFlyingBuild'}, 150: {'ability_name': 'FactoryLiftOff'}, 151: {'ability_name': 'StarportFlyingBuild'}, 152: {'ability_name': 'StarportLiftOff'}, 153: {'ability_name': 'FactoryLand'}, 154: {'ability_name': 'StarportLand'}, 155: {'ability_name': 'CommandCenterTrain'}, 156: {'ability_name': 'BarracksLand'}, 157: {'ability_name': 'SupplyDepotLower'}, 158: {'ability_name': 'SupplyDepotRaise'}, 159: {'ability_name': 'BarracksTrain'}, 160: {'ability_name': 'FactoryTrain'}, 161: {'ability_name': 'StarportTrain'}, 162: {'ability_name': 'EngineeringBayResearch'}, 164: {'ability_name': 'GhostAcademyTrain'}, 165: {'ability_name': 'BarracksTechLabResearch'}, 166: {'ability_name': 'FactoryTechLabResearch'}, 167: {'ability_name': 'StarportTechLabResearch'}, 168: {'ability_name': 'GhostAcademyResearch'}, 169: {'ability_name': 'ArmoryResearch'}, 171: {'ability_name': 'WarpPrismTransport'}, 172: {'ability_name': 'GatewayTrain'}, 173: {'ability_name': 'StargateTrain'}, 174: {'ability_name': 'RoboticsFacilityTrain'}, 175: {'ability_name': 'NexusTrain'}, 176: {'ability_name': 'PsiStorm', 'energy_cost': 75}, 180: {'ability_name': 'ForgeResearch'}, 181: {'ability_name': 'RoboticsBayResearch'}, 182: {'ability_name': 'TemplarArchiveResearch'}, 183: {'ability_name': 'ZergBuild'}, 185: {'ability_name': 'EvolutionChamberResearch'}, 186: {'ability_name': 'UpgradeToLair'}, 187: {'ability_name': 'UpgradeToHive'}, 188: {'ability_name': 'UpgradeToGreaterSpire'}, 189: {'ability_name': 'HiveResearch'}, 190: {'ability_name': 'SpawningPoolResearch'}, 191: {'ability_name': 'HydraliskDenResearch'}, 192: {'ability_name': 'GreaterSpireResearch'}, 193: {'ability_name': 'LarvaTrain'}, 194: {'ability_name': 'MorphToBroodLord'}, 195: {'ability_name': 'BurrowBanelingDown'}, 196: {'ability_name': 'BurrowBanelingUp'}, 197: {'ability_name': 'BurrowDroneDown'}, 198: {'ability_name': 'BurrowDroneUp'}, 199: {'ability_name': 'BurrowHydraliskDown'}, 200: {'ability_name': 'BurrowHydraliskUp'}, 201: {'ability_name': 'BurrowRoachDown'}, 202: {'ability_name': 'BurrowRoachUp'}, 203: {'ability_name': 'BurrowZerglingDown'}, 204: {'ability_name': 'BurrowZerglingUp'}, 211: {'ability_name': 'OverlordTransport'}, 214: {'ability_name': 'WarpGateTrain'}, 215: {'ability_name': 'BurrowQueenDown'}, 216: {'ability_name': 'BurrowQueenUp'}, 217: {'ability_name': 'NydusCanalTransport'}, 218: {'ability_name': 'Blink'}, 219: {'ability_name': 'BurrowInfestorDown'}, 220: {'ability_name': 'BurrowInfestorUp'}, 222: {'ability_name': 'UpgradeToPlanetaryFortress'}, 223: {'ability_name': 'InfestationPitResearch'}, 225: {'ability_name': 'BurrowUltraliskDown'}, 226: {'ability_name': 'BurrowUltraliskUp'}, 227: {'ability_name': 'UpgradeToOrbital'}, 230: {'ability_name': 'OrbitalLiftOff'}, 231: {'ability_name': 'OrbitalCommandLand'}, 232: {'ability_name': 'ForceField', 'energy_cost': 50}, 233: {'ability_name': 'PhasingMode'}, 234: {'ability_name': 'TransportMode'}, 235: {'ability_name': 'FusionCoreResearch'}, 236: {'ability_name': 'CyberneticsCoreResearch'}, 237: {'ability_name': 'TwilightCouncilResearch'}, 238: {'ability_name': 'TacNukeStrike'}, 241: {'ability_name': 'EMP', 'energy_cost': 75}, 243: {'ability_name': 'HiveTrain'}, 245: {'ability_name': 'Transfusion', 'energy_cost': 50}, 254: {'ability_name': 'AttackRedirect'}, 255: {'ability_name': 'StimpackRedirect'}, 256: {'ability_name': 'StimpackMarauderRedirect'}, 258: {'ability_name': 'StopRedirect'}, 259: {'ability_name': 'GenerateCreep', 'energy_cost': 25}, 260: {'ability_name': 'QueenBuild'}, 261: {'ability_name': 'SpineCrawlerUproot'}, 262: {'ability_name': 'SporeCrawlerUproot'}, 263: {'ability_name': 'SpineCrawlerRoot'}, 264: {'ability_name': 'SporeCrawlerRoot'}, 265: {'ability_name': 'CreepTumorBurrowedBuild'}, 266: {'ability_name': 'BuildAutoTurret'}, 268: {'ability_name': 'NydusNetworkBuild'}, 270: {'ability_name': 'Charge'}, 274: {'ability_name': 'Contaminate', 'energy_cost': 125}, 281: {'ability_name': 'RavagerCorrosiveBile'}, 303: {'ability_name': 'BurrowLurkerMPDown'}, 304: {'ability_name': 'BurrowLurkerMPUp'}, 307: {'ability_name': 'BurrowRavagerDown'}, 308: {'ability_name': 'BurrowRavagerUp'}, 309: {'ability_name': 'MorphToRavager'}, 310: {'ability_name': 'MorphToTransportOverlord'}, 312: {'ability_name': 'ThorNormalMode'}, 357: {'ability_name': 'MorphToHellion'}, 367: {'ability_name': 'MorphToHellionTank'}, 381: {'ability_name': 'BlindingCloud', 'energy_cost': 100}, 383: {'ability_name': 'Yoink', 'energy_cost': 75}, 386: {'ability_name': 'ViperConsumeStructure'}, 390: {'ability_name': 'VolatileBurstBuilding'}, 397: {'ability_name': 'WidowMineBurrow'}, 398: {'ability_name': 'WidowMineUnburrow'}, 399: {'ability_name': 'WidowMineAttack'}, 400: {'ability_name': 'TornadoMissile'}, 403: {'ability_name': 'HallucinationOracle', 'energy_cost': 75}, 404: {'ability_name': 'MedivacSpeedBoost'}, 419: {'ability_name': 'OracleRevelation', 'energy_cost': 50}, 468: {'ability_name': 'TemporalField', 'energy_cost': 100}, 522: {'ability_name': 'MorphToLurker'}, 526: {'ability_name': 'PurificationNovaTargeted'}, 528: {'ability_name': 'LockOn'}, 532: {'ability_name': 'Hyperjump'}, 534: {'ability_name': 'ThorAPMode'}, 537: {'ability_name': 'NydusWormTransport'}, 538: {'ability_name': 'OracleWeapon', 'energy_cost': 25}, 545: {'ability_name': 'HallucinationDisruptor', 'energy_cost': 75}, 546: {'ability_name': 'HallucinationAdept', 'energy_cost': 75}, 547: {'ability_name': 'VoidRaySwarmDamageBoost'}, 607: {'ability_name': 'ParasiticBomb', 'energy_cost': 125}, 608: {'ability_name': 'AdeptPhaseShift'}, 611: {'ability_name': 'LurkerHoldFire'}, 612: {'ability_name': 'LurkerRemoveHoldFire'}, 615: {'ability_name': 'LiberatorAGTarget'}, 616: {'ability_name': 'LiberatorAATarget'}, 630: {'ability_name': 'KD8Charge'}, 633: {'ability_name': 'AdeptPhaseShiftCancel'}, 634: {'ability_name': 'AdeptShadePhaseShiftCancel'}, 687: {'ability_name': 'DarkTemplarBlink'}, 690: {'ability_name': 'BattlecruiserAttack'}, 692: {'ability_name': 'BattlecruiserMove'}, 694: {'ability_name': 'BattlecruiserStop'}, 699: {'ability_name': 'VoidRaySwarmDamageBoostCancel'}, 703: {'ability_name': 'ChannelSnipe', 'energy_cost': 50}, 706: {'ability_name': 'DarkShrineResearch'}, 707: {'ability_name': 'LurkerDenMPResearch'}, 708: {'ability_name': 'ObserverSiegeMorphtoObserver'}, 709: {'ability_name': 'ObserverMorphtoObserverSiege'}, 712: {'ability_name': 'RavenScramblerMissile', 'energy_cost': 75}, 715: {'ability_name': 'RavenShredderMissile', 'energy_cost': 75}, 716: {'ability_name': 'ChronoBoostEnergyCost', 'energy_cost': 50}, 717: {'ability_name': 'NexusMassRecall', 'energy_cost': 50}}
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/gamedata/74741/ability_data.py
ability_data.py
import math from dataclasses import dataclass from typing import List, Optional, Dict, Tuple, Union, Literal, Deque from zephyrus_sc2_parser.dataclasses import Gameloop, Ability, Position @dataclass(frozen=True) class UnitName: name: str gameloop: Gameloop class GameObj: """ Contains detailed information about a game object (Unit or building), plus a few related methods """ # obj statuses LIVE = 'LIVE' DIED = 'DIED' IN_PROGRESS = 'IN_PROGRESS' # obj types UNIT = 'UNIT' BUILDING = 'BUILDING' WORKER = 'WORKER' SUPPLY = 'SUPPLY' def __init__( self, name: str, obj_id: int, game_id: int, tag: int, recycle: int, priority: int, mineral_cost: int, gas_cost: int, ): self.name: str = name self._name_history: List[UnitName] = [UnitName(self.name, 0)] GameObjType = Union[ Literal[self.UNIT], Literal[self.BUILDING], Literal[self.WORKER], Literal[self.SUPPLY], ] self.type: List[GameObjType] = [] self.obj_id: int = obj_id self.game_id: int = game_id self.tag: int = tag self.recycle: int = recycle self.priority: int = priority self.mineral_cost: int = mineral_cost self.gas_cost: int = gas_cost self.energy: Optional[float] = None self.supply: int = 0 self.supply_provided: int = 0 self.cooldown: Optional[int] = None # currently unused self.queue: Optional[Deque[GameObj]] = None # for Zerg, _created_units holds Larva for injects self._created_units: Optional[List[GameObj]] = None self.control_groups: Dict[int, int] = {} self.abilities_used: List[Tuple[Ability, GameObj, Gameloop]] = [] self.energy_efficiency: Optional[Tuple[float, float]] = None self.init_time: Optional[Gameloop] = None self.birth_time: Optional[Gameloop] = None self.death_time: Optional[Gameloop] = None self.morph_time: Optional[Gameloop] = None self.position: Optional[Position] = None # currently unused (I think) self.target: None = None GameObjStatus = Union[ Literal[self.LIVE], Literal[self.DIED], Literal[self.IN_PROGRESS], ] self.status: GameObjStatus = None self.killed_by: Optional[GameObj] = None def __eq__(self, other): return self.game_id == other.game_id def __hash__(self): return hash(self.game_id) def __repr__(self): return f'({self.name}, {self.tag})' def update_name(self, new_name: str, gameloop: Gameloop): self.name = new_name self._name_history.append(UnitName(new_name, gameloop)) def name_at_gameloop(self, gameloop: Gameloop) -> str: current_name = None for obj_name in self._name_history: if gameloop >= obj_name.gameloop: current_name = obj_name.name # if current gameloop is less than the obj name gameloop # we haven't reached that gameloop yet, so can exit else: break return current_name def calc_distance(self, other_position: Position) -> Optional[float]: if not self.position: return None # position contains x, y, z in integer form of floats # simple pythagoras theorem calculation x_diff = abs(self.position.x - other_position.x) y_diff = abs(self.position.y - other_position.y) distance = math.sqrt(x_diff ** 2 + y_diff ** 2) return distance def calc_energy(self, gameloop: Gameloop) -> Optional[float]: # need to check for int since 0 is falsy if not self.energy or (not self.morph_time and type(self.birth_time) != int): return None # regen per gameloop energy_regen_rate = 0.03515625 max_energy = 200 def energy_maxout(current_gameloop, current_energy, target_energy): return int(round(current_gameloop + ((target_energy - current_energy) / energy_regen_rate), 0)) # morph time for Orbitals initial_gameloop = self.morph_time or self.birth_time current_gameloop = initial_gameloop current_energy = self.energy time_past_min_energy = 0 for ability, ability_target, ability_gameloop in self.abilities_used: if not ability.energy_cost: continue # only want to measure efficiency of command structures if 'building' in self.type: min_usable_energy_gameloop = energy_maxout(current_gameloop, current_energy, 50) if ability_gameloop >= min_usable_energy_gameloop: if min_usable_energy_gameloop <= current_gameloop: time_past_min_energy += ability_gameloop - current_gameloop else: time_past_min_energy += ability_gameloop - min_usable_energy_gameloop if ability_gameloop >= energy_maxout(current_gameloop, current_energy, max_energy): current_energy = 200 else: current_energy += energy_regen_rate * (ability_gameloop - current_gameloop) current_gameloop = ability_gameloop current_energy -= ability.energy_cost if 'building' in self.type: min_usable_energy_gameloop = energy_maxout(current_gameloop, current_energy, 50) if min_usable_energy_gameloop <= gameloop: if min_usable_energy_gameloop < current_gameloop: time_past_min_energy += gameloop - current_gameloop else: time_past_min_energy += gameloop - min_usable_energy_gameloop try: self.energy_efficiency = (round(1 - (time_past_min_energy / gameloop), 3), round(time_past_min_energy / 22.4, 1)) except ZeroDivisionError: self.energy_efficiency = (1.0, round(time_past_min_energy / 22.4, 1)) if gameloop >= energy_maxout(current_gameloop, current_energy, max_energy): current_energy = max_energy else: current_energy += energy_regen_rate * (gameloop - current_gameloop) return round(current_energy, 1) def calc_inject_efficiency(self, gameloop: Gameloop) -> Optional[Tuple[float, int]]: if not self.abilities_used or self.name not in ['Hatchery', 'Lair', 'Hive']: return None # only 1 inject = 100% efficiency if len(self.abilities_used) == 1: return (1.0, 1) # ~29sec inject_delay = 650 missed_inject_time = 0 current_gameloop = self.abilities_used[0][-1] for i in range(1, len(self.abilities_used)): current_inject = self.abilities_used[i] time_diff = current_inject[-1] - current_gameloop - inject_delay # time diff < 0, inject was queued, 100% efficiency if time_diff > 0: missed_inject_time += time_diff current_gameloop = current_inject[-1] else: current_gameloop = current_inject[-1] + inject_delay inject_efficiency = 1 - (missed_inject_time / (current_gameloop - self.abilities_used[0][-1] + inject_delay)) return (round(inject_efficiency, 3), missed_inject_time)
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/game/game_obj.py
game_obj.py
from typing import Dict, Any from zephyrus_sc2_parser.dataclasses import Gameloop from zephyrus_sc2_parser.game import Game, GameObj, Player class PlayerState: """ Contains a summary of a player's gamestate at a particular gameloop, plus references to the game and player """ def __init__(self, game: Game, player: Player, gameloop: Gameloop): self.game: Game = game self.player: Player = player self.gameloop: Gameloop = gameloop self.summary: Dict[str, Any] = self._create_object_summary() def _create_object_summary(self) -> Dict[str, Any]: if not self.player.collection_rate['minerals']: collection_rate = { 'minerals': 0, 'gas': 0, } total_collection_rate = 0 unspent_resources = { 'minerals': 0, 'gas': 0, } else: collection_rate = { 'minerals': self.player.collection_rate['minerals'][-1], 'gas': self.player.collection_rate['gas'][-1], } total_collection_rate = self.player.collection_rate['minerals'][-1] + self.player.collection_rate['gas'][-1] unspent_resources = { 'minerals': self.player.unspent_resources['minerals'][-1], 'gas': self.player.unspent_resources['gas'][-1], } object_summary = { 'gameloop': self.gameloop, 'resource_collection_rate': collection_rate, 'unspent_resources': unspent_resources, 'resource_collection_rate_all': total_collection_rate, 'unit': {}, 'building': {}, 'upgrade': [], 'current_selection': {}, 'workers_active': 0, 'workers_produced': 0, 'workers_lost': 0, 'supply': self.player.supply, 'supply_cap': self.player.supply_cap, 'supply_block': round(self.player.supply_block / 22.4, 1), 'spm': 0, 'army_value': { 'minerals': 0, 'gas': 0, }, 'resources_lost': { 'minerals': 0, 'gas': 0, }, 'resources_collected': { 'minerals': self.player.resources_collected['minerals'], 'gas': self.player.resources_collected['gas'], }, 'total_army_value': 0, 'total_resources_lost': 0, 'total_resources_collected': self.player.resources_collected['minerals'] + self.player.resources_collected['gas'], 'race': {}, } object_summary['spm'] = self.player.calc_spm(self.gameloop, recent=True) # if warpgate_efficiency isn't default if self.player.warpgate_efficiency[0] > 0: object_summary['race']['warpgate_efficiency'] = ( round(1 - self.player.warpgate_efficiency[1] / self.player.warpgate_efficiency[0], 3), round(self.player.warpgate_efficiency[1] / 22.4, 1), ) for upg in self.player.upgrades: object_summary['upgrade'].append(upg.name) if self.player.race == 'Zerg': map_creep_coverage, tumors_active, tumors_died = self.player.calc_creep(self.game.map) # if the creep flag is disabled calc_creep will return None, None # need to check for int as 0 is falsy if map_creep_coverage and type(tumors_active) == int and type(tumors_died) == int: object_summary['race']['creep'] = { 'coverage': map_creep_coverage, 'tumors_active': tumors_active, 'tumors_died': tumors_active, } current_idle_larva = 0 for obj in self.player.objects.values(): # High Templars and Drones die when they morph, should not be counted if (obj.name == 'HighTemplar' or obj.name == 'Drone') and obj.morph_time: continue if obj.name == 'Larva' and obj.status == GameObj.LIVE: current_idle_larva += 1 worker = False for current_type in obj.type: if current_type == GameObj.WORKER: worker = True elif current_type != GameObj.SUPPLY: if obj.name not in object_summary[current_type.lower()]: object_summary[current_type.lower()][obj.name] = { 'type': [current_type], 'live': 0, 'died': 0, 'in_progress': 0, 'supply': obj.supply, 'supply_provided': obj.supply_provided, 'mineral_cost': obj.mineral_cost, 'gas_cost': obj.gas_cost, } # convert to lowercase for serialization object_summary[current_type.lower()][obj.name][obj.status.lower()] += 1 command_structures = ['Hatchery', 'Lair', 'Hive', 'Nexus', 'OrbitalCommand'] # Nexus, Orbital and Hatchery calculations if current_type == GameObj.BUILDING and (obj.name in command_structures): obj_energy = obj.calc_energy(self.gameloop) if obj_energy and obj.status == 'live': if 'energy' not in object_summary['race']: object_summary['race']['energy'] = {} if 'abilities_used' not in object_summary['race']: object_summary['race']['abilities_used'] = {} if self.player.race == 'Protoss' and 'ability_targets' not in object_summary['race']: object_summary['race']['ability_targets'] = {} if obj.name not in object_summary['race']['energy']: object_summary['race']['energy'][obj.name] = [] object_summary['race']['energy'][obj.name].append((obj_energy, *obj.energy_efficiency)) for ability, ability_target, ability_gameloop in obj.abilities_used: if ability.name not in object_summary['race']['abilities_used']: object_summary['race']['abilities_used'][ability.name] = 0 object_summary['race']['abilities_used'][ability.name] += 1 if 'ability_targets' in object_summary['race'] and ability_target: if ability_target.name not in object_summary['race']['ability_targets']: object_summary['race']['ability_targets'][ability_target.name] = 0 object_summary['race']['ability_targets'][ability_target.name] += 1 obj_inject_efficiency = obj.calc_inject_efficiency(self.gameloop) if obj_inject_efficiency: if 'inject_efficiency' not in object_summary['race']: object_summary['race']['inject_efficiency'] = [] object_summary['race']['inject_efficiency'].append(obj_inject_efficiency) if current_idle_larva: self.player.idle_larva.append(current_idle_larva) if worker: if obj.status == GameObj.LIVE: object_summary['workers_active'] += 1 elif obj.status == GameObj.DIED: object_summary['workers_lost'] += 1 object_summary['workers_produced'] += 1 if GameObj.WORKER not in object_summary['unit'][obj.name]['type']: object_summary['unit'][obj.name]['type'].append(GameObj.WORKER) elif GameObj.UNIT in obj.type: if obj.status == GameObj.LIVE: object_summary['army_value']['minerals'] += obj.mineral_cost object_summary['army_value']['gas'] += obj.gas_cost object_summary['total_army_value'] += obj.mineral_cost + obj.gas_cost elif obj.status == GameObj.DIED: object_summary['resources_lost']['minerals'] += obj.mineral_cost object_summary['resources_lost']['gas'] += obj.gas_cost object_summary['total_resources_lost'] += obj.mineral_cost + obj.gas_cost for obj in self.player.current_selection: if obj.name not in object_summary['current_selection']: object_summary['current_selection'][obj.name] = 0 object_summary['current_selection'][obj.name] += 1 return object_summary
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/game/player_state.py
player_state.py
import math from dataclasses import dataclass from typing import Union, Literal, Optional, Dict, List, Set, Tuple, AnyStr from zephyrus_sc2_parser.dataclasses import ( Gameloop, Resource, Ability, Upgrade, Position, Map, ) from zephyrus_sc2_parser.game.game_obj import GameObj # these are here instead of in dataclasses.py # to prevent circular imports @dataclass class Selection: """Contains the objects in, and the start/end time of, a selection""" objects: List[GameObj] start: Gameloop end: Optional[Gameloop] @dataclass(frozen=True) class ActiveAbility: """ Contains the ability, target object and target position of a player's currently active ability """ ability: Ability obj: Optional[GameObj] target_position: Optional[Position] queued: bool Race = Union[ Literal['Protoss'], Literal['Terran'], Literal['Zerg'], ] class Player: """Contains detailed information about a player, plus a few related methods""" def __init__( self, player_id: int, profile_id: int, region_id: int, realm_id: int, name: AnyStr, race: AnyStr, ): self.player_id: int = player_id if type(name) is bytes: formatted_name = name.decode('utf-8').split('>')[-1] else: formatted_name = name.split('>')[-1] self.name: str = formatted_name if type(race) is bytes: formatted_race = race.decode('utf-8') else: formatted_race = race self.race: Race = formatted_race self.user_id: Optional[int] = None self.profile_id: int = profile_id self.region_id: int = region_id self.realm_id: int = realm_id self.objects: Dict[int, GameObj] = {} self.upgrades: List[Upgrade] = [] self.current_selection: List[GameObj] = [] self.control_groups: Dict[int, List[GameObj]] = {} self.selections: List[Selection] = [] # currently unused (I think) self.warpgate_cooldowns = [] self.warpgate_efficiency = (0, 0) self.active_ability: Optional[ActiveAbility] = None # PAC related. Unsure of types right now self.pac_list = [] self.current_pac = None self.prev_screen_position = None self.screens = [] self.supply: int = 0 self.supply_cap: int = 0 self.supply_block: int = 0 self._supply_blocks: List = [] self.queues: List = [] self.idle_larva: List[int] = [] self._creep_tiles: Optional[Set[Position]] = None self.army_value: Dict[Resource, List[int]] = { 'minerals': [], 'gas': [], } self.unspent_resources: Dict[Resource, List[int]] = { 'minerals': [], 'gas': [], } self.collection_rate: Dict[Resource, List[int]] = { 'minerals': [], 'gas': [], } self.resources_collected: Dict[Resource, int] = { 'minerals': 0, 'gas': 0, } def __lt__(self, other): return self.player_id < other def __le__(self, other): return self.player_id <= other def __eq__(self, other): return self.player_id == other def __ge__(self, other): return self.player_id >= other def __gt__(self, other): return self.player_id > other def __ne__(self, other): return not self.player_id == other # def calc_supply(self): # total_supply = 0 # total_supply_provided = 0 # for obj_id, obj in self.objects.items(): # if obj.status == 'live' or ('Overlord' not in obj.name and obj.status == 'in_progress' and 'unit' in obj.type): # total_supply += obj.supply # total_supply_provided += obj.supply_provided # self.supply = total_supply # self.supply_cap = total_supply_provided def to_json(self) -> Dict[str, Union[str, int]]: return { 'name': self.name, 'race': self.race, 'player_id': self.player_id, 'realm_id': self.realm_id, 'region_id': self.region_id, 'profile_id': self.profile_id, } def calc_spm(self, gameloop: Gameloop, *, recent=False) -> Union[float, int]: if not recent: try: return round(len(self.screens) / (gameloop / 22.4 / 60), 1) except ZeroDivisionError: return 0 # 1 minute in gameloops gameloop_minute = 1344 prev_minute_screens = 0 for screen_gameloop in self.screens: if screen_gameloop >= gameloop - gameloop_minute: prev_minute_screens += 1 return prev_minute_screens def calc_creep(self, game_map: Map) -> Tuple[Tuple[float, int], int, int]: if self.race != 'Zerg' or not (game_map.width and game_map.height): return None, None, None if not self._creep_tiles: self._creep_tiles = set() creep_tumor_count = 0 creep_tumors_died = 0 for obj in self.objects.values(): # odd tile objects position += 0.5. Rounded off in events if obj.name == 'Hatchery' or obj.name == 'Lair' or obj.name == 'Hive': creep_radius = 12 elif obj.name == 'CreepTumorBurrowed': creep_radius = 10 if obj.status == GameObj.LIVE: creep_tumor_count += 1 elif obj.status == GameObj.DIED: creep_tumors_died += 1 else: continue # add 0.5 to get center of central tile building_position = (obj.position.x + 0.5, obj.position.y + 0.5) if obj.status == GameObj.DIED: def remove_tiles(tile_range, current_position): # always add midpoint in row try: self._creep_tiles.remove(current_position) except KeyError: pass # if only 1 tile in row, we're done # else expand horizontally, count new tiles until max radius # this should never happen with the improved approximation if tile_range != 0: for j in range(0, tile_range + 1): try: self._creep_tiles.remove((current_position[0] + j, current_position[1])) self._creep_tiles.remove((current_position[0] - j, current_position[1])) except KeyError: continue # removing middle row tiles remove_tiles(creep_radius, building_position) for i in range(0, creep_radius // 2): row_increment = i + 1 # ----- full-size rows ----- # add radius/2 full-size rows to improve area approximation remove_tiles( creep_radius, ( building_position[0], building_position[1] + row_increment, ), ) # tile actions are mirrored in y-axis remove_tiles( creep_radius, ( building_position[0], building_position[1] - row_increment, ), ) # ----- decreasing size rows ----- remove_tiles( creep_radius - row_increment, ( building_position[0], building_position[1] + row_increment + creep_radius / 2, ), ) # tile actions are mirrored in y-axis remove_tiles( creep_radius - row_increment, ( building_position[0], building_position[1] - row_increment - creep_radius / 2, ), ) continue elif obj.status != GameObj.LIVE: continue def add_tiles(tile_range, current_position): # always add midpoint in row self._creep_tiles.add(current_position) # if only 1 tile in row, we're done # else expand horizontally, count new tiles until max radius # this should never happen with the improved approximation if tile_range != 0: for j in range(0, tile_range + 1): self._creep_tiles.add((current_position[0] + j, current_position[1])) self._creep_tiles.add((current_position[0] - j, current_position[1])) # adding middle row tiles add_tiles(creep_radius, building_position) for i in range(0, creep_radius // 2): row_increment = i + 1 # ----- full-size rows ----- # add radius/2 full-size rows to improve area approximation add_tiles( creep_radius, ( building_position[0], building_position[1] + row_increment, ), ) # tile actions are mirrored in y-axis add_tiles( creep_radius, ( building_position[0], building_position[1] - row_increment, ), ) # ----- decreasing size rows ----- add_tiles( creep_radius - row_increment, ( building_position[0], building_position[1] + row_increment + creep_radius / 2, ), ) # tile actions are mirrored in y-axis add_tiles( creep_radius - row_increment, ( building_position[0], building_position[1] - row_increment - creep_radius / 2, ), ) map_tiles = game_map.width * game_map.height creep_coverage = round(len(self._creep_tiles) / map_tiles, 3) return (creep_coverage, len(self._creep_tiles)), creep_tumor_count, creep_tumors_died def calc_pac(self, summary_stats: Dict, game_length: int) -> Dict: game_length_minutes = game_length / 22.4 / 60 if game_length_minutes > 0: pac_per_min = len(self.pac_list) / game_length_minutes else: pac_per_min = 0 if self.pac_list: avg_pac_action_latency = sum(pac.actions[0] - pac.camera_moves[0][0] for pac in self.pac_list) / len(self.pac_list) / 22.4 avg_actions_per_pac = sum(len(pac.actions) for pac in self.pac_list) / len(self.pac_list) else: avg_pac_action_latency = 0 avg_actions_per_pac = 0 pac_gaps = [] for i in range(0, len(self.pac_list) - 1): pac_diff = self.pac_list[i + 1].initial_gameloop - self.pac_list[i].final_gameloop pac_gaps.append(pac_diff) if pac_gaps: avg_pac_gap = sum(pac_gaps) / len(pac_gaps) / 22.4 else: avg_pac_gap = 0 summary_stats['avg_pac_per_min'][self.player_id] = round(pac_per_min, 2) summary_stats['avg_pac_action_latency'][self.player_id] = round(avg_pac_action_latency, 2) summary_stats['avg_pac_actions'][self.player_id] = round(avg_actions_per_pac, 2) summary_stats['avg_pac_gap'][self.player_id] = round(avg_pac_gap, 2) return summary_stats def calc_sq(self, *, unspent_resources: int, collection_rate: int) -> float: sq = math.ceil(35 * (0.00137 * collection_rate - math.log(unspent_resources if unspent_resources > 0 else 1)) + 240) return sq
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/game/player.py
player.py
import struct from zephyrus_sc2_parser.s2protocol_fixed.compat import byte_to_int class IncompleteError(Exception): pass class BitPackedBuffer: def __init__(self, output, endian = 'big'): self._output = output self._next = 0 self._used_bits = 0 self._bigendian = (endian == 'big') def __str__(self): return 'buffer(%d)' % (self._used_bits,) def used_bits(self): return self._used_bits def byte_align(self): if (self._used_bits & 7) != 0: self._output.write(chr(self._next)) self._next = 0 self._used_bits = (self._used_bits + 7) & ~7 def write_aligned_bytes(self, data): assert isinstance(data, str) self.byte_align() self._used_bits += len(data) * 8 self._output.write(data) def write_bits(self, value, bits): writtenbits = 0 while writtenbits != bits: copybits = min(bits - writtenbits, 8 - ((self._used_bits) & 7)) if self._bigendian: copy = value >> (bits - writtenbits - copybits) else: copy = value >> writtenbits self._next |= (copy & ((1 << copybits) - 1)) << (self._used_bits & 7) writtenbits += copybits self._used_bits += copybits if (self._used_bits & 7) == 0: self._output.write(chr(self._next)) self._next = 0 assert self._output.tell() == self._used_bits / 8 def write_unaligned_bytes(self, data): assert isinstance(data, str) for c in data: self.write_bits(byte_to_int(c), 8) class BitPackedEncoder: def __init__(self, output, typeinfos): self._buffer = BitPackedBuffer(output) self._typeinfos = typeinfos def __str__(self): return self._buffer.__str__() def instance(self, value, typeid): if typeid >= len(self._typeinfos): raise CorruptedError(self) typeinfo = self._typeinfos[typeid] return getattr(self, typeinfo[0])(value, *typeinfo[1]) def byte_align(self): self._buffer.byte_align() def used_bits(self): return self._buffer.used_bits() def _array(self, value, bounds, typeid): assert isinstance(value, list) self._int(len(value), bounds) for element in value: self.instance(element, typeid) def _bitarray(self, value, bounds): assert isinstance(value, tuple) self._int(value[0], bounds) self._buffer.write_bits(value[1], value[0]) def _blob(self, value, bounds): assert isinstance(value, str) self._int(value, bounds) self._buffer.write_aligned_bytes(value) def _bool(self, value): self._buffer.write_bits(1 if (value != False) else 0, 1) def _choice(self, value, bounds, fields): #assert isinstance(value, dict) assert len(value) == 1 for tag, field in fields.items(): if field[0] in value: self._int(tag, bounds) self.instance(value[field[0]], field[1]) break else: raise IncompleteError(self) # unknown choice field name def _fourcc(self, value): assert isinstance(value, str) assert len(value) == 4 self._buffer.write_aligned_bytes(value) def _int(self, value, bounds): assert value >= bounds[0] assert value < bounds[0] + (1 << bounds[1]) self._buffer.write_bits(value - bounds[0], bounds[1]) def _null(self, value): pass def _optional(self, value, typeid): self._buffer.write_bits(1 if (value is not None) else 0, 1) if value is not None: self.instance(value, typeid) def _real32(self): assert isinstance(value, float) self._buffer.write_unaligned_bytes(struct.pack('>f', value)) def _real64(self, value): assert isinstance(value, float) self._buffer.write_unaligned_bytes(struct.pack('>d', value)) def _struct(self, value, fields): #assert isinstance(value, dict) # encode each field for field_name, field_type, _ in fields: if field_name == '__parent': # if there is a parent its fields are in the same value dict self.instance(value, field_type) elif field_name in value: self.instance(value[field_name], field_type) else: raise IncompleteError(self) # missing field_name class VersionedEncoder: def __init__(self, output, typeinfos): self._buffer = BitPackedBuffer(output) self._typeinfos = typeinfos def __str__(self): return self._buffer.__str__() def instance(self, value, typeid): if typeid >= len(self._typeinfos): raise CorruptedError(self) typeinfo = self._typeinfos[typeid] return getattr(self, typeinfo[0])(value, *typeinfo[1]) def byte_align(self): self._buffer.byte_align() def used_bits(self): return self._buffer.used_bits() def _write_skip(self, skip): self._buffer.write_bits(skip, 8) def _vint(self, value, bounds=None): assert bounds is None or value >= bounds[0] assert bounds is None or value < bounds[0] + (1 << bounds[1]) negative = (value < 0) if negative: value = -value b = ((value & 0x3f) << 1) | (1 if negative else 0) value >>= 6 self._buffer.write_bits(b | (0x80 if (value != 0) else 0x00), 8) while value != 0: b = value & 0x7f value >>= 7 self._buffer.write_bits(b | (0x80 if (value != 0) else 0x00), 8) def _array(self, value, bounds, typeid): assert isinstance(value, list) self._write_skip(0) self._vint(len(value), bounds) for element in value: self.instance(element, typeid) def _bitarray(self, value, bounds): assert isinstance(value, tuple) self._write_skip(1) self._vint(value[0], bounds) self._buffer.write_aligned_bytes(value[1]) def _blob(self, value, bounds): assert isinstance(value, str) self._write_skip(2) self._vint(len(value), bounds) self._buffer.write_aligned_bytes(value) def _bool(self, value): self._write_skip(6) self._buffer.write_bits(1 if (value != False) else 0, 8) def _choice(self, value, bounds, fields): #assert isinstance(value, dict) assert len(value) == 1 self._write_skip(3) for tag, field in fields.items(): if field[0] in value: self._vint(tag) self.instance(value[field[0]], field[1]) break else: raise IncompleteError(self) # unknown choice field name def _fourcc(self, value): assert isinstance(value, str) assert len(value) == 4 self._write_skip(7) self._buffer.write_aligned_bytes(value) def _int(self, value, bounds): self._write_skip(9) self._vint(value, bounds) def _null(self): pass def _optional(self, value, typeid): self._write_skip(4) self._buffer.write_bits(1 if (value is not None) else 0, 8) if value is not None: self.instance(value, typeid) def _real32(self, value): assert isinstance(value, float) self._write_skip(7) self._buffer.write_aligned_bytes(struct.pack('>f', value)) def _real64(self, value): assert isinstance(value, float) self._write_skip(8) self._buffer.write_aligned_bytes(struct.pack('>d', value)) def _struct(self, value, fields): #assert isinstance(value, dict) self._write_skip(5) # encode number of fields field_count = 0 for field_name, _, _ in fields: if field_name == '__parent' or field_name in value: field_count += 1 self._vint(field_count) # encode each field for field_name, field_type, field_tag in fields: if field_name == '__parent': # if there is a parent its fields are in the same value dict self._vint(field_tag) self.instance(value, field_type) elif field_name in value: self._vint(field_tag) self.instance(value[field_name], field_type)
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/encoders.py
encoders.py
import struct from zephyrus_sc2_parser.s2protocol_fixed.compat import byte_to_int class TruncatedError(Exception): pass class CorruptedError(Exception): pass class BitPackedBuffer: def __init__(self, contents, endian='big'): self._data = contents or [] self._used = 0 self._next = None self._nextbits = 0 self._bigendian = (endian == 'big') def __str__(self): s = '{:02x}'.format(byte_to_int(self._data[self._used])) \ if self._used < len(self._data) else '--' return 'buffer({0:02x}/{1:d},[{2:d}]={3:s})'.format( self._nextbits and self._next or 0, self._nextbits, self._used, s ) def done(self): return self._nextbits == 0 and self._used >= len(self._data) def used_bits(self): return self._used * 8 - self._nextbits def byte_align(self): self._nextbits = 0 def read_aligned_bytes(self, bytes): self.byte_align() data = self._data[self._used:self._used + bytes] self._used += bytes if len(data) != bytes: raise TruncatedError(self) return data def read_bits(self, bits): result = 0 resultbits = 0 while resultbits != bits: if self._nextbits == 0: if self.done(): raise TruncatedError(self) self._next = byte_to_int(self._data[self._used]) self._used += 1 self._nextbits = 8 copybits = min(bits - resultbits, self._nextbits) copy = (self._next & ((1 << copybits) - 1)) if self._bigendian: result |= copy << (bits - resultbits - copybits) else: result |= copy << resultbits self._next >>= copybits self._nextbits -= copybits resultbits += copybits return result def read_unaligned_bytes(self, bytes): return ''.join([chr(self.read_bits(8)) for i in range(bytes)]) class BitPackedDecoder: def __init__(self, contents, typeinfos): self._buffer = BitPackedBuffer(contents) self._typeinfos = typeinfos def __str__(self): return self._buffer.__str__() def instance(self, typeid): if typeid >= len(self._typeinfos): raise CorruptedError(self) typeinfo = self._typeinfos[typeid] #print ' -- instance ', typeid, typeinfo return getattr(self, typeinfo[0])(*typeinfo[1]) def byte_align(self): self._buffer.byte_align() def done(self): return self._buffer.done() def used_bits(self): return self._buffer.used_bits() def _array(self, bounds, typeid): length = self._int(bounds) return [self.instance(typeid) for i in range(length)] def _bitarray(self, bounds): length = self._int(bounds) return (length, self._buffer.read_bits(length)) def _blob(self, bounds): length = self._int(bounds) result = self._buffer.read_aligned_bytes(length) return result def _bool(self): return self._int((0, 1)) != 0 def _choice(self, bounds, fields): tag = self._int(bounds) if tag not in fields: raise CorruptedError(self) field = fields[tag] return {field[0]: self.instance(field[1])} def _fourcc(self): return self._buffer.read_unaligned_bytes(4) def _int(self, bounds): return bounds[0] + self._buffer.read_bits(bounds[1]) def _null(self): return None def _optional(self, typeid): exists = self._bool() return self.instance(typeid) if exists else None def _real32(self): return struct.unpack('>f', self._buffer.read_unaligned_bytes(4)) def _real64(self): return struct.unpack('>d', self._buffer.read_unaligned_bytes(8)) def _struct(self, fields): result = {} for field in fields: if field[0] == '__parent': parent = self.instance(field[1]) if isinstance(parent, dict): result.update(parent) elif len(fields) == 1: result = parent else: result[field[0]] = parent else: result[field[0]] = self.instance(field[1]) return result class VersionedDecoder: def __init__(self, contents, typeinfos): self._buffer = BitPackedBuffer(contents) self._typeinfos = typeinfos def __str__(self): return self._buffer.__str__() def instance(self, typeid): if typeid >= len(self._typeinfos): raise CorruptedError(self) typeinfo = self._typeinfos[typeid] return getattr(self, typeinfo[0])(*typeinfo[1]) def byte_align(self): self._buffer.byte_align() def done(self): return self._buffer.done() def used_bits(self): return self._buffer.used_bits() def _expect_skip(self, expected): if self._buffer.read_bits(8) != expected: raise CorruptedError(self) def _vint(self): b = self._buffer.read_bits(8) negative = b & 1 result = (b >> 1) & 0x3f bits = 6 while (b & 0x80) != 0: b = self._buffer.read_bits(8) result |= (b & 0x7f) << bits bits += 7 return -result if negative else result def _array(self, bounds, typeid): self._expect_skip(0) length = self._vint() return [self.instance(typeid) for i in range(length)] def _bitarray(self, bounds): self._expect_skip(1) length = self._vint() return (length, self._buffer.read_aligned_bytes((length + 7) / 8)) def _blob(self, bounds): self._expect_skip(2) length = self._vint() return self._buffer.read_aligned_bytes(length) def _bool(self): self._expect_skip(6) return self._buffer.read_bits(8) != 0 def _choice(self, bounds, fields): self._expect_skip(3) tag = self._vint() if tag not in fields: self._skip_instance() return {} field = fields[tag] return {field[0]: self.instance(field[1])} def _fourcc(self): self._expect_skip(7) return self._buffer.read_aligned_bytes(4) def _int(self, bounds): self._expect_skip(9) return self._vint() def _null(self): return None def _optional(self, typeid): self._expect_skip(4) exists = self._buffer.read_bits(8) != 0 return self.instance(typeid) if exists else None def _real32(self): self._expect_skip(7) return struct.unpack('>f', self._buffer.read_aligned_bytes(4)) def _real64(self): self._expect_skip(8) return struct.unpack('>d', self._buffer.read_aligned_bytes(8)) def _struct(self, fields): self._expect_skip(5) result = {} length = self._vint() for i in range(length): tag = self._vint() field = next((f for f in fields if f[2] == tag), None) if field: if field[0] == '__parent': parent = self.instance(field[1]) if isinstance(parent, dict): result.update(parent) elif len(fields) == 1: result = parent else: result[field[0]] = parent else: result[field[0]] = self.instance(field[1]) else: self._skip_instance() return result def _skip_instance(self): skip = self._buffer.read_bits(8) if skip == 0: # array length = self._vint() for i in range(length): self._skip_instance() elif skip == 1: # bitblob length = self._vint() self._buffer.read_aligned_bytes((length + 7) / 8) elif skip == 2: # blob length = self._vint() self._buffer.read_aligned_bytes(length) elif skip == 3: # choice tag = self._vint() self._skip_instance() elif skip == 4: # optional exists = self._buffer.read_bits(8) != 0 if exists: self._skip_instance() elif skip == 5: # struct length = self._vint() for i in range(length): tag = self._vint() self._skip_instance() elif skip == 6: # u8 self._buffer.read_aligned_bytes(1) elif skip == 7: # u32 self._buffer.read_aligned_bytes(4) elif skip == 8: # u64 self._buffer.read_aligned_bytes(8) elif skip == 9: # vint self._vint()
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/decoders.py
decoders.py
from __future__ import print_function import argparse import binascii import cProfile import json import pprint import pstats import re import sys from mpyq import MPQArchive from zephyrus_sc2_parser.s2protocol_fixed.versions import build, list_all, latest from zephyrus_sc2_parser.s2protocol_fixed.diff import diff from zephyrus_sc2_parser.s2protocol_fixed.compat import get_stream from zephyrus_sc2_parser.s2protocol_fixed import attributes as _attr __all__ = ( 'EventFilter', 'JSONOutputFilter', 'NDJSONOutputFilter', 'PrettyPrintFilter', 'StatCollectionFilter', 'TypeDumpFilter', 'cache_handle_uri', 'convert_fourcc', 'json_dump', 'main', 'process_details_data', 'process_init_data', 'process_scope_attributes', 'read_contents', ) def json_dump(obj, indent=None): def dispatch(o): # Find all bytes(str in Python2) to decode with ISO-8850-1 if isinstance(o, dict): return {k: dispatch(v) for k, v in o.items()} elif isinstance(o, list): return [dispatch(v) for v in o] elif isinstance(o, bytes): return o.decode('ISO-8859-1') else: return o return json.dumps(dispatch(obj), indent=indent) class EventFilter(object): def process(self, event): """ Called for each event in the replay stream """ return event def finish(self): """ Called when the stream has finished """ pass class JSONOutputFilter(EventFilter): """ Added as a filter will format the event into JSON """ def __init__(self, output): self._output = output def process(self, event): print(json_dump(event, indent=4), file=self._output) return event class NDJSONOutputFilter(EventFilter): """ Added as a filter will format the event into NDJSON """ def __init__(self, output): self._output = output def process(self, event): print(json_dump(event), file=self._output) return event class PrettyPrintFilter(EventFilter): """ Add as a filter will send objects to stdout """ def __init__(self, output): self._output = output def process(self, event): pprint.pprint(event, stream=self._output) return event class TypeDumpFilter(EventFilter): """ Add as a filter to convert events into type information """ def process(self, event): def recurse_into(value): if type(value) is list: decoded = [] for item in value: decoded.append(recurse_into(item)) return decoded elif type(value) is dict: decoded = {} for key, inner_value in value.items(): decoded[key] = recurse_into(inner_value) return decoded return (type(value).__name__, value) return recurse_into(event) class StatCollectionFilter(EventFilter): """ Add as a filter to collect stats on events """ def __init__(self): self._event_stats = {} def process(self, event): # update stats if '_event' in event and '_bits' in event: stat = self._event_stats.get(event['_event'], [0, 0]) stat[0] += 1 # count of events stat[1] += event['_bits'] # count of bits self._event_stats[event['_event']] = stat return event def finish(self): print('Name, Count, Bits') for name, stat in sorted(self._event_stats.items(), key=lambda x: x[1][1]): print('"{:s}", {:d}, {:d}'.format(name, stat[0], stat[1] / 8)) def convert_fourcc(fourcc_hex): """ Convert a hexidecimal [fourcc](https://en.wikipedia.org/wiki/FourCC) represpentation to a string. """ s = [] for i in range(0, 7, 2): n = int(fourcc_hex[i:i+2], 16) if n is not 0: s.append(chr(n)) return ''.join(s) def cache_handle_uri(handle): """ Convert a 'cache handle' from a binary string to a string URI """ handle_hex = binascii.b2a_hex(handle).decode() purpose = convert_fourcc(handle_hex[0:8]) # first 4 bytes region = convert_fourcc(handle_hex[8:16]) # next 4 bytes content_hash = handle_hex[16:] uri = ''.join([ 'http://', region.lower(), '.depot.battle.net:1119/', content_hash.lower(), '.', purpose.lower() ]) return uri def process_details_data(details): """ Take details and convert cache handles to HTTP references. """ translated_handles = [] for handle in details['m_cacheHandles']: translated_handles.append(cache_handle_uri(handle)) details['m_cacheHandles'] = translated_handles return details def process_init_data(initdata): """ Take replay init data and convert cache handles to HTTP references. """ translated_handles = [] for handle in initdata['m_syncLobbyState']['m_gameDescription']['m_cacheHandles']: translated_handles.append(cache_handle_uri(handle)) initdata['m_syncLobbyState']['m_gameDescription']['m_cacheHandles'] = translated_handles return initdata def process_scope_attributes(all_scopes, event_fn): # Build up the reverse attribute mapping attr_id_to_name = {} for sym in _attr.__dict__: if sym.startswith('_'): continue attr_id_to_name[_attr.__dict__.get(sym)] = sym.lower() # Each scope represents a slot in the lobby for scope, scope_dict in all_scopes.items(): scope_doc = { 'scope': scope } # Convert all other attributes to symbolic representation for attr_id, val_dict in scope_dict.items(): val = val_dict[0]['value'] attr_name = attr_id_to_name.get(attr_id, None) if attr_name is not None: scope_doc[attr_name] = val else: scope_doc['unknown_{}'.format(attr_id)] = val # Pass the scope doc as a new event event_fn(scope_doc) def read_contents(archive, content): contents = archive.read_file(content) if not contents: print('Error: Archive missing {}'.format(content)) sys.exit(1) return contents def main(): """ Get command line arguments and invoke the command line functionality. """ filters = [] parser = argparse.ArgumentParser() parser.add_argument('replay_file', help='.SC2Replay file to load', nargs='?') parser.add_argument("--gameevents", help="print game events", action="store_true") parser.add_argument("--messageevents", help="print message events", action="store_true") parser.add_argument("--trackerevents", help="print tracker events", action="store_true") parser.add_argument("--attributeevents", help="print attributes events", action="store_true") parser.add_argument("--attributeparse", help="parse attributes events", action="store_true") parser.add_argument("--header", help="print protocol header", action="store_true") parser.add_argument("--metadata", help="print game metadata", action="store_true") parser.add_argument("--details", help="print protocol details", action="store_true") parser.add_argument("--details_backup", help="print protocol anoynmized details", action="store_true") parser.add_argument("--initdata", help="print protocol initdata", action="store_true") parser.add_argument("--all", help="print all data", action="store_true") parser.add_argument("--quiet", help="disable printing", action="store_true") parser.add_argument("--stats", help="print stats", action="store_true") parser.add_argument("--diff", help="diff two protocols", default=None, action="store") parser.add_argument("--versions", help="show all protocol versions", action="store_true") parser.add_argument("--types", help="show type information in event output", action="store_true") parser.add_argument("--json", help="print output as json", action="store_true") parser.add_argument("--ndjson", help="print output as ndjson (newline delimited)", action="store_true") parser.add_argument("--profile", help="Whether to profile or not", action="store_true") args = parser.parse_args() if args.profile: pr = cProfile.Profile() pr.enable() # TODO: clean up the command line arguments to allow cleaner sub-command # style commands # List all protocol versions if args.versions: files = list_all() pattern = re.compile('^protocol([0-9]+).py$') captured = [] for f in files: captured.append(pattern.match(f).group(1)) if len(captured) == 8: print(captured[0:8]) captured = [] print(captured) return # Diff two protocols if args.diff and args.diff is not None: version_list = args.diff.split(',') if len(version_list) < 2: print("--diff requires two versions separated by comma e.g. --diff=1,2", file=sys.stderr) sys.exit(1) diff(version_list[0], version_list[1]) return # Check/test the replay file if args.replay_file is None: print(".S2Replay file not specified", file=sys.stderr) sys.exit(1) archive = MPQArchive(args.replay_file) filters = [] if args.json: filters.insert(0, JSONOutputFilter(sys.stdout)) elif args.ndjson: filters.insert(0, NDJSONOutputFilter(sys.stdout)) elif not args.quiet: filters.insert(0, PrettyPrintFilter(sys.stdout)) if args.types: filters.insert(0, TypeDumpFilter()) if args.stats: filters.insert(0, StatCollectionFilter()) def process_event(event): for f in filters: event = f.process(event) # Read the protocol header, this can be read with any protocol contents = archive.header['user_data_header']['content'] header = latest().decode_replay_header(contents) if args.header: process_event(header) # The header's baseBuild determines which protocol to use baseBuild = header['m_version']['m_baseBuild'] try: protocol = build(baseBuild) except Exception as e: print('Unsupported base build: {0} ({1!s})'.format(baseBuild, e), file=sys.stderr) sys.exit(1) # Process game metadata if args.all or args.metadata: contents = read_contents(archive, 'replay.gamemetadata.json') process_event(json.loads(contents)) # Print protocol details if args.all or args.details: contents = read_contents(archive, 'replay.details') details = protocol.decode_replay_details(contents) details = process_details_data(details) process_event(details) # Print protocol details if args.all or args.details_backup: contents = read_contents(archive, 'replay.details.backup') details_backup = protocol.decode_replay_details(contents) details_backup = process_details_data(details_backup) process_event(details_backup) # Print protocol init data if args.all or args.initdata: contents = read_contents(archive, 'replay.initData') initdata = protocol.decode_replay_initdata(contents) initdata = process_init_data(initdata) process_event(initdata) # Print game events and/or game events stats if args.all or args.gameevents: contents = read_contents(archive, 'replay.game.events') map(process_event, protocol.decode_replay_game_events(contents)) # Print message events if args.all or args.messageevents: contents = read_contents(archive, 'replay.message.events') map(process_event, protocol.decode_replay_message_events(contents)) # Print tracker events if args.all or args.trackerevents: if hasattr(protocol, 'decode_replay_tracker_events'): contents = read_contents(archive, 'replay.tracker.events') map(process_event, protocol.decode_replay_tracker_events(contents)) # Print attributes events if args.all or args.attributeevents or args.attributeparse: contents = read_contents(archive, 'replay.attributes.events') attributes = protocol.decode_replay_attributes_events(contents) # Process raw attribute events structure if args.attributeevents: process_event(attributes) # Convert attributes to higher level requested data, will # call prcess_event for each new event that it creates if args.attributeparse: process_scope_attributes(attributes['scopes'], process_event) for f in filters: f.finish() if args.profile: pr.disable() print("Profiler Results") print("----------------") s = get_stream() sortby = 'cumulative' ps = pstats.Stats(pr, stream=s).sort_stats(sortby) ps.print_stats() print(s.getvalue()) if __name__ == '__main__': main()
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/s2_cli.py
s2_cli.py
import sys import argparse import pprint from zephyrus_sc2_parser.s2protocol_fixed.versions import build def diff_things(typeinfo_index, thing_a, thing_b): if type(thing_a) != type(thing_b): print( "typeinfo {} diff types: {} {}".format( typeinfo_index, type(thing_a), type(thing_b) ) ) return if type(thing_a) == dict: thing_a = thing_a.items() thing_b = thing_b.items() if type(thing_a) == list or type(thing_a) == tuple: if len(thing_a) != len(thing_b): print( "typeinfo {} diff len: {} {}".format( typeinfo_index, len(thing_a), len(thing_b) ) ) else: for ix in range(len(thing_a)): diff_things(typeinfo_index, thing_a[ix], thing_b[ix]) elif thing_a != thing_b: if type(thing_a) == int: if (thing_a < 55 or thing_a - 1 != thing_b): print( "typeinfo {} diff number: {} {}".format( typeinfo_index, thing_a, thing_b ) ) else: print( "typeinfo {} diff string: {} {}".format( typeinfo_index, thing_a, thing_b ) ) def diff(protocol_a_ver, protocol_b_ver): print( "Comparing {} to {}".format( protocol_a_ver, protocol_b_ver ) ) protocol_a = build(protocol_a_ver) protocol_b = build(protocol_b_ver) count_a = len(protocol_a.typeinfos) count_b = len(protocol_b.typeinfos) print("Count of typeinfos: {} {}".format(count_a, count_b)) for index in range(max(count_a, count_b)): if index >= count_a: print("Protocol {} missing typeinfo {}".format(protocol_a_ver, index)) continue if index >= count_b: print("Protocol {} missing typeinfo {}".format(protocol_b_ver, index)) continue a = protocol_a.typeinfos[index] b = protocol_b.typeinfos[index] diff_things(index, a, b)
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/diff.py
diff.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',6,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,16),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-32),('m_userId',60,-31),('m_teamId',1,-30),('m_colorPref',62,-29),('m_racePref',44,-28),('m_difficulty',3,-27),('m_aiBuild',10,-26),('m_handicap',6,-25),('m_observe',24,-24),('m_logoIndex',6,-23),('m_hero',46,-22),('m_skin',46,-21),('m_mount',46,-20),('m_artifacts',63,-19),('m_workingSetSlotId',25,-18),('m_rewards',64,-17),('m_toonHandle',20,-16),('m_licenses',65,-15),('m_tandemLeaderId',60,-14),('m_commander',46,-13),('m_commanderLevel',6,-12),('m_hasSilencePenalty',13,-11),('m_tandemId',60,-10),('m_commanderMasteryLevel',6,-9),('m_commanderMasteryTalents',66,-8),('m_trophyId',6,-7),('m_rewardOverrides',68,-6),('m_brutalPlusDifficulty',6,-5),('m_retryMutationIndexes',66,-4),('m_aCEnemyRace',6,-3),('m_aCEnemyWaveType',6,-2),('m_selectedCommanderPrestige',6,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,27)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol89165.py
protocol89165.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,6)]), #2 ('_int',[(0,14)]), #3 ('_int',[(0,22)]), #4 ('_int',[(0,32)]), #5 ('_choice',[(0,2),{0:('m_uint6',2),1:('m_uint14',3),2:('m_uint22',4),3:('m_uint32',5)}]), #6 ('_blob',[(0,8)]), #7 ('_int',[(0,8)]), #8 ('_struct',[[('m_flags',8,0),('m_major',8,1),('m_minor',8,2),('m_revision',8,3),('m_build',5,4),('m_baseBuild',5,5)]]), #9 ('_int',[(0,3)]), #10 ('_struct',[[('m_signature',7,0),('m_version',9,1),('m_type',10,2),('m_elapsedGameLoops',5,3)]]), #11 ('_fourcc',[]), #12 ('_blob',[(0,7)]), #13 ('_int',[(0,64)]), #14 ('_struct',[[('m_region',8,0),('m_programId',12,1),('m_realm',5,2),('m_name',13,3),('m_id',14,4)]]), #15 ('_struct',[[('m_a',8,0),('m_r',8,1),('m_g',8,2),('m_b',8,3)]]), #16 ('_int',[(0,2)]), #17 ('_struct',[[('m_name',7,0),('m_toon',15,1),('m_race',7,2),('m_color',16,3),('m_control',8,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',17,7),('m_result',17,8)]]), #18 ('_array',[(0,5),18]), #19 ('_optional',[19]), #20 ('_blob',[(0,10)]), #21 ('_blob',[(0,11)]), #22 ('_struct',[[('m_file',22,0)]]), #23 ('_bool',[]), #24 ('_int',[(-9223372036854775808,64)]), #25 ('_blob',[(0,12)]), #26 ('_blob',[(40,0)]), #27 ('_array',[(0,4),27]), #28 ('_optional',[28]), #29 ('_struct',[[('m_playerList',20,0),('m_title',21,1),('m_difficulty',7,2),('m_thumbnail',23,3),('m_isBlizzardMap',24,4),('m_timeUTC',25,5),('m_timeLocalOffset',25,6),('m_description',26,7),('m_imageFilePath',22,8),('m_mapFileName',22,9),('m_cacheHandles',29,10),('m_miniSave',24,11),('m_gameSpeed',10,12),('m_defaultDifficulty',2,13)]]), #30 ('_optional',[8]), #31 ('_struct',[[('m_race',31,-1)]]), #32 ('_struct',[[('m_team',31,-1)]]), #33 ('_struct',[[('m_name',7,-7),('m_randomSeed',5,-6),('m_racePreference',32,-5),('m_teamPreference',33,-4),('m_testMap',24,-3),('m_testAuto',24,-2),('m_observe',17,-1)]]), #34 ('_array',[(0,5),34]), #35 ('_struct',[[('m_lockTeams',24,-11),('m_teamsTogether',24,-10),('m_advancedSharedControl',24,-9),('m_randomRaces',24,-8),('m_battleNet',24,-7),('m_amm',24,-6),('m_ranked',24,-5),('m_noVictoryOrDefeat',24,-4),('m_fog',17,-3),('m_observers',17,-2),('m_userDifficulty',17,-1)]]), #36 ('_int',[(0,5)]), #37 ('_int',[(1,4)]), #38 ('_int',[(1,8)]), #39 ('_bitarray',[(0,6)]), #40 ('_bitarray',[(0,8)]), #41 ('_bitarray',[(0,2)]), #42 ('_struct',[[('m_allowedColors',40,-5),('m_allowedRaces',41,-4),('m_allowedDifficulty',40,-3),('m_allowedControls',41,-2),('m_allowedObserveTypes',42,-1)]]), #43 ('_array',[(0,5),43]), #44 ('_struct',[[('m_randomValue',5,-23),('m_gameCacheName',21,-22),('m_gameOptions',36,-21),('m_gameSpeed',10,-20),('m_gameType',10,-19),('m_maxUsers',37,-18),('m_maxObservers',37,-17),('m_maxPlayers',37,-16),('m_maxTeams',38,-15),('m_maxColors',2,-14),('m_maxRaces',39,-13),('m_maxControls',39,-12),('m_mapSizeX',8,-11),('m_mapSizeY',8,-10),('m_mapFileSyncChecksum',5,-9),('m_mapFileName',22,-8),('m_mapAuthorName',7,-7),('m_modFileSyncChecksum',5,-6),('m_slotDescriptions',44,-5),('m_defaultDifficulty',2,-4),('m_cacheHandles',28,-3),('m_isBlizzardMap',24,-2),('m_isPremadeFFA',24,-1)]]), #45 ('_optional',[1]), #46 ('_optional',[37]), #47 ('_struct',[[('m_color',47,-1)]]), #48 ('_array',[(0,5),5]), #49 ('_struct',[[('m_control',8,-10),('m_userId',46,-9),('m_teamId',1,-8),('m_colorPref',48,-7),('m_racePref',32,-6),('m_difficulty',2,-5),('m_handicap',0,-4),('m_observe',17,-3),('m_rewards',49,-2),('m_toonHandle',13,-1)]]), #50 ('_array',[(0,5),50]), #51 ('_struct',[[('m_phase',10,-9),('m_maxUsers',37,-8),('m_maxObservers',37,-7),('m_slots',51,-6),('m_randomSeed',5,-5),('m_hostUserId',46,-4),('m_isSinglePlayer',24,-3),('m_gameDuration',5,-2),('m_defaultDifficulty',2,-1)]]), #52 ('_struct',[[('m_userInitialData',35,-3),('m_gameDescription',45,-2),('m_lobbyState',52,-1)]]), #53 ('_struct',[[('m_syncLobbyState',53,-1)]]), #54 ('_struct',[[('m_name',13,-5)]]), #55 ('_blob',[(0,6)]), #56 ('_struct',[[('m_name',56,-5)]]), #57 ('_struct',[[('m_name',56,-7),('m_type',5,-6),('m_data',13,-5)]]), #58 ('_struct',[[('m_type',5,-7),('m_name',56,-6),('m_data',26,-5)]]), #59 ('_array',[(0,5),8]), #60 ('_struct',[[('m_signature',60,-5)]]), #61 ('_struct',[[('m_developmentCheatsEnabled',24,-8),('m_multiplayerCheatsEnabled',24,-7),('m_syncChecksummingEnabled',24,-6),('m_isMapToMapTransition',24,-5)]]), #62 ('_struct',[[]]), #63 ('_struct',[[('m_fileName',22,-9),('m_automatic',24,-8),('m_overwrite',24,-7),('m_name',7,-6),('m_description',21,-5)]]), #64 ('_int',[(-2147483648,32)]), #65 ('_struct',[[('x',65,-2),('y',65,-1)]]), #66 ('_struct',[[('m_point',66,-4),('m_time',65,-3),('m_verb',21,-2),('m_arguments',21,-1)]]), #67 ('_struct',[[('m_data',67,-5)]]), #68 ('_int',[(0,18)]), #69 ('_int',[(0,16)]), #70 ('_struct',[[('m_abilLink',70,-3),('m_abilCmdIndex',37,-2),('m_abilCmdData',31,-1)]]), #71 ('_optional',[71]), #72 ('_null',[]), #73 ('_int',[(0,20)]), #74 ('_struct',[[('x',74,-3),('y',74,-2),('z',65,-1)]]), #75 ('_struct',[[('m_targetUnitFlags',8,-6),('m_timer',8,-5),('m_tag',5,-4),('m_snapshotUnitLink',70,-3),('m_snapshotPlayerId',46,-2),('m_snapshotPoint',75,-1)]]), #76 ('_choice',[(0,2),{0:('None',73),1:('TargetPoint',75),2:('TargetUnit',76),3:('Data',5)}]), #77 ('_optional',[5]), #78 ('_struct',[[('m_cmdFlags',69,-8),('m_abil',72,-7),('m_data',77,-6),('m_otherUnit',78,-5)]]), #79 ('_array',[(0,8),8]), #80 ('_choice',[(0,2),{0:('None',73),1:('Mask',41),2:('OneIndices',80),3:('ZeroIndices',80)}]), #81 ('_struct',[[('m_unitLink',70,-3),('m_intraSubgroupPriority',8,-2),('m_count',8,-1)]]), #82 ('_array',[(0,8),82]), #83 ('_array',[(0,8),5]), #84 ('_struct',[[('m_subgroupIndex',8,-4),('m_removeMask',81,-3),('m_addSubgroups',83,-2),('m_addUnitTags',84,-1)]]), #85 ('_struct',[[('m_controlGroupId',1,-6),('m_delta',85,-5)]]), #86 ('_struct',[[('m_controlGroupIndex',1,-7),('m_controlGroupUpdate',17,-6),('m_mask',81,-5)]]), #87 ('_struct',[[('m_count',8,-6),('m_subgroupCount',8,-5),('m_activeSubgroupIndex',8,-4),('m_unitTagsChecksum',5,-3),('m_subgroupIndicesChecksum',5,-2),('m_subgroupsChecksum',5,-1)]]), #88 ('_struct',[[('m_controlGroupId',1,-6),('m_selectionSyncData',88,-5)]]), #89 ('_array',[(0,3),65]), #90 ('_struct',[[('m_recipientId',1,-6),('m_resources',90,-5)]]), #91 ('_struct',[[('m_chatMessage',21,-5)]]), #92 ('_int',[(-128,8)]), #93 ('_struct',[[('x',65,-3),('y',65,-2),('z',65,-1)]]), #94 ('_struct',[[('m_beacon',93,-11),('m_ally',93,-10),('m_autocast',93,-9),('m_targetUnitTag',5,-8),('m_targetUnitSnapshotUnitLink',70,-7),('m_targetUnitSnapshotPlayerId',46,-6),('m_targetPoint',94,-5)]]), #95 ('_struct',[[('m_speed',10,-5)]]), #96 ('_struct',[[('m_delta',93,-5)]]), #97 ('_struct',[[('m_verb',21,-6),('m_arguments',21,-5)]]), #98 ('_struct',[[('m_alliance',5,-6),('m_control',5,-5)]]), #99 ('_struct',[[('m_unitTag',5,-5)]]), #100 ('_struct',[[('m_unitTag',5,-6),('m_flags',8,-5)]]), #101 ('_struct',[[('m_conversationId',65,-6),('m_replyId',65,-5)]]), #102 ('_struct',[[('m_purchaseItemId',65,-5)]]), #103 ('_struct',[[('m_difficultyLevel',65,-5)]]), #104 ('_choice',[(0,3),{0:('None',73),1:('Checked',24),2:('ValueChanged',5),3:('SelectionChanged',65),4:('TextChanged',22)}]), #105 ('_struct',[[('m_controlId',65,-7),('m_eventType',65,-6),('m_eventData',105,-5)]]), #106 ('_struct',[[('m_soundHash',5,-6),('m_length',5,-5)]]), #107 ('_struct',[[('m_soundHash',84,-2),('m_length',84,-1)]]), #108 ('_struct',[[('m_syncInfo',108,-5)]]), #109 ('_struct',[[('m_sound',5,-5)]]), #110 ('_struct',[[('m_transmissionId',65,-5)]]), #111 ('_struct',[[('x',70,-2),('y',70,-1)]]), #112 ('_optional',[70]), #113 ('_struct',[[('m_target',112,-8),('m_distance',113,-7),('m_pitch',113,-6),('m_yaw',113,-5)]]), #114 ('_int',[(0,1)]), #115 ('_struct',[[('m_skipType',115,-5)]]), #116 ('_int',[(0,11)]), #117 ('_struct',[[('x',117,-2),('y',117,-1)]]), #118 ('_struct',[[('m_button',5,-8),('m_down',24,-7),('m_posUI',118,-6),('m_posWorld',75,-5)]]), #119 ('_struct',[[('m_posUI',118,-6),('m_posWorld',75,-5)]]), #120 ('_struct',[[('m_soundtrack',5,-5)]]), #121 ('_struct',[[('m_planetId',65,-5)]]), #122 ('_struct',[[('m_key',93,-6),('m_flags',93,-5)]]), #123 ('_struct',[[('m_resources',90,-5)]]), #124 ('_struct',[[('m_fulfillRequestId',65,-5)]]), #125 ('_struct',[[('m_cancelRequestId',65,-5)]]), #126 ('_struct',[[('m_researchItemId',65,-5)]]), #127 ('_struct',[[('m_laggingPlayerId',1,-5)]]), #128 ('_struct',[[('m_mercenaryId',65,-5)]]), #129 ('_struct',[[('m_battleReportId',65,-6),('m_difficultyLevel',65,-5)]]), #130 ('_struct',[[('m_battleReportId',65,-5)]]), #131 ('_int',[(0,19)]), #132 ('_struct',[[('m_decrementMs',132,-5)]]), #133 ('_struct',[[('m_portraitId',65,-5)]]), #134 ('_struct',[[('m_functionName',13,-5)]]), #135 ('_struct',[[('m_result',65,-5)]]), #136 ('_struct',[[('m_gameMenuItemIndex',65,-5)]]), #137 ('_struct',[[('m_reason',93,-5)]]), #138 ('_struct',[[('m_purchaseCategoryId',65,-5)]]), #139 ('_struct',[[('m_button',70,-5)]]), #140 ('_struct',[[('m_recipient',17,-3),('m_string',22,-2)]]), #141 ('_struct',[[('m_recipient',17,-3),('m_point',66,-2)]]), #142 ('_struct',[[('m_progress',65,-2)]]), #143 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (63, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (55, 'NNet.Game.SBankFileEvent'), 8: (57, 'NNet.Game.SBankSectionEvent'), 9: (58, 'NNet.Game.SBankKeyEvent'), 10: (59, 'NNet.Game.SBankValueEvent'), 11: (61, 'NNet.Game.SBankSignatureEvent'), 12: (62, 'NNet.Game.SUserOptionsEvent'), 22: (64, 'NNet.Game.SSaveGameEvent'), 23: (63, 'NNet.Game.SSaveGameDoneEvent'), 25: (63, 'NNet.Game.SPlayerLeaveEvent'), 26: (68, 'NNet.Game.SGameCheatEvent'), 27: (79, 'NNet.Game.SCmdEvent'), 28: (86, 'NNet.Game.SSelectionDeltaEvent'), 29: (87, 'NNet.Game.SControlGroupUpdateEvent'), 30: (89, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (91, 'NNet.Game.SResourceTradeEvent'), 32: (92, 'NNet.Game.STriggerChatMessageEvent'), 33: (95, 'NNet.Game.SAICommunicateEvent'), 34: (96, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (97, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 37: (98, 'NNet.Game.SBroadcastCheatEvent'), 38: (99, 'NNet.Game.SAllianceEvent'), 39: (100, 'NNet.Game.SUnitClickEvent'), 40: (101, 'NNet.Game.SUnitHighlightEvent'), 41: (102, 'NNet.Game.STriggerReplySelectedEvent'), 44: (63, 'NNet.Game.STriggerSkippedEvent'), 45: (107, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (110, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (111, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (111, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (114, 'NNet.Game.SCameraUpdateEvent'), 50: (63, 'NNet.Game.STriggerAbortMissionEvent'), 51: (103, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (63, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (104, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (63, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (106, 'NNet.Game.STriggerDialogControlEvent'), 56: (109, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (116, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (119, 'NNet.Game.STriggerMouseClickedEvent'), 59: (120, 'NNet.Game.STriggerMouseMovedEvent'), 63: (63, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (121, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (122, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (123, 'NNet.Game.STriggerKeyPressedEvent'), 67: (135, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (63, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (63, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (124, 'NNet.Game.SResourceRequestEvent'), 71: (125, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (126, 'NNet.Game.SResourceRequestCancelEvent'), 73: (63, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (63, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (127, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (128, 'NNet.Game.SLagMessageEvent'), 77: (63, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (63, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (129, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (63, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (63, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (130, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (131, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (131, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (104, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (63, 'NNet.Game.STriggerMovieStartedEvent'), 87: (63, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (133, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (134, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (136, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (137, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (138, 'NNet.Game.STriggerCameraMoveEvent'), 93: (103, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (139, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (140, 'NNet.Game.STriggerButtonPressedEvent'), 96: (63, 'NNet.Game.STriggerGameCreditsFinishedEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (141, 'NNet.Game.SChatMessage'), 1: (142, 'NNet.Game.SPingMessage'), 2: (143, 'NNet.Game.SLoadingProgressMessage'), 3: (63, 'NNet.Game.SServerPingMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = None # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 6 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = None # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 11 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 30 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 54 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol18574.py
protocol18574.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',6,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,16),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-32),('m_userId',60,-31),('m_teamId',1,-30),('m_colorPref',62,-29),('m_racePref',44,-28),('m_difficulty',3,-27),('m_aiBuild',10,-26),('m_handicap',6,-25),('m_observe',24,-24),('m_logoIndex',6,-23),('m_hero',46,-22),('m_skin',46,-21),('m_mount',46,-20),('m_artifacts',63,-19),('m_workingSetSlotId',25,-18),('m_rewards',64,-17),('m_toonHandle',20,-16),('m_licenses',65,-15),('m_tandemLeaderId',60,-14),('m_commander',46,-13),('m_commanderLevel',6,-12),('m_hasSilencePenalty',13,-11),('m_tandemId',60,-10),('m_commanderMasteryLevel',6,-9),('m_commanderMasteryTalents',66,-8),('m_trophyId',6,-7),('m_rewardOverrides',68,-6),('m_brutalPlusDifficulty',6,-5),('m_retryMutationIndexes',66,-4),('m_aCEnemyRace',6,-3),('m_aCEnemyWaveType',6,-2),('m_selectedCommanderPrestige',6,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,27)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol83830.py
protocol83830.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,16),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-31),('m_userId',60,-30),('m_teamId',1,-29),('m_colorPref',62,-28),('m_racePref',44,-27),('m_difficulty',3,-26),('m_aiBuild',10,-25),('m_handicap',0,-24),('m_observe',24,-23),('m_logoIndex',6,-22),('m_hero',46,-21),('m_skin',46,-20),('m_mount',46,-19),('m_artifacts',63,-18),('m_workingSetSlotId',25,-17),('m_rewards',64,-16),('m_toonHandle',20,-15),('m_licenses',65,-14),('m_tandemLeaderId',60,-13),('m_commander',46,-12),('m_commanderLevel',6,-11),('m_hasSilencePenalty',13,-10),('m_tandemId',60,-9),('m_commanderMasteryLevel',6,-8),('m_commanderMasteryTalents',66,-7),('m_trophyId',6,-6),('m_rewardOverrides',68,-5),('m_brutalPlusDifficulty',6,-4),('m_retryMutationIndexes',66,-3),('m_aCEnemyRace',6,-2),('m_aCEnemyWaveType',6,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol77661.py
protocol77661.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,13),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol74456.py
protocol74456.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4)]]), #14 ('_fourcc',[]), #15 ('_blob',[(0,7)]), #16 ('_int',[(0,64)]), #17 ('_struct',[[('m_region',10,0),('m_programId',15,1),('m_realm',6,2),('m_name',16,3),('m_id',17,4)]]), #18 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #19 ('_int',[(0,2)]), #20 ('_optional',[10]), #21 ('_struct',[[('m_name',9,0),('m_toon',18,1),('m_race',9,2),('m_color',19,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',20,7),('m_result',20,8),('m_workingSetSlotId',21,9)]]), #22 ('_array',[(0,5),22]), #23 ('_optional',[23]), #24 ('_blob',[(0,10)]), #25 ('_blob',[(0,11)]), #26 ('_struct',[[('m_file',26,0)]]), #27 ('_optional',[13]), #28 ('_int',[(-9223372036854775808,64)]), #29 ('_blob',[(0,12)]), #30 ('_blob',[(40,0)]), #31 ('_array',[(0,6),31]), #32 ('_optional',[32]), #33 ('_array',[(0,6),26]), #34 ('_optional',[34]), #35 ('_struct',[[('m_playerList',24,0),('m_title',25,1),('m_difficulty',9,2),('m_thumbnail',27,3),('m_isBlizzardMap',13,4),('m_restartAsTransitionMap',28,16),('m_timeUTC',29,5),('m_timeLocalOffset',29,6),('m_description',30,7),('m_imageFilePath',26,8),('m_campaignIndex',10,15),('m_mapFileName',26,9),('m_cacheHandles',33,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',35,14)]]), #36 ('_optional',[9]), #37 ('_optional',[31]), #38 ('_optional',[6]), #39 ('_struct',[[('m_race',21,-1)]]), #40 ('_struct',[[('m_team',21,-1)]]), #41 ('_struct',[[('m_name',9,-13),('m_clanTag',37,-12),('m_clanLogo',38,-11),('m_highestLeague',21,-10),('m_combinedRaceLevels',39,-9),('m_randomSeed',6,-8),('m_racePreference',40,-7),('m_teamPreference',41,-6),('m_testMap',13,-5),('m_testAuto',13,-4),('m_examine',13,-3),('m_customInterface',13,-2),('m_observe',20,-1)]]), #42 ('_array',[(0,5),42]), #43 ('_struct',[[('m_lockTeams',13,-12),('m_teamsTogether',13,-11),('m_advancedSharedControl',13,-10),('m_randomRaces',13,-9),('m_battleNet',13,-8),('m_amm',13,-7),('m_competitive',13,-6),('m_noVictoryOrDefeat',13,-5),('m_fog',20,-4),('m_observers',20,-3),('m_userDifficulty',20,-2),('m_clientDebugFlags',17,-1)]]), #44 ('_int',[(1,4)]), #45 ('_int',[(1,8)]), #46 ('_bitarray',[(0,6)]), #47 ('_bitarray',[(0,8)]), #48 ('_bitarray',[(0,2)]), #49 ('_bitarray',[(0,7)]), #50 ('_struct',[[('m_allowedColors',47,-6),('m_allowedRaces',48,-5),('m_allowedDifficulty',47,-4),('m_allowedControls',48,-3),('m_allowedObserveTypes',49,-2),('m_allowedAIBuilds',50,-1)]]), #51 ('_array',[(0,5),51]), #52 ('_struct',[[('m_randomValue',6,-26),('m_gameCacheName',25,-25),('m_gameOptions',44,-24),('m_gameSpeed',12,-23),('m_gameType',12,-22),('m_maxUsers',2,-21),('m_maxObservers',2,-20),('m_maxPlayers',2,-19),('m_maxTeams',45,-18),('m_maxColors',3,-17),('m_maxRaces',46,-16),('m_maxControls',10,-15),('m_mapSizeX',10,-14),('m_mapSizeY',10,-13),('m_mapFileSyncChecksum',6,-12),('m_mapFileName',26,-11),('m_mapAuthorName',9,-10),('m_modFileSyncChecksum',6,-9),('m_slotDescriptions',52,-8),('m_defaultDifficulty',3,-7),('m_defaultAIBuild',0,-6),('m_cacheHandles',32,-5),('m_hasExtensionMod',13,-4),('m_isBlizzardMap',13,-3),('m_isPremadeFFA',13,-2),('m_isCoopMode',13,-1)]]), #53 ('_optional',[1]), #54 ('_optional',[2]), #55 ('_struct',[[('m_color',55,-1)]]), #56 ('_array',[(0,6),6]), #57 ('_array',[(0,9),6]), #58 ('_struct',[[('m_control',10,-13),('m_userId',54,-12),('m_teamId',1,-11),('m_colorPref',56,-10),('m_racePref',40,-9),('m_difficulty',3,-8),('m_aiBuild',0,-7),('m_handicap',0,-6),('m_observe',20,-5),('m_workingSetSlotId',21,-4),('m_rewards',57,-3),('m_toonHandle',16,-2),('m_licenses',58,-1)]]), #59 ('_array',[(0,5),59]), #60 ('_struct',[[('m_phase',12,-10),('m_maxUsers',2,-9),('m_maxObservers',2,-8),('m_slots',60,-7),('m_randomSeed',6,-6),('m_hostUserId',54,-5),('m_isSinglePlayer',13,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',0,-1)]]), #61 ('_struct',[[('m_userInitialData',43,-3),('m_gameDescription',53,-2),('m_lobbyState',61,-1)]]), #62 ('_struct',[[('m_syncLobbyState',62,-1)]]), #63 ('_struct',[[('m_name',16,-6)]]), #64 ('_blob',[(0,6)]), #65 ('_struct',[[('m_name',65,-6)]]), #66 ('_struct',[[('m_name',65,-8),('m_type',6,-7),('m_data',16,-6)]]), #67 ('_struct',[[('m_type',6,-8),('m_name',65,-7),('m_data',30,-6)]]), #68 ('_array',[(0,5),10]), #69 ('_struct',[[('m_signature',69,-7),('m_toonHandle',16,-6)]]), #70 ('_struct',[[('m_gameFullyDownloaded',13,-13),('m_developmentCheatsEnabled',13,-12),('m_multiplayerCheatsEnabled',13,-11),('m_syncChecksummingEnabled',13,-10),('m_isMapToMapTransition',13,-9),('m_startingRally',13,-8),('m_debugPauseEnabled',13,-7),('m_baseBuildNum',6,-6)]]), #71 ('_struct',[[]]), #72 ('_int',[(0,16)]), #73 ('_struct',[[('x',73,-2),('y',73,-1)]]), #74 ('_struct',[[('m_which',12,-7),('m_target',74,-6)]]), #75 ('_struct',[[('m_fileName',26,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',25,-6)]]), #76 ('_int',[(-2147483648,32)]), #77 ('_struct',[[('x',77,-2),('y',77,-1)]]), #78 ('_struct',[[('m_point',78,-4),('m_time',77,-3),('m_verb',25,-2),('m_arguments',25,-1)]]), #79 ('_struct',[[('m_data',79,-6)]]), #80 ('_int',[(0,20)]), #81 ('_struct',[[('m_abilLink',73,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',21,-1)]]), #82 ('_optional',[82]), #83 ('_null',[]), #84 ('_struct',[[('x',81,-3),('y',81,-2),('z',77,-1)]]), #85 ('_struct',[[('m_targetUnitFlags',10,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',73,-4),('m_snapshotControlPlayerId',54,-3),('m_snapshotUpkeepPlayerId',54,-2),('m_snapshotPoint',85,-1)]]), #86 ('_choice',[(0,2),{0:('None',84),1:('TargetPoint',85),2:('TargetUnit',86),3:('Data',6)}]), #87 ('_struct',[[('m_cmdFlags',81,-9),('m_abil',83,-8),('m_data',87,-7),('m_otherUnit',39,-6)]]), #88 ('_int',[(0,9)]), #89 ('_bitarray',[(0,9)]), #90 ('_array',[(0,9),89]), #91 ('_choice',[(0,2),{0:('None',84),1:('Mask',90),2:('OneIndices',91),3:('ZeroIndices',91)}]), #92 ('_struct',[[('m_unitLink',73,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',89,-1)]]), #93 ('_array',[(0,9),93]), #94 ('_struct',[[('m_subgroupIndex',89,-4),('m_removeMask',92,-3),('m_addSubgroups',94,-2),('m_addUnitTags',58,-1)]]), #95 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',95,-6)]]), #96 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',20,-7),('m_mask',92,-6)]]), #97 ('_struct',[[('m_count',89,-6),('m_subgroupCount',89,-5),('m_activeSubgroupIndex',89,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #98 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',98,-6)]]), #99 ('_array',[(0,3),77]), #100 ('_struct',[[('m_recipientId',1,-7),('m_resources',100,-6)]]), #101 ('_struct',[[('m_chatMessage',25,-6)]]), #102 ('_int',[(-128,8)]), #103 ('_struct',[[('x',77,-3),('y',77,-2),('z',77,-1)]]), #104 ('_struct',[[('m_beacon',103,-14),('m_ally',103,-13),('m_flags',103,-12),('m_build',103,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',73,-9),('m_targetUnitSnapshotUpkeepPlayerId',103,-8),('m_targetUnitSnapshotControlPlayerId',103,-7),('m_targetPoint',104,-6)]]), #105 ('_struct',[[('m_speed',12,-6)]]), #106 ('_struct',[[('m_delta',103,-6)]]), #107 ('_struct',[[('m_point',78,-8),('m_unit',6,-7),('m_pingedMinimap',13,-6)]]), #108 ('_struct',[[('m_verb',25,-7),('m_arguments',25,-6)]]), #109 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #110 ('_struct',[[('m_unitTag',6,-6)]]), #111 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #112 ('_struct',[[('m_conversationId',77,-7),('m_replyId',77,-6)]]), #113 ('_optional',[16]), #114 ('_struct',[[('m_gameUserId',1,-6),('m_observe',20,-5),('m_name',9,-4),('m_toonHandle',114,-3),('m_clanTag',37,-2),('m_clanLogo',38,-1)]]), #115 ('_array',[(0,5),115]), #116 ('_int',[(0,1)]), #117 ('_struct',[[('m_userInfos',116,-7),('m_method',117,-6)]]), #118 ('_struct',[[('m_purchaseItemId',77,-6)]]), #119 ('_struct',[[('m_difficultyLevel',77,-6)]]), #120 ('_choice',[(0,3),{0:('None',84),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',77),4:('TextChanged',26),5:('MouseButton',6)}]), #121 ('_struct',[[('m_controlId',77,-8),('m_eventType',77,-7),('m_eventData',121,-6)]]), #122 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #123 ('_array',[(0,7),6]), #124 ('_struct',[[('m_soundHash',124,-2),('m_length',124,-1)]]), #125 ('_struct',[[('m_syncInfo',125,-6)]]), #126 ('_struct',[[('m_sound',6,-6)]]), #127 ('_struct',[[('m_transmissionId',77,-7),('m_thread',6,-6)]]), #128 ('_struct',[[('m_transmissionId',77,-6)]]), #129 ('_optional',[74]), #130 ('_optional',[73]), #131 ('_optional',[103]), #132 ('_struct',[[('m_target',130,-10),('m_distance',131,-9),('m_pitch',131,-8),('m_yaw',131,-7),('m_reason',132,-6)]]), #133 ('_struct',[[('m_skipType',117,-6)]]), #134 ('_int',[(0,11)]), #135 ('_struct',[[('x',135,-2),('y',135,-1)]]), #136 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',136,-8),('m_posWorld',85,-7),('m_flags',103,-6)]]), #137 ('_struct',[[('m_posUI',136,-8),('m_posWorld',85,-7),('m_flags',103,-6)]]), #138 ('_struct',[[('m_achievementLink',73,-6)]]), #139 ('_struct',[[('m_abilLink',73,-8),('m_abilCmdIndex',2,-7),('m_state',103,-6)]]), #140 ('_struct',[[('m_soundtrack',6,-6)]]), #141 ('_struct',[[('m_planetId',77,-6)]]), #142 ('_struct',[[('m_key',103,-7),('m_flags',103,-6)]]), #143 ('_struct',[[('m_resources',100,-6)]]), #144 ('_struct',[[('m_fulfillRequestId',77,-6)]]), #145 ('_struct',[[('m_cancelRequestId',77,-6)]]), #146 ('_struct',[[('m_researchItemId',77,-6)]]), #147 ('_struct',[[('m_mercenaryId',77,-6)]]), #148 ('_struct',[[('m_battleReportId',77,-7),('m_difficultyLevel',77,-6)]]), #149 ('_struct',[[('m_battleReportId',77,-6)]]), #150 ('_int',[(0,19)]), #151 ('_struct',[[('m_decrementMs',151,-6)]]), #152 ('_struct',[[('m_portraitId',77,-6)]]), #153 ('_struct',[[('m_functionName',16,-6)]]), #154 ('_struct',[[('m_result',77,-6)]]), #155 ('_struct',[[('m_gameMenuItemIndex',77,-6)]]), #156 ('_struct',[[('m_purchaseCategoryId',77,-6)]]), #157 ('_struct',[[('m_button',73,-6)]]), #158 ('_struct',[[('m_cutsceneId',77,-7),('m_bookmarkName',16,-6)]]), #159 ('_struct',[[('m_cutsceneId',77,-6)]]), #160 ('_struct',[[('m_cutsceneId',77,-8),('m_conversationLine',16,-7),('m_altConversationLine',16,-6)]]), #161 ('_struct',[[('m_cutsceneId',77,-7),('m_conversationLine',16,-6)]]), #162 ('_struct',[[('m_observe',20,-10),('m_name',9,-9),('m_toonHandle',114,-8),('m_clanTag',37,-7),('m_clanLogo',38,-6)]]), #163 ('_struct',[[('m_recipient',12,-3),('m_string',26,-2)]]), #164 ('_struct',[[('m_recipient',12,-3),('m_point',78,-2)]]), #165 ('_struct',[[('m_progress',77,-2)]]), #166 ('_struct',[[('m_scoreValueMineralsCurrent',77,0),('m_scoreValueVespeneCurrent',77,1),('m_scoreValueMineralsCollectionRate',77,2),('m_scoreValueVespeneCollectionRate',77,3),('m_scoreValueWorkersActiveCount',77,4),('m_scoreValueMineralsUsedInProgressArmy',77,5),('m_scoreValueMineralsUsedInProgressEconomy',77,6),('m_scoreValueMineralsUsedInProgressTechnology',77,7),('m_scoreValueVespeneUsedInProgressArmy',77,8),('m_scoreValueVespeneUsedInProgressEconomy',77,9),('m_scoreValueVespeneUsedInProgressTechnology',77,10),('m_scoreValueMineralsUsedCurrentArmy',77,11),('m_scoreValueMineralsUsedCurrentEconomy',77,12),('m_scoreValueMineralsUsedCurrentTechnology',77,13),('m_scoreValueVespeneUsedCurrentArmy',77,14),('m_scoreValueVespeneUsedCurrentEconomy',77,15),('m_scoreValueVespeneUsedCurrentTechnology',77,16),('m_scoreValueMineralsLostArmy',77,17),('m_scoreValueMineralsLostEconomy',77,18),('m_scoreValueMineralsLostTechnology',77,19),('m_scoreValueVespeneLostArmy',77,20),('m_scoreValueVespeneLostEconomy',77,21),('m_scoreValueVespeneLostTechnology',77,22),('m_scoreValueMineralsKilledArmy',77,23),('m_scoreValueMineralsKilledEconomy',77,24),('m_scoreValueMineralsKilledTechnology',77,25),('m_scoreValueVespeneKilledArmy',77,26),('m_scoreValueVespeneKilledEconomy',77,27),('m_scoreValueVespeneKilledTechnology',77,28),('m_scoreValueFoodUsed',77,29),('m_scoreValueFoodMade',77,30),('m_scoreValueMineralsUsedActiveForces',77,31),('m_scoreValueVespeneUsedActiveForces',77,32),('m_scoreValueMineralsFriendlyFireArmy',77,33),('m_scoreValueMineralsFriendlyFireEconomy',77,34),('m_scoreValueMineralsFriendlyFireTechnology',77,35),('m_scoreValueVespeneFriendlyFireArmy',77,36),('m_scoreValueVespeneFriendlyFireEconomy',77,37),('m_scoreValueVespeneFriendlyFireTechnology',77,38)]]), #167 ('_struct',[[('m_playerId',1,0),('m_stats',167,1)]]), #168 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',25,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #169 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',54,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',39,5),('m_killerUnitTagRecycle',39,6)]]), #170 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #171 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',25,2)]]), #172 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',25,1),('m_count',77,2)]]), #173 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #174 ('_array',[(0,10),77]), #175 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',175,1)]]), #176 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',39,2),('m_slotId',39,3)]]), #177 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (72, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (71, 'NNet.Game.SUserOptionsEvent'), 9: (64, 'NNet.Game.SBankFileEvent'), 10: (66, 'NNet.Game.SBankSectionEvent'), 11: (67, 'NNet.Game.SBankKeyEvent'), 12: (68, 'NNet.Game.SBankValueEvent'), 13: (70, 'NNet.Game.SBankSignatureEvent'), 14: (75, 'NNet.Game.SCameraSaveEvent'), 21: (76, 'NNet.Game.SSaveGameEvent'), 22: (72, 'NNet.Game.SSaveGameDoneEvent'), 23: (72, 'NNet.Game.SLoadGameDoneEvent'), 26: (80, 'NNet.Game.SGameCheatEvent'), 27: (88, 'NNet.Game.SCmdEvent'), 28: (96, 'NNet.Game.SSelectionDeltaEvent'), 29: (97, 'NNet.Game.SControlGroupUpdateEvent'), 30: (99, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (101, 'NNet.Game.SResourceTradeEvent'), 32: (102, 'NNet.Game.STriggerChatMessageEvent'), 33: (105, 'NNet.Game.SAICommunicateEvent'), 34: (106, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (107, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (108, 'NNet.Game.STriggerPingEvent'), 37: (109, 'NNet.Game.SBroadcastCheatEvent'), 38: (110, 'NNet.Game.SAllianceEvent'), 39: (111, 'NNet.Game.SUnitClickEvent'), 40: (112, 'NNet.Game.SUnitHighlightEvent'), 41: (113, 'NNet.Game.STriggerReplySelectedEvent'), 43: (118, 'NNet.Game.SHijackReplayGameEvent'), 44: (72, 'NNet.Game.STriggerSkippedEvent'), 45: (123, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (127, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (128, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (129, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (133, 'NNet.Game.SCameraUpdateEvent'), 50: (72, 'NNet.Game.STriggerAbortMissionEvent'), 51: (119, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (72, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (120, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (72, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (122, 'NNet.Game.STriggerDialogControlEvent'), 56: (126, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (134, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (137, 'NNet.Game.STriggerMouseClickedEvent'), 59: (138, 'NNet.Game.STriggerMouseMovedEvent'), 60: (139, 'NNet.Game.SAchievementAwardedEvent'), 62: (140, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (72, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (141, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (142, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (143, 'NNet.Game.STriggerKeyPressedEvent'), 67: (154, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (72, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (72, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (144, 'NNet.Game.SResourceRequestEvent'), 71: (145, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (146, 'NNet.Game.SResourceRequestCancelEvent'), 73: (72, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (72, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (147, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 77: (72, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (72, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (148, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (72, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (72, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (149, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (150, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (150, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (120, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (72, 'NNet.Game.STriggerMovieStartedEvent'), 87: (72, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (152, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (153, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (155, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (156, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 93: (119, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (157, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (158, 'NNet.Game.STriggerButtonPressedEvent'), 96: (72, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (159, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (160, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (161, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (162, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (72, 'NNet.Game.SGameUserLeaveEvent'), 102: (163, 'NNet.Game.SGameUserJoinEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (164, 'NNet.Game.SChatMessage'), 1: (165, 'NNet.Game.SPingMessage'), 2: (166, 'NNet.Game.SLoadingProgressMessage'), 3: (72, 'NNet.Game.SServerPingMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (168, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (169, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (170, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (171, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (172, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (173, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (169, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (174, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (176, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (177, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 14 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 36 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 63 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol28272.py
protocol28272.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,16),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-31),('m_userId',60,-30),('m_teamId',1,-29),('m_colorPref',62,-28),('m_racePref',44,-27),('m_difficulty',3,-26),('m_aiBuild',10,-25),('m_handicap',0,-24),('m_observe',24,-23),('m_logoIndex',6,-22),('m_hero',46,-21),('m_skin',46,-20),('m_mount',46,-19),('m_artifacts',63,-18),('m_workingSetSlotId',25,-17),('m_rewards',64,-16),('m_toonHandle',20,-15),('m_licenses',65,-14),('m_tandemLeaderId',60,-13),('m_commander',46,-12),('m_commanderLevel',6,-11),('m_hasSilencePenalty',13,-10),('m_tandemId',60,-9),('m_commanderMasteryLevel',6,-8),('m_commanderMasteryTalents',66,-7),('m_trophyId',6,-6),('m_rewardOverrides',68,-5),('m_brutalPlusDifficulty',6,-4),('m_retryMutationIndexes',66,-3),('m_aCEnemyRace',6,-2),('m_aCEnemyWaveType',6,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol77379.py
protocol77379.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,9),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',65,-1)]]), #107 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',107,-6)]]), #108 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #109 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #110 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',110,-6)]]), #111 ('_array',[(0,3),47]), #112 ('_struct',[[('m_recipientId',1,-7),('m_resources',112,-6)]]), #113 ('_struct',[[('m_chatMessage',29,-6)]]), #114 ('_int',[(-128,8)]), #115 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #116 ('_struct',[[('m_beacon',115,-14),('m_ally',115,-13),('m_flags',115,-12),('m_build',115,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',115,-8),('m_targetUnitSnapshotControlPlayerId',115,-7),('m_targetPoint',116,-6)]]), #117 ('_struct',[[('m_speed',12,-6)]]), #118 ('_struct',[[('m_delta',115,-6)]]), #119 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #120 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #121 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #122 ('_struct',[[('m_unitTag',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #124 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #125 ('_optional',[20]), #126 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',126,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #127 ('_array',[(0,5),127]), #128 ('_int',[(0,1)]), #129 ('_struct',[[('m_userInfos',128,-7),('m_method',129,-6)]]), #130 ('_struct',[[('m_purchaseItemId',47,-6)]]), #131 ('_struct',[[('m_difficultyLevel',47,-6)]]), #132 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #133 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',133,-6)]]), #134 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #135 ('_array',[(0,7),6]), #136 ('_struct',[[('m_soundHash',136,-2),('m_length',136,-1)]]), #137 ('_struct',[[('m_syncInfo',137,-6)]]), #138 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #139 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #140 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #141 ('_struct',[[('m_sound',6,-6)]]), #142 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-6)]]), #144 ('_optional',[84]), #145 ('_optional',[83]), #146 ('_optional',[115]), #147 ('_struct',[[('m_target',145,-11),('m_distance',146,-10),('m_pitch',146,-9),('m_yaw',146,-8),('m_reason',147,-7),('m_follow',13,-6)]]), #148 ('_struct',[[('m_skipType',129,-6)]]), #149 ('_int',[(0,11)]), #150 ('_struct',[[('x',150,-2),('y',150,-1)]]), #151 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',151,-8),('m_posWorld',96,-7),('m_flags',115,-6)]]), #152 ('_struct',[[('m_posUI',151,-8),('m_posWorld',96,-7),('m_flags',115,-6)]]), #153 ('_struct',[[('m_achievementLink',83,-6)]]), #154 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #155 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',115,-6)]]), #156 ('_struct',[[('m_soundtrack',6,-6)]]), #157 ('_struct',[[('m_planetId',47,-6)]]), #158 ('_struct',[[('m_key',115,-7),('m_flags',115,-6)]]), #159 ('_struct',[[('m_resources',112,-6)]]), #160 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #161 ('_struct',[[('m_cancelRequestId',47,-6)]]), #162 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #163 ('_struct',[[('m_researchItemId',47,-6)]]), #164 ('_struct',[[('m_mercenaryId',47,-6)]]), #165 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-6)]]), #167 ('_struct',[[('m_decrementSeconds',47,-6)]]), #168 ('_struct',[[('m_portraitId',47,-6)]]), #169 ('_struct',[[('m_functionName',20,-6)]]), #170 ('_struct',[[('m_result',47,-6)]]), #171 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #172 ('_int',[(-32768,16)]), #173 ('_struct',[[('m_wheelSpin',173,-7),('m_flags',115,-6)]]), #174 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #175 ('_struct',[[('m_button',83,-6)]]), #176 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #180 ('_struct',[[('m_leaveReason',1,-6)]]), #181 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',126,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #182 ('_optional',[99]), #183 ('_struct',[[('m_state',24,-7),('m_sequence',183,-6)]]), #184 ('_struct',[[('m_target',96,-6)]]), #185 ('_struct',[[('m_target',97,-6)]]), #186 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #187 ('_struct',[[('m_index',6,-6)]]), #188 ('_struct',[[('m_shown',13,-6)]]), #189 ('_struct',[[('m_syncTime',6,-6)]]), #190 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #192 ('_struct',[[('m_progress',47,-2)]]), #193 ('_struct',[[('m_status',24,-2)]]), #194 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #195 ('_struct',[[('m_playerId',1,0),('m_stats',195,1)]]), #196 ('_optional',[29]), #197 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',197,9)]]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #201 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #202 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #204 ('_array',[(0,10),47]), #205 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',205,1)]]), #206 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #207 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (108, 'NNet.Game.SSelectionDeltaEvent'), 29: (109, 'NNet.Game.SControlGroupUpdateEvent'), 30: (111, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (113, 'NNet.Game.SResourceTradeEvent'), 32: (114, 'NNet.Game.STriggerChatMessageEvent'), 33: (117, 'NNet.Game.SAICommunicateEvent'), 34: (118, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (119, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (120, 'NNet.Game.STriggerPingEvent'), 37: (121, 'NNet.Game.SBroadcastCheatEvent'), 38: (122, 'NNet.Game.SAllianceEvent'), 39: (123, 'NNet.Game.SUnitClickEvent'), 40: (124, 'NNet.Game.SUnitHighlightEvent'), 41: (125, 'NNet.Game.STriggerReplySelectedEvent'), 43: (130, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (135, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (142, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (143, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (144, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (148, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (131, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (132, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (134, 'NNet.Game.STriggerDialogControlEvent'), 56: (138, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (149, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (152, 'NNet.Game.STriggerMouseClickedEvent'), 59: (153, 'NNet.Game.STriggerMouseMovedEvent'), 60: (154, 'NNet.Game.SAchievementAwardedEvent'), 61: (155, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (156, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (157, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (158, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (159, 'NNet.Game.STriggerKeyPressedEvent'), 67: (170, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (160, 'NNet.Game.SResourceRequestEvent'), 71: (161, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (162, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (164, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (163, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (165, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (166, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (167, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (167, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (132, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (168, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (169, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (171, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (172, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (174, 'NNet.Game.STriggerMouseWheelEvent'), 93: (131, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (175, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (176, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (177, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (178, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (179, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (180, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (181, 'NNet.Game.SGameUserLeaveEvent'), 102: (182, 'NNet.Game.SGameUserJoinEvent'), 103: (184, 'NNet.Game.SCommandManagerStateEvent'), 104: (185, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (186, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (139, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (140, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (141, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (187, 'NNet.Game.SCatalogModifyEvent'), 110: (188, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (189, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (190, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (190, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (190, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (190, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (191, 'NNet.Game.SChatMessage'), 1: (192, 'NNet.Game.SPingMessage'), 2: (193, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (194, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (196, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (198, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (199, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (200, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (201, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (202, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (203, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (204, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (206, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (207, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol66668.py
protocol66668.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',6,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,16),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-32),('m_userId',60,-31),('m_teamId',1,-30),('m_colorPref',62,-29),('m_racePref',44,-28),('m_difficulty',3,-27),('m_aiBuild',10,-26),('m_handicap',6,-25),('m_observe',24,-24),('m_logoIndex',6,-23),('m_hero',46,-22),('m_skin',46,-21),('m_mount',46,-20),('m_artifacts',63,-19),('m_workingSetSlotId',25,-18),('m_rewards',64,-17),('m_toonHandle',20,-16),('m_licenses',65,-15),('m_tandemLeaderId',60,-14),('m_commander',46,-13),('m_commanderLevel',6,-12),('m_hasSilencePenalty',13,-11),('m_tandemId',60,-10),('m_commanderMasteryLevel',6,-9),('m_commanderMasteryTalents',66,-8),('m_trophyId',6,-7),('m_rewardOverrides',68,-6),('m_brutalPlusDifficulty',6,-5),('m_retryMutationIndexes',66,-4),('m_aCEnemyRace',6,-3),('m_aCEnemyWaveType',6,-2),('m_selectedCommanderPrestige',6,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,27)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol86383.py
protocol86383.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,13),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol75025.py
protocol75025.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,13),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol74071.py
protocol74071.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,6)]), #2 ('_int',[(0,14)]), #3 ('_int',[(0,22)]), #4 ('_int',[(0,32)]), #5 ('_choice',[(0,2),{0:('m_uint6',2),1:('m_uint14',3),2:('m_uint22',4),3:('m_uint32',5)}]), #6 ('_blob',[(0,8)]), #7 ('_int',[(0,8)]), #8 ('_struct',[[('m_flags',8,0),('m_major',8,1),('m_minor',8,2),('m_revision',8,3),('m_build',5,4),('m_baseBuild',5,5)]]), #9 ('_int',[(0,3)]), #10 ('_struct',[[('m_signature',7,0),('m_version',9,1),('m_type',10,2),('m_elapsedGameLoops',5,3)]]), #11 ('_fourcc',[]), #12 ('_blob',[(0,7)]), #13 ('_int',[(0,64)]), #14 ('_struct',[[('m_region',8,0),('m_programId',12,1),('m_realm',5,2),('m_name',13,3),('m_id',14,4)]]), #15 ('_struct',[[('m_a',8,0),('m_r',8,1),('m_g',8,2),('m_b',8,3)]]), #16 ('_int',[(0,2)]), #17 ('_struct',[[('m_name',7,0),('m_toon',15,1),('m_race',7,2),('m_color',16,3),('m_control',8,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',17,7),('m_result',17,8)]]), #18 ('_array',[(0,5),18]), #19 ('_optional',[19]), #20 ('_blob',[(0,10)]), #21 ('_blob',[(0,11)]), #22 ('_struct',[[('m_file',22,0)]]), #23 ('_bool',[]), #24 ('_int',[(-9223372036854775808,64)]), #25 ('_blob',[(0,12)]), #26 ('_blob',[(40,0)]), #27 ('_array',[(0,4),27]), #28 ('_optional',[28]), #29 ('_struct',[[('m_playerList',20,0),('m_title',21,1),('m_difficulty',7,2),('m_thumbnail',23,3),('m_isBlizzardMap',24,4),('m_timeUTC',25,5),('m_timeLocalOffset',25,6),('m_description',26,7),('m_imageFilePath',22,8),('m_mapFileName',22,9),('m_cacheHandles',29,10),('m_miniSave',24,11),('m_gameSpeed',10,12),('m_defaultDifficulty',2,13)]]), #30 ('_optional',[8]), #31 ('_struct',[[('m_race',31,-1)]]), #32 ('_struct',[[('m_team',31,-1)]]), #33 ('_struct',[[('m_name',7,-7),('m_randomSeed',5,-6),('m_racePreference',32,-5),('m_teamPreference',33,-4),('m_testMap',24,-3),('m_testAuto',24,-2),('m_observe',17,-1)]]), #34 ('_array',[(0,5),34]), #35 ('_struct',[[('m_lockTeams',24,-11),('m_teamsTogether',24,-10),('m_advancedSharedControl',24,-9),('m_randomRaces',24,-8),('m_battleNet',24,-7),('m_amm',24,-6),('m_ranked',24,-5),('m_noVictoryOrDefeat',24,-4),('m_fog',17,-3),('m_observers',17,-2),('m_userDifficulty',17,-1)]]), #36 ('_int',[(0,5)]), #37 ('_int',[(1,4)]), #38 ('_int',[(1,8)]), #39 ('_bitarray',[(0,6)]), #40 ('_bitarray',[(0,8)]), #41 ('_bitarray',[(0,2)]), #42 ('_struct',[[('m_allowedColors',40,-5),('m_allowedRaces',41,-4),('m_allowedDifficulty',40,-3),('m_allowedControls',41,-2),('m_allowedObserveTypes',42,-1)]]), #43 ('_array',[(0,5),43]), #44 ('_struct',[[('m_randomValue',5,-23),('m_gameCacheName',21,-22),('m_gameOptions',36,-21),('m_gameSpeed',10,-20),('m_gameType',10,-19),('m_maxUsers',37,-18),('m_maxObservers',37,-17),('m_maxPlayers',37,-16),('m_maxTeams',38,-15),('m_maxColors',2,-14),('m_maxRaces',39,-13),('m_maxControls',39,-12),('m_mapSizeX',8,-11),('m_mapSizeY',8,-10),('m_mapFileSyncChecksum',5,-9),('m_mapFileName',22,-8),('m_mapAuthorName',7,-7),('m_modFileSyncChecksum',5,-6),('m_slotDescriptions',44,-5),('m_defaultDifficulty',2,-4),('m_cacheHandles',28,-3),('m_isBlizzardMap',24,-2),('m_isPremadeFFA',24,-1)]]), #45 ('_optional',[1]), #46 ('_optional',[37]), #47 ('_struct',[[('m_color',47,-1)]]), #48 ('_array',[(0,5),5]), #49 ('_array',[(0,9),5]), #50 ('_struct',[[('m_control',8,-11),('m_userId',46,-10),('m_teamId',1,-9),('m_colorPref',48,-8),('m_racePref',32,-7),('m_difficulty',2,-6),('m_handicap',0,-5),('m_observe',17,-4),('m_rewards',49,-3),('m_toonHandle',13,-2),('m_licenses',50,-1)]]), #51 ('_array',[(0,5),51]), #52 ('_struct',[[('m_phase',10,-9),('m_maxUsers',37,-8),('m_maxObservers',37,-7),('m_slots',52,-6),('m_randomSeed',5,-5),('m_hostUserId',46,-4),('m_isSinglePlayer',24,-3),('m_gameDuration',5,-2),('m_defaultDifficulty',2,-1)]]), #53 ('_struct',[[('m_userInitialData',35,-3),('m_gameDescription',45,-2),('m_lobbyState',53,-1)]]), #54 ('_struct',[[('m_syncLobbyState',54,-1)]]), #55 ('_struct',[[('m_name',13,-5)]]), #56 ('_blob',[(0,6)]), #57 ('_struct',[[('m_name',57,-5)]]), #58 ('_struct',[[('m_name',57,-7),('m_type',5,-6),('m_data',13,-5)]]), #59 ('_struct',[[('m_type',5,-7),('m_name',57,-6),('m_data',26,-5)]]), #60 ('_array',[(0,5),8]), #61 ('_struct',[[('m_signature',61,-5)]]), #62 ('_struct',[[('m_developmentCheatsEnabled',24,-8),('m_multiplayerCheatsEnabled',24,-7),('m_syncChecksummingEnabled',24,-6),('m_isMapToMapTransition',24,-5)]]), #63 ('_struct',[[]]), #64 ('_struct',[[('m_fileName',22,-9),('m_automatic',24,-8),('m_overwrite',24,-7),('m_name',7,-6),('m_description',21,-5)]]), #65 ('_int',[(-2147483648,32)]), #66 ('_struct',[[('x',66,-2),('y',66,-1)]]), #67 ('_struct',[[('m_point',67,-4),('m_time',66,-3),('m_verb',21,-2),('m_arguments',21,-1)]]), #68 ('_struct',[[('m_data',68,-5)]]), #69 ('_int',[(0,18)]), #70 ('_int',[(0,16)]), #71 ('_struct',[[('m_abilLink',71,-3),('m_abilCmdIndex',37,-2),('m_abilCmdData',31,-1)]]), #72 ('_optional',[72]), #73 ('_null',[]), #74 ('_int',[(0,20)]), #75 ('_struct',[[('x',75,-3),('y',75,-2),('z',66,-1)]]), #76 ('_struct',[[('m_targetUnitFlags',8,-7),('m_timer',8,-6),('m_tag',5,-5),('m_snapshotUnitLink',71,-4),('m_snapshotControlPlayerId',46,-3),('m_snapshotUpkeepPlayerId',46,-2),('m_snapshotPoint',76,-1)]]), #77 ('_choice',[(0,2),{0:('None',74),1:('TargetPoint',76),2:('TargetUnit',77),3:('Data',5)}]), #78 ('_optional',[5]), #79 ('_struct',[[('m_cmdFlags',70,-8),('m_abil',73,-7),('m_data',78,-6),('m_otherUnit',79,-5)]]), #80 ('_array',[(0,8),8]), #81 ('_choice',[(0,2),{0:('None',74),1:('Mask',41),2:('OneIndices',81),3:('ZeroIndices',81)}]), #82 ('_struct',[[('m_unitLink',71,-3),('m_intraSubgroupPriority',8,-2),('m_count',8,-1)]]), #83 ('_array',[(0,8),83]), #84 ('_array',[(0,8),5]), #85 ('_struct',[[('m_subgroupIndex',8,-4),('m_removeMask',82,-3),('m_addSubgroups',84,-2),('m_addUnitTags',85,-1)]]), #86 ('_struct',[[('m_controlGroupId',1,-6),('m_delta',86,-5)]]), #87 ('_struct',[[('m_controlGroupIndex',1,-7),('m_controlGroupUpdate',17,-6),('m_mask',82,-5)]]), #88 ('_struct',[[('m_count',8,-6),('m_subgroupCount',8,-5),('m_activeSubgroupIndex',8,-4),('m_unitTagsChecksum',5,-3),('m_subgroupIndicesChecksum',5,-2),('m_subgroupsChecksum',5,-1)]]), #89 ('_struct',[[('m_controlGroupId',1,-6),('m_selectionSyncData',89,-5)]]), #90 ('_array',[(0,3),66]), #91 ('_struct',[[('m_recipientId',1,-6),('m_resources',91,-5)]]), #92 ('_struct',[[('m_chatMessage',21,-5)]]), #93 ('_int',[(-128,8)]), #94 ('_struct',[[('x',66,-3),('y',66,-2),('z',66,-1)]]), #95 ('_struct',[[('m_beacon',94,-12),('m_ally',94,-11),('m_autocast',94,-10),('m_targetUnitTag',5,-9),('m_targetUnitSnapshotUnitLink',71,-8),('m_targetUnitSnapshotUpkeepPlayerId',46,-7),('m_targetUnitSnapshotControlPlayerId',46,-6),('m_targetPoint',95,-5)]]), #96 ('_struct',[[('m_speed',10,-5)]]), #97 ('_struct',[[('m_delta',94,-5)]]), #98 ('_struct',[[('m_verb',21,-6),('m_arguments',21,-5)]]), #99 ('_struct',[[('m_alliance',5,-6),('m_control',5,-5)]]), #100 ('_struct',[[('m_unitTag',5,-5)]]), #101 ('_struct',[[('m_unitTag',5,-6),('m_flags',8,-5)]]), #102 ('_struct',[[('m_conversationId',66,-6),('m_replyId',66,-5)]]), #103 ('_struct',[[('m_purchaseItemId',66,-5)]]), #104 ('_struct',[[('m_difficultyLevel',66,-5)]]), #105 ('_choice',[(0,3),{0:('None',74),1:('Checked',24),2:('ValueChanged',5),3:('SelectionChanged',66),4:('TextChanged',22)}]), #106 ('_struct',[[('m_controlId',66,-7),('m_eventType',66,-6),('m_eventData',106,-5)]]), #107 ('_struct',[[('m_soundHash',5,-6),('m_length',5,-5)]]), #108 ('_struct',[[('m_soundHash',85,-2),('m_length',85,-1)]]), #109 ('_struct',[[('m_syncInfo',109,-5)]]), #110 ('_struct',[[('m_sound',5,-5)]]), #111 ('_struct',[[('m_transmissionId',66,-5)]]), #112 ('_struct',[[('x',71,-2),('y',71,-1)]]), #113 ('_optional',[71]), #114 ('_struct',[[('m_target',113,-8),('m_distance',114,-7),('m_pitch',114,-6),('m_yaw',114,-5)]]), #115 ('_int',[(0,1)]), #116 ('_struct',[[('m_skipType',116,-5)]]), #117 ('_int',[(0,11)]), #118 ('_struct',[[('x',118,-2),('y',118,-1)]]), #119 ('_struct',[[('m_button',5,-8),('m_down',24,-7),('m_posUI',119,-6),('m_posWorld',76,-5)]]), #120 ('_struct',[[('m_posUI',119,-6),('m_posWorld',76,-5)]]), #121 ('_struct',[[('m_soundtrack',5,-5)]]), #122 ('_struct',[[('m_planetId',66,-5)]]), #123 ('_struct',[[('m_key',94,-6),('m_flags',94,-5)]]), #124 ('_struct',[[('m_resources',91,-5)]]), #125 ('_struct',[[('m_fulfillRequestId',66,-5)]]), #126 ('_struct',[[('m_cancelRequestId',66,-5)]]), #127 ('_struct',[[('m_researchItemId',66,-5)]]), #128 ('_struct',[[('m_laggingPlayerId',1,-5)]]), #129 ('_struct',[[('m_mercenaryId',66,-5)]]), #130 ('_struct',[[('m_battleReportId',66,-6),('m_difficultyLevel',66,-5)]]), #131 ('_struct',[[('m_battleReportId',66,-5)]]), #132 ('_int',[(0,19)]), #133 ('_struct',[[('m_decrementMs',133,-5)]]), #134 ('_struct',[[('m_portraitId',66,-5)]]), #135 ('_struct',[[('m_functionName',13,-5)]]), #136 ('_struct',[[('m_result',66,-5)]]), #137 ('_struct',[[('m_gameMenuItemIndex',66,-5)]]), #138 ('_struct',[[('m_reason',94,-5)]]), #139 ('_struct',[[('m_purchaseCategoryId',66,-5)]]), #140 ('_struct',[[('m_button',71,-5)]]), #141 ('_struct',[[('m_recipient',17,-3),('m_string',22,-2)]]), #142 ('_struct',[[('m_recipient',17,-3),('m_point',67,-2)]]), #143 ('_struct',[[('m_progress',66,-2)]]), #144 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (64, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (56, 'NNet.Game.SBankFileEvent'), 8: (58, 'NNet.Game.SBankSectionEvent'), 9: (59, 'NNet.Game.SBankKeyEvent'), 10: (60, 'NNet.Game.SBankValueEvent'), 11: (62, 'NNet.Game.SBankSignatureEvent'), 12: (63, 'NNet.Game.SUserOptionsEvent'), 22: (65, 'NNet.Game.SSaveGameEvent'), 23: (64, 'NNet.Game.SSaveGameDoneEvent'), 25: (64, 'NNet.Game.SPlayerLeaveEvent'), 26: (69, 'NNet.Game.SGameCheatEvent'), 27: (80, 'NNet.Game.SCmdEvent'), 28: (87, 'NNet.Game.SSelectionDeltaEvent'), 29: (88, 'NNet.Game.SControlGroupUpdateEvent'), 30: (90, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (92, 'NNet.Game.SResourceTradeEvent'), 32: (93, 'NNet.Game.STriggerChatMessageEvent'), 33: (96, 'NNet.Game.SAICommunicateEvent'), 34: (97, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (98, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 37: (99, 'NNet.Game.SBroadcastCheatEvent'), 38: (100, 'NNet.Game.SAllianceEvent'), 39: (101, 'NNet.Game.SUnitClickEvent'), 40: (102, 'NNet.Game.SUnitHighlightEvent'), 41: (103, 'NNet.Game.STriggerReplySelectedEvent'), 44: (64, 'NNet.Game.STriggerSkippedEvent'), 45: (108, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (111, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (112, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (112, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (115, 'NNet.Game.SCameraUpdateEvent'), 50: (64, 'NNet.Game.STriggerAbortMissionEvent'), 51: (104, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (64, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (105, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (64, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (107, 'NNet.Game.STriggerDialogControlEvent'), 56: (110, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (117, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (120, 'NNet.Game.STriggerMouseClickedEvent'), 59: (121, 'NNet.Game.STriggerMouseMovedEvent'), 63: (64, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (122, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (123, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (124, 'NNet.Game.STriggerKeyPressedEvent'), 67: (136, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (64, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (64, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (125, 'NNet.Game.SResourceRequestEvent'), 71: (126, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (127, 'NNet.Game.SResourceRequestCancelEvent'), 73: (64, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (64, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (128, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (129, 'NNet.Game.SLagMessageEvent'), 77: (64, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (64, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (130, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (64, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (64, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (131, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (132, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (132, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (105, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (64, 'NNet.Game.STriggerMovieStartedEvent'), 87: (64, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (134, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (135, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (137, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (138, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (139, 'NNet.Game.STriggerCameraMoveEvent'), 93: (104, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (140, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (141, 'NNet.Game.STriggerButtonPressedEvent'), 96: (64, 'NNet.Game.STriggerGameCreditsFinishedEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (142, 'NNet.Game.SChatMessage'), 1: (143, 'NNet.Game.SPingMessage'), 2: (144, 'NNet.Game.SLoadingProgressMessage'), 3: (64, 'NNet.Game.SServerPingMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = None # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 6 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = None # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 11 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 30 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 55 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol19595.py
protocol19595.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,13),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol71061.py
protocol71061.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4)]]), #14 ('_fourcc',[]), #15 ('_blob',[(0,7)]), #16 ('_int',[(0,64)]), #17 ('_struct',[[('m_region',10,0),('m_programId',15,1),('m_realm',6,2),('m_name',16,3),('m_id',17,4)]]), #18 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #19 ('_int',[(0,2)]), #20 ('_optional',[10]), #21 ('_struct',[[('m_name',9,0),('m_toon',18,1),('m_race',9,2),('m_color',19,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',20,7),('m_result',20,8),('m_workingSetSlotId',21,9)]]), #22 ('_array',[(0,5),22]), #23 ('_optional',[23]), #24 ('_blob',[(0,10)]), #25 ('_blob',[(0,11)]), #26 ('_struct',[[('m_file',26,0)]]), #27 ('_optional',[13]), #28 ('_int',[(-9223372036854775808,64)]), #29 ('_blob',[(0,12)]), #30 ('_blob',[(40,0)]), #31 ('_array',[(0,6),31]), #32 ('_optional',[32]), #33 ('_array',[(0,6),26]), #34 ('_optional',[34]), #35 ('_struct',[[('m_playerList',24,0),('m_title',25,1),('m_difficulty',9,2),('m_thumbnail',27,3),('m_isBlizzardMap',13,4),('m_restartAsTransitionMap',28,16),('m_timeUTC',29,5),('m_timeLocalOffset',29,6),('m_description',30,7),('m_imageFilePath',26,8),('m_campaignIndex',10,15),('m_mapFileName',26,9),('m_cacheHandles',33,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',35,14)]]), #36 ('_optional',[9]), #37 ('_optional',[31]), #38 ('_optional',[6]), #39 ('_struct',[[('m_race',21,-1)]]), #40 ('_struct',[[('m_team',21,-1)]]), #41 ('_struct',[[('m_name',9,-13),('m_clanTag',37,-12),('m_clanLogo',38,-11),('m_highestLeague',21,-10),('m_combinedRaceLevels',39,-9),('m_randomSeed',6,-8),('m_racePreference',40,-7),('m_teamPreference',41,-6),('m_testMap',13,-5),('m_testAuto',13,-4),('m_examine',13,-3),('m_customInterface',13,-2),('m_observe',20,-1)]]), #42 ('_array',[(0,5),42]), #43 ('_struct',[[('m_lockTeams',13,-12),('m_teamsTogether',13,-11),('m_advancedSharedControl',13,-10),('m_randomRaces',13,-9),('m_battleNet',13,-8),('m_amm',13,-7),('m_competitive',13,-6),('m_noVictoryOrDefeat',13,-5),('m_fog',20,-4),('m_observers',20,-3),('m_userDifficulty',20,-2),('m_clientDebugFlags',17,-1)]]), #44 ('_int',[(1,4)]), #45 ('_int',[(1,8)]), #46 ('_bitarray',[(0,6)]), #47 ('_bitarray',[(0,8)]), #48 ('_bitarray',[(0,2)]), #49 ('_bitarray',[(0,7)]), #50 ('_struct',[[('m_allowedColors',47,-6),('m_allowedRaces',48,-5),('m_allowedDifficulty',47,-4),('m_allowedControls',48,-3),('m_allowedObserveTypes',49,-2),('m_allowedAIBuilds',50,-1)]]), #51 ('_array',[(0,5),51]), #52 ('_struct',[[('m_randomValue',6,-26),('m_gameCacheName',25,-25),('m_gameOptions',44,-24),('m_gameSpeed',12,-23),('m_gameType',12,-22),('m_maxUsers',2,-21),('m_maxObservers',2,-20),('m_maxPlayers',2,-19),('m_maxTeams',45,-18),('m_maxColors',3,-17),('m_maxRaces',46,-16),('m_maxControls',10,-15),('m_mapSizeX',10,-14),('m_mapSizeY',10,-13),('m_mapFileSyncChecksum',6,-12),('m_mapFileName',26,-11),('m_mapAuthorName',9,-10),('m_modFileSyncChecksum',6,-9),('m_slotDescriptions',52,-8),('m_defaultDifficulty',3,-7),('m_defaultAIBuild',0,-6),('m_cacheHandles',32,-5),('m_hasExtensionMod',13,-4),('m_isBlizzardMap',13,-3),('m_isPremadeFFA',13,-2),('m_isCoopMode',13,-1)]]), #53 ('_optional',[1]), #54 ('_optional',[2]), #55 ('_struct',[[('m_color',55,-1)]]), #56 ('_array',[(0,6),6]), #57 ('_array',[(0,9),6]), #58 ('_struct',[[('m_control',10,-13),('m_userId',54,-12),('m_teamId',1,-11),('m_colorPref',56,-10),('m_racePref',40,-9),('m_difficulty',3,-8),('m_aiBuild',0,-7),('m_handicap',0,-6),('m_observe',20,-5),('m_workingSetSlotId',21,-4),('m_rewards',57,-3),('m_toonHandle',16,-2),('m_licenses',58,-1)]]), #59 ('_array',[(0,5),59]), #60 ('_struct',[[('m_phase',12,-10),('m_maxUsers',2,-9),('m_maxObservers',2,-8),('m_slots',60,-7),('m_randomSeed',6,-6),('m_hostUserId',54,-5),('m_isSinglePlayer',13,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',0,-1)]]), #61 ('_struct',[[('m_userInitialData',43,-3),('m_gameDescription',53,-2),('m_lobbyState',61,-1)]]), #62 ('_struct',[[('m_syncLobbyState',62,-1)]]), #63 ('_struct',[[('m_name',16,-6)]]), #64 ('_blob',[(0,6)]), #65 ('_struct',[[('m_name',65,-6)]]), #66 ('_struct',[[('m_name',65,-8),('m_type',6,-7),('m_data',16,-6)]]), #67 ('_struct',[[('m_type',6,-8),('m_name',65,-7),('m_data',30,-6)]]), #68 ('_array',[(0,5),10]), #69 ('_struct',[[('m_signature',69,-7),('m_toonHandle',16,-6)]]), #70 ('_struct',[[('m_gameFullyDownloaded',13,-13),('m_developmentCheatsEnabled',13,-12),('m_multiplayerCheatsEnabled',13,-11),('m_syncChecksummingEnabled',13,-10),('m_isMapToMapTransition',13,-9),('m_startingRally',13,-8),('m_debugPauseEnabled',13,-7),('m_baseBuildNum',6,-6)]]), #71 ('_struct',[[]]), #72 ('_int',[(0,16)]), #73 ('_struct',[[('x',73,-2),('y',73,-1)]]), #74 ('_struct',[[('m_which',12,-7),('m_target',74,-6)]]), #75 ('_struct',[[('m_fileName',26,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',25,-6)]]), #76 ('_int',[(-2147483648,32)]), #77 ('_struct',[[('x',77,-2),('y',77,-1)]]), #78 ('_struct',[[('m_point',78,-4),('m_time',77,-3),('m_verb',25,-2),('m_arguments',25,-1)]]), #79 ('_struct',[[('m_data',79,-6)]]), #80 ('_int',[(0,20)]), #81 ('_struct',[[('m_abilLink',73,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',21,-1)]]), #82 ('_optional',[82]), #83 ('_null',[]), #84 ('_struct',[[('x',81,-3),('y',81,-2),('z',77,-1)]]), #85 ('_struct',[[('m_targetUnitFlags',10,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',73,-4),('m_snapshotControlPlayerId',54,-3),('m_snapshotUpkeepPlayerId',54,-2),('m_snapshotPoint',85,-1)]]), #86 ('_choice',[(0,2),{0:('None',84),1:('TargetPoint',85),2:('TargetUnit',86),3:('Data',6)}]), #87 ('_struct',[[('m_cmdFlags',81,-9),('m_abil',83,-8),('m_data',87,-7),('m_otherUnit',39,-6)]]), #88 ('_int',[(0,9)]), #89 ('_bitarray',[(0,9)]), #90 ('_array',[(0,9),89]), #91 ('_choice',[(0,2),{0:('None',84),1:('Mask',90),2:('OneIndices',91),3:('ZeroIndices',91)}]), #92 ('_struct',[[('m_unitLink',73,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',89,-1)]]), #93 ('_array',[(0,9),93]), #94 ('_struct',[[('m_subgroupIndex',89,-4),('m_removeMask',92,-3),('m_addSubgroups',94,-2),('m_addUnitTags',58,-1)]]), #95 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',95,-6)]]), #96 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',20,-7),('m_mask',92,-6)]]), #97 ('_struct',[[('m_count',89,-6),('m_subgroupCount',89,-5),('m_activeSubgroupIndex',89,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #98 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',98,-6)]]), #99 ('_array',[(0,3),77]), #100 ('_struct',[[('m_recipientId',1,-7),('m_resources',100,-6)]]), #101 ('_struct',[[('m_chatMessage',25,-6)]]), #102 ('_int',[(-128,8)]), #103 ('_struct',[[('x',77,-3),('y',77,-2),('z',77,-1)]]), #104 ('_struct',[[('m_beacon',103,-14),('m_ally',103,-13),('m_flags',103,-12),('m_build',103,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',73,-9),('m_targetUnitSnapshotUpkeepPlayerId',103,-8),('m_targetUnitSnapshotControlPlayerId',103,-7),('m_targetPoint',104,-6)]]), #105 ('_struct',[[('m_speed',12,-6)]]), #106 ('_struct',[[('m_delta',103,-6)]]), #107 ('_struct',[[('m_point',78,-8),('m_unit',6,-7),('m_pingedMinimap',13,-6)]]), #108 ('_struct',[[('m_verb',25,-7),('m_arguments',25,-6)]]), #109 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #110 ('_struct',[[('m_unitTag',6,-6)]]), #111 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #112 ('_struct',[[('m_conversationId',77,-7),('m_replyId',77,-6)]]), #113 ('_optional',[16]), #114 ('_struct',[[('m_gameUserId',1,-6),('m_observe',20,-5),('m_name',9,-4),('m_toonHandle',114,-3),('m_clanTag',37,-2),('m_clanLogo',38,-1)]]), #115 ('_array',[(0,5),115]), #116 ('_int',[(0,1)]), #117 ('_struct',[[('m_userInfos',116,-7),('m_method',117,-6)]]), #118 ('_struct',[[('m_purchaseItemId',77,-6)]]), #119 ('_struct',[[('m_difficultyLevel',77,-6)]]), #120 ('_choice',[(0,3),{0:('None',84),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',77),4:('TextChanged',26),5:('MouseButton',6)}]), #121 ('_struct',[[('m_controlId',77,-8),('m_eventType',77,-7),('m_eventData',121,-6)]]), #122 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #123 ('_array',[(0,7),6]), #124 ('_struct',[[('m_soundHash',124,-2),('m_length',124,-1)]]), #125 ('_struct',[[('m_syncInfo',125,-6)]]), #126 ('_struct',[[('m_sound',6,-6)]]), #127 ('_struct',[[('m_transmissionId',77,-7),('m_thread',6,-6)]]), #128 ('_struct',[[('m_transmissionId',77,-6)]]), #129 ('_optional',[74]), #130 ('_optional',[73]), #131 ('_optional',[103]), #132 ('_struct',[[('m_target',130,-10),('m_distance',131,-9),('m_pitch',131,-8),('m_yaw',131,-7),('m_reason',132,-6)]]), #133 ('_struct',[[('m_skipType',117,-6)]]), #134 ('_int',[(0,11)]), #135 ('_struct',[[('x',135,-2),('y',135,-1)]]), #136 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',136,-8),('m_posWorld',85,-7),('m_flags',103,-6)]]), #137 ('_struct',[[('m_posUI',136,-8),('m_posWorld',85,-7),('m_flags',103,-6)]]), #138 ('_struct',[[('m_achievementLink',73,-6)]]), #139 ('_struct',[[('m_abilLink',73,-8),('m_abilCmdIndex',2,-7),('m_state',103,-6)]]), #140 ('_struct',[[('m_soundtrack',6,-6)]]), #141 ('_struct',[[('m_planetId',77,-6)]]), #142 ('_struct',[[('m_key',103,-7),('m_flags',103,-6)]]), #143 ('_struct',[[('m_resources',100,-6)]]), #144 ('_struct',[[('m_fulfillRequestId',77,-6)]]), #145 ('_struct',[[('m_cancelRequestId',77,-6)]]), #146 ('_struct',[[('m_researchItemId',77,-6)]]), #147 ('_struct',[[('m_mercenaryId',77,-6)]]), #148 ('_struct',[[('m_battleReportId',77,-7),('m_difficultyLevel',77,-6)]]), #149 ('_struct',[[('m_battleReportId',77,-6)]]), #150 ('_int',[(0,19)]), #151 ('_struct',[[('m_decrementMs',151,-6)]]), #152 ('_struct',[[('m_portraitId',77,-6)]]), #153 ('_struct',[[('m_functionName',16,-6)]]), #154 ('_struct',[[('m_result',77,-6)]]), #155 ('_struct',[[('m_gameMenuItemIndex',77,-6)]]), #156 ('_struct',[[('m_purchaseCategoryId',77,-6)]]), #157 ('_struct',[[('m_button',73,-6)]]), #158 ('_struct',[[('m_cutsceneId',77,-7),('m_bookmarkName',16,-6)]]), #159 ('_struct',[[('m_cutsceneId',77,-6)]]), #160 ('_struct',[[('m_cutsceneId',77,-8),('m_conversationLine',16,-7),('m_altConversationLine',16,-6)]]), #161 ('_struct',[[('m_cutsceneId',77,-7),('m_conversationLine',16,-6)]]), #162 ('_struct',[[('m_observe',20,-10),('m_name',9,-9),('m_toonHandle',114,-8),('m_clanTag',37,-7),('m_clanLogo',38,-6)]]), #163 ('_struct',[[('m_recipient',12,-3),('m_string',26,-2)]]), #164 ('_struct',[[('m_recipient',12,-3),('m_point',78,-2)]]), #165 ('_struct',[[('m_progress',77,-2)]]), #166 ('_struct',[[('m_scoreValueMineralsCurrent',77,0),('m_scoreValueVespeneCurrent',77,1),('m_scoreValueMineralsCollectionRate',77,2),('m_scoreValueVespeneCollectionRate',77,3),('m_scoreValueWorkersActiveCount',77,4),('m_scoreValueMineralsUsedInProgressArmy',77,5),('m_scoreValueMineralsUsedInProgressEconomy',77,6),('m_scoreValueMineralsUsedInProgressTechnology',77,7),('m_scoreValueVespeneUsedInProgressArmy',77,8),('m_scoreValueVespeneUsedInProgressEconomy',77,9),('m_scoreValueVespeneUsedInProgressTechnology',77,10),('m_scoreValueMineralsUsedCurrentArmy',77,11),('m_scoreValueMineralsUsedCurrentEconomy',77,12),('m_scoreValueMineralsUsedCurrentTechnology',77,13),('m_scoreValueVespeneUsedCurrentArmy',77,14),('m_scoreValueVespeneUsedCurrentEconomy',77,15),('m_scoreValueVespeneUsedCurrentTechnology',77,16),('m_scoreValueMineralsLostArmy',77,17),('m_scoreValueMineralsLostEconomy',77,18),('m_scoreValueMineralsLostTechnology',77,19),('m_scoreValueVespeneLostArmy',77,20),('m_scoreValueVespeneLostEconomy',77,21),('m_scoreValueVespeneLostTechnology',77,22),('m_scoreValueMineralsKilledArmy',77,23),('m_scoreValueMineralsKilledEconomy',77,24),('m_scoreValueMineralsKilledTechnology',77,25),('m_scoreValueVespeneKilledArmy',77,26),('m_scoreValueVespeneKilledEconomy',77,27),('m_scoreValueVespeneKilledTechnology',77,28),('m_scoreValueFoodUsed',77,29),('m_scoreValueFoodMade',77,30),('m_scoreValueMineralsUsedActiveForces',77,31),('m_scoreValueVespeneUsedActiveForces',77,32),('m_scoreValueMineralsFriendlyFireArmy',77,33),('m_scoreValueMineralsFriendlyFireEconomy',77,34),('m_scoreValueMineralsFriendlyFireTechnology',77,35),('m_scoreValueVespeneFriendlyFireArmy',77,36),('m_scoreValueVespeneFriendlyFireEconomy',77,37),('m_scoreValueVespeneFriendlyFireTechnology',77,38)]]), #167 ('_struct',[[('m_playerId',1,0),('m_stats',167,1)]]), #168 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',25,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #169 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',54,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',39,5),('m_killerUnitTagRecycle',39,6)]]), #170 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #171 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',25,2)]]), #172 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',25,1),('m_count',77,2)]]), #173 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #174 ('_array',[(0,10),77]), #175 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',175,1)]]), #176 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',39,2),('m_slotId',39,3)]]), #177 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (72, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (71, 'NNet.Game.SUserOptionsEvent'), 9: (64, 'NNet.Game.SBankFileEvent'), 10: (66, 'NNet.Game.SBankSectionEvent'), 11: (67, 'NNet.Game.SBankKeyEvent'), 12: (68, 'NNet.Game.SBankValueEvent'), 13: (70, 'NNet.Game.SBankSignatureEvent'), 14: (75, 'NNet.Game.SCameraSaveEvent'), 21: (76, 'NNet.Game.SSaveGameEvent'), 22: (72, 'NNet.Game.SSaveGameDoneEvent'), 23: (72, 'NNet.Game.SLoadGameDoneEvent'), 26: (80, 'NNet.Game.SGameCheatEvent'), 27: (88, 'NNet.Game.SCmdEvent'), 28: (96, 'NNet.Game.SSelectionDeltaEvent'), 29: (97, 'NNet.Game.SControlGroupUpdateEvent'), 30: (99, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (101, 'NNet.Game.SResourceTradeEvent'), 32: (102, 'NNet.Game.STriggerChatMessageEvent'), 33: (105, 'NNet.Game.SAICommunicateEvent'), 34: (106, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (107, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (108, 'NNet.Game.STriggerPingEvent'), 37: (109, 'NNet.Game.SBroadcastCheatEvent'), 38: (110, 'NNet.Game.SAllianceEvent'), 39: (111, 'NNet.Game.SUnitClickEvent'), 40: (112, 'NNet.Game.SUnitHighlightEvent'), 41: (113, 'NNet.Game.STriggerReplySelectedEvent'), 43: (118, 'NNet.Game.SHijackReplayGameEvent'), 44: (72, 'NNet.Game.STriggerSkippedEvent'), 45: (123, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (127, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (128, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (129, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (133, 'NNet.Game.SCameraUpdateEvent'), 50: (72, 'NNet.Game.STriggerAbortMissionEvent'), 51: (119, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (72, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (120, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (72, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (122, 'NNet.Game.STriggerDialogControlEvent'), 56: (126, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (134, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (137, 'NNet.Game.STriggerMouseClickedEvent'), 59: (138, 'NNet.Game.STriggerMouseMovedEvent'), 60: (139, 'NNet.Game.SAchievementAwardedEvent'), 62: (140, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (72, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (141, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (142, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (143, 'NNet.Game.STriggerKeyPressedEvent'), 67: (154, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (72, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (72, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (144, 'NNet.Game.SResourceRequestEvent'), 71: (145, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (146, 'NNet.Game.SResourceRequestCancelEvent'), 73: (72, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (72, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (147, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 77: (72, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (72, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (148, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (72, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (72, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (149, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (150, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (150, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (120, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (72, 'NNet.Game.STriggerMovieStartedEvent'), 87: (72, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (152, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (153, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (155, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (156, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 93: (119, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (157, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (158, 'NNet.Game.STriggerButtonPressedEvent'), 96: (72, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (159, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (160, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (161, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (162, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (72, 'NNet.Game.SGameUserLeaveEvent'), 102: (163, 'NNet.Game.SGameUserJoinEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (164, 'NNet.Game.SChatMessage'), 1: (165, 'NNet.Game.SPingMessage'), 2: (166, 'NNet.Game.SLoadingProgressMessage'), 3: (72, 'NNet.Game.SServerPingMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (168, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (169, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (170, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (171, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (172, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (173, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (169, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (174, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (176, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (177, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 14 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 36 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 63 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol28667.py
protocol28667.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',6,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,16),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-32),('m_userId',60,-31),('m_teamId',1,-30),('m_colorPref',62,-29),('m_racePref',44,-28),('m_difficulty',3,-27),('m_aiBuild',10,-26),('m_handicap',6,-25),('m_observe',24,-24),('m_logoIndex',6,-23),('m_hero',46,-22),('m_skin',46,-21),('m_mount',46,-20),('m_artifacts',63,-19),('m_workingSetSlotId',25,-18),('m_rewards',64,-17),('m_toonHandle',20,-16),('m_licenses',65,-15),('m_tandemLeaderId',60,-14),('m_commander',46,-13),('m_commanderLevel',6,-12),('m_hasSilencePenalty',13,-11),('m_tandemId',60,-10),('m_commanderMasteryLevel',6,-9),('m_commanderMasteryTalents',66,-8),('m_trophyId',6,-7),('m_rewardOverrides',68,-6),('m_brutalPlusDifficulty',6,-5),('m_retryMutationIndexes',66,-4),('m_aCEnemyRace',6,-3),('m_aCEnemyWaveType',6,-2),('m_selectedCommanderPrestige',6,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,27)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_array',[(0,9),6]), #107 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',107,-1)]]), #108 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',108,-6)]]), #109 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #110 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #111 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',111,-6)]]), #112 ('_array',[(0,3),47]), #113 ('_struct',[[('m_recipientId',1,-7),('m_resources',113,-6)]]), #114 ('_struct',[[('m_chatMessage',29,-6)]]), #115 ('_int',[(-128,8)]), #116 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #117 ('_struct',[[('m_beacon',116,-14),('m_ally',116,-13),('m_flags',116,-12),('m_build',116,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',116,-8),('m_targetUnitSnapshotControlPlayerId',116,-7),('m_targetPoint',117,-6)]]), #118 ('_struct',[[('m_speed',12,-6)]]), #119 ('_struct',[[('m_delta',116,-6)]]), #120 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #121 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #122 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-6)]]), #124 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #125 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #126 ('_optional',[20]), #127 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',127,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #128 ('_array',[(0,5),128]), #129 ('_int',[(0,1)]), #130 ('_struct',[[('m_userInfos',129,-7),('m_method',130,-6)]]), #131 ('_struct',[[('m_purchaseItemId',47,-6)]]), #132 ('_struct',[[('m_difficultyLevel',47,-6)]]), #133 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #134 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',134,-6)]]), #135 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #136 ('_array',[(0,7),6]), #137 ('_struct',[[('m_soundHash',137,-2),('m_length',137,-1)]]), #138 ('_struct',[[('m_syncInfo',138,-6)]]), #139 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #140 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #141 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #142 ('_struct',[[('m_sound',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #144 ('_struct',[[('m_transmissionId',47,-6)]]), #145 ('_optional',[84]), #146 ('_optional',[83]), #147 ('_optional',[116]), #148 ('_struct',[[('m_target',146,-11),('m_distance',147,-10),('m_pitch',147,-9),('m_yaw',147,-8),('m_reason',148,-7),('m_follow',13,-6)]]), #149 ('_struct',[[('m_skipType',130,-6)]]), #150 ('_int',[(0,11)]), #151 ('_struct',[[('x',151,-2),('y',151,-1)]]), #152 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #153 ('_struct',[[('m_posUI',152,-8),('m_posWorld',96,-7),('m_flags',116,-6)]]), #154 ('_struct',[[('m_achievementLink',83,-6)]]), #155 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #156 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',116,-6)]]), #157 ('_struct',[[('m_soundtrack',6,-6)]]), #158 ('_struct',[[('m_planetId',47,-6)]]), #159 ('_struct',[[('m_key',116,-7),('m_flags',116,-6)]]), #160 ('_struct',[[('m_resources',113,-6)]]), #161 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #162 ('_struct',[[('m_cancelRequestId',47,-6)]]), #163 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #164 ('_struct',[[('m_researchItemId',47,-6)]]), #165 ('_struct',[[('m_mercenaryId',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #167 ('_struct',[[('m_battleReportId',47,-6)]]), #168 ('_struct',[[('m_decrementSeconds',47,-6)]]), #169 ('_struct',[[('m_portraitId',47,-6)]]), #170 ('_struct',[[('m_functionName',20,-6)]]), #171 ('_struct',[[('m_result',47,-6)]]), #172 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #173 ('_int',[(-32768,16)]), #174 ('_struct',[[('m_wheelSpin',174,-7),('m_flags',116,-6)]]), #175 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #176 ('_struct',[[('m_button',83,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #180 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #181 ('_struct',[[('m_leaveReason',1,-6)]]), #182 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',127,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #183 ('_optional',[99]), #184 ('_struct',[[('m_state',24,-7),('m_sequence',184,-6)]]), #185 ('_struct',[[('m_target',96,-6)]]), #186 ('_struct',[[('m_target',97,-6)]]), #187 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #188 ('_struct',[[('m_index',6,-6)]]), #189 ('_struct',[[('m_shown',13,-6)]]), #190 ('_struct',[[('m_syncTime',6,-6)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #192 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #193 ('_struct',[[('m_progress',47,-2)]]), #194 ('_struct',[[('m_status',24,-2)]]), #195 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #196 ('_struct',[[('m_playerId',1,0),('m_stats',196,1)]]), #197 ('_optional',[29]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',198,9)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #202 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #204 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #205 ('_array',[(0,10),47]), #206 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',206,1)]]), #207 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #208 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (109, 'NNet.Game.SSelectionDeltaEvent'), 29: (110, 'NNet.Game.SControlGroupUpdateEvent'), 30: (112, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (114, 'NNet.Game.SResourceTradeEvent'), 32: (115, 'NNet.Game.STriggerChatMessageEvent'), 33: (118, 'NNet.Game.SAICommunicateEvent'), 34: (119, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (120, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (121, 'NNet.Game.STriggerPingEvent'), 37: (122, 'NNet.Game.SBroadcastCheatEvent'), 38: (123, 'NNet.Game.SAllianceEvent'), 39: (124, 'NNet.Game.SUnitClickEvent'), 40: (125, 'NNet.Game.SUnitHighlightEvent'), 41: (126, 'NNet.Game.STriggerReplySelectedEvent'), 43: (131, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (136, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (143, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (144, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (145, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (149, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (132, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (133, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (135, 'NNet.Game.STriggerDialogControlEvent'), 56: (139, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (150, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (153, 'NNet.Game.STriggerMouseClickedEvent'), 59: (154, 'NNet.Game.STriggerMouseMovedEvent'), 60: (155, 'NNet.Game.SAchievementAwardedEvent'), 61: (156, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (157, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (158, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (159, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (160, 'NNet.Game.STriggerKeyPressedEvent'), 67: (171, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (161, 'NNet.Game.SResourceRequestEvent'), 71: (162, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (163, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (165, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (164, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (166, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (167, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (168, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (168, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (133, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (169, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (170, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (172, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (173, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (175, 'NNet.Game.STriggerMouseWheelEvent'), 93: (132, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (176, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (177, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (178, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (179, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (180, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (181, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (182, 'NNet.Game.SGameUserLeaveEvent'), 102: (183, 'NNet.Game.SGameUserJoinEvent'), 103: (185, 'NNet.Game.SCommandManagerStateEvent'), 104: (186, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (187, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (140, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (141, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (142, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (188, 'NNet.Game.SCatalogModifyEvent'), 110: (189, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (190, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (191, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (191, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (191, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (191, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (192, 'NNet.Game.SChatMessage'), 1: (193, 'NNet.Game.SPingMessage'), 2: (194, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (195, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (197, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (199, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (200, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (201, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (202, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (203, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (204, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (205, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (207, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (208, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol80949.py
protocol80949.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,9),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,26)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',65,-1)]]), #107 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',107,-6)]]), #108 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #109 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #110 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',110,-6)]]), #111 ('_array',[(0,3),47]), #112 ('_struct',[[('m_recipientId',1,-7),('m_resources',112,-6)]]), #113 ('_struct',[[('m_chatMessage',29,-6)]]), #114 ('_int',[(-128,8)]), #115 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #116 ('_struct',[[('m_beacon',115,-14),('m_ally',115,-13),('m_flags',115,-12),('m_build',115,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',115,-8),('m_targetUnitSnapshotControlPlayerId',115,-7),('m_targetPoint',116,-6)]]), #117 ('_struct',[[('m_speed',12,-6)]]), #118 ('_struct',[[('m_delta',115,-6)]]), #119 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #120 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #121 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #122 ('_struct',[[('m_unitTag',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #124 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #125 ('_optional',[20]), #126 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',126,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #127 ('_array',[(0,5),127]), #128 ('_int',[(0,1)]), #129 ('_struct',[[('m_userInfos',128,-7),('m_method',129,-6)]]), #130 ('_struct',[[('m_purchaseItemId',47,-6)]]), #131 ('_struct',[[('m_difficultyLevel',47,-6)]]), #132 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #133 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',133,-6)]]), #134 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #135 ('_array',[(0,7),6]), #136 ('_struct',[[('m_soundHash',136,-2),('m_length',136,-1)]]), #137 ('_struct',[[('m_syncInfo',137,-6)]]), #138 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #139 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #140 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #141 ('_struct',[[('m_sound',6,-6)]]), #142 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-6)]]), #144 ('_optional',[84]), #145 ('_optional',[83]), #146 ('_optional',[115]), #147 ('_struct',[[('m_target',145,-11),('m_distance',146,-10),('m_pitch',146,-9),('m_yaw',146,-8),('m_reason',147,-7),('m_follow',13,-6)]]), #148 ('_struct',[[('m_skipType',129,-6)]]), #149 ('_int',[(0,11)]), #150 ('_struct',[[('x',150,-2),('y',150,-1)]]), #151 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',151,-8),('m_posWorld',96,-7),('m_flags',115,-6)]]), #152 ('_struct',[[('m_posUI',151,-8),('m_posWorld',96,-7),('m_flags',115,-6)]]), #153 ('_struct',[[('m_achievementLink',83,-6)]]), #154 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #155 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',115,-6)]]), #156 ('_struct',[[('m_soundtrack',6,-6)]]), #157 ('_struct',[[('m_planetId',47,-6)]]), #158 ('_struct',[[('m_key',115,-7),('m_flags',115,-6)]]), #159 ('_struct',[[('m_resources',112,-6)]]), #160 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #161 ('_struct',[[('m_cancelRequestId',47,-6)]]), #162 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #163 ('_struct',[[('m_researchItemId',47,-6)]]), #164 ('_struct',[[('m_mercenaryId',47,-6)]]), #165 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-6)]]), #167 ('_struct',[[('m_decrementSeconds',47,-6)]]), #168 ('_struct',[[('m_portraitId',47,-6)]]), #169 ('_struct',[[('m_functionName',20,-6)]]), #170 ('_struct',[[('m_result',47,-6)]]), #171 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #172 ('_int',[(-32768,16)]), #173 ('_struct',[[('m_wheelSpin',173,-7),('m_flags',115,-6)]]), #174 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #175 ('_struct',[[('m_button',83,-6)]]), #176 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #180 ('_struct',[[('m_leaveReason',1,-6)]]), #181 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',126,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #182 ('_optional',[99]), #183 ('_struct',[[('m_state',24,-7),('m_sequence',183,-6)]]), #184 ('_struct',[[('m_target',96,-6)]]), #185 ('_struct',[[('m_target',97,-6)]]), #186 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #187 ('_struct',[[('m_index',6,-6)]]), #188 ('_struct',[[('m_shown',13,-6)]]), #189 ('_struct',[[('m_syncTime',6,-6)]]), #190 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #191 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #192 ('_struct',[[('m_progress',47,-2)]]), #193 ('_struct',[[('m_status',24,-2)]]), #194 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #195 ('_struct',[[('m_playerId',1,0),('m_stats',195,1)]]), #196 ('_optional',[29]), #197 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',197,9)]]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #200 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #201 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #202 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #203 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #204 ('_array',[(0,10),47]), #205 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',205,1)]]), #206 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #207 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (108, 'NNet.Game.SSelectionDeltaEvent'), 29: (109, 'NNet.Game.SControlGroupUpdateEvent'), 30: (111, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (113, 'NNet.Game.SResourceTradeEvent'), 32: (114, 'NNet.Game.STriggerChatMessageEvent'), 33: (117, 'NNet.Game.SAICommunicateEvent'), 34: (118, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (119, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (120, 'NNet.Game.STriggerPingEvent'), 37: (121, 'NNet.Game.SBroadcastCheatEvent'), 38: (122, 'NNet.Game.SAllianceEvent'), 39: (123, 'NNet.Game.SUnitClickEvent'), 40: (124, 'NNet.Game.SUnitHighlightEvent'), 41: (125, 'NNet.Game.STriggerReplySelectedEvent'), 43: (130, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (135, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (142, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (143, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (144, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (148, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (131, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (132, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (134, 'NNet.Game.STriggerDialogControlEvent'), 56: (138, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (149, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (152, 'NNet.Game.STriggerMouseClickedEvent'), 59: (153, 'NNet.Game.STriggerMouseMovedEvent'), 60: (154, 'NNet.Game.SAchievementAwardedEvent'), 61: (155, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (156, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (157, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (158, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (159, 'NNet.Game.STriggerKeyPressedEvent'), 67: (170, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (160, 'NNet.Game.SResourceRequestEvent'), 71: (161, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (162, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (164, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (163, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (165, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (166, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (167, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (167, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (132, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (168, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (169, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (171, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (172, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (174, 'NNet.Game.STriggerMouseWheelEvent'), 93: (131, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (175, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (176, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (177, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (178, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (179, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (180, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (181, 'NNet.Game.SGameUserLeaveEvent'), 102: (182, 'NNet.Game.SGameUserJoinEvent'), 103: (184, 'NNet.Game.SCommandManagerStateEvent'), 104: (185, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (186, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (139, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (140, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (141, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (187, 'NNet.Game.SCatalogModifyEvent'), 110: (188, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (189, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), 116: (190, 'NNet.Game.SSetSyncLoadingTimeEvent'), 117: (190, 'NNet.Game.SSetSyncPlayingTimeEvent'), 118: (190, 'NNet.Game.SPeerSetSyncLoadingTimeEvent'), 119: (190, 'NNet.Game.SPeerSetSyncPlayingTimeEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (191, 'NNet.Game.SChatMessage'), 1: (192, 'NNet.Game.SPingMessage'), 2: (193, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (194, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (196, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (198, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (199, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (200, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (201, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (202, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (203, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (204, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (206, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (207, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol69232.py
protocol69232.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_array',[(16,0),10]), #14 ('_optional',[14]), #15 ('_blob',[(16,0)]), #16 ('_struct',[[('m_dataDeprecated',15,0),('m_data',16,1)]]), #17 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4),('m_ngdpRootKey',17,5),('m_dataBuildNum',6,6),('m_replayCompatibilityHash',17,7),('m_ngdpRootKeyIsDevData',13,8)]]), #18 ('_fourcc',[]), #19 ('_blob',[(0,7)]), #20 ('_int',[(0,64)]), #21 ('_struct',[[('m_region',10,0),('m_programId',19,1),('m_realm',6,2),('m_name',20,3),('m_id',21,4)]]), #22 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #23 ('_int',[(0,2)]), #24 ('_optional',[10]), #25 ('_struct',[[('m_name',9,0),('m_toon',22,1),('m_race',9,2),('m_color',23,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',24,7),('m_result',24,8),('m_workingSetSlotId',25,9),('m_hero',9,10)]]), #26 ('_array',[(0,5),26]), #27 ('_optional',[27]), #28 ('_blob',[(0,10)]), #29 ('_blob',[(0,11)]), #30 ('_struct',[[('m_file',30,0)]]), #31 ('_int',[(-9223372036854775808,64)]), #32 ('_optional',[13]), #33 ('_blob',[(0,12)]), #34 ('_blob',[(40,0)]), #35 ('_array',[(0,6),35]), #36 ('_optional',[36]), #37 ('_array',[(0,6),30]), #38 ('_optional',[38]), #39 ('_struct',[[('m_playerList',28,0),('m_title',29,1),('m_difficulty',9,2),('m_thumbnail',31,3),('m_isBlizzardMap',13,4),('m_timeUTC',32,5),('m_timeLocalOffset',32,6),('m_restartAsTransitionMap',33,16),('m_disableRecoverGame',13,17),('m_description',34,7),('m_imageFilePath',30,8),('m_campaignIndex',10,15),('m_mapFileName',30,9),('m_cacheHandles',37,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',39,14)]]), #40 ('_optional',[9]), #41 ('_optional',[35]), #42 ('_optional',[6]), #43 ('_struct',[[('m_race',25,-1)]]), #44 ('_struct',[[('m_team',25,-1)]]), #45 ('_blob',[(0,9)]), #46 ('_int',[(-2147483648,32)]), #47 ('_optional',[47]), #48 ('_struct',[[('m_name',9,-19),('m_clanTag',41,-18),('m_clanLogo',42,-17),('m_highestLeague',25,-16),('m_combinedRaceLevels',43,-15),('m_randomSeed',6,-14),('m_racePreference',44,-13),('m_teamPreference',45,-12),('m_testMap',13,-11),('m_testAuto',13,-10),('m_examine',13,-9),('m_customInterface',13,-8),('m_testType',6,-7),('m_observe',24,-6),('m_hero',46,-5),('m_skin',46,-4),('m_mount',46,-3),('m_toonHandle',20,-2),('m_scaledRating',48,-1)]]), #49 ('_array',[(0,5),49]), #50 ('_struct',[[('m_lockTeams',13,-16),('m_teamsTogether',13,-15),('m_advancedSharedControl',13,-14),('m_randomRaces',13,-13),('m_battleNet',13,-12),('m_amm',13,-11),('m_competitive',13,-10),('m_practice',13,-9),('m_cooperative',13,-8),('m_noVictoryOrDefeat',13,-7),('m_heroDuplicatesAllowed',13,-6),('m_fog',24,-5),('m_observers',24,-4),('m_userDifficulty',24,-3),('m_clientDebugFlags',21,-2),('m_buildCoachEnabled',13,-1)]]), #51 ('_int',[(1,4)]), #52 ('_int',[(1,8)]), #53 ('_bitarray',[(0,6)]), #54 ('_bitarray',[(0,8)]), #55 ('_bitarray',[(0,2)]), #56 ('_struct',[[('m_allowedColors',54,-6),('m_allowedRaces',55,-5),('m_allowedDifficulty',54,-4),('m_allowedControls',55,-3),('m_allowedObserveTypes',56,-2),('m_allowedAIBuilds',55,-1)]]), #57 ('_array',[(0,5),57]), #58 ('_struct',[[('m_randomValue',6,-28),('m_gameCacheName',29,-27),('m_gameOptions',51,-26),('m_gameSpeed',12,-25),('m_gameType',12,-24),('m_maxUsers',2,-23),('m_maxObservers',2,-22),('m_maxPlayers',2,-21),('m_maxTeams',52,-20),('m_maxColors',3,-19),('m_maxRaces',53,-18),('m_maxControls',10,-17),('m_mapSizeX',10,-16),('m_mapSizeY',10,-15),('m_mapFileSyncChecksum',6,-14),('m_mapFileName',30,-13),('m_mapAuthorName',9,-12),('m_modFileSyncChecksum',6,-11),('m_slotDescriptions',58,-10),('m_defaultDifficulty',3,-9),('m_defaultAIBuild',10,-8),('m_cacheHandles',36,-7),('m_hasExtensionMod',13,-6),('m_hasNonBlizzardExtensionMod',13,-5),('m_isBlizzardMap',13,-4),('m_isPremadeFFA',13,-3),('m_isCoopMode',13,-2),('m_isRealtimeMode',13,-1)]]), #59 ('_optional',[1]), #60 ('_optional',[2]), #61 ('_struct',[[('m_color',61,-1)]]), #62 ('_array',[(0,4),46]), #63 ('_array',[(0,17),6]), #64 ('_array',[(0,9),6]), #65 ('_array',[(0,3),6]), #66 ('_struct',[[('m_key',6,-2),('m_rewards',64,-1)]]), #67 ('_array',[(0,17),67]), #68 ('_struct',[[('m_control',10,-26),('m_userId',60,-25),('m_teamId',1,-24),('m_colorPref',62,-23),('m_racePref',44,-22),('m_difficulty',3,-21),('m_aiBuild',10,-20),('m_handicap',0,-19),('m_observe',24,-18),('m_logoIndex',6,-17),('m_hero',46,-16),('m_skin',46,-15),('m_mount',46,-14),('m_artifacts',63,-13),('m_workingSetSlotId',25,-12),('m_rewards',64,-11),('m_toonHandle',20,-10),('m_licenses',65,-9),('m_tandemLeaderId',60,-8),('m_commander',46,-7),('m_commanderLevel',6,-6),('m_hasSilencePenalty',13,-5),('m_tandemId',60,-4),('m_commanderMasteryLevel',6,-3),('m_commanderMasteryTalents',66,-2),('m_rewardOverrides',68,-1)]]), #69 ('_array',[(0,5),69]), #70 ('_struct',[[('m_phase',12,-11),('m_maxUsers',2,-10),('m_maxObservers',2,-9),('m_slots',70,-8),('m_randomSeed',6,-7),('m_hostUserId',60,-6),('m_isSinglePlayer',13,-5),('m_pickedMapTag',10,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',10,-1)]]), #71 ('_struct',[[('m_userInitialData',50,-3),('m_gameDescription',59,-2),('m_lobbyState',71,-1)]]), #72 ('_struct',[[('m_syncLobbyState',72,-1)]]), #73 ('_struct',[[('m_name',20,-6)]]), #74 ('_blob',[(0,6)]), #75 ('_struct',[[('m_name',75,-6)]]), #76 ('_struct',[[('m_name',75,-8),('m_type',6,-7),('m_data',20,-6)]]), #77 ('_struct',[[('m_type',6,-8),('m_name',75,-7),('m_data',34,-6)]]), #78 ('_array',[(0,5),10]), #79 ('_struct',[[('m_signature',79,-7),('m_toonHandle',20,-6)]]), #80 ('_struct',[[('m_gameFullyDownloaded',13,-19),('m_developmentCheatsEnabled',13,-18),('m_testCheatsEnabled',13,-17),('m_multiplayerCheatsEnabled',13,-16),('m_syncChecksummingEnabled',13,-15),('m_isMapToMapTransition',13,-14),('m_debugPauseEnabled',13,-13),('m_useGalaxyAsserts',13,-12),('m_platformMac',13,-11),('m_cameraFollow',13,-10),('m_baseBuildNum',6,-9),('m_buildNum',6,-8),('m_versionFlags',6,-7),('m_hotkeyProfile',46,-6)]]), #81 ('_struct',[[]]), #82 ('_int',[(0,16)]), #83 ('_struct',[[('x',83,-2),('y',83,-1)]]), #84 ('_struct',[[('m_which',12,-7),('m_target',84,-6)]]), #85 ('_struct',[[('m_fileName',30,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',29,-6)]]), #86 ('_struct',[[('m_sequence',6,-6)]]), #87 ('_struct',[[('x',47,-2),('y',47,-1)]]), #88 ('_struct',[[('m_point',88,-4),('m_time',47,-3),('m_verb',29,-2),('m_arguments',29,-1)]]), #89 ('_struct',[[('m_data',89,-6)]]), #90 ('_int',[(0,25)]), #91 ('_struct',[[('m_abilLink',83,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',25,-1)]]), #92 ('_optional',[92]), #93 ('_null',[]), #94 ('_int',[(0,20)]), #95 ('_struct',[[('x',95,-3),('y',95,-2),('z',47,-1)]]), #96 ('_struct',[[('m_targetUnitFlags',83,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',83,-4),('m_snapshotControlPlayerId',60,-3),('m_snapshotUpkeepPlayerId',60,-2),('m_snapshotPoint',96,-1)]]), #97 ('_choice',[(0,2),{0:('None',94),1:('TargetPoint',96),2:('TargetUnit',97),3:('Data',6)}]), #98 ('_int',[(1,32)]), #99 ('_struct',[[('m_cmdFlags',91,-11),('m_abil',93,-10),('m_data',98,-9),('m_sequence',99,-8),('m_otherUnit',43,-7),('m_unitGroup',43,-6)]]), #100 ('_int',[(0,9)]), #101 ('_bitarray',[(0,9)]), #102 ('_array',[(0,9),101]), #103 ('_choice',[(0,2),{0:('None',94),1:('Mask',102),2:('OneIndices',103),3:('ZeroIndices',103)}]), #104 ('_struct',[[('m_unitLink',83,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',101,-1)]]), #105 ('_array',[(0,9),105]), #106 ('_struct',[[('m_subgroupIndex',101,-4),('m_removeMask',104,-3),('m_addSubgroups',106,-2),('m_addUnitTags',65,-1)]]), #107 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',107,-6)]]), #108 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',12,-7),('m_mask',104,-6)]]), #109 ('_struct',[[('m_count',101,-6),('m_subgroupCount',101,-5),('m_activeSubgroupIndex',101,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #110 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',110,-6)]]), #111 ('_array',[(0,3),47]), #112 ('_struct',[[('m_recipientId',1,-7),('m_resources',112,-6)]]), #113 ('_struct',[[('m_chatMessage',29,-6)]]), #114 ('_int',[(-128,8)]), #115 ('_struct',[[('x',47,-3),('y',47,-2),('z',47,-1)]]), #116 ('_struct',[[('m_beacon',115,-14),('m_ally',115,-13),('m_flags',115,-12),('m_build',115,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',83,-9),('m_targetUnitSnapshotUpkeepPlayerId',115,-8),('m_targetUnitSnapshotControlPlayerId',115,-7),('m_targetPoint',116,-6)]]), #117 ('_struct',[[('m_speed',12,-6)]]), #118 ('_struct',[[('m_delta',115,-6)]]), #119 ('_struct',[[('m_point',88,-14),('m_unit',6,-13),('m_unitLink',83,-12),('m_unitControlPlayerId',60,-11),('m_unitUpkeepPlayerId',60,-10),('m_unitPosition',96,-9),('m_unitIsUnderConstruction',13,-8),('m_pingedMinimap',13,-7),('m_option',47,-6)]]), #120 ('_struct',[[('m_verb',29,-7),('m_arguments',29,-6)]]), #121 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #122 ('_struct',[[('m_unitTag',6,-6)]]), #123 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #124 ('_struct',[[('m_conversationId',47,-7),('m_replyId',47,-6)]]), #125 ('_optional',[20]), #126 ('_struct',[[('m_gameUserId',1,-6),('m_observe',24,-5),('m_name',9,-4),('m_toonHandle',126,-3),('m_clanTag',41,-2),('m_clanLogo',42,-1)]]), #127 ('_array',[(0,5),127]), #128 ('_int',[(0,1)]), #129 ('_struct',[[('m_userInfos',128,-7),('m_method',129,-6)]]), #130 ('_struct',[[('m_purchaseItemId',47,-6)]]), #131 ('_struct',[[('m_difficultyLevel',47,-6)]]), #132 ('_choice',[(0,3),{0:('None',94),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',47),4:('TextChanged',30),5:('MouseButton',6)}]), #133 ('_struct',[[('m_controlId',47,-8),('m_eventType',47,-7),('m_eventData',133,-6)]]), #134 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #135 ('_array',[(0,7),6]), #136 ('_struct',[[('m_soundHash',136,-2),('m_length',136,-1)]]), #137 ('_struct',[[('m_syncInfo',137,-6)]]), #138 ('_struct',[[('m_queryId',83,-8),('m_lengthMs',6,-7),('m_finishGameLoop',6,-6)]]), #139 ('_struct',[[('m_queryId',83,-7),('m_lengthMs',6,-6)]]), #140 ('_struct',[[('m_animWaitQueryId',83,-6)]]), #141 ('_struct',[[('m_sound',6,-6)]]), #142 ('_struct',[[('m_transmissionId',47,-7),('m_thread',6,-6)]]), #143 ('_struct',[[('m_transmissionId',47,-6)]]), #144 ('_optional',[84]), #145 ('_optional',[83]), #146 ('_optional',[115]), #147 ('_struct',[[('m_target',145,-11),('m_distance',146,-10),('m_pitch',146,-9),('m_yaw',146,-8),('m_reason',147,-7),('m_follow',13,-6)]]), #148 ('_struct',[[('m_skipType',129,-6)]]), #149 ('_int',[(0,11)]), #150 ('_struct',[[('x',150,-2),('y',150,-1)]]), #151 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',151,-8),('m_posWorld',96,-7),('m_flags',115,-6)]]), #152 ('_struct',[[('m_posUI',151,-8),('m_posWorld',96,-7),('m_flags',115,-6)]]), #153 ('_struct',[[('m_achievementLink',83,-6)]]), #154 ('_struct',[[('m_hotkey',6,-7),('m_down',13,-6)]]), #155 ('_struct',[[('m_abilLink',83,-8),('m_abilCmdIndex',2,-7),('m_state',115,-6)]]), #156 ('_struct',[[('m_soundtrack',6,-6)]]), #157 ('_struct',[[('m_planetId',47,-6)]]), #158 ('_struct',[[('m_key',115,-7),('m_flags',115,-6)]]), #159 ('_struct',[[('m_resources',112,-6)]]), #160 ('_struct',[[('m_fulfillRequestId',47,-6)]]), #161 ('_struct',[[('m_cancelRequestId',47,-6)]]), #162 ('_struct',[[('m_error',47,-7),('m_abil',93,-6)]]), #163 ('_struct',[[('m_researchItemId',47,-6)]]), #164 ('_struct',[[('m_mercenaryId',47,-6)]]), #165 ('_struct',[[('m_battleReportId',47,-7),('m_difficultyLevel',47,-6)]]), #166 ('_struct',[[('m_battleReportId',47,-6)]]), #167 ('_struct',[[('m_decrementSeconds',47,-6)]]), #168 ('_struct',[[('m_portraitId',47,-6)]]), #169 ('_struct',[[('m_functionName',20,-6)]]), #170 ('_struct',[[('m_result',47,-6)]]), #171 ('_struct',[[('m_gameMenuItemIndex',47,-6)]]), #172 ('_int',[(-32768,16)]), #173 ('_struct',[[('m_wheelSpin',173,-7),('m_flags',115,-6)]]), #174 ('_struct',[[('m_purchaseCategoryId',47,-6)]]), #175 ('_struct',[[('m_button',83,-6)]]), #176 ('_struct',[[('m_cutsceneId',47,-7),('m_bookmarkName',20,-6)]]), #177 ('_struct',[[('m_cutsceneId',47,-6)]]), #178 ('_struct',[[('m_cutsceneId',47,-8),('m_conversationLine',20,-7),('m_altConversationLine',20,-6)]]), #179 ('_struct',[[('m_cutsceneId',47,-7),('m_conversationLine',20,-6)]]), #180 ('_struct',[[('m_leaveReason',1,-6)]]), #181 ('_struct',[[('m_observe',24,-12),('m_name',9,-11),('m_toonHandle',126,-10),('m_clanTag',41,-9),('m_clanLogo',42,-8),('m_hijack',13,-7),('m_hijackCloneGameUserId',60,-6)]]), #182 ('_optional',[99]), #183 ('_struct',[[('m_state',24,-7),('m_sequence',183,-6)]]), #184 ('_struct',[[('m_target',96,-6)]]), #185 ('_struct',[[('m_target',97,-6)]]), #186 ('_struct',[[('m_catalog',10,-9),('m_entry',83,-8),('m_field',9,-7),('m_value',9,-6)]]), #187 ('_struct',[[('m_index',6,-6)]]), #188 ('_struct',[[('m_shown',13,-6)]]), #189 ('_struct',[[('m_recipient',12,-3),('m_string',30,-2)]]), #190 ('_struct',[[('m_recipient',12,-3),('m_point',88,-2)]]), #191 ('_struct',[[('m_progress',47,-2)]]), #192 ('_struct',[[('m_status',24,-2)]]), #193 ('_struct',[[('m_scoreValueMineralsCurrent',47,0),('m_scoreValueVespeneCurrent',47,1),('m_scoreValueMineralsCollectionRate',47,2),('m_scoreValueVespeneCollectionRate',47,3),('m_scoreValueWorkersActiveCount',47,4),('m_scoreValueMineralsUsedInProgressArmy',47,5),('m_scoreValueMineralsUsedInProgressEconomy',47,6),('m_scoreValueMineralsUsedInProgressTechnology',47,7),('m_scoreValueVespeneUsedInProgressArmy',47,8),('m_scoreValueVespeneUsedInProgressEconomy',47,9),('m_scoreValueVespeneUsedInProgressTechnology',47,10),('m_scoreValueMineralsUsedCurrentArmy',47,11),('m_scoreValueMineralsUsedCurrentEconomy',47,12),('m_scoreValueMineralsUsedCurrentTechnology',47,13),('m_scoreValueVespeneUsedCurrentArmy',47,14),('m_scoreValueVespeneUsedCurrentEconomy',47,15),('m_scoreValueVespeneUsedCurrentTechnology',47,16),('m_scoreValueMineralsLostArmy',47,17),('m_scoreValueMineralsLostEconomy',47,18),('m_scoreValueMineralsLostTechnology',47,19),('m_scoreValueVespeneLostArmy',47,20),('m_scoreValueVespeneLostEconomy',47,21),('m_scoreValueVespeneLostTechnology',47,22),('m_scoreValueMineralsKilledArmy',47,23),('m_scoreValueMineralsKilledEconomy',47,24),('m_scoreValueMineralsKilledTechnology',47,25),('m_scoreValueVespeneKilledArmy',47,26),('m_scoreValueVespeneKilledEconomy',47,27),('m_scoreValueVespeneKilledTechnology',47,28),('m_scoreValueFoodUsed',47,29),('m_scoreValueFoodMade',47,30),('m_scoreValueMineralsUsedActiveForces',47,31),('m_scoreValueVespeneUsedActiveForces',47,32),('m_scoreValueMineralsFriendlyFireArmy',47,33),('m_scoreValueMineralsFriendlyFireEconomy',47,34),('m_scoreValueMineralsFriendlyFireTechnology',47,35),('m_scoreValueVespeneFriendlyFireArmy',47,36),('m_scoreValueVespeneFriendlyFireEconomy',47,37),('m_scoreValueVespeneFriendlyFireTechnology',47,38)]]), #194 ('_struct',[[('m_playerId',1,0),('m_stats',194,1)]]), #195 ('_optional',[29]), #196 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6),('m_creatorUnitTagIndex',43,7),('m_creatorUnitTagRecycle',43,8),('m_creatorAbilityName',196,9)]]), #197 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',60,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',43,5),('m_killerUnitTagRecycle',43,6)]]), #198 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #199 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2)]]), #200 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',29,1),('m_count',47,2)]]), #201 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',29,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #202 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #203 ('_array',[(0,10),47]), #204 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',204,1)]]), #205 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',43,2),('m_slotId',43,3)]]), #206 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (82, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (81, 'NNet.Game.SUserOptionsEvent'), 9: (74, 'NNet.Game.SBankFileEvent'), 10: (76, 'NNet.Game.SBankSectionEvent'), 11: (77, 'NNet.Game.SBankKeyEvent'), 12: (78, 'NNet.Game.SBankValueEvent'), 13: (80, 'NNet.Game.SBankSignatureEvent'), 14: (85, 'NNet.Game.SCameraSaveEvent'), 21: (86, 'NNet.Game.SSaveGameEvent'), 22: (82, 'NNet.Game.SSaveGameDoneEvent'), 23: (82, 'NNet.Game.SLoadGameDoneEvent'), 25: (87, 'NNet.Game.SCommandManagerResetEvent'), 26: (90, 'NNet.Game.SGameCheatEvent'), 27: (100, 'NNet.Game.SCmdEvent'), 28: (108, 'NNet.Game.SSelectionDeltaEvent'), 29: (109, 'NNet.Game.SControlGroupUpdateEvent'), 30: (111, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (113, 'NNet.Game.SResourceTradeEvent'), 32: (114, 'NNet.Game.STriggerChatMessageEvent'), 33: (117, 'NNet.Game.SAICommunicateEvent'), 34: (118, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (119, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (120, 'NNet.Game.STriggerPingEvent'), 37: (121, 'NNet.Game.SBroadcastCheatEvent'), 38: (122, 'NNet.Game.SAllianceEvent'), 39: (123, 'NNet.Game.SUnitClickEvent'), 40: (124, 'NNet.Game.SUnitHighlightEvent'), 41: (125, 'NNet.Game.STriggerReplySelectedEvent'), 43: (130, 'NNet.Game.SHijackReplayGameEvent'), 44: (82, 'NNet.Game.STriggerSkippedEvent'), 45: (135, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (142, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (143, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (144, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (148, 'NNet.Game.SCameraUpdateEvent'), 50: (82, 'NNet.Game.STriggerAbortMissionEvent'), 51: (131, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (82, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (132, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (82, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (134, 'NNet.Game.STriggerDialogControlEvent'), 56: (138, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (149, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (152, 'NNet.Game.STriggerMouseClickedEvent'), 59: (153, 'NNet.Game.STriggerMouseMovedEvent'), 60: (154, 'NNet.Game.SAchievementAwardedEvent'), 61: (155, 'NNet.Game.STriggerHotkeyPressedEvent'), 62: (156, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (82, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (157, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (158, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (159, 'NNet.Game.STriggerKeyPressedEvent'), 67: (170, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (82, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (82, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (160, 'NNet.Game.SResourceRequestEvent'), 71: (161, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (162, 'NNet.Game.SResourceRequestCancelEvent'), 73: (82, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (82, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (164, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (163, 'NNet.Game.STriggerCommandErrorEvent'), 77: (82, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (82, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (165, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (82, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (82, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (166, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (167, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (167, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (132, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (82, 'NNet.Game.STriggerMovieStartedEvent'), 87: (82, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (168, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (169, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (171, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (172, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (174, 'NNet.Game.STriggerMouseWheelEvent'), 93: (131, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (175, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (176, 'NNet.Game.STriggerButtonPressedEvent'), 96: (82, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (177, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (178, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (179, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (180, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (181, 'NNet.Game.SGameUserLeaveEvent'), 102: (182, 'NNet.Game.SGameUserJoinEvent'), 103: (184, 'NNet.Game.SCommandManagerStateEvent'), 104: (185, 'NNet.Game.SCmdUpdateTargetPointEvent'), 105: (186, 'NNet.Game.SCmdUpdateTargetUnitEvent'), 106: (139, 'NNet.Game.STriggerAnimLengthQueryByNameEvent'), 107: (140, 'NNet.Game.STriggerAnimLengthQueryByPropsEvent'), 108: (141, 'NNet.Game.STriggerAnimOffsetEvent'), 109: (187, 'NNet.Game.SCatalogModifyEvent'), 110: (188, 'NNet.Game.SHeroTalentTreeSelectedEvent'), 111: (82, 'NNet.Game.STriggerProfilerLoggingFinishedEvent'), 112: (189, 'NNet.Game.SHeroTalentTreeSelectionPanelToggledEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (190, 'NNet.Game.SChatMessage'), 1: (191, 'NNet.Game.SPingMessage'), 2: (192, 'NNet.Game.SLoadingProgressMessage'), 3: (82, 'NNet.Game.SServerPingMessage'), 4: (193, 'NNet.Game.SReconnectNotifyMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (195, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (197, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (198, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (199, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (200, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (201, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (202, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (203, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (205, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (206, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 18 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 40 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 73 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol62347.py
protocol62347.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,5)]), #2 ('_int',[(0,6)]), #3 ('_int',[(0,14)]), #4 ('_int',[(0,22)]), #5 ('_int',[(0,32)]), #6 ('_choice',[(0,2),{0:('m_uint6',3),1:('m_uint14',4),2:('m_uint22',5),3:('m_uint32',6)}]), #7 ('_struct',[[('m_userId',2,-1)]]), #8 ('_blob',[(0,8)]), #9 ('_int',[(0,8)]), #10 ('_struct',[[('m_flags',10,0),('m_major',10,1),('m_minor',10,2),('m_revision',10,3),('m_build',6,4),('m_baseBuild',6,5)]]), #11 ('_int',[(0,3)]), #12 ('_bool',[]), #13 ('_struct',[[('m_signature',9,0),('m_version',11,1),('m_type',12,2),('m_elapsedGameLoops',6,3),('m_useScaledTime',13,4)]]), #14 ('_fourcc',[]), #15 ('_blob',[(0,7)]), #16 ('_int',[(0,64)]), #17 ('_struct',[[('m_region',10,0),('m_programId',15,1),('m_realm',6,2),('m_name',16,3),('m_id',17,4)]]), #18 ('_struct',[[('m_a',10,0),('m_r',10,1),('m_g',10,2),('m_b',10,3)]]), #19 ('_int',[(0,2)]), #20 ('_optional',[10]), #21 ('_struct',[[('m_name',9,0),('m_toon',18,1),('m_race',9,2),('m_color',19,3),('m_control',10,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',20,7),('m_result',20,8),('m_workingSetSlotId',21,9)]]), #22 ('_array',[(0,5),22]), #23 ('_optional',[23]), #24 ('_blob',[(0,10)]), #25 ('_blob',[(0,11)]), #26 ('_struct',[[('m_file',26,0)]]), #27 ('_optional',[13]), #28 ('_int',[(-9223372036854775808,64)]), #29 ('_blob',[(0,12)]), #30 ('_blob',[(40,0)]), #31 ('_array',[(0,6),31]), #32 ('_optional',[32]), #33 ('_array',[(0,6),26]), #34 ('_optional',[34]), #35 ('_struct',[[('m_playerList',24,0),('m_title',25,1),('m_difficulty',9,2),('m_thumbnail',27,3),('m_isBlizzardMap',13,4),('m_restartAsTransitionMap',28,16),('m_timeUTC',29,5),('m_timeLocalOffset',29,6),('m_description',30,7),('m_imageFilePath',26,8),('m_campaignIndex',10,15),('m_mapFileName',26,9),('m_cacheHandles',33,10),('m_miniSave',13,11),('m_gameSpeed',12,12),('m_defaultDifficulty',3,13),('m_modPaths',35,14)]]), #36 ('_optional',[9]), #37 ('_optional',[31]), #38 ('_optional',[6]), #39 ('_struct',[[('m_race',21,-1)]]), #40 ('_struct',[[('m_team',21,-1)]]), #41 ('_struct',[[('m_name',9,-13),('m_clanTag',37,-12),('m_clanLogo',38,-11),('m_highestLeague',21,-10),('m_combinedRaceLevels',39,-9),('m_randomSeed',6,-8),('m_racePreference',40,-7),('m_teamPreference',41,-6),('m_testMap',13,-5),('m_testAuto',13,-4),('m_examine',13,-3),('m_customInterface',13,-2),('m_observe',20,-1)]]), #42 ('_array',[(0,5),42]), #43 ('_struct',[[('m_lockTeams',13,-12),('m_teamsTogether',13,-11),('m_advancedSharedControl',13,-10),('m_randomRaces',13,-9),('m_battleNet',13,-8),('m_amm',13,-7),('m_competitive',13,-6),('m_noVictoryOrDefeat',13,-5),('m_fog',20,-4),('m_observers',20,-3),('m_userDifficulty',20,-2),('m_clientDebugFlags',17,-1)]]), #44 ('_int',[(1,4)]), #45 ('_int',[(1,8)]), #46 ('_bitarray',[(0,6)]), #47 ('_bitarray',[(0,8)]), #48 ('_bitarray',[(0,2)]), #49 ('_bitarray',[(0,7)]), #50 ('_struct',[[('m_allowedColors',47,-6),('m_allowedRaces',48,-5),('m_allowedDifficulty',47,-4),('m_allowedControls',48,-3),('m_allowedObserveTypes',49,-2),('m_allowedAIBuilds',50,-1)]]), #51 ('_array',[(0,5),51]), #52 ('_struct',[[('m_randomValue',6,-26),('m_gameCacheName',25,-25),('m_gameOptions',44,-24),('m_gameSpeed',12,-23),('m_gameType',12,-22),('m_maxUsers',2,-21),('m_maxObservers',2,-20),('m_maxPlayers',2,-19),('m_maxTeams',45,-18),('m_maxColors',3,-17),('m_maxRaces',46,-16),('m_maxControls',10,-15),('m_mapSizeX',10,-14),('m_mapSizeY',10,-13),('m_mapFileSyncChecksum',6,-12),('m_mapFileName',26,-11),('m_mapAuthorName',9,-10),('m_modFileSyncChecksum',6,-9),('m_slotDescriptions',52,-8),('m_defaultDifficulty',3,-7),('m_defaultAIBuild',0,-6),('m_cacheHandles',32,-5),('m_hasExtensionMod',13,-4),('m_isBlizzardMap',13,-3),('m_isPremadeFFA',13,-2),('m_isCoopMode',13,-1)]]), #53 ('_optional',[1]), #54 ('_optional',[2]), #55 ('_struct',[[('m_color',55,-1)]]), #56 ('_array',[(0,6),6]), #57 ('_array',[(0,9),6]), #58 ('_struct',[[('m_control',10,-13),('m_userId',54,-12),('m_teamId',1,-11),('m_colorPref',56,-10),('m_racePref',40,-9),('m_difficulty',3,-8),('m_aiBuild',0,-7),('m_handicap',0,-6),('m_observe',20,-5),('m_workingSetSlotId',21,-4),('m_rewards',57,-3),('m_toonHandle',16,-2),('m_licenses',58,-1)]]), #59 ('_array',[(0,5),59]), #60 ('_struct',[[('m_phase',12,-10),('m_maxUsers',2,-9),('m_maxObservers',2,-8),('m_slots',60,-7),('m_randomSeed',6,-6),('m_hostUserId',54,-5),('m_isSinglePlayer',13,-4),('m_gameDuration',6,-3),('m_defaultDifficulty',3,-2),('m_defaultAIBuild',0,-1)]]), #61 ('_struct',[[('m_userInitialData',43,-3),('m_gameDescription',53,-2),('m_lobbyState',61,-1)]]), #62 ('_struct',[[('m_syncLobbyState',62,-1)]]), #63 ('_struct',[[('m_name',16,-6)]]), #64 ('_blob',[(0,6)]), #65 ('_struct',[[('m_name',65,-6)]]), #66 ('_struct',[[('m_name',65,-8),('m_type',6,-7),('m_data',16,-6)]]), #67 ('_struct',[[('m_type',6,-8),('m_name',65,-7),('m_data',30,-6)]]), #68 ('_array',[(0,5),10]), #69 ('_struct',[[('m_signature',69,-7),('m_toonHandle',16,-6)]]), #70 ('_struct',[[('m_gameFullyDownloaded',13,-13),('m_developmentCheatsEnabled',13,-12),('m_multiplayerCheatsEnabled',13,-11),('m_syncChecksummingEnabled',13,-10),('m_isMapToMapTransition',13,-9),('m_startingRally',13,-8),('m_debugPauseEnabled',13,-7),('m_baseBuildNum',6,-6)]]), #71 ('_struct',[[]]), #72 ('_int',[(0,16)]), #73 ('_struct',[[('x',73,-2),('y',73,-1)]]), #74 ('_struct',[[('m_which',12,-7),('m_target',74,-6)]]), #75 ('_struct',[[('m_fileName',26,-10),('m_automatic',13,-9),('m_overwrite',13,-8),('m_name',9,-7),('m_description',25,-6)]]), #76 ('_int',[(-2147483648,32)]), #77 ('_struct',[[('x',77,-2),('y',77,-1)]]), #78 ('_struct',[[('m_point',78,-4),('m_time',77,-3),('m_verb',25,-2),('m_arguments',25,-1)]]), #79 ('_struct',[[('m_data',79,-6)]]), #80 ('_int',[(0,20)]), #81 ('_struct',[[('m_abilLink',73,-3),('m_abilCmdIndex',2,-2),('m_abilCmdData',21,-1)]]), #82 ('_optional',[82]), #83 ('_null',[]), #84 ('_struct',[[('x',81,-3),('y',81,-2),('z',77,-1)]]), #85 ('_struct',[[('m_targetUnitFlags',10,-7),('m_timer',10,-6),('m_tag',6,-5),('m_snapshotUnitLink',73,-4),('m_snapshotControlPlayerId',54,-3),('m_snapshotUpkeepPlayerId',54,-2),('m_snapshotPoint',85,-1)]]), #86 ('_choice',[(0,2),{0:('None',84),1:('TargetPoint',85),2:('TargetUnit',86),3:('Data',6)}]), #87 ('_struct',[[('m_cmdFlags',81,-9),('m_abil',83,-8),('m_data',87,-7),('m_otherUnit',39,-6)]]), #88 ('_int',[(0,9)]), #89 ('_bitarray',[(0,9)]), #90 ('_array',[(0,9),89]), #91 ('_choice',[(0,2),{0:('None',84),1:('Mask',90),2:('OneIndices',91),3:('ZeroIndices',91)}]), #92 ('_struct',[[('m_unitLink',73,-4),('m_subgroupPriority',10,-3),('m_intraSubgroupPriority',10,-2),('m_count',89,-1)]]), #93 ('_array',[(0,9),93]), #94 ('_struct',[[('m_subgroupIndex',89,-4),('m_removeMask',92,-3),('m_addSubgroups',94,-2),('m_addUnitTags',58,-1)]]), #95 ('_struct',[[('m_controlGroupId',1,-7),('m_delta',95,-6)]]), #96 ('_struct',[[('m_controlGroupIndex',1,-8),('m_controlGroupUpdate',20,-7),('m_mask',92,-6)]]), #97 ('_struct',[[('m_count',89,-6),('m_subgroupCount',89,-5),('m_activeSubgroupIndex',89,-4),('m_unitTagsChecksum',6,-3),('m_subgroupIndicesChecksum',6,-2),('m_subgroupsChecksum',6,-1)]]), #98 ('_struct',[[('m_controlGroupId',1,-7),('m_selectionSyncData',98,-6)]]), #99 ('_array',[(0,3),77]), #100 ('_struct',[[('m_recipientId',1,-7),('m_resources',100,-6)]]), #101 ('_struct',[[('m_chatMessage',25,-6)]]), #102 ('_int',[(-128,8)]), #103 ('_struct',[[('x',77,-3),('y',77,-2),('z',77,-1)]]), #104 ('_struct',[[('m_beacon',103,-14),('m_ally',103,-13),('m_flags',103,-12),('m_build',103,-11),('m_targetUnitTag',6,-10),('m_targetUnitSnapshotUnitLink',73,-9),('m_targetUnitSnapshotUpkeepPlayerId',103,-8),('m_targetUnitSnapshotControlPlayerId',103,-7),('m_targetPoint',104,-6)]]), #105 ('_struct',[[('m_speed',12,-6)]]), #106 ('_struct',[[('m_delta',103,-6)]]), #107 ('_struct',[[('m_point',78,-8),('m_unit',6,-7),('m_pingedMinimap',13,-6)]]), #108 ('_struct',[[('m_verb',25,-7),('m_arguments',25,-6)]]), #109 ('_struct',[[('m_alliance',6,-7),('m_control',6,-6)]]), #110 ('_struct',[[('m_unitTag',6,-6)]]), #111 ('_struct',[[('m_unitTag',6,-7),('m_flags',10,-6)]]), #112 ('_struct',[[('m_conversationId',77,-7),('m_replyId',77,-6)]]), #113 ('_optional',[16]), #114 ('_struct',[[('m_gameUserId',1,-6),('m_observe',20,-5),('m_name',9,-4),('m_toonHandle',114,-3),('m_clanTag',37,-2),('m_clanLogo',38,-1)]]), #115 ('_array',[(0,5),115]), #116 ('_int',[(0,1)]), #117 ('_struct',[[('m_userInfos',116,-7),('m_method',117,-6)]]), #118 ('_struct',[[('m_purchaseItemId',77,-6)]]), #119 ('_struct',[[('m_difficultyLevel',77,-6)]]), #120 ('_choice',[(0,3),{0:('None',84),1:('Checked',13),2:('ValueChanged',6),3:('SelectionChanged',77),4:('TextChanged',26),5:('MouseButton',6)}]), #121 ('_struct',[[('m_controlId',77,-8),('m_eventType',77,-7),('m_eventData',121,-6)]]), #122 ('_struct',[[('m_soundHash',6,-7),('m_length',6,-6)]]), #123 ('_array',[(0,7),6]), #124 ('_struct',[[('m_soundHash',124,-2),('m_length',124,-1)]]), #125 ('_struct',[[('m_syncInfo',125,-6)]]), #126 ('_struct',[[('m_sound',6,-6)]]), #127 ('_struct',[[('m_transmissionId',77,-7),('m_thread',6,-6)]]), #128 ('_struct',[[('m_transmissionId',77,-6)]]), #129 ('_optional',[74]), #130 ('_optional',[73]), #131 ('_optional',[103]), #132 ('_struct',[[('m_target',130,-10),('m_distance',131,-9),('m_pitch',131,-8),('m_yaw',131,-7),('m_reason',132,-6)]]), #133 ('_struct',[[('m_skipType',117,-6)]]), #134 ('_int',[(0,11)]), #135 ('_struct',[[('x',135,-2),('y',135,-1)]]), #136 ('_struct',[[('m_button',6,-10),('m_down',13,-9),('m_posUI',136,-8),('m_posWorld',85,-7),('m_flags',103,-6)]]), #137 ('_struct',[[('m_posUI',136,-8),('m_posWorld',85,-7),('m_flags',103,-6)]]), #138 ('_struct',[[('m_achievementLink',73,-6)]]), #139 ('_struct',[[('m_abilLink',73,-8),('m_abilCmdIndex',2,-7),('m_state',103,-6)]]), #140 ('_struct',[[('m_soundtrack',6,-6)]]), #141 ('_struct',[[('m_planetId',77,-6)]]), #142 ('_struct',[[('m_key',103,-7),('m_flags',103,-6)]]), #143 ('_struct',[[('m_resources',100,-6)]]), #144 ('_struct',[[('m_fulfillRequestId',77,-6)]]), #145 ('_struct',[[('m_cancelRequestId',77,-6)]]), #146 ('_struct',[[('m_researchItemId',77,-6)]]), #147 ('_struct',[[('m_mercenaryId',77,-6)]]), #148 ('_struct',[[('m_battleReportId',77,-7),('m_difficultyLevel',77,-6)]]), #149 ('_struct',[[('m_battleReportId',77,-6)]]), #150 ('_int',[(0,19)]), #151 ('_struct',[[('m_decrementMs',151,-6)]]), #152 ('_struct',[[('m_portraitId',77,-6)]]), #153 ('_struct',[[('m_functionName',16,-6)]]), #154 ('_struct',[[('m_result',77,-6)]]), #155 ('_struct',[[('m_gameMenuItemIndex',77,-6)]]), #156 ('_struct',[[('m_purchaseCategoryId',77,-6)]]), #157 ('_struct',[[('m_button',73,-6)]]), #158 ('_struct',[[('m_cutsceneId',77,-7),('m_bookmarkName',16,-6)]]), #159 ('_struct',[[('m_cutsceneId',77,-6)]]), #160 ('_struct',[[('m_cutsceneId',77,-8),('m_conversationLine',16,-7),('m_altConversationLine',16,-6)]]), #161 ('_struct',[[('m_cutsceneId',77,-7),('m_conversationLine',16,-6)]]), #162 ('_struct',[[('m_observe',20,-10),('m_name',9,-9),('m_toonHandle',114,-8),('m_clanTag',37,-7),('m_clanLogo',38,-6)]]), #163 ('_struct',[[('m_recipient',12,-3),('m_string',26,-2)]]), #164 ('_struct',[[('m_recipient',12,-3),('m_point',78,-2)]]), #165 ('_struct',[[('m_progress',77,-2)]]), #166 ('_struct',[[('m_scoreValueMineralsCurrent',77,0),('m_scoreValueVespeneCurrent',77,1),('m_scoreValueMineralsCollectionRate',77,2),('m_scoreValueVespeneCollectionRate',77,3),('m_scoreValueWorkersActiveCount',77,4),('m_scoreValueMineralsUsedInProgressArmy',77,5),('m_scoreValueMineralsUsedInProgressEconomy',77,6),('m_scoreValueMineralsUsedInProgressTechnology',77,7),('m_scoreValueVespeneUsedInProgressArmy',77,8),('m_scoreValueVespeneUsedInProgressEconomy',77,9),('m_scoreValueVespeneUsedInProgressTechnology',77,10),('m_scoreValueMineralsUsedCurrentArmy',77,11),('m_scoreValueMineralsUsedCurrentEconomy',77,12),('m_scoreValueMineralsUsedCurrentTechnology',77,13),('m_scoreValueVespeneUsedCurrentArmy',77,14),('m_scoreValueVespeneUsedCurrentEconomy',77,15),('m_scoreValueVespeneUsedCurrentTechnology',77,16),('m_scoreValueMineralsLostArmy',77,17),('m_scoreValueMineralsLostEconomy',77,18),('m_scoreValueMineralsLostTechnology',77,19),('m_scoreValueVespeneLostArmy',77,20),('m_scoreValueVespeneLostEconomy',77,21),('m_scoreValueVespeneLostTechnology',77,22),('m_scoreValueMineralsKilledArmy',77,23),('m_scoreValueMineralsKilledEconomy',77,24),('m_scoreValueMineralsKilledTechnology',77,25),('m_scoreValueVespeneKilledArmy',77,26),('m_scoreValueVespeneKilledEconomy',77,27),('m_scoreValueVespeneKilledTechnology',77,28),('m_scoreValueFoodUsed',77,29),('m_scoreValueFoodMade',77,30),('m_scoreValueMineralsUsedActiveForces',77,31),('m_scoreValueVespeneUsedActiveForces',77,32),('m_scoreValueMineralsFriendlyFireArmy',77,33),('m_scoreValueMineralsFriendlyFireEconomy',77,34),('m_scoreValueMineralsFriendlyFireTechnology',77,35),('m_scoreValueVespeneFriendlyFireArmy',77,36),('m_scoreValueVespeneFriendlyFireEconomy',77,37),('m_scoreValueVespeneFriendlyFireTechnology',77,38)]]), #167 ('_struct',[[('m_playerId',1,0),('m_stats',167,1)]]), #168 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',25,2),('m_controlPlayerId',1,3),('m_upkeepPlayerId',1,4),('m_x',10,5),('m_y',10,6)]]), #169 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_killerPlayerId',54,2),('m_x',10,3),('m_y',10,4),('m_killerUnitTagIndex',39,5),('m_killerUnitTagRecycle',39,6)]]), #170 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_controlPlayerId',1,2),('m_upkeepPlayerId',1,3)]]), #171 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1),('m_unitTypeName',25,2)]]), #172 ('_struct',[[('m_playerId',1,0),('m_upgradeTypeName',25,1),('m_count',77,2)]]), #173 ('_struct',[[('m_unitTagIndex',6,0),('m_unitTagRecycle',6,1)]]), #174 ('_array',[(0,10),77]), #175 ('_struct',[[('m_firstUnitIndex',6,0),('m_items',175,1)]]), #176 ('_struct',[[('m_playerId',1,0),('m_type',6,1),('m_userId',39,2),('m_slotId',39,3)]]), #177 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (72, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (71, 'NNet.Game.SUserOptionsEvent'), 9: (64, 'NNet.Game.SBankFileEvent'), 10: (66, 'NNet.Game.SBankSectionEvent'), 11: (67, 'NNet.Game.SBankKeyEvent'), 12: (68, 'NNet.Game.SBankValueEvent'), 13: (70, 'NNet.Game.SBankSignatureEvent'), 14: (75, 'NNet.Game.SCameraSaveEvent'), 21: (76, 'NNet.Game.SSaveGameEvent'), 22: (72, 'NNet.Game.SSaveGameDoneEvent'), 23: (72, 'NNet.Game.SLoadGameDoneEvent'), 26: (80, 'NNet.Game.SGameCheatEvent'), 27: (88, 'NNet.Game.SCmdEvent'), 28: (96, 'NNet.Game.SSelectionDeltaEvent'), 29: (97, 'NNet.Game.SControlGroupUpdateEvent'), 30: (99, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (101, 'NNet.Game.SResourceTradeEvent'), 32: (102, 'NNet.Game.STriggerChatMessageEvent'), 33: (105, 'NNet.Game.SAICommunicateEvent'), 34: (106, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (107, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (108, 'NNet.Game.STriggerPingEvent'), 37: (109, 'NNet.Game.SBroadcastCheatEvent'), 38: (110, 'NNet.Game.SAllianceEvent'), 39: (111, 'NNet.Game.SUnitClickEvent'), 40: (112, 'NNet.Game.SUnitHighlightEvent'), 41: (113, 'NNet.Game.STriggerReplySelectedEvent'), 43: (118, 'NNet.Game.SHijackReplayGameEvent'), 44: (72, 'NNet.Game.STriggerSkippedEvent'), 45: (123, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (127, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (128, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (129, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (133, 'NNet.Game.SCameraUpdateEvent'), 50: (72, 'NNet.Game.STriggerAbortMissionEvent'), 51: (119, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (72, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (120, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (72, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (122, 'NNet.Game.STriggerDialogControlEvent'), 56: (126, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (134, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (137, 'NNet.Game.STriggerMouseClickedEvent'), 59: (138, 'NNet.Game.STriggerMouseMovedEvent'), 60: (139, 'NNet.Game.SAchievementAwardedEvent'), 62: (140, 'NNet.Game.STriggerTargetModeUpdateEvent'), 63: (72, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (141, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (142, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (143, 'NNet.Game.STriggerKeyPressedEvent'), 67: (154, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (72, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (72, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (144, 'NNet.Game.SResourceRequestEvent'), 71: (145, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (146, 'NNet.Game.SResourceRequestCancelEvent'), 73: (72, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (72, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (147, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 77: (72, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (72, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (148, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (72, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (72, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (149, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (150, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (150, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (120, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (72, 'NNet.Game.STriggerMovieStartedEvent'), 87: (72, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (152, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (153, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (155, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (156, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 93: (119, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (157, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (158, 'NNet.Game.STriggerButtonPressedEvent'), 96: (72, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (159, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (160, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (161, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (162, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), 101: (72, 'NNet.Game.SGameUserLeaveEvent'), 102: (163, 'NNet.Game.SGameUserJoinEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (164, 'NNet.Game.SChatMessage'), 1: (165, 'NNet.Game.SPingMessage'), 2: (166, 'NNet.Game.SLoadingProgressMessage'), 3: (72, 'NNet.Game.SServerPingMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { 0: (168, 'NNet.Replay.Tracker.SPlayerStatsEvent'), 1: (169, 'NNet.Replay.Tracker.SUnitBornEvent'), 2: (170, 'NNet.Replay.Tracker.SUnitDiedEvent'), 3: (171, 'NNet.Replay.Tracker.SUnitOwnerChangeEvent'), 4: (172, 'NNet.Replay.Tracker.SUnitTypeChangeEvent'), 5: (173, 'NNet.Replay.Tracker.SUpgradeEvent'), 6: (169, 'NNet.Replay.Tracker.SUnitInitEvent'), 7: (174, 'NNet.Replay.Tracker.SUnitDoneEvent'), 8: (176, 'NNet.Replay.Tracker.SUnitPositionsEvent'), 9: (177, 'NNet.Replay.Tracker.SPlayerSetupEvent'), } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = 2 # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 7 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = 8 # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 14 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 36 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 63 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol27950.py
protocol27950.py
from zephyrus_sc2_parser.s2protocol_fixed.decoders import * # Decoding instructions for each protocol type. typeinfos = [ ('_int',[(0,7)]), #0 ('_int',[(0,4)]), #1 ('_int',[(0,6)]), #2 ('_int',[(0,14)]), #3 ('_int',[(0,22)]), #4 ('_int',[(0,32)]), #5 ('_choice',[(0,2),{0:('m_uint6',2),1:('m_uint14',3),2:('m_uint22',4),3:('m_uint32',5)}]), #6 ('_blob',[(0,8)]), #7 ('_int',[(0,8)]), #8 ('_struct',[[('m_flags',8,0),('m_major',8,1),('m_minor',8,2),('m_revision',8,3),('m_build',5,4),('m_baseBuild',5,5)]]), #9 ('_int',[(0,3)]), #10 ('_struct',[[('m_signature',7,0),('m_version',9,1),('m_type',10,2),('m_elapsedGameLoops',5,3)]]), #11 ('_fourcc',[]), #12 ('_blob',[(0,7)]), #13 ('_int',[(0,64)]), #14 ('_struct',[[('m_region',8,0),('m_programId',12,1),('m_realm',5,2),('m_name',13,3),('m_id',14,4)]]), #15 ('_struct',[[('m_a',8,0),('m_r',8,1),('m_g',8,2),('m_b',8,3)]]), #16 ('_int',[(0,2)]), #17 ('_struct',[[('m_name',7,0),('m_toon',15,1),('m_race',7,2),('m_color',16,3),('m_control',8,4),('m_teamId',1,5),('m_handicap',0,6),('m_observe',17,7),('m_result',17,8)]]), #18 ('_array',[(0,5),18]), #19 ('_optional',[19]), #20 ('_blob',[(0,10)]), #21 ('_blob',[(0,11)]), #22 ('_struct',[[('m_file',22,0)]]), #23 ('_bool',[]), #24 ('_int',[(-9223372036854775808,64)]), #25 ('_blob',[(0,12)]), #26 ('_blob',[(40,0)]), #27 ('_array',[(0,6),27]), #28 ('_optional',[28]), #29 ('_array',[(0,6),22]), #30 ('_optional',[30]), #31 ('_struct',[[('m_playerList',20,0),('m_title',21,1),('m_difficulty',7,2),('m_thumbnail',23,3),('m_isBlizzardMap',24,4),('m_timeUTC',25,5),('m_timeLocalOffset',25,6),('m_description',26,7),('m_imageFilePath',22,8),('m_mapFileName',22,9),('m_cacheHandles',29,10),('m_miniSave',24,11),('m_gameSpeed',10,12),('m_defaultDifficulty',2,13),('m_modPaths',31,14)]]), #32 ('_optional',[8]), #33 ('_struct',[[('m_race',33,-1)]]), #34 ('_struct',[[('m_team',33,-1)]]), #35 ('_struct',[[('m_name',7,-8),('m_randomSeed',5,-7),('m_racePreference',34,-6),('m_teamPreference',35,-5),('m_testMap',24,-4),('m_testAuto',24,-3),('m_examine',24,-2),('m_observe',17,-1)]]), #36 ('_array',[(0,5),36]), #37 ('_struct',[[('m_lockTeams',24,-12),('m_teamsTogether',24,-11),('m_advancedSharedControl',24,-10),('m_randomRaces',24,-9),('m_battleNet',24,-8),('m_amm',24,-7),('m_ranked',24,-6),('m_noVictoryOrDefeat',24,-5),('m_fog',17,-4),('m_observers',17,-3),('m_userDifficulty',17,-2),('m_clientDebugFlags',14,-1)]]), #38 ('_int',[(0,5)]), #39 ('_int',[(1,4)]), #40 ('_int',[(1,8)]), #41 ('_bitarray',[(0,6)]), #42 ('_bitarray',[(0,8)]), #43 ('_bitarray',[(0,2)]), #44 ('_struct',[[('m_allowedColors',42,-5),('m_allowedRaces',43,-4),('m_allowedDifficulty',42,-3),('m_allowedControls',43,-2),('m_allowedObserveTypes',44,-1)]]), #45 ('_array',[(0,5),45]), #46 ('_struct',[[('m_randomValue',5,-23),('m_gameCacheName',21,-22),('m_gameOptions',38,-21),('m_gameSpeed',10,-20),('m_gameType',10,-19),('m_maxUsers',39,-18),('m_maxObservers',39,-17),('m_maxPlayers',39,-16),('m_maxTeams',40,-15),('m_maxColors',2,-14),('m_maxRaces',41,-13),('m_maxControls',41,-12),('m_mapSizeX',8,-11),('m_mapSizeY',8,-10),('m_mapFileSyncChecksum',5,-9),('m_mapFileName',22,-8),('m_mapAuthorName',7,-7),('m_modFileSyncChecksum',5,-6),('m_slotDescriptions',46,-5),('m_defaultDifficulty',2,-4),('m_cacheHandles',28,-3),('m_isBlizzardMap',24,-2),('m_isPremadeFFA',24,-1)]]), #47 ('_optional',[1]), #48 ('_optional',[39]), #49 ('_struct',[[('m_color',49,-1)]]), #50 ('_array',[(0,5),5]), #51 ('_array',[(0,9),5]), #52 ('_struct',[[('m_control',8,-11),('m_userId',48,-10),('m_teamId',1,-9),('m_colorPref',50,-8),('m_racePref',34,-7),('m_difficulty',2,-6),('m_handicap',0,-5),('m_observe',17,-4),('m_rewards',51,-3),('m_toonHandle',13,-2),('m_licenses',52,-1)]]), #53 ('_array',[(0,5),53]), #54 ('_struct',[[('m_phase',10,-9),('m_maxUsers',39,-8),('m_maxObservers',39,-7),('m_slots',54,-6),('m_randomSeed',5,-5),('m_hostUserId',48,-4),('m_isSinglePlayer',24,-3),('m_gameDuration',5,-2),('m_defaultDifficulty',2,-1)]]), #55 ('_struct',[[('m_userInitialData',37,-3),('m_gameDescription',47,-2),('m_lobbyState',55,-1)]]), #56 ('_struct',[[('m_syncLobbyState',56,-1)]]), #57 ('_struct',[[('m_name',13,-5)]]), #58 ('_blob',[(0,6)]), #59 ('_struct',[[('m_name',59,-5)]]), #60 ('_struct',[[('m_name',59,-7),('m_type',5,-6),('m_data',13,-5)]]), #61 ('_struct',[[('m_type',5,-7),('m_name',59,-6),('m_data',26,-5)]]), #62 ('_array',[(0,5),8]), #63 ('_struct',[[('m_signature',63,-5)]]), #64 ('_struct',[[('m_gameFullyDownloaded',24,-10),('m_developmentCheatsEnabled',24,-9),('m_multiplayerCheatsEnabled',24,-8),('m_syncChecksummingEnabled',24,-7),('m_isMapToMapTransition',24,-6),('m_useAIBeacons',24,-5)]]), #65 ('_struct',[[]]), #66 ('_struct',[[('m_fileName',22,-9),('m_automatic',24,-8),('m_overwrite',24,-7),('m_name',7,-6),('m_description',21,-5)]]), #67 ('_int',[(-2147483648,32)]), #68 ('_struct',[[('x',68,-2),('y',68,-1)]]), #69 ('_struct',[[('m_point',69,-4),('m_time',68,-3),('m_verb',21,-2),('m_arguments',21,-1)]]), #70 ('_struct',[[('m_data',70,-5)]]), #71 ('_int',[(0,20)]), #72 ('_int',[(0,16)]), #73 ('_struct',[[('m_abilLink',73,-3),('m_abilCmdIndex',39,-2),('m_abilCmdData',33,-1)]]), #74 ('_optional',[74]), #75 ('_null',[]), #76 ('_struct',[[('x',72,-3),('y',72,-2),('z',68,-1)]]), #77 ('_struct',[[('m_targetUnitFlags',8,-7),('m_timer',8,-6),('m_tag',5,-5),('m_snapshotUnitLink',73,-4),('m_snapshotControlPlayerId',48,-3),('m_snapshotUpkeepPlayerId',48,-2),('m_snapshotPoint',77,-1)]]), #78 ('_choice',[(0,2),{0:('None',76),1:('TargetPoint',77),2:('TargetUnit',78),3:('Data',5)}]), #79 ('_optional',[5]), #80 ('_struct',[[('m_cmdFlags',72,-8),('m_abil',75,-7),('m_data',79,-6),('m_otherUnit',80,-5)]]), #81 ('_int',[(0,9)]), #82 ('_bitarray',[(0,9)]), #83 ('_array',[(0,9),82]), #84 ('_choice',[(0,2),{0:('None',76),1:('Mask',83),2:('OneIndices',84),3:('ZeroIndices',84)}]), #85 ('_struct',[[('m_unitLink',73,-3),('m_intraSubgroupPriority',8,-2),('m_count',82,-1)]]), #86 ('_array',[(0,9),86]), #87 ('_struct',[[('m_subgroupIndex',82,-4),('m_removeMask',85,-3),('m_addSubgroups',87,-2),('m_addUnitTags',52,-1)]]), #88 ('_struct',[[('m_controlGroupId',1,-6),('m_delta',88,-5)]]), #89 ('_struct',[[('m_controlGroupIndex',1,-7),('m_controlGroupUpdate',17,-6),('m_mask',85,-5)]]), #90 ('_struct',[[('m_count',82,-6),('m_subgroupCount',82,-5),('m_activeSubgroupIndex',82,-4),('m_unitTagsChecksum',5,-3),('m_subgroupIndicesChecksum',5,-2),('m_subgroupsChecksum',5,-1)]]), #91 ('_struct',[[('m_controlGroupId',1,-6),('m_selectionSyncData',91,-5)]]), #92 ('_array',[(0,3),68]), #93 ('_struct',[[('m_recipientId',1,-6),('m_resources',93,-5)]]), #94 ('_struct',[[('m_chatMessage',21,-5)]]), #95 ('_int',[(-128,8)]), #96 ('_struct',[[('x',68,-3),('y',68,-2),('z',68,-1)]]), #97 ('_struct',[[('m_beacon',96,-13),('m_ally',96,-12),('m_flags',96,-11),('m_build',96,-10),('m_targetUnitTag',5,-9),('m_targetUnitSnapshotUnitLink',73,-8),('m_targetUnitSnapshotUpkeepPlayerId',96,-7),('m_targetUnitSnapshotControlPlayerId',96,-6),('m_targetPoint',97,-5)]]), #98 ('_struct',[[('m_speed',10,-5)]]), #99 ('_struct',[[('m_delta',96,-5)]]), #100 ('_struct',[[('m_point',69,-7),('m_unit',5,-6),('m_pingedMinimap',24,-5)]]), #101 ('_struct',[[('m_verb',21,-6),('m_arguments',21,-5)]]), #102 ('_struct',[[('m_alliance',5,-6),('m_control',5,-5)]]), #103 ('_struct',[[('m_unitTag',5,-5)]]), #104 ('_struct',[[('m_unitTag',5,-6),('m_flags',8,-5)]]), #105 ('_struct',[[('m_conversationId',68,-6),('m_replyId',68,-5)]]), #106 ('_struct',[[('m_purchaseItemId',68,-5)]]), #107 ('_struct',[[('m_difficultyLevel',68,-5)]]), #108 ('_choice',[(0,3),{0:('None',76),1:('Checked',24),2:('ValueChanged',5),3:('SelectionChanged',68),4:('TextChanged',22)}]), #109 ('_struct',[[('m_controlId',68,-7),('m_eventType',68,-6),('m_eventData',109,-5)]]), #110 ('_struct',[[('m_soundHash',5,-6),('m_length',5,-5)]]), #111 ('_array',[(0,7),5]), #112 ('_struct',[[('m_soundHash',112,-2),('m_length',112,-1)]]), #113 ('_struct',[[('m_syncInfo',113,-5)]]), #114 ('_struct',[[('m_sound',5,-5)]]), #115 ('_struct',[[('m_transmissionId',68,-6),('m_thread',5,-5)]]), #116 ('_struct',[[('m_transmissionId',68,-5)]]), #117 ('_struct',[[('x',73,-2),('y',73,-1)]]), #118 ('_optional',[73]), #119 ('_struct',[[('m_target',118,-8),('m_distance',119,-7),('m_pitch',119,-6),('m_yaw',119,-5)]]), #120 ('_int',[(0,1)]), #121 ('_struct',[[('m_skipType',121,-5)]]), #122 ('_int',[(0,11)]), #123 ('_struct',[[('x',123,-2),('y',123,-1)]]), #124 ('_struct',[[('m_button',5,-8),('m_down',24,-7),('m_posUI',124,-6),('m_posWorld',77,-5)]]), #125 ('_struct',[[('m_posUI',124,-6),('m_posWorld',77,-5)]]), #126 ('_struct',[[('m_achievementLink',73,-5)]]), #127 ('_struct',[[('m_soundtrack',5,-5)]]), #128 ('_struct',[[('m_planetId',68,-5)]]), #129 ('_struct',[[('m_key',96,-6),('m_flags',96,-5)]]), #130 ('_struct',[[('m_resources',93,-5)]]), #131 ('_struct',[[('m_fulfillRequestId',68,-5)]]), #132 ('_struct',[[('m_cancelRequestId',68,-5)]]), #133 ('_struct',[[('m_researchItemId',68,-5)]]), #134 ('_struct',[[('m_laggingPlayerId',1,-5)]]), #135 ('_struct',[[('m_mercenaryId',68,-5)]]), #136 ('_struct',[[('m_battleReportId',68,-6),('m_difficultyLevel',68,-5)]]), #137 ('_struct',[[('m_battleReportId',68,-5)]]), #138 ('_int',[(0,19)]), #139 ('_struct',[[('m_decrementMs',139,-5)]]), #140 ('_struct',[[('m_portraitId',68,-5)]]), #141 ('_struct',[[('m_functionName',13,-5)]]), #142 ('_struct',[[('m_result',68,-5)]]), #143 ('_struct',[[('m_gameMenuItemIndex',68,-5)]]), #144 ('_struct',[[('m_reason',96,-5)]]), #145 ('_struct',[[('m_purchaseCategoryId',68,-5)]]), #146 ('_struct',[[('m_button',73,-5)]]), #147 ('_struct',[[('m_cutsceneId',68,-6),('m_bookmarkName',13,-5)]]), #148 ('_struct',[[('m_cutsceneId',68,-5)]]), #149 ('_struct',[[('m_cutsceneId',68,-7),('m_conversationLine',13,-6),('m_altConversationLine',13,-5)]]), #150 ('_struct',[[('m_cutsceneId',68,-6),('m_conversationLine',13,-5)]]), #151 ('_struct',[[('m_recipient',10,-3),('m_string',22,-2)]]), #152 ('_struct',[[('m_recipient',10,-3),('m_point',69,-2)]]), #153 ('_struct',[[('m_progress',68,-2)]]), #154 ] # Map from protocol NNet.Game.*Event eventid to (typeid, name) game_event_types = { 5: (66, 'NNet.Game.SUserFinishedLoadingSyncEvent'), 7: (58, 'NNet.Game.SBankFileEvent'), 8: (60, 'NNet.Game.SBankSectionEvent'), 9: (61, 'NNet.Game.SBankKeyEvent'), 10: (62, 'NNet.Game.SBankValueEvent'), 11: (64, 'NNet.Game.SBankSignatureEvent'), 12: (65, 'NNet.Game.SUserOptionsEvent'), 22: (67, 'NNet.Game.SSaveGameEvent'), 23: (66, 'NNet.Game.SSaveGameDoneEvent'), 25: (66, 'NNet.Game.SPlayerLeaveEvent'), 26: (71, 'NNet.Game.SGameCheatEvent'), 27: (81, 'NNet.Game.SCmdEvent'), 28: (89, 'NNet.Game.SSelectionDeltaEvent'), 29: (90, 'NNet.Game.SControlGroupUpdateEvent'), 30: (92, 'NNet.Game.SSelectionSyncCheckEvent'), 31: (94, 'NNet.Game.SResourceTradeEvent'), 32: (95, 'NNet.Game.STriggerChatMessageEvent'), 33: (98, 'NNet.Game.SAICommunicateEvent'), 34: (99, 'NNet.Game.SSetAbsoluteGameSpeedEvent'), 35: (100, 'NNet.Game.SAddAbsoluteGameSpeedEvent'), 36: (101, 'NNet.Game.STriggerPingEvent'), 37: (102, 'NNet.Game.SBroadcastCheatEvent'), 38: (103, 'NNet.Game.SAllianceEvent'), 39: (104, 'NNet.Game.SUnitClickEvent'), 40: (105, 'NNet.Game.SUnitHighlightEvent'), 41: (106, 'NNet.Game.STriggerReplySelectedEvent'), 44: (66, 'NNet.Game.STriggerSkippedEvent'), 45: (111, 'NNet.Game.STriggerSoundLengthQueryEvent'), 46: (115, 'NNet.Game.STriggerSoundOffsetEvent'), 47: (116, 'NNet.Game.STriggerTransmissionOffsetEvent'), 48: (117, 'NNet.Game.STriggerTransmissionCompleteEvent'), 49: (120, 'NNet.Game.SCameraUpdateEvent'), 50: (66, 'NNet.Game.STriggerAbortMissionEvent'), 51: (107, 'NNet.Game.STriggerPurchaseMadeEvent'), 52: (66, 'NNet.Game.STriggerPurchaseExitEvent'), 53: (108, 'NNet.Game.STriggerPlanetMissionLaunchedEvent'), 54: (66, 'NNet.Game.STriggerPlanetPanelCanceledEvent'), 55: (110, 'NNet.Game.STriggerDialogControlEvent'), 56: (114, 'NNet.Game.STriggerSoundLengthSyncEvent'), 57: (122, 'NNet.Game.STriggerConversationSkippedEvent'), 58: (125, 'NNet.Game.STriggerMouseClickedEvent'), 59: (126, 'NNet.Game.STriggerMouseMovedEvent'), 60: (127, 'NNet.Game.SAchievementAwardedEvent'), 63: (66, 'NNet.Game.STriggerPlanetPanelReplayEvent'), 64: (128, 'NNet.Game.STriggerSoundtrackDoneEvent'), 65: (129, 'NNet.Game.STriggerPlanetMissionSelectedEvent'), 66: (130, 'NNet.Game.STriggerKeyPressedEvent'), 67: (142, 'NNet.Game.STriggerMovieFunctionEvent'), 68: (66, 'NNet.Game.STriggerPlanetPanelBirthCompleteEvent'), 69: (66, 'NNet.Game.STriggerPlanetPanelDeathCompleteEvent'), 70: (131, 'NNet.Game.SResourceRequestEvent'), 71: (132, 'NNet.Game.SResourceRequestFulfillEvent'), 72: (133, 'NNet.Game.SResourceRequestCancelEvent'), 73: (66, 'NNet.Game.STriggerResearchPanelExitEvent'), 74: (66, 'NNet.Game.STriggerResearchPanelPurchaseEvent'), 75: (134, 'NNet.Game.STriggerResearchPanelSelectionChangedEvent'), 76: (135, 'NNet.Game.SLagMessageEvent'), 77: (66, 'NNet.Game.STriggerMercenaryPanelExitEvent'), 78: (66, 'NNet.Game.STriggerMercenaryPanelPurchaseEvent'), 79: (136, 'NNet.Game.STriggerMercenaryPanelSelectionChangedEvent'), 80: (66, 'NNet.Game.STriggerVictoryPanelExitEvent'), 81: (66, 'NNet.Game.STriggerBattleReportPanelExitEvent'), 82: (137, 'NNet.Game.STriggerBattleReportPanelPlayMissionEvent'), 83: (138, 'NNet.Game.STriggerBattleReportPanelPlaySceneEvent'), 84: (138, 'NNet.Game.STriggerBattleReportPanelSelectionChangedEvent'), 85: (108, 'NNet.Game.STriggerVictoryPanelPlayMissionAgainEvent'), 86: (66, 'NNet.Game.STriggerMovieStartedEvent'), 87: (66, 'NNet.Game.STriggerMovieFinishedEvent'), 88: (140, 'NNet.Game.SDecrementGameTimeRemainingEvent'), 89: (141, 'NNet.Game.STriggerPortraitLoadedEvent'), 90: (143, 'NNet.Game.STriggerCustomDialogDismissedEvent'), 91: (144, 'NNet.Game.STriggerGameMenuItemSelectedEvent'), 92: (145, 'NNet.Game.STriggerCameraMoveEvent'), 93: (107, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseItemChangedEvent'), 94: (146, 'NNet.Game.STriggerPurchasePanelSelectedPurchaseCategoryChangedEvent'), 95: (147, 'NNet.Game.STriggerButtonPressedEvent'), 96: (66, 'NNet.Game.STriggerGameCreditsFinishedEvent'), 97: (148, 'NNet.Game.STriggerCutsceneBookmarkFiredEvent'), 98: (149, 'NNet.Game.STriggerCutsceneEndSceneFiredEvent'), 99: (150, 'NNet.Game.STriggerCutsceneConversationLineEvent'), 100: (151, 'NNet.Game.STriggerCutsceneConversationLineMissingEvent'), } # The typeid of the NNet.Game.EEventId enum. game_eventid_typeid = 0 # Map from protocol NNet.Game.*Message eventid to (typeid, name) message_event_types = { 0: (152, 'NNet.Game.SChatMessage'), 1: (153, 'NNet.Game.SPingMessage'), 2: (154, 'NNet.Game.SLoadingProgressMessage'), 3: (66, 'NNet.Game.SServerPingMessage'), } # The typeid of the NNet.Game.EMessageId enum. message_eventid_typeid = 1 # Map from protocol NNet.Replay.Tracker.*Event eventid to (typeid, name) tracker_event_types = { } # NOTE: older builds may not support some types and the generated methods # may fail to function properly, if specific backwards compatibility is # needed these values should be tested against for None # The typeid of the NNet.Replay.Tracker.EEventId enum. tracker_eventid_typeid = None # The typeid of NNet.SVarUint32 (the type used to encode gameloop deltas). svaruint32_typeid = 6 # The typeid of NNet.Replay.SGameUserId (the type used to encode player ids). replay_userid_typeid = None # The typeid of NNet.Replay.SHeader (the type used to store replay game version and length). replay_header_typeid = 11 # The typeid of NNet.Game.SDetails (the type used to store overall replay details). game_details_typeid = 32 # The typeid of NNet.Replay.SInitData (the type used to store the inital lobby). replay_initdata_typeid = 57 def _varuint32_value(value): # Returns the numeric value from a SVarUint32 instance. for v in value.values(): return v return 0 def _decode_event_stream(decoder, eventid_typeid, event_types, decode_user_id): # Decodes events prefixed with a gameloop and possibly userid gameloop = 0 while not decoder.done(): start_bits = decoder.used_bits() # decode the gameloop delta before each event delta = _varuint32_value(decoder.instance(svaruint32_typeid)) gameloop += delta # decode the userid before each event if decode_user_id: userid = decoder.instance(replay_userid_typeid) # decode the event id eventid = decoder.instance(eventid_typeid) typeid, typename = event_types.get(eventid, (None, None)) if typeid is None: raise CorruptedError('eventid({}) at {}'.format(eventid, decoder)) # decode the event struct instance event = decoder.instance(typeid) event['_event'] = typename event['_eventid'] = eventid # insert gameloop and userid event['_gameloop'] = gameloop if decode_user_id: event['_userid'] = userid # the next event is byte aligned decoder.byte_align() # insert bits used in stream event['_bits'] = decoder.used_bits() - start_bits yield event def decode_replay_game_events(contents): """Decodes and yields each game event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, game_eventid_typeid, game_event_types, decode_user_id=True): yield event def decode_replay_message_events(contents): """Decodes and yields each message event from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, message_eventid_typeid, message_event_types, decode_user_id=True): yield event def decode_replay_tracker_events(contents): """Decodes and yields each tracker event from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) for event in _decode_event_stream(decoder, tracker_eventid_typeid, tracker_event_types, decode_user_id=False): yield event def decode_replay_header(contents): """Decodes and return the replay header from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(replay_header_typeid) def decode_replay_details(contents): """Decodes and returns the game details from the contents byte string.""" decoder = VersionedDecoder(contents, typeinfos) return decoder.instance(game_details_typeid) def decode_replay_initdata(contents): """Decodes and return the replay init data from the contents byte string.""" decoder = BitPackedDecoder(contents, typeinfos) return decoder.instance(replay_initdata_typeid) def decode_replay_attributes_events(contents): """Decodes and yields each attribute from the contents byte string.""" buffer = BitPackedBuffer(contents, 'little') attributes = {} if not buffer.done(): attributes['source'] = buffer.read_bits(8) attributes['mapNamespace'] = buffer.read_bits(32) count = buffer.read_bits(32) attributes['scopes'] = {} while not buffer.done(): value = {} value['namespace'] = buffer.read_bits(32) value['attrid'] = attrid = buffer.read_bits(32) scope = buffer.read_bits(8) value['value'] = buffer.read_aligned_bytes(4)[::-1].strip(b'\x00') if not scope in attributes['scopes']: attributes['scopes'][scope] = {} if not attrid in attributes['scopes'][scope]: attributes['scopes'][scope][attrid] = [] attributes['scopes'][scope][attrid].append(value) return attributes def unit_tag(unitTagIndex, unitTagRecycle): return (unitTagIndex << 18) + unitTagRecycle def unit_tag_index(unitTag): return (unitTag >> 18) & 0x00003fff def unit_tag_recycle(unitTag): return (unitTag) & 0x0003ffff
zephyrus-sc2-parser
/zephyrus-sc2-parser-0.3.8.tar.gz/zephyrus-sc2-parser-0.3.8/zephyrus_sc2_parser/s2protocol_fixed/versions/protocol23260.py
protocol23260.py