Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Put hypertraining checks after PIDIV checks
Browse files Browse the repository at this point in the history
  • Loading branch information
architdate committed Jan 29, 2018
1 parent 2adcbcc commit 04f060a
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions AutoLegality/PKSMAutoLegality.cs
Original file line number Diff line number Diff line change
Expand Up @@ -858,26 +858,6 @@ private bool CommonErrorHandling2(PKM pk)
pk.Met_Level = pk.Met_Level - 1;
report = UpdateReport(pk);
}
if (report.Contains(V41)) // V41 = Can't Hyper Train a Pokémon with perfect IVs.
{
pk.HT_HP = false;
pk.HT_ATK = false;
pk.HT_DEF = false;
pk.HT_SPA = false;
pk.HT_SPD = false;
pk.HT_SPE = false;
report = UpdateReport(pk);
}
if (report.Contains(V42)) // V42 = Can't Hyper Train a perfect IV.
{
if (pk.IV_HP == 31) pk.HT_HP = false;
if (pk.IV_ATK == 31) pk.HT_ATK = false;
if (pk.IV_DEF == 31) pk.HT_DEF = false;
if (pk.IV_SPA == 31) pk.HT_SPA = false;
if (pk.IV_SPD == 31) pk.HT_SPD = false;
if (pk.IV_SPE == 31) pk.HT_SPE = false;
report = UpdateReport(pk);
}
if (report.Contains(V411)) //V411 = Encounter Type PID mismatch.
{
if (pk.Version == (int)GameVersion.CXD)
Expand Down Expand Up @@ -910,6 +890,26 @@ private bool CommonErrorHandling2(PKM pk)
}
}
}
if (report.Contains(V41)) // V41 = Can't Hyper Train a Pokémon with perfect IVs.
{
pk.HT_HP = false;
pk.HT_ATK = false;
pk.HT_DEF = false;
pk.HT_SPA = false;
pk.HT_SPD = false;
pk.HT_SPE = false;
report = UpdateReport(pk);
}
if (report.Contains(V42)) // V42 = Can't Hyper Train a perfect IV.
{
if (pk.IV_HP == 31) pk.HT_HP = false;
if (pk.IV_ATK == 31) pk.HT_ATK = false;
if (pk.IV_DEF == 31) pk.HT_DEF = false;
if (pk.IV_SPA == 31) pk.HT_SPA = false;
if (pk.IV_SPD == 31) pk.HT_SPD = false;
if (pk.IV_SPE == 31) pk.HT_SPE = false;
report = UpdateReport(pk);
}
if (report.Contains(string.Format(V28, 3))) //V28 = Should have at least {0} IVs = 31.
{
PKM temp = pk;
Expand Down

0 comments on commit 04f060a

Please sign in to comment.