mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 19:06:48 -05:00
Update MemoryContext8.cs
This commit is contained in:
@@ -74,9 +74,9 @@ private static bool IsInvalidGenLoc8(int memory, int loc, int egg, int variable,
|
||||
|
||||
switch (memory)
|
||||
{
|
||||
case 1 when enc.EggEncounter || IsCurryEncounter(pk, enc):
|
||||
case 1 when !IsWildEncounter(pk, enc):
|
||||
case 2 when !enc.EggEncounter:
|
||||
case 3 when (enc is not (EncounterTrade or EncounterStatic {Gift: true} or WC8 {IsHOMEGift: false}) && !IsCurryEncounter(pk, enc)):
|
||||
case 3 when !IsWildEncounterMeet(pk, enc):
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -94,6 +94,26 @@ private static bool IsInvalidGenLoc8(int memory, int loc, int egg, int variable,
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool IsWildEncounterMeet(PKM pk, IEncounterTemplate enc)
|
||||
{
|
||||
if (enc is EncounterTrade or EncounterStatic { Gift: true } or WC8 { IsHOMEGift: false })
|
||||
return true;
|
||||
if (IsCurryEncounter(pk, enc))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool IsWildEncounter(PKM pk, IEncounterTemplate enc)
|
||||
{
|
||||
if (enc is not EncounterSlot or EncounterStatic { Gift: false })
|
||||
return false;
|
||||
if (pk is IRibbonSetMark8 { RibbonMarkCurry: true })
|
||||
return false;
|
||||
if (pk.Species == (int)Species.Shedinja && pk is PK8 { AffixedRibbon: (int)RibbonIndex.MarkCurry })
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static bool IsCurryEncounter(PKM pk, IEncounterTemplate enc)
|
||||
{
|
||||
if (enc is not EncounterSlot8)
|
||||
|
||||
Reference in New Issue
Block a user