• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python relations.MODIFIERS类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中the_tale.game.heroes.relations.MODIFIERS的典型用法代码示例。如果您正苦于以下问题:Python MODIFIERS类的具体用法?Python MODIFIERS怎么用?Python MODIFIERS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了MODIFIERS类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: test_witchcraft

    def test_witchcraft(self):
        self.assertEqual(companions.WITCHCRAFT().modify_attribute(MODIFIERS.COMPANION_UNUSUAL_HEAL, 0), 0.0462962962962963)
        self.assertEqual(companions.WITCHCRAFT().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_UNUSUAL_HEAL,)), 0), 0)

        self.assertEqual(self.hero.companion_unusual_heal_probability, 0)
        self.hero.abilities.add(companions.WITCHCRAFT.get_id(), 3)
        self.assertEqual(self.hero.companion_unusual_heal_probability, 0.1388888888888889)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例2: test_coherence

    def test_coherence(self):
        self.assertEqual(companions.COHERENCE().modify_attribute(MODIFIERS.COMPANION_MAX_COHERENCE, 0), 20)
        self.assertEqual(companions.COHERENCE().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_MAX_COHERENCE,)), 1), 1)

        self.assertEqual(self.hero.companion_max_coherence, 20) # coherence lvl 1 — default hero ability
        self.hero.abilities.add(companions.COHERENCE.get_id(), 3)
        self.assertEqual(self.hero.companion_max_coherence, 60)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例3: test_service

    def test_service(self):
        self.assertEqual(companions.SERVICE().modify_attribute(MODIFIERS.COMPANION_CONSTRUCT_COHERENCE_SPEED, 1), 1.2)
        self.assertEqual(companions.SERVICE().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_CONSTRUCT_COHERENCE_SPEED,)), 1), 1)

        self.assertEqual(self.hero.companion_construct_coherence_speed, 1)
        self.hero.abilities.add(companions.SERVICE.get_id(), 3)
        self.assertEqual(self.hero.companion_construct_coherence_speed, 1.6)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例4: test_thoughtful

    def test_thoughtful(self):
        self.assertEqual(companions.THOUGHTFUL().modify_attribute(MODIFIERS.COMPANION_MAX_HEALTH, 1.0), 1.1)
        self.assertEqual(companions.THOUGHTFUL().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_MAX_HEALTH,)), 1), 1)

        self.assertEqual(self.hero.companion_max_health_multiplier, 1)
        self.hero.abilities.add(companions.THOUGHTFUL.get_id(), 3)
        self.assertEqual(self.hero.companion_max_health_multiplier, 1.3)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例5: test_mage_mechanincs

    def test_mage_mechanincs(self):
        self.assertEqual(companions.MAGE_MECHANICS().modify_attribute(MODIFIERS.COMPANION_CONSTRUCT_HEAL, 0), 0.0462962962962963)
        self.assertEqual(companions.MAGE_MECHANICS().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_CONSTRUCT_HEAL,)), 0), 0)

        self.assertEqual(self.hero.companion_construct_heal_probability, 0)
        self.hero.abilities.add(companions.MAGE_MECHANICS.get_id(), 3)
        self.assertEqual(self.hero.companion_construct_heal_probability, 0.1388888888888889)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例6: test_sociability

    def test_sociability(self):
        self.assertEqual(companions.SOCIABILITY().modify_attribute(MODIFIERS.COMPANION_LIVING_COHERENCE_SPEED, 1), 1.2)
        self.assertEqual(companions.SOCIABILITY().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_LIVING_COHERENCE_SPEED,)), 1), 1)

        self.assertEqual(self.hero.companion_living_coherence_speed, 1)
        self.hero.abilities.add(companions.SOCIABILITY.get_id(), 3)
        self.assertEqual(self.hero.companion_living_coherence_speed, 1.6)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例7: test_healing

    def test_healing(self):
        self.assertEqual(companions.HEALING().modify_attribute(MODIFIERS.COMPANION_LIVING_HEAL, 0), 0.0462962962962963)
        self.assertEqual(companions.HEALING().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_LIVING_HEAL,)), 0), 0)

        self.assertEqual(self.hero.companion_living_heal_probability, 0)
        self.hero.abilities.add(companions.HEALING.get_id(), 3)
        self.assertEqual(self.hero.companion_living_heal_probability, 0.1388888888888889)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例8: test_sacredness

    def test_sacredness(self):
        self.assertEqual(companions.SACREDNESS().modify_attribute(MODIFIERS.COMPANION_UNUSUAL_COHERENCE_SPEED, 1), 1.2)
        self.assertEqual(companions.SACREDNESS().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_UNUSUAL_COHERENCE_SPEED,)), 1), 1)

        self.assertEqual(self.hero.companion_unusual_coherence_speed, 1)
        self.hero.abilities.add(companions.SACREDNESS.get_id(), 3)
        self.assertEqual(self.hero.companion_unusual_coherence_speed, 1.6)
