def setup(self):
        self.character = (CharacterBuilder()
                            .with_hit_points(10)
                            .build())

        self.target = (CharacterBuilder()
                            .with_hit_points(10)
                            .build())

        self.level = (LevelBuilder()
                        .build())

        add_character(self.level, (2, 2), self.character)
        add_character(self.level, (5, 2), self.target)

        bow = (ItemBuilder()
                    .with_name('bow')
                    .with_required_ammunition_type('arrow')
                    .with_damage(1, 'crushing')
                    .build())
        self.arrows = (ItemBuilder()
                        .with_name('arrows')
                        .with_ammunition_type('arrow')
                        .with_range_damage(3, 'piercing')
                        .with_count(10)
                        .build())

        self.character.inventory.append(bow)
        self.character.inventory.append(self.arrows)
        self.character.inventory.weapon = bow
        self.character.inventory.projectiles = self.arrows

        set_action_factory(ActionFactoryBuilder()
                           .with_attack_factory()
                           .build())
Setup test cases
dataset/ETHPy150Open tuturto/pyherc/src/pyherc/test/unit/test_ranged_combat.py/TestRangedCombat.setup