mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-20 11:03:05 -05:00
Handle generating gb2 events & eggs
restrict the simple encounter provider to not spit out cart era only gifts.
This commit is contained in:
@@ -12,7 +12,8 @@ public static IEnumerable<EncounterStatic> GetPossible(PKM pkm, GameVersion game
|
||||
if (gameSource == GameVersion.Any)
|
||||
gameSource = (GameVersion)pkm.Version;
|
||||
|
||||
return GetStaticEncounters(pkm, gameSource: gameSource);
|
||||
var encs = GetStaticEncounters(pkm, gameSource: gameSource);
|
||||
return encs.Where(e => AllowGBCartEra || !GameVersion.GBCartEraOnly.Contains(e.Version));
|
||||
}
|
||||
public static IEnumerable<EncounterStatic> GetValidStaticEncounter(PKM pkm, GameVersion gameSource = GameVersion.Any)
|
||||
{
|
||||
@@ -77,7 +78,7 @@ private static bool GetIsMatchStatic(PKM pkm, EncounterStatic e, int lvl)
|
||||
case 1 when pkm.Met_Location == 0:
|
||||
return false;
|
||||
default:
|
||||
if (pkm.Met_Location == 0)
|
||||
if (pkm.Met_Location == 0 && pkm.Met_Level != 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user