Example #1
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):
                     select=int(raw_input("Your Choise: "))
                 if select==1:
                     enemigo.hp_lost(heroe.ataque)
                 else:
                     print "No dejes que te engaƱe"
             else:
                 print "Atacaras? (1)si (2)no"
                 select=0
                 while (select<1 or select>2):
                     select=int(raw_input("Your Choise: "))
                 if select==1:
                     enemigo.hp_lost(heroe.ataque)