Advertisement
Guest User

horrible ????? game

a guest
Aug 17th, 2019
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.28 KB | None | 0 0
  1. #initial
  2.  
  3. wincondition1 = 0
  4. wincondition2 = 0
  5. wincondition3 = 0
  6.  
  7. weaponXlayer1 = 1
  8. weaponYlayer1 = 1
  9.  
  10. playerhp = 100
  11.  
  12.  
  13. #Internetal
  14. #If Health is = 2, the game restarts.
  15. #If Win = 1, the next level is achieved (Left2 +1)
  16. #If Level2 = 0, the game continues at level 1.
  17.  
  18.  
  19. internal = [ 'Win' , 'Lose' , 'Health' , 'doihaveaweapon' , 'Level2' ]
  20.  
  21. internal[0] = 0
  22.  
  23.  
  24. #player
  25.  
  26. playerpositionx = 1
  27. playerpositiony = 1
  28.  
  29. #mobs
  30.  
  31. headcrabX = 2
  32. headcrabY = 2
  33. barnaclex = 2
  34. barnacley = 3
  35.  
  36. staircase1x = 3
  37. staircase1y = 3
  38. staircase2x = 3
  39. staircase2y = 2
  40. mobs = [ 'Headcrab' , 'Skeleton' , 'd o g' , 'Staircase1X' , 'StairCase1Y']
  41.  
  42.  
  43.  
  44. #commands
  45.  
  46. commands = [ 'moveright' , 'moveleft' , 'moveup' , 'movedown' , 'fight' , 'grab' , ]
  47.  
  48. commands[5] = 0
  49.  
  50. #floors
  51.  
  52. floor2layer1 = [ '1' , '2' , '3' ,]
  53. floor2layer2 = [ '1' , '2' , '3' ,]
  54. floor2layer3 = [ '1' , '2' , '3' ,]
  55.  
  56. floor3layefr1 = [ '1' , '2' , '3' ,]
  57. floor3layer2 = [ '1' , '2' , '3' ,]
  58. floor3layer3 = [ '1' , '2' , '3' ,]
  59.  
  60.  
  61.  
  62. # intro dialogue
  63.  
  64. print("You are trapped in a three story dungeon, and you must get out.")
  65.  
  66. print("There is only way out but up, and there are many, many monster lurking. Luckily, there is a crowbar underneath you to protect yourself with. You begin your journey up.")
  67.  
  68. print(" ")
  69.  
  70. print("Each floor takes foorsteps to move from one side to the next. It is too dark to see anything this far down, so you must guess and move to the position of the stairs.")
  71.  
  72. print(" ")
  73.  
  74. print("You are at " + str(playerpositionx) + " of three steps right.")
  75. print("You are at " + str(playerpositiony) + " of three steps up.")
  76.  
  77. #level introduction
  78.  
  79. print(" ")
  80.  
  81. print(" ")
  82.  
  83. print(" ")
  84.  
  85. print("This is the level.")
  86.  
  87. print(" ")
  88.  
  89. floor1layer1 = [ '1' , '2' , '3' ,]
  90. floor1layer2 = [ '1' , '2' , '3' ,]
  91. floor1layer3 = [ '1' , '2' , '3' ,]
  92.  
  93. internal[4] = 0
  94.  
  95. print(floor1layer1)
  96. print(floor1layer2)
  97. print(floor1layer3)
  98.  
  99. print(" ")
  100.  
  101. print("Your player is represented by the x on the map.")
  102.  
  103. floor1layer3[0] = "x"
  104.  
  105. print(" ")
  106.  
  107. print(floor1layer1)
  108. print(floor1layer2)
  109. print(floor1layer3)
  110.  
  111. print(" ")
  112.  
  113. #Help
  114.  
  115. userround = input("Every round, you will be given an option to interact with the map. Type in the command, 'help' , you will receive a list of commands. " )
  116.  
  117. print (" ")
  118.  
  119. #Hint #1
  120.  
  121. if weaponXlayer1 == playerpositionx and weaponYlayer1 == playerpositiony :
  122. print("Hey just a hint, there's a weapon right under you. If you like living, you should pick it up.")
  123.  
  124. print (" ")
  125.  
  126. #Positive Round 1
  127.  
  128.  
  129.  
  130. while playerpositionx != mobs[3] and playerpositiony != mobs[4] :
  131. if wincondition1 == 1:
  132. break
  133.  
  134. #moveright false
  135.  
  136. if userround == "moveright" and int(playerpositionx) == 3 :
  137. print("Your player cannot move anymore right, as there x position is: " + str(playerpositionx) + "." )
  138.  
  139.  
  140. print(" ")
  141. print(floor1layer1)
  142. print(floor1layer2)
  143. print(floor1layer3)
  144. print(" ")
  145.  
  146. #moveright
  147.  
  148. if userround == "moveright" and 3 > int(playerpositionx) :
  149. playerpositionx = playerpositionx + 1
  150.  
  151. if floor1layer1[0] == "x" :
  152. floor1layer1[0] = 1
  153. if floor1layer1[1] == "x" :
  154. floor1layer1[1] = 2
  155. if floor1layer1[2] == "x" :
  156. floor1layer1[2] = 3
  157. if floor1layer2[0] == "x" :
  158. floor1layer2[0] = 1
  159. if floor1layer2[1] == "x" :
  160. floor1layer2[1] = 2
  161. if floor1layer2[2] == "x" :
  162. floor1layer2[2] = 3
  163. if floor1layer3[0] == "x" :
  164. floor1layer3[0] = 1
  165. if floor1layer3[1] == "x" :
  166. floor1layer3[1] = 2
  167. if floor1layer3[2] == "x" :
  168. floor1layer3[2] = 3
  169.  
  170. if playerpositionx == 1 and playerpositiony == 1:
  171. floor1layer3[0] = "x"
  172. if playerpositionx == 2 and playerpositiony == 1:
  173. floor1layer3[1] = "x"
  174. if playerpositionx == 3 and playerpositiony == 1:
  175. floor1layer3[2] = "x"
  176. if playerpositionx == 1 and playerpositiony == 2:
  177. floor1layer2[0] = "x"
  178. if playerpositionx == 2 and playerpositiony == 2:
  179. floor1layer2[1] = "x"
  180. if playerpositionx == 3 and playerpositiony == 2:
  181. floor1layer2[2] = "x"
  182. if playerpositionx == 1 and playerpositiony == 3:
  183. floor1layer1[0] = "x"
  184. if playerpositionx == 2 and playerpositiony == 3:
  185. floor1layer1[1] = "x"
  186. if playerpositionx == 3 and playerpositiony == 3:
  187. floor1layer1[2] = "x"
  188.  
  189. print("Your player has moved one step to the right, making their x position: " + str(playerpositionx) + "." )
  190.  
  191. print(" ")
  192. print(floor1layer1)
  193. print(floor1layer2)
  194. print(floor1layer3)
  195. print(" ")
  196.  
  197. #false moveleft
  198.  
  199. if userround == "moveleft" and 1 == playerpositionx :
  200. print("Your player cannot move anymore left, as their x position: " + str(playerpositionx) + ", is equal to 1.")
  201.  
  202. print(" ")
  203. print(floor1layer1)
  204. print(floor1layer2)
  205. print(floor1layer3)
  206. print(" ")
  207.  
  208. #moveleft
  209.  
  210. if userround == "moveleft" and int(playerpositionx) > 1 :
  211. playerpositionx = playerpositionx - 1
  212.  
  213. if floor1layer1[0] == "x" :
  214. floor1layer1[0] = 1
  215. if floor1layer1[1] == "x" :
  216. floor1layer1[1] = 2
  217. if floor1layer1[2] == "x" :
  218. floor1layer1[2] = 3
  219. if floor1layer2[0] == "x" :
  220. floor1layer2[0] = 1
  221. if floor1layer2[1] == "x" :
  222. floor1layer2[1] = 2
  223. if floor1layer2[2] == "x" :
  224. floor1layer2[2] = 3
  225. if floor1layer3[0] == "x" :
  226. floor1layer3[0] = 1
  227. if floor1layer3[1] == "x" :
  228. floor1layer3[1] = 2
  229. if floor1layer3[2] == "x" :
  230. floor1layer3[2] = 3
  231.  
  232. if playerpositionx == 1 and playerpositiony == 1:
  233. floor1layer3[0] = "x"
  234. if playerpositionx == 2 and playerpositiony == 1:
  235. floor1layer3[1] = "x"
  236. if playerpositionx == 3 and playerpositiony == 1:
  237. floor1layer3[2] = "x"
  238. if playerpositionx == 1 and playerpositiony == 2:
  239. floor1layer2[0] = "x"
  240. if playerpositionx == 2 and playerpositiony == 2:
  241. floor1layer2[1] = "x"
  242. if playerpositionx == 3 and playerpositiony == 2:
  243. floor1layer2[2] = "x"
  244. if playerpositionx == 1 and playerpositiony == 3:
  245. floor1layer1[0] = "x"
  246. if playerpositionx == 2 and playerpositiony == 3:
  247. floor1layer1[1] = "x"
  248. if playerpositionx == 3 and playerpositiony == 3:
  249. floor1layer1[2] = "x"
  250.  
  251. print("Your player has moved one step to the left making their x position: " + str(playerpositionx) + "." )
  252.  
  253. print(" ")
  254. print(floor1layer1)
  255. print(floor1layer2)
  256. print(floor1layer3)
  257. print(" ")
  258.  
  259. if userround == "moveleft" and int(playerpositionx) == 0 :
  260.  
  261. print("Your player cannot move anymore left, as their x position: " + str(playerpositionx) + ", is equal to 0." )
  262.  
  263. print(" ")
  264. print(floor1layer1)
  265. print(floor1layer2)
  266. print(floor1layer3)
  267. print(" ")
  268.  
  269. #moveup false
  270.  
  271. if userround == "moveup" and int(playerpositiony) == 3 :
  272. print("Your player cannot move anymore up, as their y position: " + str(playerpositiony) + ", is equal to 3." )
  273.  
  274. print(" ")
  275. print(floor1layer1)
  276. print(floor1layer2)
  277. print(floor1layer3)
  278. print(" ")
  279.  
  280. #moveup
  281.  
  282. if userround == "moveup" and 3 > int(playerpositiony) :
  283.  
  284. playerpositiony = playerpositiony + 1
  285. print("Your player has moved one step up, making their y position: " + str(playerpositiony) + "." )
  286.  
  287. if floor1layer1[0] == "x" :
  288. floor1layer1[0] = 1
  289. if floor1layer1[1] == "x" :
  290. floor1layer1[1] = 2
  291. if floor1layer1[2] == "x" :
  292. floor1layer1[2] = 3
  293. if floor1layer2[0] == "x" :
  294. floor1layer2[0] = 1
  295. if floor1layer2[1] == "x" :
  296. floor1layer2[1] = 2
  297. if floor1layer2[2] == "x" :
  298. floor1layer2[2] = 3
  299. if floor1layer3[0] == "x" :
  300. floor1layer3[0] = 1
  301. if floor1layer3[1] == "x" :
  302. floor1layer3[1] = 2
  303. if floor1layer3[2] == "x" :
  304. floor1layer3[2] = 3
  305.  
  306. if playerpositionx == 1 and playerpositiony == 1:
  307. floor1layer3[0] = "x"
  308. if playerpositionx == 2 and playerpositiony == 1:
  309. floor1layer3[1] = "x"
  310. if playerpositionx == 3 and playerpositiony == 1:
  311. floor1layer3[2] = "x"
  312. if playerpositionx == 1 and playerpositiony == 2:
  313. floor1layer2[0] = "x"
  314. if playerpositionx == 2 and playerpositiony == 2:
  315. floor1layer2[1] = "x"
  316. if playerpositionx == 3 and playerpositiony == 2:
  317. floor1layer2[2] = "x"
  318. if playerpositionx == 1 and playerpositiony == 3:
  319. floor1layer1[0] = "x"
  320. if playerpositionx == 2 and playerpositiony == 3:
  321. floor1layer1[1] = "x"
  322. if playerpositionx == 3 and playerpositiony == 3:
  323. floor1layer1[2] = "x"
  324.  
  325. print(" ")
  326. print(floor1layer1)
  327. print(floor1layer2)
  328. print(floor1layer3)
  329. print(" ")
  330.  
  331. #false movedown
  332.  
  333. if userround == "movedown" and playerpositiony == 1 :
  334. print("Your player cannot move anymore down, as their x position: " + str(playerpositiony) + ", is equal to 1.")
  335.  
  336. print(" ")
  337. print(floor1layer1)
  338. print(floor1layer2)
  339. print(floor1layer3)
  340. print(" ")
  341.  
  342. #movedown
  343.  
  344. if userround == "movedown" and 1 < int(playerpositiony) :
  345. playerpositiony = playerpositiony - 1
  346.  
  347. if floor1layer1[0] == "x" :
  348. floor1layer1[0] = 1
  349. if floor1layer1[1] == "x" :
  350. floor1layer1[1] = 2
  351. if floor1layer1[2] == "x" :
  352. floor1layer1[2] = 3
  353. if floor1layer2[0] == "x" :
  354. floor1layer2[0] = 1
  355. if floor1layer2[1] == "x" :
  356. floor1layer2[1] = 2
  357. if floor1layer2[2] == "x" :
  358. floor1layer2[2] = 3
  359. if floor1layer3[0] == "x" :
  360. floor1layer3[0] = 1
  361. if floor1layer3[1] == "x" :
  362. floor1layer3[1] = 2
  363. if floor1layer3[2] == "x" :
  364. floor1layer3[2] = 3
  365.  
  366. if playerpositionx == 1 and playerpositiony == 1:
  367. floor1layer3[0] = "x"
  368. if playerpositionx == 2 and playerpositiony == 1:
  369. floor1layer3[1] = "x"
  370. if playerpositionx == 3 and playerpositiony == 1:
  371. floor1layer3[2] = "x"
  372. if playerpositionx == 1 and playerpositiony == 2:
  373. floor1layer2[0] = "x"
  374. if playerpositionx == 2 and playerpositiony == 2:
  375. floor1layer2[1] = "x"
  376. if playerpositionx == 3 and playerpositiony == 2:
  377. floor1layer2[2] = "x"
  378. if playerpositionx == 1 and playerpositiony == 3:
  379. floor1layer1[0] = "x"
  380. if playerpositionx == 2 and playerpositiony == 3:
  381. floor1layer1[1] = "x"
  382. if playerpositionx == 3 and playerpositiony == 3:
  383. floor1layer1[2] = "x"
  384.  
  385. print("Your player has moved one step up, making their y position: " + str(playerpositiony) + "." )
  386.  
  387. print(" ")
  388. print(floor1layer1)
  389. print(floor1layer2)
  390. print(floor1layer3)
  391. print(" ")
  392.  
  393. #grab
  394.  
  395. if userround == "grab" and weaponXlayer1 == playerpositionx and weaponYlayer1 == playerpositiony :
  396. print("You have aquired a crowbar.")
  397.  
  398. commands[5] = 1
  399.  
  400. print(" ")
  401. print(floor1layer1)
  402. print(floor1layer2)
  403. print(floor1layer3)
  404. print(" ")
  405.  
  406. #grab false
  407.  
  408. if userround == "grab" and weaponXlayer1 != playerpositionx and playerpositiony != weaponYlayer1 :
  409. print("You are not able to grab anything at the coordinates: " + str(playerpositionx) + " x , " + str(playerpositiony) + " y ." )
  410.  
  411. print(" ")
  412. print(floor1layer1)
  413. print(floor1layer2)
  414. print(floor1layer3)
  415. print(" ")
  416.  
  417. if userround == "help" :
  418. print(commands)
  419.  
  420. print(" ")
  421. print(floor1layer1)
  422. print(floor1layer2)
  423. print(floor1layer3)
  424. print(" ")
  425.  
  426. #level setter
  427.  
  428. if playerpositionx == headcrabX and playerpositiony == headcrabY :
  429. print("There is an enemy right under you. If you input the 'fight' command, you will be able to live.")
  430.  
  431. print(" ")
  432.  
  433. print("Your HP is: " + str(playerhp) )
  434.  
  435. print("Every time you stumble upon an enemy, you lose 50 hp.")
  436.  
  437. playerhp = playerhp - 50
  438.  
  439. print("Since you stumbled upon a " + str(mobs[0]) + " , your hp is " + str(playerhp) )
  440.  
  441. print(" ")
  442. print(floor1layer1)
  443. print(floor1layer2)
  444. print(floor1layer3)
  445.  
  446. #fight
  447.  
  448. if playerpositionx == headcrabX and playerpositiony == headcrabY and userround == "fight" and commands[5] == 1 :
  449. print(" ")
  450. print("You swing your crowbar.")
  451. print("The headcrab is dead. What a challenge.")
  452. playerhp = playerhp + 50
  453. print("Your hp is " + str(playerhp) )
  454.  
  455. print(" ")
  456. print(floor1layer1)
  457. print(floor1layer2)
  458. print(floor1layer3)
  459.  
  460. #fight false #1
  461.  
  462. if playerpositionx != headcrabX and playerpositiony != headcrabY and userround == "fight" :
  463. print(" ")
  464. print("You swing your crowbar.")
  465. print("There is nothing to be hit.")
  466.  
  467. print(floor1layer1)
  468. print(floor1layer2)
  469. print(floor1layer3)
  470.  
  471. #fight false #1
  472.  
  473. if playerpositionx == headcrabX and playerpositiony == headcrabY and userround == "fight" and commands[5] != 0 :
  474.  
  475. playerhp = playerhp + 50
  476.  
  477. print(" ")
  478. print("You forgot your crowbar.")
  479. print("You cannot hit the headcrab.")
  480. print("Your hp is now" + str(playerhp) )
  481. print(" ")
  482.  
  483. print(floor1layer1)
  484. print(floor1layer2)
  485. print(floor1layer3)
  486.  
  487. #death
  488.  
  489. if playerhp == 0 :
  490. if floor1layer1[0] == "x" :
  491. floor1layer1[0] = 1
  492. if floor1layer1[1] == "x" :
  493. floor1layer1[1] = 2
  494. if floor1layer1[2] == "x" :
  495. floor1layer1[2] = 3
  496. if floor1layer2[0] == "x" :
  497. floor1layer2[0] = 1
  498. if floor1layer2[1] == "x" :
  499. floor1layer2[1] = 2
  500. if floor1layer2[2] == "x" :
  501. floor1layer2[2] = 3
  502. if floor1layer3[0] == "x" :
  503. floor1layer3[0] = 1
  504. if floor1layer3[1] == "x" :
  505. floor1layer3[1] = 2
  506. if floor1layer3[2] == "x" :
  507. floor1layer3[2] = 3
  508.  
  509. playerpositionx = 1
  510. playerpositiony = 1
  511. floor1layer3[0] = "x"
  512.  
  513. print("You are dead. You have respawned at 0,0 .")
  514.  
  515. playerhp = 100
  516.  
  517. print("Your hp is now" + str(playerhp))
  518.  
  519. print(floor1layer1)
  520. print(floor1layer2)
  521. print(floor1layer3)
  522.  
  523.  
  524. if playerpositionx == staircase1x and playerpositiony == staircase1y :
  525. print("You reached the second level!")
  526. print(" ")
  527. floor2layer3[0] = "x"
  528. print(floor2layer1)
  529. print(floor2layer2)
  530. print(floor2layer3)
  531. print(" ")
  532. print("This is level two.")
  533. wincondition1 = 1
  534.  
  535. userround = input("Input one of the commands here:. ")
  536.  
  537. playerpositionx = 0
  538. playerpositiony = 0
  539.  
  540. weaponlayer1x = 0
  541. weaponlayer1y = 0
  542.  
  543. floor2layer3[0] = "x"
  544.  
  545. while playerpositionx != mobs[3] and playerpositiony != mobs[4] :
  546. if wincondition2 == 1:
  547. break
  548.  
  549. #moveright false
  550.  
  551. if userround == "moveright" and int(playerpositionx) == 3 :
  552. print("Your player cannot move anymore right, as there x position is: " + str(playerpositionx) + "." )
  553.  
  554.  
  555. print(" ")
  556. print(floor2layer1)
  557. print(floor2layer2)
  558. print(floor2layer3)
  559. print(" ")
  560.  
  561. #moveright
  562.  
  563. if userround == "moveright" :
  564. playerpositionx = playerpositionx + 1
  565.  
  566. if floor2layer3[0] == "x" :
  567. floor2layer3[0] = 1
  568. if floor2layer3[1] == "x" :
  569. floor2layer3[1] = 2
  570. if floor2layer3[2] == "x" :
  571. floor2layer3[2] = 3
  572. if floor2layer2[0] == "x" :
  573. floor2layer2[0] = 1
  574. if floor2layer2[1] == "x" :
  575. floor2layer2[1] = 2
  576. if floor2layer2[2] == "x" :
  577. floor2layer2[2] = 3
  578. if floor2layer1[0] == "x" :
  579. floor2layer1[0] = 1
  580. if floor2layer1[1] == "x" :
  581. floor2layer1[1] = 2
  582. if floor2layer1[2] == "x" :
  583. floor2layer1[2] = 3
  584.  
  585. if playerpositionx == 1 and playerpositiony == 1:
  586. floor2layer3[0] = "x"
  587. if playerpositionx == 2 and playerpositiony == 1:
  588. floor2layer3[1] = "x"
  589. if playerpositionx == 3 and playerpositiony == 1:
  590. floor2layer3[2] = "x"
  591. if playerpositionx == 1 and playerpositiony == 2:
  592. floor2layer2[0] = "x"
  593. if playerpositionx == 2 and playerpositiony == 2:
  594. floor2layer2[1] = "x"
  595. if playerpositionx == 3 and playerpositiony == 2:
  596. floor2layer2[2] = "x"
  597. if playerpositionx == 1 and playerpositiony == 3:
  598. floor2layer1[0] = "x"
  599. if playerpositionx == 2 and playerpositiony == 3:
  600. floor2layer1[1] = "x"
  601. if playerpositionx == 3 and playerpositiony == 3:
  602. floor2layer1[2] = "x"
  603.  
  604. print(" ")
  605. print(floor2layer1)
  606. print(floor2layer2)
  607. print(floor2layer3)
  608. print(" ")
  609.  
  610. #moveleft false
  611.  
  612. if userround == "moveleft" and int(playerpositionx) == 1 :
  613. print("Your player cannot move anymore left, as there x position is: " + str(playerpositionx) + "." )
  614.  
  615.  
  616. print(" ")
  617. print(floor2layer1)
  618. print(floor2layer2)
  619. print(floor2layer3)
  620. print(" ")
  621.  
  622. #moveleft
  623.  
  624. if userround == "left" and playerpositionx > 1 :
  625. playerpositionx = playerpositionx - 1
  626.  
  627. if floor2layer3[0] == "x" :
  628. floor2layer3[0] = 1
  629. if floor2layer3[1] == "x" :
  630. floor2layer3[1] = 2
  631. if floor2layer3[2] == "x" :
  632. floor2layer3[2] = 3
  633. if floor2layer2[0] == "x" :
  634. floor2layer2[0] = 1
  635. if floor2layer2[1] == "x" :
  636. floor2layer2[1] = 2
  637. if floor2layer2[2] == "x" :
  638. floor2layer2[2] = 3
  639. if floor2layer1[0] == "x" :
  640. floor2layer1[0] = 1
  641. if floor2layer1[1] == "x" :
  642. floor2layer1[1] = 2
  643. if floor2layer1[2] == "x" :
  644. floor2layer1[2] = 3
  645.  
  646. if playerpositionx == 1 and playerpositiony == 1:
  647. floor2layer3[0] = "x"
  648. if playerpositionx == 2 and playerpositiony == 1:
  649. floor2layer3[1] = "x"
  650. if playerpositionx == 3 and playerpositiony == 1:
  651. floor2layer3[2] = "x"
  652. if playerpositionx == 1 and playerpositiony == 2:
  653. floor2layer2[0] = "x"
  654. if playerpositionx == 2 and playerpositiony == 2:
  655. floor2layer2[1] = "x"
  656. if playerpositionx == 3 and playerpositiony == 2:
  657. floor2layer2[2] = "x"
  658. if playerpositionx == 1 and playerpositiony == 3:
  659. floor2layer1[0] = "x"
  660. if playerpositionx == 2 and playerpositiony == 3:
  661. floor2layer1[1] = "x"
  662. if playerpositionx == 3 and playerpositiony == 3:
  663. floor2layer1[2] = "x"
  664.  
  665. print(" ")
  666. print(floor2layer1)
  667. print(floor2layer2)
  668. print(floor2layer3)
  669. print(" ")
  670.  
  671. #moveup false
  672.  
  673. if userround == "moveup" and int(playerpositiony) == 3 :
  674. print("Your player cannot move anymore up, as there y position is: " + str(playerpositiony) + "." )
  675.  
  676.  
  677. print(" ")
  678. print(floor2layer1)
  679. print(floor2layer2)
  680. print(floor2layer3)
  681. print(" ")
  682.  
  683. #moveright
  684.  
  685. if userround == "moveright" :
  686. playerpositionx = playerpositionx + 1
  687.  
  688. if floor2layer3[0] == "x" :
  689. floor2layer3[0] = 1
  690. if floor2layer3[1] == "x" :
  691. floor2layer3[1] = 2
  692. if floor2layer3[2] == "x" :
  693. floor2layer3[2] = 3
  694. if floor2layer2[0] == "x" :
  695. floor2layer2[0] = 1
  696. if floor2layer2[1] == "x" :
  697. floor2layer2[1] = 2
  698. if floor2layer2[2] == "x" :
  699. floor2layer2[2] = 3
  700. if floor2layer1[0] == "x" :
  701. floor2layer1[0] = 1
  702. if floor2layer1[1] == "x" :
  703. floor2layer1[1] = 2
  704. if floor2layer1[2] == "x" :
  705. floor2layer1[2] = 3
  706.  
  707. if playerpositionx == 1 and playerpositiony == 1:
  708. floor2layer3[0] = "x"
  709. if playerpositionx == 2 and playerpositiony == 1:
  710. floor2layer3[1] = "x"
  711. if playerpositionx == 3 and playerpositiony == 1:
  712. floor2layer3[2] = "x"
  713. if playerpositionx == 1 and playerpositiony == 2:
  714. floor2layer2[0] = "x"
  715. if playerpositionx == 2 and playerpositiony == 2:
  716. floor2layer2[1] = "x"
  717. if playerpositionx == 3 and playerpositiony == 2:
  718. floor2layer2[2] = "x"
  719. if playerpositionx == 1 and playerpositiony == 3:
  720. floor2layer1[0] = "x"
  721. if playerpositionx == 2 and playerpositiony == 3:
  722. floor2layer1[1] = "x"
  723. if playerpositionx == 3 and playerpositiony == 3:
  724. floor2layer1[2] = "x"
  725.  
  726. print(" ")
  727. print(floor2layer1)
  728. print(floor2layer2)
  729. print(floor2layer3)
  730. print(" ")
  731.  
  732. #fight
  733.  
  734. if playerpositionx == barnaclex and playerpositiony == headcrabY and userround == "fight" and commands[5] == 1 :
  735. print(" ")
  736. print("You swing your crowbar.")
  737. print("The headcrab is dead. What a challenge.")
  738. playerhp = playerhp + 50
  739. print("Your hp is " + str(playerhp) )
  740.  
  741. print(" ")
  742. print(floor1layer1)
  743. print(floor1layer2)
  744. print(floor1layer3)
  745.  
  746. #fight false #1
  747.  
  748. if playerpositionx != headcrabX and playerpositiony != headcrabY and userround == "fight" :
  749. print(" ")
  750. print("You swing your crowbar.")
  751. print("There is nothing to be hit.")
  752.  
  753. print(floor1layer1)
  754. print(floor1layer2)
  755. print(floor1layer3)
  756.  
  757. #fight false #1
  758.  
  759. if playerpositionx == headcrabX and playerpositiony == headcrabY and userround == "fight" and commands[5] != 0 :
  760.  
  761. playerhp = playerhp + 50
  762.  
  763. print(" ")
  764. print("You forgot your crowbar.")
  765. print("You cannot hit the headcrab.")
  766. print("Your hp is now" + str(playerhp) )
  767. print(" ")
  768.  
  769. print(floor1layer1)
  770. print(floor1layer2)
  771. print(floor1layer3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement