Advertisement
KodingKid

Text-Based Shooter in Python - Version 2

Aug 1st, 2021
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.83 KB | None | 0 0
  1. import time
  2. import random
  3. weaponlist = [rifle, shotgun, pistol, assault-weapon, knife, c4, car]
  4. health = 100
  5. money = 0
  6. kills = 0
  7. deaths = 0
  8. loop1 < loop2
  9. while loop1 < loop2:
  10.     time.sleep(15)
  11.     money + 100
  12.     health + 25
  13. print(weaponlist)
  14. weaponchoice = input()
  15. if weaponchoice == "rifle" or "Rifle":
  16.     health - 40
  17.     money - 500
  18.     print(health)
  19.     print(money)
  20. if weaponchoice == "shotgun" or "Shotgun":
  21.     health - 75
  22.     money - 350
  23.     print(health)
  24.     print(money)
  25. if weaponchoice == "pistol" or "Pistol":
  26.     health - 12.5
  27.     money - 125
  28.     print(health)
  29.     print(money)
  30. if weaponchoice == "assault-weapon" or "Assault-Weapon" or "Assault-weapon" or "assault-Weapon":
  31.     health - 65
  32.     money - 1000
  33.     print(health)
  34.     print(money)
  35. if weaponchoice == "knife" or "Knife":
  36.     health - 5
  37.     money - 5
  38.     print(health)
  39.     print(money)
  40. if weaponchoice == "c4" or "C4":
  41.     health - 200
  42.     money - 2500
  43.     random_kills = random.randint(0,10)
  44.     random_kills + kills
  45.     random_deaths = random.randint(0,5)
  46.     random_deaths + deaths
  47.     print(health)
  48.     print(money)
  49. if weaponchoice == "car" or "Car":
  50.     health - 50
  51.     money - 5000
  52.     print(health)
  53.     print(money)
  54. else:
  55.     print("Sorry, I didn't get that.")
  56. if health < 0:
  57.     print("You got a kill")
  58.     health + 100
  59.     kills + 1
  60. if money < 0:
  61.     print("You ran out of money")
  62.     money + 100
  63.     kills - 1
  64.     deaths + 1
  65. kdr = kills / deaths
  66. print(kdr)
  67. extralist = [money-printer, regenerator, nuke]
  68. extrabuy = input()
  69. print(extralist)
  70. if extrabuy == "Money-Printer" or "Money-printer" or "money-Printer" or "money-printer":
  71.     money - 2000
  72.     time.sleep(1.5)
  73.     money + 400
  74.     time.sleep(1.5)
  75.     money + 400
  76.     time.sleep(1.5)
  77.     money + 400
  78.     time.sleep(1.5)
  79.     money + 400
  80.     time.sleep(1.5)
  81.     money + 400
  82.     time.sleep(1.5)
  83.     money + 400
  84.     time.sleep(1.5)
  85.     money + 400
  86. if extrabuy == "Regenerator" or "regenerator":
  87.     money - 1000
  88.     time.sleep(1.5)
  89.     health + 10
  90.     time.sleep(1.5)
  91.     health + 10
  92.     time.sleep(1.5)
  93.     health + 10
  94.     time.sleep(1.5)
  95.     health + 10
  96.     time.sleep(1.5)
  97.     health + 10
  98.     time.sleep(1.5)
  99.     health + 10
  100.     time.sleep(1.5)
  101.     health + 10
  102. if extrabuy == "Nuke" or "nuke":
  103.     money - 100000
  104.     random_chance = random.randint(1,100)
  105.     if random_chance > 99:
  106.         kills + 1000
  107.     if random_chance < 2:
  108.         deaths + 10
  109.     else:
  110.         random_kills = random.randint(2,999)
  111.         random_kills + kills
  112.         random_deaths = random.randint(0,99)
  113.         random_deaths + deaths
  114. xp = 0
  115. if kills + 1:
  116.     xp + 100
  117. if kills + 2:
  118.     xp + 300
  119. if kills + 3:
  120.     xp + 600
  121. if kills + 4:
  122.     xp + 1000
  123. if kills + 5:
  124.     xp + 2000
  125. level = 0
  126. if xp > 100:
  127.     level + 1
  128.     money + 25
  129.     health + 10
  130. if xp > 200:
  131.     level + 1
  132.     money + 40
  133.     health + 15
  134. if xp > 350:
  135.     level + 1
  136.     money + 70
  137.     health + 30
  138. if xp > 550:
  139.     level + 1
  140.     money + 125
  141.     health + 55
  142. if xp > 700:
  143.     level + 1
  144.     money + 200
  145.     health + 80
  146. if xp > 950:
  147.     level + 1
  148.     money + 500
  149.     health + 125
  150. if xp > 1150:
  151.     level + 1
  152.     money + 700
  153.     health + 175
  154. if xp > 1400:
  155.     level + 1
  156.     money + 1000
  157.     health + 250
  158. if xp > 1700:
  159.     level + 1
  160.     money + 1250
  161.     health + 300
  162. if xp > 2100:
  163.     level + 1
  164.     money + 1750
  165.     health + 400
  166. if xp > 2500:
  167.     level + 1
  168.     money + 2000
  169.     health + 500
  170. if xp > 3000:
  171.     level + 1
  172.     money + 2250
  173.     health + 600
  174. if xp > 3500:
  175.     level + 1
  176.     money + 2500
  177.     health + 700
  178. if xp > 4000:
  179.     level + 1
  180.     money + 2750
  181.     health + 800
  182. if xp > 4500:
  183.     level + 1
  184.     money + 3000
  185.     health + 900
  186. if xp > 5000:
  187.     level + 1
  188.     money + 3250
  189.     health + 1000
  190. if xp > 5500:
  191.     level + 1
  192.     money + 3500
  193.     health + 1100
  194. if xp > 6000:
  195.     level + 1
  196.     money + 3750
  197.     health + 1200
  198. if xp > 6500:
  199.     level + 1
  200.     money + 4000
  201.     health + 1300
  202. if xp > 7000:
  203.     level + 1
  204.     money + 4250
  205.     health + 1400
  206. if xp > 7500:
  207.     level + 1
  208.     money + 4500
  209.     health + 1500
  210. if xp > 8000:
  211.     level + 1
  212.     money + 4750
  213.     health + 1600
  214. if xp > 8500:
  215.     level + 1
  216.     money + 5000
  217.     health + 1700
  218. if xp > 9000:
  219.     level + 1
  220.     money + 5500
  221.     health + 1800
  222. if xp > 10000:
  223.     level + 1
  224.     money + 5750
  225.     health + 1900
  226. if xp > 15000:
  227.     level + 1
  228.     money + 6000
  229.     health + 2000
  230. if xp > 20000:
  231.     level + 1
  232.     money + 7000
  233.     health + 2500
  234. print(level)
  235. suicide = input()
  236. if suicide == "Yes" or "yes":
  237.     deaths + 1
  238.     random_chance = random.randint(1,10)
  239.     if random_chance > 5:
  240.         kills + 5
  241.     else:
  242.         deaths + 1
  243. else:
  244.     random_chance = random.randint(1, 10)
  245.     if random_chance > 9:
  246.         kills + 10
  247.     if random_chance < 2:
  248.         deaths + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement