manny405 / sapai

Super auto pets engine built with reinforment learning training in mind
MIT License
67 stars 21 forks source link

Summoning animals in shop with pill doesn't trigger summon abilities #56

Closed alexdriedger closed 2 years ago

alexdriedger commented 2 years ago

The classic example here is pilling a cricket in the shop. Horse, turkey, etc. should buff the zombie cricket

def test_cricket_pill_in_shop_with_turkey(self):
    player = Player(shop=Shop(["sleeping-pill"]), team=Team([Pet("cricket"), Pet("turkey")]))
    player.buy_food(0, 0)
    self.assertEqual(player.team[0].attack, 4)
    self.assertEqual(player.team[0].health, 4)

def test_cricket_pill_in_shop_with_horse(self):
    player = Player(shop=Shop(["sleeping-pill"]), team=Team([Pet("cricket"), Pet("horse")]))
    player.buy_food(0, 0)
    self.assertEqual(player.team[0].attack, 2)