mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
Simplify Characteristic calc
++ increments after calculation, array accessor uses the calculated value
This commit is contained in:
parent
1b4975f6c5
commit
aeab85cb83
1 changed files with 2 additions and 5 deletions
|
@ -474,11 +474,8 @@ namespace PKHeX
|
||||||
int pm6stat = 0;
|
int pm6stat = 0;
|
||||||
|
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
{
|
if (IVs[pm6stat = pm6++ % 6] == maxIV)
|
||||||
pm6stat = (pm6 + i) % 6;
|
break;
|
||||||
if (IVs[pm6stat] == maxIV)
|
|
||||||
break; // P%6 is this stat
|
|
||||||
}
|
|
||||||
return pm6stat*5 + maxIV%5;
|
return pm6stat*5 + maxIV%5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue