From d699b6db3eea423acf9bfbe55d194b1497fd3f4e Mon Sep 17 00:00:00 2001 From: Kurt Date: Wed, 16 Apr 2025 17:09:05 -0500 Subject: [PATCH] Update MethodPokeSpot.cs Closes #4470 Co-Authored-By: santacrab2 <79347566+santacrab2@users.noreply.github.com> --- PKHeX.Core/Legality/RNG/CXD/MethodPokeSpot.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PKHeX.Core/Legality/RNG/CXD/MethodPokeSpot.cs b/PKHeX.Core/Legality/RNG/CXD/MethodPokeSpot.cs index e95cfa17c..fb6e2c952 100644 --- a/PKHeX.Core/Legality/RNG/CXD/MethodPokeSpot.cs +++ b/PKHeX.Core/Legality/RNG/CXD/MethodPokeSpot.cs @@ -224,7 +224,10 @@ public static void SetRandomIVs(XK3 pk, EncounterCriteria criteria, byte levelMi var origin = XDRNG.Prev6(preIV); if (!IsValidAnimation(origin, out origin, out _)) + { + seed = XDRNG.Next(seed); // avoid infinite loop continue; + } var iv1 = XDRNG.Next15(ref seed); var iv2 = XDRNG.Next15(ref seed);