- from random import randint
- print """You have arrived at the Tocumen airport\nYou are a backpacker\n
- but here you are THE MOCHILERO\nYou have no cash\nYou see an ATM\n
- You also notice you can travel to another place\nBut there fee is $50 to any of the locations\n"""
- raw_input("Press Any Key To Continue")
- class Bad:
- def __init__(self, hp = 100):
- self.hp = hp
- class Hero:
- def __init__(self, hp= 100, money = 0, cash = 100):
- self.hp = hp
- self.money = money
- self.cash = cash
- def eat(self):
- self.hp = self.hp + 1
- def move(self):
- self.move = move
- class FIGHT:
- def badattack():
- x = randint(0, 20)
- hero.hp -= x
- def heroattack():
- y = randint(0, 20)
- print "Hero scores %s " % y
- bad.hp -= y
- def dorado():
- print "You now have %s" % hero.money
- print "You have reached dorado"
- def albrook():
- print "You now have %s" % hero.money
- print "You have reached albrook"
- def multiplaza():
- print "You now have %s" % hero.money
- print "You have reached multiplaza"
- def calidonia():
- print "You now have %s" % hero.money
- print "You have reached calidonia"
- def cintacostera():
- print "You now have %s" % hero.money
- print "You have reached cinta costera"
- def panamaviejo():
- print "You now have %s" % hero.money
- print "You have reached Panama Viejo"
- def engine():
- move = raw_input("Where to?> ")
- if move == "dorado":
- dorado()
- elif move == "albrook":
- albrook()
- elif move == "multiplaza":
- multiplaza()
- elif move == "calidonia":
- calidonia()
- elif move == "cinta costera":
- cintacostera()
- elif move == "panama viejo":
- panamaviejo()
- else:
- print """For money type atm
- To move type travel
- available destinations are:
- dorado\\albrook\\multiplaza\\calidonia\\cinta costera\\panama viejo"""
- attack = FIGHT()
- hero = Hero()
- bad = Bad()
- move = hero.move
- if hero.hp == 0:
- print "YOU ARE DEAD"
- quit()
- def options():
- while True:
- move = raw_input("stats, atm or travel> ")
- if move == "travel":
- if hero.money <= 0:
- print "You don't have any money\n"
- else:
- engine()
- if move == "stats":
- print " You have %s money and %s life\n" % (hero.money, hero.hp)
- elif move == "atm":
- hero.money += hero.cash
- hero.cash = 0
- print "You now have %s money\n" % hero.money
- if move == "end":
- print "Thanks for playing\nGood BYE"
- quit()
- elif hero.hp <= 0:
- print "GAME OVER YOU HAVE NO MORE LIFE"
- quit()