Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.59 KB | None | 0 0
  1. int class_selection()
  2. {
  3. char selection;
  4. const char *classesa[12];
  5. int current = 0;
  6. printf("\n Choose a class: ");
  7. printf("\n Classes");
  8. printf("\n Fighters are all around melee combatants. They have lots of hitpoints, can deal a lot of damage and can use any weapon. The downside? They can't use magic.");
  9. printf("\n Wizards are masters of the arcane arts. They use powerful magic to destroy opponents, buff allies and summon deadly creatures. However, they are especially squishy and don't have a lot of hitpoints.");
  10. printf("\n Rogues attack from the shadows, find traps, sneak around their opponents and stab them in the back. Some of them operate with deadly poisons to weaken their enemies, others use their charisma to get what they want.");
  11. printf("\n Clerics are servants of the gods. They use their divine magic to heal allies, buff them, and more! They can use armor, unlike the wizards, and are pretty decent in melee.");
  12. printf("\n Unlike Wizards, who need to study to use their magic, Sorcerers have it from birth. They may not have that many spells to choose from, but their magic is much different. A sorcerer doesn't need to prepare their spells in advance, they can do whatever the situation calls for. However, they don't have a lot of hitpoints.");
  13. printf("\n Bards are jacks-of-all-trades. They can use magic to attack, to heal, can use their songs in battle to help their teammates, and can fight in melee. However, even though they are jacks-of-all-trades, they are master of none. Wizards are more proficient in arcane magic. Clerics are more proficient in healing and etc.");
  14. printf("\n The Barbarian is the ultimate fighter. A lot of hitpoints, humongous attack and the ability to go in a supernatural rage that boosts their abilities.");
  15. printf("\n While a Cleric is a servant of their god/goddess, the Paladin is much more. A Paladin is entirely dependent of their god/goddess and have an oath that, if broken, takes all their powers from them. Paladins are awesome at melee combat and can use some magic, primarly healing. They also have a lot of hitpoints");
  16. printf("\n Warlocks are people that have made a deal with a creature from Hell. That deal gives them the ability to cast spells, even though limited. They are decent melee fighters without lots of hitpoints.");
  17. printf("\n Monks are people who have learned to magically harness the energy that flows through their bodies. They are unparalleled in unarmed combat and as they level up, they gain access to spells.");
  18. printf("\n Druids wield the power of nature against their foes. They are guardians of the unspoiled wild. They are especially powerful casters that can shapeshift into beasts.");
  19. printf("\n Rangers are usually nature-loving fellas. They are warriors that are generally useful for tracking down enemies. They can also use some healing magic.");
  20. printf("\n Which class will you choose?: ");
  21. classesa[0] = "Fighter";
  22. classesa[1] = "Wizard";
  23. classesa[2] = "Rogue";
  24. classesa[3] = "Cleric";
  25. classesa[4] = "Sorcerer";
  26. classesa[5] = "Bard";
  27. classesa[6] = "Barbarian";
  28. classesa[7] = "Paladin";
  29. classesa[8] = "Warlock";
  30. classesa[9] = "Monk";
  31. classesa[10] = "Druid";
  32. classesa[11] = "Ranger";
  33. do{
  34. selection = getch;
  35. if(selecion = 'w'){
  36. current++;
  37. if(current > 11)
  38. current = 0;
  39. }
  40. else if(selection = 's'){
  41. current--;
  42. if(current < 0)
  43. current = 11;
  44. }
  45. for(int i = 0; i<12; i++){
  46. if(current == i)
  47. printf(">%s", classesa[i]);
  48. else
  49. printf(" %s", ,classesa[i]);
  50. }
  51. system("cls");
  52. }while(selection!=13)
  53. return current;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement