mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-13 01:25:22 -05:00
Hidden Power IVs method simplification
This commit is contained in:
12
Misc/PKX.cs
12
Misc/PKX.cs
@@ -1220,15 +1220,11 @@ internal Personal GetPersonal(int species, int formID)
|
||||
}
|
||||
}
|
||||
|
||||
internal static int[] setHPIVs(string HP, int[] curIVs)
|
||||
internal static int[] setHPIVs(int type, int[] ivs)
|
||||
{
|
||||
int[] ivmods = hpivs[Array.IndexOf(hptypes, HP)];
|
||||
for (int i = 0; i < 6; i++) // modify IVs
|
||||
{
|
||||
curIVs[i] &= 0x1E;
|
||||
curIVs[i] += ivmods[i];
|
||||
}
|
||||
return curIVs;
|
||||
for (int i = 0; i < 6; i++)
|
||||
ivs[i] &= 0x1E + hpivs[type][i];
|
||||
return ivs;
|
||||
}
|
||||
internal static string[] hptypes = new string[] {
|
||||
"Fighting", "Flying", "Poison", "Ground",
|
||||
|
||||
Reference in New Issue
Block a user