Advertisement
Guest User

Untitled

a guest
Jan 21st, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. else if (input.ToLower() == "h" || input.ToLower() == "heal")
  2. {
  3. //Heal
  4. if (Game.currentPlayer.potions <= 0)
  5. {
  6. int damage = p - Game.currentPlayer.armorValue;
  7. if (damage < 0)
  8. damage = 0;
  9. Console.WriteLine("You do not have any potions to consume");
  10. Console.WriteLine("The " +n+ " strikes you as he reacts to you not having any potions, you lose "+ damage +" health.");
  11.  
  12. }
  13. else
  14. {
  15. int damage = p - Game.currentPlayer.armorValue;
  16. int potionV = 5;
  17. Console.WriteLine("You consume a potion and gain "+potionV+" points of health");
  18. Game.currentPlayer.health += potionV;
  19. Console.WriteLine("While consuming the potion, the "+ n +" takes advantage and strikes you");
  20. if (damage < 0)
  21. damage = 0;
  22. Console.WriteLine("You lose " + damage + " health");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement