Handle gen2 gift egg collision with low hatch cycle req

Closes #2824
ty @KR1dude !

change miscverifier to use OT_Friendship instead of CurrentFriendship.
This commit is contained in:
Kurt 2020-05-24 10:46:08 -07:00
parent 4a5a913142
commit d8cd75908b
2 changed files with 3 additions and 1 deletions

View File

@ -323,6 +323,8 @@ private bool IsMatchEggLocation(PKM pkm, ref int lvl)
{
if (pkm.Met_Location != 0 && pkm.Met_Level != 0)
return false;
if (pkm.OT_Friendship > EggCycles) // Dizzy Punch eggs start with below-normal hatch counters.
return false;
}
else
{

View File

@ -208,7 +208,7 @@ private static void VerifyMiscEggCommon(LegalityAnalysis data)
var HatchCycles = EncounterMatch is EncounterStatic s ? s.EggCycles : 0;
if (HatchCycles == 0) // no value set
HatchCycles = pkm.PersonalInfo.HatchCycles;
if (pkm.CurrentFriendship > HatchCycles)
if (pkm.OT_Friendship > HatchCycles)
data.AddLine(GetInvalid(LEggHatchCycles, Egg));
if (pkm.Format >= 6 && EncounterMatch is EncounterEgg && !pkm.Moves.SequenceEqual(pkm.RelearnMoves))