本文整理汇总了Python中wizard.Wizard.strike方法的典型用法代码示例。如果您正苦于以下问题:Python Wizard.strike方法的具体用法?Python Wizard.strike怎么用?Python Wizard.strike使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wizard.Wizard
的用法示例。
在下文中一共展示了Wizard.strike方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_no_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_no_manna(self):
wizard = Wizard("Test", 40, 10, 0)
opponent = Wizard("Opponent", 40, 10, 20)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 0)
示例2: test_strike_wo_mana
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_wo_mana(self):
wizard = Wizard('GHAARRiYYY', 50, 30, 0)
opponent = Wizard('VOLDERMORT', 100, 70, 20)
wizard.strike(opponent)
self.assertEqual(opponent.hp, 90)
示例3: test_without_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_without_manna(self):
wizard = Wizard("Merlin", 40, 10, 20)
opponent = Wizard("Other",30, 5, 20)
wizard.strike(opponent)
self.assertEqual(opponent.manna, 15)
示例4: test_strike_too_less_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_too_less_manna(self):
wizard = Wizard('Merlin', 40, 12, 4)
opponent = Wizard('Oz', 40, 10, 30)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 4)
self.assertEqual(opponent.hp, 36)
示例5: test_strike_with_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_with_manna(self):
wizard = Wizard("Merlin", 40, 10, 20)
opponent = Wizard("Malfoy", 30, 5, 10)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 15)
示例6: test_strike_less_than_five_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_less_than_five_manna(self):
wizard = Wizard("Merlin", 40, 9, 4)
opponent = Wizard("opi", 40, 10, 20)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 4)
self.assertEqual(opponent.hp, 37)
示例7: test_strike_manna_decrease
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_manna_decrease(self):
wizard = Wizard('Merlin', 40, 10, 20)
opponent = Wizard('Oz', 40, 10, 30)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 15)
示例8: test_strike_manna_strong
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_manna_strong(self):
wizard = Wizard('TestWizard', 100, 10, 10)
enemy = Character('TestCharacter', 100, 10)
wizard.strike(enemy)
self.assertEqual(enemy.hp, 70)
示例9: test_strike_manna_reduce
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_manna_reduce(self):
wizard = Wizard('Merlin', 40, 10, 6)
enemy = Wizard('Oz', 50, 8, 5)
wizard.strike(enemy)
self.assertEqual(wizard.manna, 6-5)
示例10: test_strike_with_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_with_manna(self):
wizard = Wizard('Merlin', 40, 10, 20)
opponent = Wizard('Malfoy', 30, 5, 10)
wizard.strike(opponent)
self.assertEqual(opponent.hp, 0)
示例11: test_strike_manna_week
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_manna_week(self):
wizard = Wizard('TestWizard', 100, 9, 4)
enemy = Character('TestCharacter', 100, 10)
wizard.strike(enemy)
self.assertEqual(enemy.hp, 97)
示例12: test_no_reduce_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_no_reduce_manna(self):
wizard = Wizard('Merlin', 40, 10, 0)
opponent = Wizard('Malfoy', 30, 5, 10)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 0)
示例13: test_strike_without_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_without_manna(self):
wizard = Wizard("Test", 40, 5, 0)
opponent = Wizard("Opponent", 40, 10, 20)
wizard.strike(opponent)
self.assertEqual(opponent.hp, 27)
示例14: test_more_than_5_manna
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_more_than_5_manna(self):
wizard = Wizard("Test", 40, 10, 20)
opponent = Wizard("Opponent", 40, 10, 20)
self.assertEqual(wizard.manna, 15)
wizard.strike(opponent)
sels.assertEqual(opponent.hp, 0)
示例15: test_strike_4
# 需要导入模块: from wizard import Wizard [as 别名]
# 或者: from wizard.Wizard import strike [as 别名]
def test_strike_4(self):
wizard = Wizard("Harry", 40, 10, 25)
opponent = Wizard("Hermioner", 9, 2, 10)
wizard.strike(opponent)
self.assertEqual(wizard.manna, 20)