Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.04 KB | None | 0 0
  1. from random import randint
  2. print("Welcome to the Slime Killer!!!")
  3. print("You should kill slimes. That's it.")
  4. name = input("What is your name?\n")
  5. print("Hello %s!!!" % name)
  6. attack = 1
  7. health = 10
  8. gold = 0
  9. while health > 0:
  10.     print("You have %d health and %d attack" % (health, attack))
  11.     print("You saw a Slime sliming outside...KILL IT")
  12.     slimeAttack = randint(1, 3)
  13.     slimeHealth = randint(1, 2)
  14.     print("Slime has %d attack and %d health." % (slimeAttack, slimeHealth))
  15.     health -= slimeHealth / attack * slimeAttack - slimeAttack
  16.     print("You kill this silly slime and get out with %d health." % health)
  17.     gold += 1
  18.     print("You got 1 gold from this slime!\nYou have %d gold now" % gold)
  19.     print("You can heal or buy a new sword.\nWhat you gonna do?")
  20.     choice = str(input("Heal, sword or nothing? Please, type with lower cases!\n"))
  21.     if choice == health:
  22.         gold -= 1
  23.         health += 5
  24.     elif choice == attack:
  25.         gold -= 1
  26.         attack += 1
  27.     else:
  28.         continue
  29. print("GG WP")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement