Guest User

Untitled

a guest
Mar 21st, 2012
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<fstream>
  4. #include<windows.h>
  5. using namespace std;
  6.  
  7. int hp, maxhp, potions, adh, adl, optionmenu;
  8.  
  9. void Status() {
  10. cout << "|=============| " << "HP: " << hp << "/" << maxhp << " |==| ";
  11. cout << "Potions: " << potions << " |==| ";
  12. cout << "Max Hit: " << adh;
  13. cout << " |============|" << endl << endl;
  14. }
  15.  
  16. int main() {
  17.  
  18. system("TITLE Kingdom");
  19. int level;
  20. string name, weapon;
  21. char spec;
  22.  
  23. level = 1;
  24.  
  25. Status();
  26.  
  27. cout << "Enter your name: ";
  28. cin >> name;
  29. system("CLS");
  30.  
  31. Status();
  32.  
  33. cout << "Select your class: \n";
  34. cout << "(A) Warrior [110HP, Ability to Block]\n";
  35. cout << "(B) Ranger [100HP, Ability to Increase AD]\n";
  36. cout << "(C) Cleric [95HP, Ability to Heal]\n";
  37. cin >> spec;
  38. system("CLS");
  39.  
  40. switch(spec)
  41. {
  42. case 'A':
  43. case 'a':
  44. maxhp = 110;
  45. hp = 110;
  46. adh= 11;
  47. adl= 7;
  48. weapon = "Sword";
  49. break;
  50. case 'B':
  51. case 'b':
  52. maxhp = 110;
  53. hp = 100;
  54. adh = 10;
  55. adl = 6;
  56. weapon = "Bow";
  57. break;
  58. case 'C':
  59. case 'c':
  60. maxhp = 95;
  61. hp = 95;
  62. adh = 9;
  63. adl = 5;
  64. weapon = "Staff";
  65. break;
  66. default:
  67. maxhp = 110;
  68. hp = 110;
  69. adh= 11;
  70. adl= 7;
  71. }
  72.  
  73. Status();
  74. cout << "Stat Review:" << endl;
  75. cout << "HP: " << hp << endl;
  76. cout << "AD: " << adl << " to " << adh << "." << endl;
  77. system("PAUSE");
  78. system("CLS");
  79.  
  80. Status();
  81. cout << "You wake up in an unfamiliar grotto, but you quickly find your " << weapon << " " << endl;
  82. cout << "laying nearby. You immediately grab it with no further thought. " << endl;
  83. cout << "Type 'C' for your options" << endl;
  84. cin >> optionmenu;
  85.  
  86.  
  87. system("PAUSE");
  88. return 0;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment