//Gets random loot and food void GetRandomFoodAndLoot() { Random randomItems = new Random(); int randomItemAmount = randomItems.Next(RandomLootAmountMin, RandomLootAmountMax); int randomFoodAmount = randomItems.Next(1, 2); for (int i = 0; i < (randomItemAmount - randomFoodAmount); i++) { PlayerInventory.PickupItem(PlayerInventory.AllItems[randomItems.Next(0, PlayerInventory.AllItems.Count - 1)]); } for (int i = 0; i < randomFoodAmount; i++) { PlayerInventory.AddFood(PlayerInventory.AllFood[randomItems.Next(0, PlayerInventory.AllFood.Count - 1)]); } }