本文整理汇总了Python中orc.Orc.health方法的典型用法代码示例。如果您正苦于以下问题:Python Orc.health方法的具体用法?Python Orc.health怎么用?Python Orc.health使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类orc.Orc
的用法示例。
在下文中一共展示了Orc.health方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_Orc_take_healing_maxhealing
# 需要导入模块: from orc import Orc [as 别名]
# 或者: from orc.Orc import health [as 别名]
def test_Orc_take_healing_maxhealing(self):
my_Orc = Orc("Ivan", 100, 1.5)
my_Orc.health = 100
my_Orc.take_healing(10)
self.assertEqual(my_Orc.get_health(), 100)
示例2: test_Orc_take_healing
# 需要导入模块: from orc import Orc [as 别名]
# 或者: from orc.Orc import health [as 别名]
def test_Orc_take_healing(self):
my_Orc = Orc("Ivan", 100, 1.5)
my_Orc.health = 50
my_Orc.take_healing(30)
self.assertEqual(my_Orc.get_health(), 80)
示例3: test_Orc_take_healing_dead
# 需要导入模块: from orc import Orc [as 别名]
# 或者: from orc.Orc import health [as 别名]
def test_Orc_take_healing_dead(self):
my_Orc = Orc("Ivan", 100, 1.5)
my_Orc.health = 0
self.assertFalse(my_Orc.take_healing(30))
self.assertEqual(my_Orc.get_health(), 0)
示例4: test_Orc_is_alive_dead
# 需要导入模块: from orc import Orc [as 别名]
# 或者: from orc.Orc import health [as 别名]
def test_Orc_is_alive_dead(self):
my_Orc = Orc("Ivan", 100, 1.5)
my_Orc.health = 0
self.assertFalse(my_Orc.is_alive())