manny405/sapai

Knockout phase should happen before "after attack hurt/faint triggers"

Opened this issue · 0 comments

https://www.reddit.com/r/superautopets/comments/u06kr7/not_sure_if_rhino_good_or_he_just_got_way_too_far/

Below test gets stuck in a loop, but with debugging you can see that it spawns a chick way before rhino can trigger his knock out ability on the other roosters.

    def test_rhino(self):
        t0 = Team(["rhino"])
        t1 = Team(["rooster","rooster","rooster","rooster","rooster"])
        b = Battle(t0, t1)
        r = b.battle()
        # print(b.battle_history)
        self.assertEqual(r, 0)

Not sure what is causing the loop yet, but it might be fixed by re-ordering the knock out phase.