mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 01:58:52 -05:00
Disallow move suggestions for formats < 6
Flip requirement from gennumber to format (since the moves are learnable on said format)
This commit is contained in:
@@ -210,7 +210,7 @@ public int[] getSuggestedRelearn()
|
||||
}
|
||||
public int[] getSuggestedMoves(bool tm, bool tutor)
|
||||
{
|
||||
if (pkm.GenNumber < 6)
|
||||
if (pkm.Format < 6)
|
||||
return null;
|
||||
return Legal.getValidMoves(pkm, Tutor: tutor, Machine: tm).Skip(1).ToArray(); // skip move 0
|
||||
}
|
||||
|
||||
@@ -1784,6 +1784,9 @@ private void clickMoves(object sender, EventArgs e)
|
||||
{
|
||||
bool random = ModifierKeys == Keys.Control;
|
||||
int[] m = Legality.getSuggestedMoves(tm: random, tutor: random);
|
||||
if (m == null)
|
||||
{ Util.Alert("Suggestions are not enabled for this PKM format."); return; }
|
||||
|
||||
if (random)
|
||||
Util.Shuffle(m);
|
||||
if (m.Length > 4)
|
||||
|
||||
Reference in New Issue
Block a user