dtalley11

Untitled

Jan 25th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. # Adventure in Clearwater
  2. # by DTALLEY11
  3.  
  4. # Variables
  5. sword = 0
  6. player = "player"
  7. hometown = ('Clearwater Town', 'It is a quiet little town where '+player+' was born.')
  8. crossroads = ('Cross Roads', 'The point that connects Clearwater town with the bridge, fishing spot and the falls')
  9. goblencave = ('Clearwater Cave' , 'Hidden behind clearwater falls, the caves are infamous for constantly being Goblen Infested')
  10. forests = ('Great Forest' , 'The large forest outside of town')
  11. bridge = ('Clearwater Bridge' , 'The bridge that goes over the clearwater river')
  12. waterfall = ('Clearwater Falls', 'The roaring waterfall, known for concealing the Clearwater Cave')
  13. fishing = ('Fishing Spot', 'Everybody\'s favorite fishing location, Every local fisherman has a story about this spot')
  14. location = hometown
  15. clearwater = {
  16. hometown: (crossroads,),
  17. crossroads: (hometown, waterfall, fishing, bridge),
  18. waterfall: (goblencave, crossroads),
  19. goblencave: (waterfall,),
  20. fishing: (crossroads,),
  21. bridge: (forests, crossroads),
  22. forests: (bridge,)
  23. }
  24.  
  25. # Events and General Functions
  26.  
  27. # When the player ventures into the cave, this even trigures
  28. def caveevent(sword):
  29. if sword == 0:
  30. print "As you look at the cave, you realize that it is unwise to go into a goblen infested cave without any way to defend yourself, and decide not to venture in."
  31. return 0
  32. else:
  33. print "Placeholder"
  34. print "You are teh 1337 goblen slayer, you just WIN"
  35. return 1
  36.  
  37. def ynprompt():
  38. yes = set(['yes','y', 'ye', ''])
  39. no = set(['no','n'])
  40. choice = raw_input(('[Y,n] ')).lower()
  41. if choice in yes: return 1
  42. elif choice in no: return 0
  43. else: return None
  44.  
  45. # When the player starts the game, this intro is ran
  46. def intro():
  47. print "Hello, what is your name?\n"
  48. player = raw_input('Name? ')
  49. print player+"? That's a cool name!\n"
  50. print "Well, "+player+" I think it's time that you go explore the local area"
  51.  
  52. # Main Loop
  53. while True:
  54. print "This is "+location[0]+", "+location[1]
  55. if location == goblencave: caveevent(sword)
  56.  
  57. print "\nFrom "+location[0]+" you can go to these places:\n"
  58.  
  59. for (i, t) in enumerate(clearwater[location]):
  60. print i +1, t[0]
  61.  
  62. choice = int(raw_input('Where would you like to go? (Chose one) '))
  63. location = clearwater[location][choice - 1]
Advertisement
Add Comment
Please, Sign In to add comment