manny405 / sapai

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

Dragon ability should not affect itself #38

Closed alexdriedger closed 2 years ago

alexdriedger commented 2 years ago

Dragon ability updated in patch 0.16 to not affect itself. From looking at the data file, t-rex and snail may be buffing themselves currently as well and also need to be updated to not buff themselves.

def test_dragon_ability(self):
    player = Player(shop=Shop(["ant"]), team=Team([Pet("fish"), Pet("dragon")]))
    self.assertEqual(player.team[0].attack, 2)
    self.assertEqual(player.team[0].health, 3)
    self.assertEqual(player.team[1].attack, 6)
    self.assertEqual(player.team[1].health, 8)

    player.buy_pet(0)
    self.assertEqual(player.team[0].attack, 3)
    self.assertEqual(player.team[0].health, 4)
    self.assertEqual(player.team[1].attack, 6)
    self.assertEqual(player.team[1].health, 8)