mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-11 18:35:22 -05:00
Allow pk7->pk8 pikachu cap transfer
This commit is contained in:
@@ -60,12 +60,13 @@ private CheckResult VerifyForm(LegalityAnalysis data)
|
||||
return GetInvalid(isStatic ? LFormPikachuCosplayInvalid : LFormPikachuCosplay);
|
||||
break;
|
||||
|
||||
case (int)Species.Pikachu when Info.Generation == 7: // Cap
|
||||
case (int)Species.Pikachu when Info.Generation >= 7: // Cap
|
||||
bool IsValidPikachuCap()
|
||||
{
|
||||
return EncounterMatch switch
|
||||
{
|
||||
WC7 wc7 => (wc7.Form == form),
|
||||
WC8 wc => (wc.Form == form),
|
||||
EncounterStatic s => (s.Form == form),
|
||||
_ => (form == 0)
|
||||
};
|
||||
@@ -73,7 +74,7 @@ bool IsValidPikachuCap()
|
||||
|
||||
if (!IsValidPikachuCap())
|
||||
{
|
||||
bool gift = EncounterMatch is WC7 g && g.Form != form;
|
||||
bool gift = EncounterMatch is MysteryGift g && g.Form != form;
|
||||
var msg = gift ? LFormPikachuEventInvalid : LFormInvalidGame;
|
||||
return GetInvalid(msg);
|
||||
}
|
||||
@@ -189,7 +190,7 @@ bool IsValidPikachuCap()
|
||||
}
|
||||
if (format >= 8 && Info.Generation < 8)
|
||||
{
|
||||
if (species == 25 || Legal.GalarOriginForms.Contains(species) || Legal.GalarVariantFormEvolutions.Contains(data.EncounterOriginal.Species))
|
||||
if (Legal.GalarOriginForms.Contains(species) || Legal.GalarVariantFormEvolutions.Contains(data.EncounterOriginal.Species))
|
||||
return GetInvalid(LFormInvalidGame);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user