Minor perf tweak for generating shiny slot

This commit is contained in:
Kurt 2025-10-27 00:28:26 -05:00
parent 1b2512c16f
commit bee3cfb657

View File

@ -69,6 +69,8 @@ private void SetPINGA(PA9 pk, EncounterCriteria criteria, PersonalInfo9ZA pi)
criteria = criteria.WithoutIVs();
var param = GetParams(pi);
if (criteria.Shiny.IsShiny())
param = param with { RollCount = 1 + 3 }; // Give the +3 for Shiny Charm so that the generator search is more likely to succeed.
ulong init = Util.Rand.Rand64();
var success = this.TryApply64(pk, init, param, criteria);
if (!success && !this.TryApply64(pk, init, param, criteria.WithoutIVs()))