mirror of
https://github.com/kwsch/pkNX.git
synced 2026-06-02 22:34:58 -05:00
Rework call for high powered moves
learn is a bit more complex; just add an overload with another param
This commit is contained in:
parent
5676115f9b
commit
f77454d3d4
|
|
@ -131,12 +131,7 @@ private int[] GetRandomMoves(int count, int index)
|
|||
return moves;
|
||||
}
|
||||
|
||||
public int[] GetHighPoweredMoves(int species, int form, int count = 4)
|
||||
{
|
||||
int index = Personal.GetFormeIndex(species, form);
|
||||
var learn = Learnsets[index];
|
||||
return learn.GetHighPoweredMoves(count, Moves);
|
||||
}
|
||||
internal int[] GetHighPoweredMoves(int species, int form, int count = 4) => GetHighPoweredMoves(Moves, species, form, count);
|
||||
|
||||
public int[] GetCurrentMoves(int species, int form, int level, int count = 4)
|
||||
{
|
||||
|
|
@ -145,5 +140,12 @@ public int[] GetCurrentMoves(int species, int form, int level, int count = 4)
|
|||
Array.Resize(ref moves, count);
|
||||
return moves;
|
||||
}
|
||||
|
||||
public int[] GetHighPoweredMoves(Move[] movedata, int species, int form, int count = 4)
|
||||
{
|
||||
int index = Personal.GetFormeIndex(species, form);
|
||||
var learn = Learnsets[index];
|
||||
return learn.GetHighPoweredMoves(count, movedata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -499,7 +499,8 @@ private void B_HighAttack_Click(object sender, EventArgs e)
|
|||
pkm.Species = CB_Species.SelectedIndex;
|
||||
pkm.Level = (int)NUD_Level.Value;
|
||||
pkm.Form = CB_Forme.SelectedIndex;
|
||||
var moves = learn.GetHighPoweredMoves(pkm.Species, pkm.Form, 4);
|
||||
var movedata = Game.Data.MoveData.LoadAll();
|
||||
var moves = learn.GetHighPoweredMoves(movedata, pkm.Species, pkm.Form, 4);
|
||||
SetMoves(moves);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user