private static void UseChest() { Chest chest = new Chest("Chest"); RandomItemGenerator itemGenerator = new RandomItemGenerator(player.Level); chest.Items.AddRange(itemGenerator.ItemsList); Print.PrintMessageWithAudio("The chest has droped " + chest.Items.Count() + " items."); player.PickUpItem(chest.Items); }
private void PlayerHit(Enemy enemy) { enemy.HealthPoints -= player.CalculateDamage(enemy); player.Experience += (decimal)player.CalculateDamage(enemy); lastUsedSpells.ForEach(n => player.RemoveItemEffects(n)); lastUsedSpells.Clear(); if (enemy.HealthPoints <= 0) { Print.PrintMessageWithAudio("Enemy Died"); player.KillCounter++; player.PickUpItem(enemy.Inventory); enemies.Remove(enemy); } if (enemies.Any()) { ShowStats(enemy); } }