mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -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:
parent
b2c54b7a43
commit
55f0143400
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user