Beispiel #1
0
    def setUp(self):
        super(PrototypeTests, self).setUp()
        create_test_map()

        result, account_id, bundle_id = register_user('test_user')
        self.hero = HeroPrototype.get_by_account_id(account_id)

        artifacts_storage.sync(force=True)

        self.artifact_record = artifacts_storage.all()[0]
Beispiel #2
0
    def setUp(self):
        super(PrototypeTests, self).setUp()
        create_test_map()

        account = self.accounts_factory.create_account()
        self.hero = heroes_logic.load_hero(account_id=account.id)

        artifacts_storage.sync(force=True)

        self.artifact_record = artifacts_storage.all()[0]
Beispiel #3
0
    def setUp(self):
        super(PrototypeTests, self).setUp()
        create_test_map()

        account = self.accounts_factory.create_account()
        self.hero = heroes_logic.load_hero(account_id=account.id)

        artifacts_storage.sync(force=True)

        self.artifact_record = artifacts_storage.all()[0]
Beispiel #4
0
    def setUp(self):
        super(PrototypeTests, self).setUp()
        create_test_map()

        result, account_id, bundle_id = register_user('test_user')
        self.hero = HeroPrototype.get_by_account_id(account_id)

        artifacts_storage.sync(force=True)

        self.artifact_record = artifacts_storage.all()[0]
Beispiel #5
0
    def setUp(self):
        super(EffectsTests, self).setUp()

        create_test_map()

        result, account_id, bundle_id = register_user('test_user')
        self.hero = HeroPrototype.get_by_account_id(account_id)

        artifacts_storage.sync(force=True)

        self.artifact = self.hero.equipment.values()[0]
    def setUp(self):
        super(EffectsTests, self).setUp()

        create_test_map()

        result, account_id, bundle_id = register_user('test_user')
        self.hero = HeroPrototype.get_by_account_id(account_id)

        artifacts_storage.sync(force=True)

        self.artifact = self.hero.equipment.values()[0]
Beispiel #7
0
    def setUp(self):
        super(EffectsTests, self).setUp()

        create_test_map()

        account = self.accounts_factory.create_account()
        self.hero = heroes_logic.load_hero(account_id=account.id)

        artifacts_storage.sync(force=True)

        self.artifact = self.hero.equipment.values()[0]
        self.artifact_2 = self.hero.equipment.values()[1]
Beispiel #8
0
    def setUp(self):
        super(EffectsTests, self).setUp()

        create_test_map()

        account = self.accounts_factory.create_account()
        self.hero = heroes_logic.load_hero(account_id=account.id)

        artifacts_storage.sync(force=True)

        self.artifact = list(self.hero.equipment.values())[0]
        self.artifact_2 = list(self.hero.equipment.values())[1]
Beispiel #9
0
    def purchase_artifact(self, rarity, better):
        distribution = self.preferences.archetype.power_distribution

        power = Power.better_artifact_power_randomized(distribution, self.level) if better else Power.artifact_power_randomized(distribution, self.level)

        artifacts_storage.sync()

        artifact = random.choice(artifacts_storage.artifacts).create_artifact(level=self.level,
                                                                              power=power,
                                                                              rarity=rarity)
        self.put_loot(artifact, force=True)

        self.actions.request_replane()

        return artifact
Beispiel #10
0
    def purchase_artifact(self, rarity, better):
        distribution = self.preferences.archetype.power_distribution

        power = Power.better_artifact_power_randomized(
            distribution,
            self.level) if better else Power.artifact_power_randomized(
                distribution, self.level)

        artifacts_storage.sync()

        artifact = random.choice(artifacts_storage.artifacts).create_artifact(
            level=self.level, power=power, rarity=rarity)
        self.put_loot(artifact, force=True)

        self.actions.request_replane()

        return artifact