def __call__(self, attacker):
        add_history_value(self.target, 'hit_points')

        rng = mock()
        when(rng).randint(1, 6).thenReturn(1)

        action_factory = (ActionFactoryBuilder()
                          .with_move_factory()
                          .with_attack_factory()
                          .with_drink_factory()
                          .with_inventory_factory()
                          .with_dying_rules()
                          .build())

        set_action_factory(action_factory) # TODO: mutating global state is bad
        attack(attacker,
               find_direction(attacker.location,
                              self.target.location),
               rng)
Performs the hit
dataset/ETHPy150Open tuturto/pyherc/src/pyherc/test/cutesy/dictionary.py/Hit.__call__