private void popEntry(int index) { var p = Main.SAV.Personal[index]; int s = index > Main.SAV.MaxSpeciesID ? baseForm[index] : index; var f = index <= Main.SAV.MaxSpeciesID ? 0 : formVal[index]; bool alolan = s > 721 || Legal.PastGenAlolanNatives.Contains(s); if (alolanOnly && !alolan) { return; } var row = new DataGridViewRow(); row.CreateCells(DGV); int r = 0; row.Cells[r++].Value = s.ToString("000") + (f > 0 ? "-" + f.ToString("00") :""); row.Cells[r++].Value = PKMUtil.getSprite(s, f, 0, 0, false, false, Main.SAV.Generation); row.Cells[r++].Value = species[index]; row.Cells[r++].Value = s > 721 || Legal.PastGenAlolanNatives.Contains(s); row.Cells[r].Style.BackColor = mapColor((int)((p.BST - 175) / 3f)); row.Cells[r++].Value = p.BST.ToString("000"); row.Cells[r++].Value = PKMUtil.getTypeSprite(p.Types[0]); row.Cells[r++].Value = p.Types[0] == p.Types[1] ? Resources.slotTrans : PKMUtil.getTypeSprite(p.Types[1]); row.Cells[r].Style.BackColor = mapColor(p.HP); row.Cells[r++].Value = p.HP.ToString("000"); row.Cells[r].Style.BackColor = mapColor(p.ATK); row.Cells[r++].Value = p.ATK.ToString("000"); row.Cells[r].Style.BackColor = mapColor(p.DEF); row.Cells[r++].Value = p.DEF.ToString("000"); row.Cells[r].Style.BackColor = mapColor(p.SPA); row.Cells[r++].Value = p.SPA.ToString("000"); row.Cells[r].Style.BackColor = mapColor(p.SPD); row.Cells[r++].Value = p.SPD.ToString("000"); row.Cells[r].Style.BackColor = mapColor(p.SPE); row.Cells[r++].Value = p.SPE.ToString("000"); row.Cells[r++].Value = abilities[p.Abilities[0]]; row.Cells[r++].Value = abilities[p.Abilities[1]]; row.Cells[r].Value = abilities[p.Abilities[2]]; DGV.Rows.Add(row); }