Skip to content

Commit

Permalink
Fix CanInhabitGen1 comparison
Browse files Browse the repository at this point in the history
extracted and forgot to double check the boolean comparison when
inverting the return value

https://projectpokemon.org/home/forums/topic/46148-bug-gen-1-moves-and-legendaries-incorrectly-flagged-in-gen-2-game/

Thanks Raptor385!
  • Loading branch information
kwsch committed Jul 10, 2018
1 parent d45a8af commit 93876d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PKHeX.Core/Legality/Core.cs
Expand Up @@ -1258,7 +1258,7 @@ internal static bool CanInhabitGen1(this PKM pkm)
if (pkm is PK2 pk2 && pk2.CaughtData != 0)
return false;
int species = pkm.Species;
if (species > MaxSpeciesID_1 || !FutureEvolutionsGen1.Contains(species))
if (species > MaxSpeciesID_1 && !FutureEvolutionsGen1.Contains(species))
return false;
return true;
}
Expand Down

0 comments on commit 93876d9

Please sign in to comment.