本文整理汇总了Python中ikalog.utils.IkaUtils.death_reason2text方法的典型用法代码示例。如果您正苦于以下问题:Python IkaUtils.death_reason2text方法的具体用法?Python IkaUtils.death_reason2text怎么用?Python IkaUtils.death_reason2text使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ikalog.utils.IkaUtils
的用法示例。
在下文中一共展示了IkaUtils.death_reason2text方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_death_reason2text
# 需要导入模块: from ikalog.utils import IkaUtils [as 别名]
# 或者: from ikalog.utils.IkaUtils import death_reason2text [as 别名]
def test_death_reason2text(self):
### Weapons
reason = 'hokusai'
# English
self.assertEqual('Octobrush',
IkaUtils.death_reason2text(reason, languages='en'))
# Japanese
self.assertEqual('ホクサイ',
IkaUtils.death_reason2text(reason, languages='ja'))
# Fallback to English
self.assertEqual('Octobrush',
IkaUtils.death_reason2text(reason, languages='??'))
# Multiple languages
self.assertEqual('ホクサイ',
IkaUtils.death_reason2text(reason,
languages=['ja', 'en']))
### Sub weapons
reason = 'trap'
self.assertEqual('Ink Mine',
IkaUtils.death_reason2text(reason, languages='en'))
self.assertEqual('トラップ',
IkaUtils.death_reason2text(reason, languages='ja'))
### Special weapons
reason = 'daioika'
self.assertEqual('Kraken',
IkaUtils.death_reason2text(reason, languages='en'))
self.assertEqual('ダイオウイカ',
IkaUtils.death_reason2text(reason, languages='ja'))
### Hurtable objects
reason = 'hoko_shot'
self.assertEqual('Rainmaker Shot',
IkaUtils.death_reason2text(reason, languages='en'))
self.assertEqual('ガチホコショット',
IkaUtils.death_reason2text(reason, languages='ja'))
### OOB reasons
reason = 'oob'
self.assertEqual('Out of Bounds',
IkaUtils.death_reason2text(reason, languages='en'))
self.assertEqual('場外',
IkaUtils.death_reason2text(reason, languages='ja'))
### Unkonwn
unknown_reason = 'unknown'
self.assertEqual('?', IkaUtils.death_reason2text(unknown_reason))
self.assertEqual('<:=',
IkaUtils.death_reason2text(unknown_reason,
unknown='<:='))