コード例 #1
0
 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)
コード例 #2
0
ファイル: test_wizard.py プロジェクト: florimaros/florimaros
 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)
コード例 #3
0
 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)
コード例 #4
0
 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)
コード例 #5
0
 def test_strike(self):
     wizard = Wizard("Merlin", 40, 2, 20)
     opponent = Wizard("Dumbledor", 10, 2, 10)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 4)
コード例 #6
0
 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)
コード例 #7
0
 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)
コード例 #8
0
 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)
コード例 #9
0
 def test_strike_without_manna(self):
     wizard = Wizard('Merlin', 40, 9, 0)
     opponent = Wizard('Other', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 27)
コード例 #10
0
 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)
コード例 #11
0
 def test_reduce_manna(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Other', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 0)
コード例 #12
0
 def test_strike_with_manna(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Other', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 15)
コード例 #13
0
 def test_strike_lowmanna(self):
     wizard = Wizard("Merlin", 40, 10, 20)
     opponent = Wizard("Saruman", 50, 9, 4)
     opponent.strike(wizard)
     self.assertEqual(wizard.hp, 37)
     self.assertEqual(opponent.manna, 4)
コード例 #14
0
	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)
コード例 #15
0
 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)
コード例 #16
0
 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)
コード例 #17
0
 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)
コード例 #18
0
ファイル: wizard_test.py プロジェクト: Wushaowei001/frankedus
 def test_strike_without_manna(self):
     wizard = Wizard('Merlin', 40, 9, 0)
     opponent = Wizard('Other', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 27)
コード例 #19
0
 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)
コード例 #20
0
 def test_strike_3(self):
     wizard = Wizard("Voldemort", 40, 10, 3)
     opponent = Wizard("Hermioner", 9, 2, 10)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 3)
コード例 #21
0
ファイル: wizard_test.py プロジェクト: glukocerin/mrakosms
 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)
コード例 #22
0
 def test_strike_five_manna(self):
     wizard = Wizard("Merlin", 40, 10, 20)
     opponent = Wizard("opi", 40, 10, 20)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 15)
     self.assertEqual(opponent.hp, 10)
コード例 #23
0
ファイル: wizard_test.py プロジェクト: glukocerin/mrakosms
 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)
コード例 #24
0
 def test_strike_no_manna(self):
     wizard = Wizard('Merlin', 40, 10, 4)
     other = Wizard('Ursula', 40, 10, 20)
     wizard.strike(other)
     self.assertEqual(wizard.manna, 4)
     self.assertEqual(other.hp, 37)
コード例 #25
0
 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)
コード例 #26
0
 def test_strike_triple_damage(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Oz', 40, 10, 30)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 15)
     self.assertEqual(opponent.hp, 10)
コード例 #27
0
 def test_strike_with_manna(self):
     wizard = Wizard('Merlin', 40, 10, 6)
     enemy = Wizard('Oz', 50, 8, 5)
     wizard.strike(enemy)
     self.assertEqual(wizard.manna, 6-5)
     self.assertEqual(enemy.hp, 50-3*10)
コード例 #28
0
 def test_strike_no_manna(self):
     wizard = Wizard('Merlin',100,10,0)
     opponent = Wizard('Gandalf',100,10,20)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna,0)
     self.assertEqual(opponent.hp,97)
コード例 #29
0
 def test_strike_without_manna(self):
     wizard = Wizard('Merlin', 40, 9, 0)
     enemy = Wizard('Oz', 50, 8, 5)
     wizard.strike(enemy)
     self.assertEqual(wizard.manna, 0-0)
     self.assertEqual(enemy.hp, 50-9/3)
コード例 #30
0
	def test_strike(self):
		wizard = Wizard('HARYYRYR', 50, 50, 20)
		opponent = Wizard('Tom Denem', 100, 70, 20)
		wizard.strike(opponent)
		self.assertEqual(opponent.hp, -50)
コード例 #31
0
ファイル: wizard_test.py プロジェクト: Wushaowei001/frankedus
 def test_strike_with_manna(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Other', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(wizard.manna, 15)
コード例 #32
0
	def test_manna(self):
		wizard = Wizard('hafaprotter', 50, 50, 20)
		opponent = Wizard('VODLMER', 100, 70, 20)
		wizard.strike(opponent)
		self.assertEqual(wizard.manna, 15)
コード例 #33
0
ファイル: wizard_test.py プロジェクト: Wushaowei001/frankedus
 def test_reduce_manna(self):
     wizard = Wizard('Merlin', 40, 10, 20)
     opponent = Wizard('Other', 30, 5, 10)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 0)
コード例 #34
0
 def test_strike_with_manna(self):
     wizard = Wizard("Merlin", 40, 9, 0)
     opponent = Wizard("Other", 30, 5, 20)
     wizard.strike(opponent)
     self.assertEqual(opponent.hp, 27)
コード例 #35
0
 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)