Adilol

Player

Aug 14th, 2011
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.45 KB | None | 0 0
  1.  
  2. #include "Library.h"
  3.  
  4. //HELPER FUNCTIONS
  5.  
  6.  
  7. void Wait()
  8. {
  9.     cout << "Press Enter to Continue";
  10.  
  11.     cin.ignore(1,'\n');
  12.  
  13.     cout << "\n";
  14. }
  15.  
  16. void DisplayStats(PLAYER* player)
  17. {
  18.     //display stats
  19.     cout << endl << player->GetName() << endl;
  20.     cout << "Level: " << player->GetLevel() << endl;
  21.     cout << "HP: " << player->GetHealth() << " / " << player->GetMaxHealth() << endl;
  22.     cout << "MP: " << player->GetMana() << " / " << player->GetMaxMana() << endl << endl;
  23.  
  24.     cout << "Strength: " << player->GetStrength() << endl;
  25.     cout << "Intelligence: " << player->GetIntelligence() << endl << endl;
  26.  
  27.     cout << "Gold: " << player->GetGold() << endl;
  28.     cout << "Experience: " << player->GetExperience() << endl;
  29.     cout << endl;
  30.     cout << "Weapon: " << player->GetWeapon()->GetName() << endl;
  31.     cout << "Armor: " << player->GetArmor()->GetName() << endl;
  32.     cout << endl;
  33.     //list potions
  34.     cout << "POTIONS\n\n";
  35.     POTION** potionlist = player->GetPotionList();
  36.     for (int loop=0;loop < 15;loop++)
  37.     {
  38.         if (potionlist[loop] != NULL)
  39.         {
  40.             cout << potionlist[loop]->GetQuantity() << " x " << potionlist[loop]->GetName() << endl;
  41.         }
  42.     }
  43.  
  44.     cout << endl;
  45.  
  46.     //list spells
  47.     cout << "SPELLS\n\n";
  48.     SPELL** spelllist = player->GetSpellList();
  49.     for (int loop2=0;loop2 < 10;loop2++)
  50.     {
  51.         if (spelllist[loop2] != NULL)
  52.         {
  53.             cout << spelllist[loop2]->GetName() << " - MP: " << spelllist[loop2]->GetManaCost() << endl;
  54.         }
  55.     }
  56.  
  57. cout << endl;
  58.  
  59.     Wait();
  60.     cout << endl;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment