Wouldn't that make it so that every time you ran this in Gen 5 or 6, there would be no data because you're skipping the next part? (That is what ``continue`` does right? Moves to the next entry in the for loop)

Gen 5 + 6 disregard dead pokemon. So if your gen is higher than 4, and the pokemon is dead, then you skip it. If your gen is 4 and its dead, you include it.