mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Ignore bad evolution slots
This commit is contained in:
parent
016ebb86ad
commit
3d6bb0ec00
1 changed files with 18 additions and 0 deletions
|
@ -111,8 +111,26 @@ namespace PKHeX.Core
|
|||
if (!slot.IsWithinStartEnd(stamp))
|
||||
continue;
|
||||
|
||||
if (IsDeferredSlot(slot, pkm))
|
||||
continue;
|
||||
|
||||
yield return slot;
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsDeferredSlot(IEncounterable slot, PKM pk)
|
||||
{
|
||||
if (slot.Species == (int) Core.Species.Wurmple)
|
||||
return !WurmpleUtil.IsWurmpleEvoValid(pk);
|
||||
|
||||
return slot.Species switch
|
||||
{
|
||||
(int) Core.Species.Yamask when pk.Species != slot.Species && pk is IFormArgument f => f.FormArgument == 0,
|
||||
(int) Core.Species.Milcery when pk.Species != slot.Species && pk is IFormArgument f => f.FormArgument == 0,
|
||||
(int) Core.Species.Runerigus when pk is IFormArgument f && f.FormArgument != 0 => true,
|
||||
(int) Core.Species.Alcremie when pk is IFormArgument f && f.FormArgument != 0 => true,
|
||||
_ => false,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue