public void UnAbsorb(int id) { List <MonsterInfo> absorbList = new List <MonsterInfo>(); for (int i = 0; i < allMonsters.Count; i++) { for (int j = 0; j < allMonsters[i].Count; j++) { MonsterInfo monsterInfo = allMonsters[i][j]; if (monsterInfo.CanUnAbsorb(id)) { absorbList.Add(monsterInfo); } } } if (absorbList.Count > 0) { absorbIndex--; if (absorbIndex < 0) { absorbIndex = (absorbList.Count - 1); } MonsterInfo monsterCheck = absorbList[absorbIndex]; monsterCheck.UnAbsorb(id); } }