Misc cxd fixes

#1970
This commit is contained in:
Kurt 2018-05-27 12:18:27 -07:00
parent 1b8fe201c0
commit ae27c10dc2
3 changed files with 5 additions and 4 deletions

View file

@ -2366,6 +2366,8 @@ namespace PKHeX.Core
VerifyWC3Shiny(w);
return;
case WC3 w:
if (w.Version == GameVersion.XD)
return; // Can have either state
VerifyWC3Shiny(w);
break;
case MysteryGift g when g.Format != 3: // WC3

View file

@ -39,7 +39,7 @@ namespace PKHeX.Core
new WC3 { Species = 213, Level = 20, Language = l, Location = 116, TID = 37149, SID = -1, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Surskit ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, Moves = new[] { 092, 164, 188, 277 } }, // Shuckle @ Pyrite Town
new WC3 { Species = 246, Level = 20, Language = l, Location = 116, TID = 37149, SID = -1, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.XD, CardTitle = $"Trade Wooper ({id})", Method = PIDType.CXD, Shiny = Shiny.Never, Moves = new[] { 201, 349, 044, 200 } }, // Larvitar @ Pyrite Town
new WC3 { Species = 311, Level = 13, Language = l, Location = 254, TID = 37149, SID = 0, OT_Gender = 0, OT_Name = d[l], Version = GameVersion.COLO, CardTitle = $"Special Gift ({id})", Method = PIDType.CXD, Shiny = Shiny.Never }, // Plusle @ Ingame Trade
new WC3 { Species = 250, Level = 70, Language = l, Location = 255, TID = 10048, SID = 0, OT_Gender = 0, OT_Name = m[l], Version = GameVersion.COLO, CardTitle = $"Mt. Battle Ho-oh ({id})", Method = PIDType.CXD, Shiny = Shiny.Never } // Ho-oh @ Mt. Battle
new WC3 { Species = 250, Level = 70, Language = l, Location = 255, TID = 10048, SID = 0, OT_Gender = 0, OT_Name = m[l], Version = GameVersion.S, CardTitle = $"Mt. Battle Ho-oh ({id})", Method = PIDType.CXD, Shiny = Shiny.Never } // Ho-oh @ Mt. Battle
};
}
}

View file

@ -175,7 +175,7 @@ namespace PKHeX.Core
private static bool GetIsMatchWC3(PKM pkm, WC3 wc)
{
// Gen3 Version MUST match.
if (wc.Version != 0 && !((GameVersion)wc.Version).Contains((GameVersion)pkm.Version))
if (wc.Version != 0 && !(wc.Version).Contains((GameVersion)pkm.Version))
return false;
bool hatchedEgg = wc.IsEgg && !pkm.IsEgg;
@ -192,8 +192,7 @@ namespace PKHeX.Core
if (wc.Fateful != pkm.FatefulEncounter)
{
// XD Gifts only at level 20 get flagged after transfer
bool valid = wc.Level == 20 && pkm is XK3;
if (!valid)
if (wc.Version == GameVersion.XD != pkm is XK3)
return false;
}