def test_attack_with_weapon(self): self.orc.equip_weapon(a_hero.Weapon('axe', 11, 1)) self.assertEqual(11 * 1.3 * 2, self.orc.attack())
def test_equip_weapon(self): self.assertEqual(False, self.orc.has_weapon()) self.orc.equip_weapon(a_hero.Weapon('axe', 11, 1)) self.assertEqual(True, self.orc.has_weapon())
def test_critical_hit_0_percent(self): self.weapon = a_hero.Weapon('axe', 11, 0) self.assertEqual(False, self.weapon.critical_hit())
def setUp(self): self.orc = a_hero.Orc("Thrall", 76, 1.3) self.orc.equip_weapon(a_hero.Weapon('axe', 11, 0.1)) self.h = a_hero.Hero("Bron", 100, "The DragonSlayer") self.h.equip_weapon(a_hero.Weapon('Broadsword', 14, 0.1)) self.fight = a_hero.Fight(self.h, self.orc)
def setUp(self): self.weapon = a_hero.Weapon('axe', 11, 1)