manny405/sapai

Fly's ability counter should not increment if there is no room to summon

Opened this issue · 0 comments

If Fly can't summon a zombie fly, the ability counter should not increment.
Below example with a priority cricket that summons its zombie cricket first, leaving no room for the fly.

    def test_ability_counter_unchanged(self):
        cricket = Pet("cricket")
        cricket._attack = 10
        player = Player(shop=["sleeping-pill"], team=[cricket, "fish", "fish", "tiger", "fly"])
        player.buy_food(0, 0)

        self.assertEqual(player.team[0].pet.name, "pet-zombie-cricket")
        ### no zombie fly spawned, ability counter should remain 0
        self.assertEqual(player.team[4].pet.ability_counter, 0)