PokeFinder icon indicating copy to clipboard operation
PokeFinder copied to clipboard

[BDSP] Unown rand call is misplaced resulting in incorrect results

Open Lincoln-LM opened this issue 2 years ago • 0 comments

The rand call for unown form is misplaced here: https://github.com/Admiral-Fish/PokeFinder/blob/6ab77ca23525a4b85ed52def311dbdc08eb81d3a/Source/Core/Gen8/Generators/WildGenerator8.cpp#L117 This results in nature/ability/gender (ability and gender are locked anyway) being 1 advance off from the IVs.

The correct place for the unown form call would be right after this line: https://github.com/Admiral-Fish/PokeFinder/blob/6ab77ca23525a4b85ed52def311dbdc08eb81d3a/Source/Core/Gen8/Generators/WildGenerator8.cpp#L45 and the correct syntax would be gen.next<0,1>() for the rooms with only 1 unown (this can only result in 0 so who knows why the rand still happens), gen.next<0,2>() for the !/? room, and gen.next<0,20>() for the rooms that give 20 unown forms.

Lincoln-LM avatar Apr 03 '22 22:04 Lincoln-LM