Пример #1
0
 def test_get_eligible_defender_taunt(self):
     taunted_enemy = create_entity(taunt=True)
     untaunted_enemy = create_entity(taunt=False)
     attacker = create_entity(attack=1)
     combat = SimulatedCombat(([untaunted_enemy,
                                taunted_enemy], [attacker]))
     result = combat.get_eligible_defender(0)
     self.assertEqual(result, taunted_enemy)
Пример #2
0
 def test_get_eligible_defender_zapp_lowest_health(self):
     lowest_health_enemy = create_entity(health=1)
     combat = SimulatedCombat(([
         create_entity(health=2),
         create_entity(health=3),
         create_entity(health=4), lowest_health_enemy
     ], [create_entity(attack=1)]))
     result = combat.get_eligible_defender(0, lowest_health=True)
     self.assertEqual(result, lowest_health_enemy)