print "(2)Salir de la cueva" select=0 while (select>2 or select<1): select=int(raw_input("Your Choise: ")) if select==1: pygame.mixer.music.load("C:\Python27\data\om2.mp3") pygame.mixer.music.play() raw_input("Press enter to skip or to continue...") pygame.mixer.music.load("C:\Python27\data\om2_1.mp3") pygame.mixer.music.play() raw_input("Press enter to skip or to continue...") select=0 while (select>2 or select<1): select=int(raw_input("Your Choise: ")) if select==2: heroe.hp=heroe.hp-5 enemigo=Enemie() enemigo.defEnem(20, 15, 10, 12, 10) print "Enemigo Goblin ha aparecido" while (heroe.hp>0 and enemigo.hp>0): if(enemigo.velocidad>heroe.velocidad): aleat=random.randrange(1, 5) print aleat if (aleat==1): print "goblin is watching" else: print "goblin ataca" heroe.hp_lost(enemigo.ataque) print "Atacaras? (1)si (2)no" select=0 while (select<1 or select>2):
while (select>2 or select<1): select=int(raw_input("Tu eleccion: ")) if select==1: pygame.mixer.music.load("C:\Python27\data\om2.mp3") pygame.mixer.music.play() raw_input("Press enter to skip or to continue...") pygame.mixer.music.load("C:\Python27\data\om2_1.mp3") pygame.mixer.music.play() raw_input("Press enter to skip or to continue...") pygame.mixer.music.stop() select=0 while (select>2 or select<1): print "(1)Subir la ladera \n(2)Continuar recto" select=int(raw_input("Tu eleccion: ")) if select==2: heroe.hp=heroe.hp-5 pygame.mixer.music.load("C:\Python27\data\intro7.mp3") pygame.mixer.music.play() raw_input("Press enter to skip or to continue...") enemigo=Enemie() enemigo.defEnem(20, 15, 10, 12, 10) pygame.mixer.music.load("C:\Python27\data\intro8.mp3") pygame.mixer.music.play() time.sleep(4) heroe.pelea(enemigo) if heroe.hp<=0: pygame.mixer.music.load("C:\Python27\data\over.mp3") pygame.mixer.music.play() time.sleep(4) sys.exit() pygame.mixer.music.load("C:\Python27\data\gana1.mp3")