Zarel/Pokemon-Showdown — pull request #1144 by Pikachuun (2014-08-17 14:04:02+00:00)
Title: 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.