How to use sc2reader - 10 common examples

To help you get started, we’ve selected a few sc2reader examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GraylinKim / sc2reader / test_replays / test_all.py View on Github external
def test_encrypted(self):
        replay = sc2reader.load_replay("test_replays/1.2.2.17811/4.SC2Replay")
github GraylinKim / sc2reader / test_replays / test_all.py View on Github external
def test_referee(self):
        replay = sc2reader.load_replay("test_replays/1.2.2.17811/14.SC2Replay")
github GraylinKim / sc2reader / tests / tests.py View on Github external
def test_list_constructor(self):
		lookup = sc2reader.utils.PersonDict([
			sc2reader.objects.Player(1, "player1"),
			sc2reader.objects.Player(2, "player2")
		])

		self.assertEquals(lookup[1].name, "player1")
		self.assertEquals(lookup["player2"].pid, 2)
github GraylinKim / sc2reader / tests / tests.py View on Github external
def test_color(self):
		color = sc2reader.utils.Color(r=0x00, g=0x42, b=0xFF, a=75)
		self.assertEqual(color.rgba, (0x00,0x42,0xFF,75))
		self.assertEqual(color.hex, "0042FF")
github GraylinKim / sc2reader / sc2reader / data / base.py View on Github external
class MineralField(Resource):
    pass

class RichMineralField(MineralField):
    pass

class VespeneGeyser(Resource):
    pass

class RichVespeneGeyser(VespeneGeyser):
    pass

class Moveable(DataObject):
    pass

class Critter(Moveable):
    pass

class Destructable(DataObject):
    pass

class Attacker(DataObject):
    pass

class Army(Moveable, Attacker):
    pass

class Unit(DataObject):
    pass

class Supporter(DataObject):
    pass
github GraylinKim / sc2reader / sc2reader / old_data.py View on Github external
research = {
        0x031100: 'Centrifugal Hooks',
    }
class CreepTumor(GameObject, Building, Zerg):
    code = 0x7301
    abilities = { 
        0x033a10: 'Spawn Creep Tumor',
        0x03fa06: 'Cancel Creep Tumor',
    }
class BurrowedCreepTumor(GameObject, Building, Zerg):
    code = 0xa501
    abilities = { 
        0x033a10: 'Spawn Creep Tumor',
        0x03fa06: 'Cancel Creep Tumor',
    }
class HydraliskDen(GameObject, Building, Zerg):
    code = 0x7701
    research = {
        0x023002: 'Grooved Spines',
    }
class InfestationPit(GameObject, Building, Zerg):
    code = 0x7a01
    research = {
        0x031002: 'Pathogen Glands',
        0x031003: 'Neural Parasite',
    }
class NydusNetwork(GameObject, Building, Zerg):
    code = 0x7b01
    abilities = {
        0x033d10: 'Spawn Nydus Worm',
    }
class Spire(GameObject, Building, Zerg):
github GraylinKim / sc2reader / sc2reader / old_data.py View on Github external
code = 0x7701
    research = {
        0x023002: 'Grooved Spines',
    }
class InfestationPit(GameObject, Building, Zerg):
    code = 0x7a01
    research = {
        0x031002: 'Pathogen Glands',
        0x031003: 'Neural Parasite',
    }
class NydusNetwork(GameObject, Building, Zerg):
    code = 0x7b01
    abilities = {
        0x033d10: 'Spawn Nydus Worm',
    }
class Spire(GameObject, Building, Zerg):
    code = 0x7801
    research = {
        0x023100: 'Flyer Attacks Level 1',
        0x023101: 'Flyer Attacks Level 2',
        0x023102: 'Flyer Attacks Level 3',
        0x023103: 'Flyer Carapace Level 1',
        0x023104: 'Flyer Carapace Level 2',
        0x023105: 'Flyer Carapace Level 3',
    }
    @Upgrade(0x022d00, 0x022d01)
    class GreaterSpire(object):
        code = 0x8201
        inherit = True

class UltraliskCavern(GameObject, Building, Zerg):
    code = 0x7901
github GraylinKim / sc2reader / sc2reader / data / base.py View on Github external
class HydraliskDen(Zerg, Building):
        code = 0x7701

    class Spire(Zerg, Building):
        code = 0x7801

    class UltraliskCavern(Zerg, Building):
        code = 0x7901

    class InfestationPit(Zerg, Building):
        code = 0x7a01

    class NydusNetwork(Zerg, Building):
        code = 0x7b01

    class BanelingNest(Zerg, Building):
        code = 0x7c01

    class RoachWarren(Zerg, Building):
        code = 0x7d01

    class Lair(Zerg, Building, Main):
        code = 0x8001

    class Hive(Zerg, Building, Main):
        code = 0x8101

    class GreaterSpire(Zerg, Building):
        code = 0x8201

    class SpineCrawler(Zerg, Building, Attacker):
        code = 0x7e01
github GraylinKim / sc2reader / sc2reader / data / base.py View on Github external
class ChangelingZergling(Changeling):
        code = 0x2a01

    class ChangelingZerglingWings(ChangelingZergling):
        code = 0x2b01

    class Hatchery(Zerg, Building, Main):
        code = 0x7201

    class CreepTumor(Zerg, Building):
        code = 0x7301

    class Extractor(Zerg, Building):
        code = 0x7401

    class SpawningPool(Zerg, Building):
        code = 0x7501

    class EvolutionChamber(Zerg, Building):
        code = 0x7601

    class HydraliskDen(Zerg, Building):
        code = 0x7701

    class Spire(Zerg, Building):
        code = 0x7801

    class UltraliskCavern(Zerg, Building):
        code = 0x7901

    class InfestationPit(Zerg, Building):
        code = 0x7a01
github GraylinKim / sc2reader / sc2reader / data / base.py View on Github external
class Extractor(Zerg, Building):
        code = 0x7401

    class SpawningPool(Zerg, Building):
        code = 0x7501

    class EvolutionChamber(Zerg, Building):
        code = 0x7601

    class HydraliskDen(Zerg, Building):
        code = 0x7701

    class Spire(Zerg, Building):
        code = 0x7801

    class UltraliskCavern(Zerg, Building):
        code = 0x7901

    class InfestationPit(Zerg, Building):
        code = 0x7a01

    class NydusNetwork(Zerg, Building):
        code = 0x7b01

    class BanelingNest(Zerg, Building):
        code = 0x7c01

    class RoachWarren(Zerg, Building):
        code = 0x7d01

    class Lair(Zerg, Building, Main):
        code = 0x8001