public void BuyHealthPotion(ref Player player, ref HealthPotion hp) { if (player.GetGold() > 10) { player.SetGold(-10); player.PickupItem(hp); player.ShowInventory(); } else { Console.WriteLine("You don't have enough gold!"); } }
public void StartEncouter(ref Player player, ref Map map) { Console.WriteLine("The Blood Drake Attacks!"); do { Program.HealthUI("Blood Drake", health, maxHealth, stamina, maxStamina, 10); CastAbility(ref player); FightUI fui = new FightUI(); health -= fui.ShowFightUI(ref player); Console.Clear(); } while (health > 1); Console.WriteLine("The Blood Drake falls down from the sky!"); Console.ReadLine(); Console.Clear(); Console.WriteLine("Congrats! You've defeated the Blood Drake!"); player.SetGold(10); player.SetStamina(-player.GetMaxStamina()); Console.WriteLine("You get 10G loot!"); }
public void StartEncounter(ref Player player, ref Map map) { Console.WriteLine("The Angry Man Attacks!"); do { Program.HealthUI("Angry Man", health, maxHealth, stamina, maxStamina, 10); CastAbility(ref player); FightUI fui = new FightUI(); health -= fui.ShowFightUI(ref player); Console.Clear(); } while (health > 1); Console.WriteLine("The angry man is knocked down.."); player.ResetStamina(ref player); Console.WriteLine("As his head bounces against the floor he stops breathing.. "); Console.ReadLine(); Console.Clear(); Console.WriteLine("Congrats! You've killed an innocent man in his own house!"); Console.WriteLine(""); player.SetGold(20); Console.WriteLine("You stole 20 gold from the man!"); Console.WriteLine("Press enter to continue..."); Console.ReadLine(); }