spacepaste

  1.  
  2. from random import randint
  3. print """You have arrived at the Tocumen airport\nYou are a backpacker\n
  4. but here you are THE MOCHILERO\nYou have no cash\nYou see an ATM\n
  5. You also notice you can travel to another place\nBut there fee is $50 to any of the locations\n"""
  6. raw_input("Press Any Key To Continue")
  7. class Bad:
  8. def __init__(self, hp = 100):
  9. self.hp = hp
  10. class Hero:
  11. def __init__(self, hp= 100, money = 0, cash = 100):
  12. self.hp = hp
  13. self.money = money
  14. self.cash = cash
  15. def eat(self):
  16. self.hp = self.hp + 1
  17. def move(self):
  18. self.move = move
  19. class FIGHT:
  20. def badattack():
  21. x = randint(0, 20)
  22. hero.hp -= x
  23. def heroattack():
  24. y = randint(0, 20)
  25. print "Hero scores %s " % y
  26. bad.hp -= y
  27. def dorado():
  28. print "You now have %s" % hero.money
  29. print "You have reached dorado"
  30. def albrook():
  31. print "You now have %s" % hero.money
  32. print "You have reached albrook"
  33. def multiplaza():
  34. print "You now have %s" % hero.money
  35. print "You have reached multiplaza"
  36. def calidonia():
  37. print "You now have %s" % hero.money
  38. print "You have reached calidonia"
  39. def cintacostera():
  40. print "You now have %s" % hero.money
  41. print "You have reached cinta costera"
  42. def panamaviejo():
  43. print "You now have %s" % hero.money
  44. print "You have reached Panama Viejo"
  45. def engine():
  46. move = raw_input("Where to?> ")
  47. if move == "dorado":
  48. dorado()
  49. elif move == "albrook":
  50. albrook()
  51. elif move == "multiplaza":
  52. multiplaza()
  53. elif move == "calidonia":
  54. calidonia()
  55. elif move == "cinta costera":
  56. cintacostera()
  57. elif move == "panama viejo":
  58. panamaviejo()
  59. else:
  60. print """For money type atm
  61. To move type travel
  62. available destinations are:
  63. dorado\\albrook\\multiplaza\\calidonia\\cinta costera\\panama viejo"""
  64. attack = FIGHT()
  65. hero = Hero()
  66. bad = Bad()
  67. move = hero.move
  68. if hero.hp == 0:
  69. print "YOU ARE DEAD"
  70. quit()
  71. def options():
  72. while True:
  73. move = raw_input("stats, atm or travel> ")
  74. if move == "travel":
  75. if hero.money <= 0:
  76. print "You don't have any money\n"
  77. else:
  78. engine()
  79. if move == "stats":
  80. print " You have %s money and %s life\n" % (hero.money, hero.hp)
  81. elif move == "atm":
  82. hero.money += hero.cash
  83. hero.cash = 0
  84. print "You now have %s money\n" % hero.money
  85. if move == "end":
  86. print "Thanks for playing\nGood BYE"
  87. quit()
  88. elif hero.hp <= 0:
  89. print "GAME OVER YOU HAVE NO MORE LIFE"
  90. quit()
  91.