示例#1
0
    def setUp(self):
        super(MobsPrototypeTests, self).setUp()
        create_test_map()

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

        mobs_storage.sync(force=True)
示例#2
0
    def setUp(self):
        super(MobsPrototypeTests, self).setUp()
        create_test_map()

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

        mobs_storage.sync(force=True)
示例#3
0
    def setUp(self):
        super(MobsPrototypeTests, self).setUp()
        create_test_map()

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

        mobs_storage.sync(force=True)
示例#4
0
    def setUp(self):
        super(MobsPrototypeTests, self).setUp()
        create_test_map()

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

        mobs_storage.sync(force=True)
示例#5
0
    def test_mob_attributes(self):
        MobRecordPrototype.create(uuid='bandit',
                                  level=1,
                                  utg_name=names.generator.get_test_name(name='bandit'),
                                  description='bandint',
                                  abilities=['hit', 'thick', 'slow', 'extra_strong'],
                                  terrains=TERRAIN.records,
                                  type=MOB_TYPE.CIVILIZED,
                                  archetype=game_relations.ARCHETYPE.NEUTRAL,
                                  state=MOB_RECORD_STATE.ENABLED)
        mobs_storage.sync(force=True)

        bandit = MobPrototype(record_id=mobs_storage.get_by_uuid('bandit').id, level=1)

        self.assertEqual(bandit.health_cooficient, 1.025)
        self.assertEqual(bandit.initiative, 0.975)
        self.assertEqual(bandit.damage_modifier, 1.05)
示例#6
0
    def test_mob_attributes(self):
        MobRecordPrototype.create(uuid='bandit',
                                  level=1,
                                  utg_name=names.generator.get_test_name(name='bandit'),
                                  description='bandint',
                                  abilities=['hit', 'thick', 'slow', 'extra_strong'],
                                  terrains=TERRAIN.records,
                                  type=game_relations.BEING_TYPE.CIVILIZED,
                                  archetype=game_relations.ARCHETYPE.NEUTRAL,
                                  state=MOB_RECORD_STATE.ENABLED)
        mobs_storage.sync(force=True)

        bandit = MobPrototype(record_id=mobs_storage.get_by_uuid('bandit').id, level=1)

        self.assertEqual(bandit.health_cooficient, 1.025)
        self.assertEqual(bandit.initiative, 0.975)
        self.assertEqual(bandit.damage_modifier, 1.05)