Closed yuzeh closed 6 years ago
No, this should definitely be changed to PRNG.
Cool! This is actually where the roll should happen, I believe:
https://github.com/Zarel/Pokemon-Showdown/blob/e8d8a6f/data/random-teams.js#L498
We support random gender with customized teams. It's actually the default setting.
See the "Random" setting?
Okay, sounds like this should happen at the first callsite then.
It should be replaceable with this.battle.random()
While we're here, I think these calls should also be changed to use the PRNG:
Does this sound right?
Agreed, there should be no Math.random()
in sim/
.
Fixed in #4365
Is there a reason that
Math.random
is being used on this line?https://github.com/Zarel/Pokemon-Showdown/blob/99d682ca26fb184f10a788bf7c5406dad8e951af/sim/pokemon.js#L119