public static bool IsCompatible3(this PIDType val, IEncounterable encounter, PKM pkm) { switch (encounter) { case WC3 g: if (val == g.Method) { return(true); } // forced shiny eggs, when hatched, can lose their detectable correlation. return(g.IsEgg && !pkm.IsEgg && val == PIDType.None && (g.Method == PIDType.BACD_R_S || g.Method == PIDType.BACD_U_S)); case EncounterStaticShadow d when d.EReader: return(val == PIDType.None); // All IVs are 0 case EncounterStatic s: switch (pkm.Version) { case (int)GameVersion.CXD: return(val == PIDType.CXD || val == PIDType.CXD_ColoStarter); case (int)GameVersion.E: return(val == PIDType.Method_1); // no roamer glitch case (int)GameVersion.FR: case (int)GameVersion.LG: return(s.Roaming ? val.IsRoamerPIDIV(pkm) : val == PIDType.Method_1); // roamer glitch default: // RS, roamer glitch && RSBox s/w emulation => method 4 available return(s.Roaming ? val.IsRoamerPIDIV(pkm) : MethodH14.Any(z => z == val)); } case EncounterSlot w: if (pkm.Version == 15) { return(val == PIDType.PokeSpot); } return((w.Species == 201 ? MethodH_Unown : MethodH).Any(z => z == val)); default: return(val == PIDType.None); } }
public static bool IsCompatible3(this PIDType val, IEncounterable encounter, PKM pkm) { switch (encounter) { case WC3 g: return(val == g.Method); case EncounterStaticShadow d when d.EReader: return(val == PIDType.None); // All IVs are 0 case EncounterStatic s: switch (pkm.Version) { case (int)GameVersion.CXD: return(val == PIDType.CXD); case (int)GameVersion.E: return(val == PIDType.Method_1); // no roamer glitch case (int)GameVersion.FR: case (int)GameVersion.LG: return(s.Roaming ? val == PIDType.Method_1_Roamer : val == PIDType.Method_1); // roamer glitch default: // RS, roamer glitch && RSBox s/w emulation => method 4 available return(s.Roaming ? val == PIDType.Method_1_Roamer : MethodH14.Any(z => z == val)); } case EncounterSlot w: if (pkm.Version == 15) { return(val == PIDType.PokeSpot); } return((w.Species == 201 ? MethodH_Unown : MethodH).Any(z => z == val)); default: return(val == PIDType.None); } }