GAD225: HW3

I've decided to keep this as the HW assignment. You should be able to do all of it except for the entering of the character name, which we'll cover next week.

Text adventure time!

1. Allow the user to enter a character name.
1a. Once they do, automatically call a function that generates three stats for their character (you can make up whatever stats you want (let's say the range for each is 1-10).
2. Present them with a menu with Several options options. Selecting any option should call a function specific to that option, each of which is described below.
3. First option: Check status. This should print out their character's name, their 3 stats, and how much health they have left (all characters should start at 100 health), how much experience they have (and what level they are), and how much gold they have (useless for now).
4-6. The nextthree options are yours to make up. Each one should be focused on one (or more) of the character's stats. Each one should feature at least one possible success, and one possible failure, and the results should be random (modified by the appropriate stat, of course). For example, I could have an encounter that involved a hot dog eating contest against Kobayashi. Fortunately, my belly stat is 10. So some random generation happens, if I win, I gain 10xp, 50 gold. If I lose, I vomit, and lose 5 health.
7. 4th option: Use an item. The character has an inventory (array) with five ints in it. Each int represents how many of each item they have. Item[0] is a healing item. Item[1]-[3] are buff items, they should add a random amount to a specific stat for the next encounter. Item[4] is a loot item, that the user can sell for money. Remember, the array just contains integers telling the user how many of each item they have!
8. Last option: Shop. The user can sell any items they have, and buy new ones. This should have its own menu.
9. After any encounter, your program should automatically call a function that checks for leveling up. If the character has 100+ xp, they gain a level, (and lose 100 xp). When they gain a level, one stat randomly goes up by one point.
10. Make it so that the stat-using options above, in some successful cases, drop loot and money.

Share and Enjoy:
  • Digg
  • StumbleUpon
  • Facebook
  • Twitter
  • Google Bookmarks
  • Fark
  • Google Buzz

Comments are closed.