mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
commit
b0bbbbadac
2 changed files with 10 additions and 10 deletions
|
@ -381,11 +381,10 @@ namespace PKHeX.Core
|
|||
switch (IVs[0])
|
||||
{
|
||||
case 0xFE:
|
||||
finalIVs[0] = 31;
|
||||
do { // 31 HP IV, 2 other 31s
|
||||
for (int i = 1; i < 6; i++)
|
||||
do { // 3 Perfect IVs
|
||||
for (int i = 0; i < 6; i++)
|
||||
finalIVs[i] = IVs[i] > 31 ? (int)(Util.rnd32() & 0x1F) : IVs[i];
|
||||
} while (finalIVs.Count(r => r == 31) < 3); // 31 + 2*31
|
||||
} while (finalIVs.Count(r => r == 31) < 3); // 3*31
|
||||
break;
|
||||
case 0xFD:
|
||||
do { // 2 other 31s
|
||||
|
@ -429,7 +428,8 @@ namespace PKHeX.Core
|
|||
pk.PID = (uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF));
|
||||
break;
|
||||
case 03: // Random Nonshiny
|
||||
do { pk.PID = Util.rnd32(); } while ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16);
|
||||
pk.PID = Util.rnd32();
|
||||
if ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16) pk.PID ^= 0x10000000;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -408,11 +408,10 @@ namespace PKHeX.Core
|
|||
switch (IVs[0])
|
||||
{
|
||||
case 0xFE:
|
||||
finalIVs[0] = 31;
|
||||
do { // 31 HP IV, 2 other 31s
|
||||
for (int i = 1; i < 6; i++)
|
||||
do { // 3 Perfect IVs
|
||||
for (int i = 0; i < 6; i++)
|
||||
finalIVs[i] = IVs[i] > 31 ? (int)(Util.rnd32() & 0x1F) : IVs[i];
|
||||
} while (finalIVs.Count(r => r == 31) < 3); // 31 + 2*31
|
||||
} while (finalIVs.Count(r => r == 31) < 3); // 3*31
|
||||
break;
|
||||
case 0xFD:
|
||||
do { // 2 other 31s
|
||||
|
@ -456,7 +455,8 @@ namespace PKHeX.Core
|
|||
pk.PID = (uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF));
|
||||
break;
|
||||
case 03: // Random Nonshiny
|
||||
do { pk.PID = Util.rnd32(); } while ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16);
|
||||
pk.PID = Util.rnd32();
|
||||
if ((uint)(((TID ^ SID ^ (pk.PID & 0xFFFF)) << 16) + (pk.PID & 0xFFFF)) < 16) pk.PID ^= 0x10000000;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue