In Gen 6, no Pokemon can battle with >510 EVs fix

Before you ask, yes, I have tested both Custom Game and Balanced Hackmons, to see if this actually did work.

After reading @V4Victini's comment about a bypass for Custom Game, I felt like I needed to do that, since Custom Game is amazing, in my opinion. This was quite simple to do, as seen by the 4 additions and 1 deletion. In the process of doing so, I also discovered a typo in the current code, which was easily fixed by replacing this.gen with tools.gen. Thus, this pull request happened, you know the rest. Rip in pepperonis, Balanced and Pure Hackmons, we hardly knew ye.