mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-27 18:04:11 -05:00
Minor perf tweak for generating shiny slot
This commit is contained in:
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user