mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Correctly prevent xd locked shinies
oops, 7fd7a86074
was not correct (only handled lockless) -- the verifier doesn't check the final shadow pokemon (not a lock).
https://projectpokemon.org/home/forums/topic/57014-shiny-shadow-pok%C3%A9mon-from-xd-shown-as-legal-pkhex-legality-check-error/
This commit is contained in:
parent
383cf3e514
commit
5fc15dc9c8
1 changed files with 3 additions and 1 deletions
|
@ -6,9 +6,11 @@ namespace PKHeX.Core
|
|||
{
|
||||
public static bool IsAllShadowLockValid(EncounterStaticShadow s, PIDIV pv, PKM pkm)
|
||||
{
|
||||
if (s.Version == GameVersion.XD && pkm.IsShiny)
|
||||
return false; // no xd shiny shadow mons
|
||||
var teams = s.Locks;
|
||||
if (teams.Length == 0)
|
||||
return s.Version == GameVersion.COLO || !pkm.IsShiny; // no xd shiny shadow mons
|
||||
return true;
|
||||
|
||||
var tsv = s.Version == GameVersion.XD ? (pkm.TID ^ pkm.SID) >> 3 : -1; // no xd shiny shadow mons
|
||||
return IsAllShadowLockValid(pv, teams, tsv);
|
||||
|
|
Loading…
Reference in a new issue