Skip to content

Commit 9d1865d

Browse files
authored
Merge pull request metafy-social#408 from N00rAhmed/master
Created Level 3 and refactored code
2 parents 7c34320 + b009bde commit 9d1865d

1 file changed

Lines changed: 142 additions & 45 deletions

File tree

scripts/Text_Game/Text_Game.py

Lines changed: 142 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import random
22
import time
33
import sys
4-
# print(""" ──────────────────██
5-
# ▄───▄▀█▄▄▄▄
6-
# ─ ▄▀─█▄▄
7-
# ▄▄▄▀───▀▄
8-
# ▀────────▀▀ """)
4+
95

106
def start():
117
# story generated
@@ -105,7 +101,7 @@ def level2():
105101
print('You are running far away from the robots')
106102

107103
time.sleep(2)
108-
print(""" ──────────────────██
104+
print(""" ──────────────────────██
109105
▄───▄▀█▄▄▄▄
110106
─ ▄▀─█▄▄
111107
▄▄▄▀───▀▄
@@ -188,59 +184,160 @@ def level2():
188184
´´´´´¶¶¶¶¶¶¶¶¶¶¶¶´
189185
´´´´´´´¶¶¶¶¶¶¶¶
190186
""")
187+
# question_one = ''
188+
# while question_one != 'run away' and question_one != 'shoot robot in head':
189+
items = ''
190+
while items != 'tank' and items != 'bomb' and items != 'mech suit':
191+
items = input("which item do you choose - the mech suit, tank or bomb : ")
191192

192-
items = input("which item do you choose - the mech suit, tank or bomb : ")
193+
if (items == 'tank'):
194+
time.sleep(3)
195+
print('oh no the cyborg has ripped through the tank')
196+
time.sleep(3)
197+
print('you are running away to find safety')
198+
time.sleep(3)
199+
print('but the cyborg has seen you and captured you')
193200

194-
if (items == 'tank'):
195-
time.sleep(3)
196-
print('oh no the cyborg has ripped through the tank')
197-
time.sleep(3)
198-
print('you are running away to find safety')
199-
time.sleep(3)
200-
print('but the cyborg has seen you and captured you')
201+
elif (items == 'bomb'):
202+
time.sleep(3)
203+
print('you throw the bomb and it exlodes')
204+
time.sleep(3)
205+
print('but it doesnt even lay a scratch on him')
206+
time.sleep(3)
207+
print('because he is made from vibranium')
208+
time.sleep(3)
209+
print('you are instantly captured now')
201210

202-
elif (items == 'bomb'):
203-
time.sleep(3)
204-
print('you throw the bomb and it exlodes')
205-
time.sleep(3)
206-
print('but it doesnt even lay a scratch on him')
207-
time.sleep(3)
208-
print('because he is made from vibranium')
211+
elif (items == "mech suit"):
212+
time.sleep(3)
213+
print('you are now in the mech suit')
214+
time.sleep(3)
215+
print('the cyborg is running towards you')
216+
time.sleep(3)
217+
print('this suit is highly advanced and gives you a ton of diffrent options')
218+
suit_options()
219+
# question_one = ''
220+
# while question_one != 'run away' and question_one != 'shoot robot in head':
221+
def combat_option():
222+
combat_moves = ''
223+
while combat_moves != 'right hook' and combat_moves != 'head butt':
209224
time.sleep(3)
210-
print('you are instantly captured now')
225+
combat_moves = input("do you want to throw a right hook or head butt: ")
226+
if (combat_moves == 'right hook'):
227+
time.sleep(3)
228+
print('wow your right hook to the cyborg was so DEVASTATING that it has killed him')
229+
level3()
230+
elif (combat_moves == 'head butt'):
231+
time.sleep(3)
232+
print('incredible your head butt has KNOCKED OUT the cyborg')
233+
level3()
211234

212-
elif (items == "mech suit"):
213-
time.sleep(3)
214-
print('you are now in the mech suit')
235+
def suit_options():
215236
time.sleep(3)
216-
print('the cyborg is running towards you')
217-
time.sleep(3)
218-
print('this suit is highly advanced and gives you a ton of diffrent options')
237+
select_option = ''
238+
while select_option != 'rocket fist' and select_option != 'missile' and select_option != 'body slam':
239+
select_option = input("what would you like to use: rocket fist, missile, body slam: ")
219240

220-
time.sleep(3)
221-
select_option = input("what would you like to use: rocket fist, missile, body slam: ")
241+
if (select_option == "rocket fist"):
242+
time.sleep(3)
243+
print('good the cyborg is extremely disorientated')
244+
combat_option()
245+
# def combat_option():
246+
# combat_moves = ''
247+
# while combat_moves != 'right hook' and combat_moves != 'head butt':
248+
# time.sleep(3)
249+
# combat_moves = input("do you want to throw a right hook or head butt: ")
250+
# if (combat_moves == 'right hook'):
251+
# time.sleep(3)
252+
# print('wow your right hook to the cyborg was so DEVASTATING that it has killed him')
253+
# level3()
254+
# elif (combat_moves == 'head butt'):
255+
# time.sleep(3)
256+
# print('incredible your head butt has KNOCKED OUT the cyborg')
257+
# level3()
222258

223-
if (select_option == "rocket fist"):
224-
time.sleep(3)
225-
print('good the cyborg is extremely disorientated')
226-
time.sleep(3)
227-
combat_moves = input("do you want to throw a right hook or head butt: ")
228-
if (combat_moves == 'right hook'):
259+
elif (select_option == 'missile'):
229260
time.sleep(3)
230-
print('wow your right hook to the cyborg was so DEVASTATING that it has killed him')
231-
elif (combat_moves == 'head butt'):
261+
print('oh no the cyborg is made from vibranium')
232262
time.sleep(3)
233-
print('incredible your head butt has KNOCKED OUT the cyborg')
234-
elif (select_option == 'missile'):
263+
print('the cyborg punches you and takes you back to the robots')
264+
elif (select_option == 'body slam'):
265+
time.sleep(3)
266+
print('the cyborg has been knocked unconsious good job')
267+
time.sleep(3)
268+
print('u have enough time to run')
269+
level3()
270+
271+
def level3():
272+
time.sleep(3)
273+
print('after that battle you are completely drained and are trying to find safety')
274+
time.sleep(3)
275+
print('after walking for hours you come across a strange looking object')
276+
time.sleep(3)
277+
print('the strange looking object looks like a computer from the past')
278+
time.sleep(4)
279+
print("""
280+
▐▓█▀▀▀▀▀▀▀▀▀█▓▌░▄▄▄▄▄░
281+
▐▓█░░▀░░▀▄░░█▓▌░█▄▄▄█░
282+
▐▓█░░▄░░▄▀░░█▓▌░█▄▄▄█░
283+
▐▓█▄▄▄▄▄▄▄▄▄█▓▌░█████░
284+
░░░░▄▄███▄▄░░░░░█████░
285+
286+
""")
287+
time.sleep(3)
288+
print('there is a video recording on it')
289+
# question_one = ''
290+
# while question_one != 'run away' and question_one != 'shoot robot in head':
291+
message = ''
292+
while message != 'yes' and message != 'no':
293+
message = input('Do you want to play the recording: ')
294+
if message == 'yes':
295+
time.sleep(2)
296+
print('...')
297+
time.sleep(2)
298+
print('..')
299+
time.sleep(2)
300+
print('.')
235301
time.sleep(3)
236-
print('oh no the cyborg is made from vibranium')
302+
print('Computer: We have found a way to end the war')
237303
time.sleep(3)
238-
print('the cyborg punches you and takes you back to the robots')
239-
elif (select_option == 'body slam'):
304+
print('We have ...')
305+
time.sleep(5)
306+
print("Computer: We have created an algorithm which can search and terminate all AI organisms")
307+
time.sleep(2)
308+
print('Computer: OH NO')
240309
time.sleep(3)
241-
print('the cyborg has been knocked unconsious good job')
310+
print('Computer: the machines have invaded our base')
242311
time.sleep(3)
243-
print('u have enough time to run')
312+
print("/@)|¬!}{")
313+
algorithm()
314+
315+
def algorithm():
316+
time.sleep(3)
317+
initiate = ''
318+
while initiate != 'start' and initiate != 'terminate':
319+
initiate = input('If you wish to initiate this algorithm please type start or if you wish to terminate the algorithm please type terminate: ')
320+
if (initiate == 'start'):
321+
time.sleep(3)
322+
print('....')
323+
time.sleep(3)
324+
print('beep')
325+
time.sleep(3)
326+
print('boop')
327+
time.sleep(3)
328+
print('boop')
329+
time.sleep(3)
330+
print('beep')
331+
time.sleep(3)
332+
print('Congratulations you have sucessfully killed all of the robots in this timeline !!!!!!')
333+
334+
335+
elif (initiate == 'terminate'):
336+
time.sleep(3)
337+
print('WTF !!!!')
338+
339+
340+
244341
# option to play again at completion of game
245342
play_again = "yes"
246343

0 commit comments

Comments
 (0)