• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# random batle

a guest Nov 12th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. '''Random batle by Joseph'''
2. '''Ver 1.2'''
3.
4.
5. import random
6.
7. Boss = "The King of Monsters"
8. Boss_HP = 150
9. HP = 130
10. Heals = 10
11. Power = 0
12. Power_tank = 1
13. Creeper = 2
14. Air = 999
15. Gold = 40
16.
17. while Boss_HP >= 1 and HP >= 1:
18.     print(Boss, "has", Boss_HP, "HP left you have", HP, "HP left.")
19.     print("Power is at", Power)
20.     print("You can do")
21.     print("Fight")
22.     if Power >= 100:
23.         print("Power")
24.     print("Heal")
25.     print("Item")
26.     print("Check")
27.     act = input("What will you do? ")
28.     if act == "fight" or act == "Fight":
29.         Boss_HP -= random.randint(15, 30)
30.         HP -= random.randint(20, 60)
31.         print("You attcked and did some damage to him.")
32.         print("You got hit")
33.         Power += 10
34.
35.     elif act == "heal" or act == "Heal":
36.         if Heals >= 1:
37.             print("You Healed 5 HP")
38.             HP += 5
39.             Heals -= 1
40.             Boss_HP += random.randint(1, 3)
41.             print("You lost 1 healing item you now have", Heals, "healing items but the boss has more HP")
42.             print("now.")
43.         elif Heals <= 0:
44.             print("You have No heals left but the boss got more HP")
45.             Boss_HP += random.randint(1, 10)
46.
47.     elif act == "check" or act == "Check":
48.         print(Boss, "can do up to 60 damage.")
49.         print("You got hit")
50.         HP -= random.randint(1, 60)
51.     elif act == "Power" or act == "power": #Power attack
52.         if Power >= 100: #Power check
53.             print("Did 60 damage")
54.             Power -= 100
55.             Boss_HP -= 60
56.         else:
57.             print("Not enough power")
58.     elif act == "item" or act == "Item":
59.         if Power_tank == 1:
60.             print("Power Tank", Power_tank)
61.         if Creeper >= 1:
62.             print("Creeper", Creeper)
63.         if Air >= 1:
64.             print("Air in a Can", Air)
65.         Item = input("What item do you want to use? ")
66.         if Item == "Power Tank" or Item == "power tank" or Item == "Power tank" or Item == "Power" or Item == "Power":
67.             if Power_tank == 1:
68.                 Power += 50
69.                 print("Your Power is at now", Power)
70.                 Power_tank -= 1
71.             else:
72.                 print("Don't do that")
73.
74.         elif Item == "creeper" or Item == "Creeper":  #random item
75.             if Creeper >= 1:
76.                 print("You used a Creeper")
77.                 print("Aww Man")
78.                 Creeper -= 1
79.                 Boss_HP -= random.randint(0, 190) #random damage
80.                 HP -= random.randint(0, 190) #random damage
81.             else:
82.                 print("Don't do that")
83.         elif Item == "Air" or Item == "Air in a can" or Item == "Air in a Can" or Item == "air in a  can" or Item == "air":
84.             if Air >= 1:
85.                 print("Why?")
86.                 Air -= 1
87.             else:
88.                 print("Don't do that")
89.
90. if HP <= 0:
91.     print("You Died")
92.     print("The boss was at", Boss_HP)
93. else:
94.     print("You Won")
95.     print("You have", HP, "left")
96.     Gold = HP + Gold
97.     print("You got", Gold, "Gold")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top