mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Bounds check sketch move IDs for generation
Smeargle no longer permitted to have Eerie Spell in gen6 format :)
This commit is contained in:
parent
4e7e23cb88
commit
606818b835
2 changed files with 14 additions and 1 deletions
|
@ -129,6 +129,19 @@ namespace PKHeX.Core
|
|||
_ => -1,
|
||||
};
|
||||
|
||||
internal static int GetMaxMoveID(int generation) => generation switch
|
||||
{
|
||||
1 => MaxMoveID_1,
|
||||
2 => MaxMoveID_2,
|
||||
3 => MaxMoveID_3,
|
||||
4 => MaxMoveID_4,
|
||||
5 => MaxMoveID_5,
|
||||
6 => MaxMoveID_6_AO,
|
||||
7 => MaxMoveID_7b,
|
||||
8 => MaxMoveID_8,
|
||||
_ => -1,
|
||||
};
|
||||
|
||||
internal const GameVersion NONE = GameVersion.Invalid;
|
||||
internal static readonly LearnVersion LearnNONE = new(-1);
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace PKHeX.Core
|
|||
return false;
|
||||
if (generation is 8 && DummiedMoves_BDSP.Contains(move)) // can't Sketch unusable moves in BDSP
|
||||
return false;
|
||||
return true;
|
||||
return move <= GetMaxMoveID(generation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Reference in a new issue