def test_handle_turn_windfury(self, attack_with): attacker = create_entity(attack=1, windfury=True) defender = create_entity(attack=0, health=100) combat = SimulatedCombat(([attacker], [defender])) combat.handle_turn(0, single_turn=True) attack_with.assert_has_calls( (unittest.mock.call(attacker), unittest.mock.call(attacker))) self.assertEqual(attack_with.call_count, 2)
def test_handle_turn_stalemate(self): combat = SimulatedCombat( ([create_entity(attack=0)], [create_entity(attack=0)])) self.assertEqual(combat.handle_turn(0), (-1, 0)) self.assertEqual(combat.handle_turn(1), (-1, 0))