Zarel/Pokemon-Showdown — pull request #264 by Jay2645 (2013-07-06 23:13:27+00:00)
Title: Randbats: Isolated type weakness change.

Isolated the change to the team generation to reject a team if it is too weak to any one type.
Basically, team generation now looks for weaknesses to any one particular type.
How strict it is about removing Pokemon is determined by `if (typeWeaknesses[t] > i)`, where `i` is the maximum number of Pokemon that are allowed to be weak to that type. Typically, 0 is too strict and 2 rejects only the worst cases. It's currently set to 1; feel free to adjust it as you see fit.
* Perhaps there should be a chance to keep the Pokemon anyway, even if it makes us weak to a type? I don't *see* any real reduction in randomness (if `i` is 1 we usually reject about 4-7 Pokemon per side; if `i` is 2 we usually reject 0-3), but considering how we have a small chance to keep Pokemon elsewhere even if they cause issues, perhaps there should be a check included here as well.