开发者ID:Alkalit,项目名称:the-tale,代码行数:7,代码来源:test_habilities_companions.py


示例9: test_economic

    def test_economic(self):
        self.assertEqual(companions.ECONOMIC().modify_attribute(MODIFIERS.COMPANION_ABILITIES_LEVELS, {}),
                        {companions_abilities_relations.METATYPE.MONEY: 1})
        self.assertEqual(companions.ECONOMIC().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_ABILITIES_LEVELS,)), {}), {})

        self.assertEqual(self.hero.companion_abilities_levels, {})
        self.hero.abilities.add(companions.ECONOMIC.get_id(), 3)
        self.assertEqual(self.hero.companion_abilities_levels, {companions_abilities_relations.METATYPE.MONEY: 3})
开发者ID:Alkalit,项目名称:the-tale,代码行数:8,代码来源:test_habilities_companions.py


示例10: test_improviser

    def test_improviser(self):
        self.assertEqual(companions.IMPROVISER().modify_attribute(MODIFIERS.COMPANION_ABILITIES_LEVELS, {}),
                        {companions_abilities_relations.METATYPE.OTHER: 1})
        self.assertEqual(companions.IMPROVISER().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_ABILITIES_LEVELS,)), {}), {})

        self.assertEqual(self.hero.companion_abilities_levels, {})
        self.hero.abilities.add(companions.IMPROVISER.get_id(), 3)
        self.assertEqual(self.hero.companion_abilities_levels, {companions_abilities_relations.METATYPE.OTHER: 3})
开发者ID:Alkalit,项目名称:the-tale,代码行数:8,代码来源:test_habilities_companions.py


示例11: test_comrade

    def test_comrade(self):
        self.assertEqual(companions.COMRADE().modify_attribute(MODIFIERS.COMPANION_ABILITIES_LEVELS, {}),
                        {companions_abilities_relations.METATYPE.BATTLE: 1})
        self.assertEqual(companions.COMRADE().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_ABILITIES_LEVELS,)), {}), {})

        self.assertEqual(self.hero.companion_abilities_levels, {})
        self.hero.abilities.add(companions.COMRADE.get_id(), 3)
        self.assertEqual(self.hero.companion_abilities_levels, {companions_abilities_relations.METATYPE.BATTLE: 3})
开发者ID:Alkalit,项目名称:the-tale,代码行数:8,代码来源:test_habilities_companions.py


示例12: test_healing

    def test_healing(self):
        self.assertEqual(companions.HEALING().modify_attribute(MODIFIERS.COMPANION_LIVING_HEAL, 0), 0.0462962962962963)
        self.assertEqual(companions.HEALING().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_LIVING_HEAL,)), 0), 0)

        companion_record = companions_storage.companions.enabled_companions().next()
        self.hero.set_companion(companions_logic.create_companion(companion_record))

        with mock.patch('the_tale.game.companions.objects.CompanionRecord.type', game_relations.BEING_TYPE.ANIMAL):
            self.assertEqual(self.hero.companion_heal_probability, 0)
            self.hero.abilities.add(companions.HEALING.get_id(), 3)
            self.assertEqual(self.hero.companion_heal_probability, 0.1388888888888889)
开发者ID:alexudracul,项目名称:the-tale,代码行数:11,代码来源:test_habilities_companions.py


示例13: test_sociability

    def test_sociability(self):
        self.assertEqual(companions.SOCIABILITY().modify_attribute(MODIFIERS.COMPANION_LIVING_COHERENCE_SPEED, 1), 1.2)
        self.assertEqual(companions.SOCIABILITY().modify_attribute(MODIFIERS.random(exclude=(MODIFIERS.COMPANION_LIVING_COHERENCE_SPEED,)), 1), 1)

        companion_record = companions_storage.companions.enabled_companions().next()
        self.hero.set_companion(companions_logic.create_companion(companion_record))

        with mock.patch('the_tale.game.companions.objects.CompanionRecord.type', game_relations.BEING_TYPE.ANIMAL):
            self.assertEqual(self.hero.companion_coherence_speed, 1)
            self.hero.abilities.add(companions.SOCIABILITY.get_id(), 3)
            self.assertEqual(self.hero.companion_coherence_speed, 1.6)
开发者ID:alexudracul,项目名称:the-tale,代码行数:11,代码来源:test_habilities_companions.py



注:本文中的the_tale.game.heroes.relations.MODIFIERS类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python logic.create_test_map函数代码示例发布时间:2022-05-27
下一篇:
Python prototypes.HeroPrototype类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap