Add party-only form legality checks

Closes #806
This commit is contained in:
Kurt
2017-02-02 19:27:48 -08:00
parent 614b15f1b7
commit c0e5db6bb0
2 changed files with 12 additions and 0 deletions

View File

@@ -3531,7 +3531,11 @@ private void clickLegality(object sender, EventArgs e)
int slot = getSlot(sender);
PKM pk;
if (slot >= 0)
{
pk = SAV.getStoredSlot(getPKXOffset(slot));
if (slot < 30 || slot >= 36) // not party
pk.Box = CB_BoxSelect.SelectedIndex; // mark as in a box
}
else if (verifiedPKM())
pk = preparePKM();
else

View File

@@ -1677,6 +1677,14 @@ private void verifyForm()
return;
}
break;
// Party Only Forms
case 492: // Shaymin
case 676: // Furfrou
case 720: // Hoopa
if (pkm.AltForm != 0 && pkm.Box > -1) // has form but stored in box
AddLine(Severity.Invalid, "Form cannot exist outside of Party.", CheckIdentifier.Form);
break;
}
if (pkm.Format >= 7 && pkm.GenNumber < 7 && pkm.AltForm != 0)