Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def fightmode(name, hp, dmg, gold):
- print 'nnnYou are in a fight with %s' %name
- print '%s has %sHP' %(name, hp)
- while myhp > 0 or hp > 0:
- hp = hp - mydmg
- print 'nt1. Attack nt2. Guard nt3. Run away.'
- opt1= ''
- allowed = ["1", "2", "3"]
- while opt1 not in allowed:
- opt1 = raw_input("nWhat will you do? ")
- if opt1 == "1":
- print "You have inflicted %d damage on %s. %s's HP is %s" %(mydmg, name, name, hp)
- if myhp > 0 :
- print"myhp"
- if hp > 0 :
- print"theirhp"
Add Comment
Please, Sign In to add comment