Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: cp1252 -*-
- import random
- def turnbased():
- way = 1
- hp = 100
- mp = 40
- at = 5 #1d6+5
- cat = 3 #1d4+3
- print 'Seu HP: %s\nSeu MP: %s' % (hp, mp)
- while way <= 10:
- chp = 30
- turno = 'a'
- print 'Caminho: %s/10' % way
- w_accept = raw_input('Esta pronto para andar?[s/n]: ')
- if w_accept == 's':
- chance = random.randint(1,2)
- if chance == 1:
- print 'Creep apareceu.'
- if hp > 0 and chp > 0:
- while hp> 0 and chp>0:
- print 'Seu HP: %s \nSeu MP: %s\nCreep HP: %s' % (hp, mp, chp)
- if turno == 'a':
- print '1-Ataque fisico\n2-Fireball (-15 dano, 10 mana)'
- choice = input('O que deseja fazer?: ')
- if choice == 1:
- tat = at+random.randint(1,6)
- print 'Você deu %s de dano ao creep.' % tat
- chp -= tat
- mp -= 0
- turno = 'b'
- elif choice == 2:
- if mp >= 10:
- tat = 15
- print 'Você deu %s de dano ao creep.' % tat
- chp -= tat
- mp -= 10
- turno = 'b'
- else:
- print 'Mana insuficiente.\n'
- if turno == 'b':
- tcat = cat+random.randint(1,4)
- print 'Creep deu %s de dano a você.\n' % tcat
- hp -= tcat
- turno = 'a'
- if hp <=0:
- print 'Você morreu.'
- return
- if chp <=0:
- print 'Creep morreu.'
- way += 1
- print '\n\n'
- if chance == 2:
- print 'Nada.'
- way += 1
- print '\n\n'
- if w_accept == 'n':
- print 'Nao andou.'
- print '\n\n'
- print '\nTERRORBLADE APARECEU!!!\n'
- thp = 60
- Tat = 6 #+1d6
- while hp> 0 and chp>0:
- print 'Seu HP: %s \nSeu MP: %s\nTerrorblade HP: %s' % (hp, mp, thp)
- if turno == 'a':
- print '1-Ataque fisico\n2-Fireball (-15 dano, 10 mana)'
- choice = input('O que deseja fazer?: ')
- if choice == 1:
- tat = at+random.randint(1,6)
- print 'Você deu %s de dano a Terrorblade.' % tat
- thp -= tat
- mp -= 0
- turno = 'b'
- elif choice == 2:
- if mp >= 10:
- tat = 15
- print 'Você deu %s de dano a Terrorblade.' % tat
- chp -= tat
- mp -= 10
- turno = 'b'
- else:
- print 'Mana insuficiente.\n'
- if turno == 'b':
- Ttat = Tat+random.randint(1,6)
- print 'Terrorblade deu %s de dano a você.\n' % Ttat
- hp -= Ttat
- turno = 'a'
- if hp <= 0:
- print 'Você morreu.'
- if thp <= 0:
- print 'Parabéns, você venceu o jogo.'
- turnbased()
- x=raw_input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement