Guest User

Untitled

a guest
Jan 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def fightmode(name, hp, dmg, gold):
  2. print 'nnnYou are in a fight with %s' %name
  3. print '%s has %sHP' %(name, hp)
  4. while myhp > 0 or hp > 0:
  5. hp = hp - mydmg
  6. print 'nt1. Attack nt2. Guard nt3. Run away.'
  7. opt1= ''
  8. allowed = ["1", "2", "3"]
  9. while opt1 not in allowed:
  10. opt1 = raw_input("nWhat will you do? ")
  11. if opt1 == "1":
  12. print "You have inflicted %d damage on %s. %s's HP is %s" %(mydmg, name, name, hp)
  13. if myhp > 0 :
  14. print"myhp"
  15. if hp > 0 :
  16. print"theirhp"
Add Comment
Please, Sign In to add comment