// when item is selected
 public void OnItemSelected(int id)
 {
     // if item quantity is above 0 and debuff won't degrade enemy hp below 0 and buff won't expand hero hp above max
     if (itemList.GetItemQuantity(id) > 0 && enemyHP + itemList.GetEnemyBuff(id) > 0 && playerHP + itemList.GetHeroBuff(id) <= playerMaxHP)
     {
         Camera.main.transform.position = new Vector3(0f, 0f, -1f);                    // move camera back to battle
         enemyHB.RemoveHP(5.594886f / (float)enemyMaxHP * -itemList.GetEnemyBuff(id)); // move enemy hp bar
         enemyHP         += itemList.GetEnemyBuff(id);                                 // change enemy hp
         enemyHPtext.text = enemyHP.ToString();                                        // change enemy hp text
         playerHB.AddHP(5.594886f / (float)playerMaxHP * itemList.GetHeroBuff(id));    // move player hp bar
         playerHP         += itemList.GetHeroBuff(id);                                 // change player hp
         playerHPtext.text = playerHP.ToString();                                      // change hero hp text
         itemList.gameObject.SetActive(false);                                         // turn off item list
         GameObject.FindObjectOfType <Equipment>().RemoveItem(itemList.GetItem(id));   // remove item from inventory
         itemList.ChangeResetStatus();                                                 // on next inventory visit list will be reloaded from eq
     }
 }