Simplify Characteristic calc

++ increments after calculation, array accessor uses the calculated
value
This commit is contained in:
Kaphotics 2016-02-11 20:52:10 -08:00
parent 1b4975f6c5
commit aeab85cb83

View file

@ -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;
} }
} }