-
Notifications
You must be signed in to change notification settings - Fork 0
/
text game.py
392 lines (375 loc) · 13.8 KB
/
text game.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# Designed and created by [redacted :))))]
# Year 10A 2019
from time import sleep
#I borrowed this method of commands from the internet.
def maincontrol(controllist):
control = input()
if control in controllist:
return control
elif control == "help":
print ("Type the number beside the command you wish to perform.")
return maincontrol(controllist)
elif control == "titan industries":
print ("titan Industries © is an multi-billion dollar coparation, founded by entrepreneur John Titan. As well as being the leading industrial corporation of the 23rd century, we cover media, housing, technology, construction, finance, airships, Android exo-skelteons and the health drink Vitex. Currently we are developing a new exo-skeleton, known as project TITAN. Find out more at titanindustries.com!")
return maincontrol(controllist)
else:
print ("[COMMAND NOT RECOGNISED]")
return maincontrol(controllist)
def gameover ():
print ("[WARNING]")
sleep (2)
print ("...")
print ("[MAJOR DAMAGE TO CPU]")
sleep (3)
print ("...")
print ("[T3000 OFFLINE]")
sleep (3)
print ("...")
print ("[TITAN T3000 HAS BEEN EXTERMINATED]")
sleep (3)
print ("...")
print ("[GAME OVER]")
def elevator1 ():
#This is the main hub. The player must go to the six different floors to flush out the enemy Androids.
print ("You are in The Teleportation deck. Please select floor:")
print ("[1] Observation deck")
print ("[2] Repair deck")
print ("[3] Security deck")
print ("[4] Airlock")
print ("[5] Cargo hold")
print ("[6] Control room")
controllist = ("1", "2", "3", "4", "5", "6",)
control = maincontrol(controllist)
if control == "1":
print ("[TELPORTER ENERGISING]")
print ("...")
sleep (3)
print ("You are beamed on the Observation Deck.")
floor1()
elif control == "2":
print ("[TELPORTER ENERGISING]")
print ("...")
sleep (3)
print ("You are beamed on the Repair Deck.")
floor2()
elif control == "3":
print ("[TELPORTER ENERGISING]")
print ("...")
sleep (3)
print ("You are beamed on the Security Deck.")
floor3()
elif control == "4":
print ("[TELPORTER ENERGISING]")
print ("...")
sleep (3)
print ("You are beamed on the Airlock.")
floor4()
elif control == "5":
print ("[TELPORTER ENERGISING]")
print ("...")
sleep (3)
print ("[ACCESS TO CARGO HOLD IS DENIED]")
print ("...")
sleep (2)
print ("[YOU DO NOT HAVE SECURITY CLEARANCE]")
return elevator1()
elif control == "6":
print ("[TELPORTER ENERGISING]")
print ("...")
sleep (3)
print ("[THE CONTROL ROOM REQUIRES PRIVATE TELEPORTER TO ACCESS].")
return elevator1()
def floor1():
print ("...")
print ("A C23 Maintenace android is lying on the floor. It appears exterminated. A control panel is in front of you.")
print ("[1] Inspect C23 Droid")
print ("[2] Go to Control Panel")
print ("[3] Return to Telportation Deck")
controllist = ("1","2","3",)
control = maincontrol(controllist)
if control == "1":
print ("...")
sleep (2)
print ("You inspect the droid. Scans indicate heavy laser fire to Main CPU. You can:")
print ("[1] Attempt Data hack")
print ("[2] Return")
controllist = ("1","2",)
control = maincontrol(controllist)
if control == "1":
print ("...")
sleep (3)
print ("Data hack successful.")
print ("Data indicates control panel passcode is AN264def.")
return floor1 ()
elif control == "2":
return floor1()
elif control == "2":
print ("...")
print ("Scanners indicate tpye 3 encryption on control panel. You can:")
print ("[1] Enter Passcode")
print ("[2] Return ")
controllist = ("1", "2")
control = maincontrol(controllist)
if control == "1":
password = (input ("[ENTER PASSCODE]: "))
if password == "AN264def":
print ("[ACCESS TO CONTROL PANEL GRANTED]")
print ()
sleep (3)
print ("Ship scans indicate several enemy Androids are located in Repair Deck. It is ill-advised to proceed.")
return elevator1()
else:
print ("[INCORRECT PASSCODE]")
print ("...")
sleep (2)
print ("You hear lasers charging up. You look up. multiple defence lasers have engaged and have aimed at your CPU")
gameover ()
elif control == "2":
return floor1()
elif control == "3":
elevator1 ()
def floor2():
print ("Two enemy Androids are in front of you. Behind them is a laser spanner, capable of repairing your damaged tracking beacon. They spot you and engage their lasers. You can:")
print ("[1] Fire your laser")
print ("[2] Duck for cover behind a crate")
print ("[3] Retreat to the Teleportation Deck")
controllist = ("1","2","3",)
control = maincontrol(controllist)
if control == "1":
print ("[LOCKING ON TARGET]")
sleep (2)
print ("...")
print ("[DIRECT HIT]")
print ("...")
print ("The First Enemy Android sustains heavy damage to the CPU. It is exterminated. The Second one fires at you. You can:")
print ("[1] Retreat to the Teleportation Deck")
controllist = ("1")
control = maincontrol(controllist)
if control == "1":
print ("The Android fires at you")
print ("...")
sleep (2)
print ("It is a direct hit")
gameover()
elif control == "2":
print ("The Enemy Android fires straight through the crate.")
print (...)
sleep (2)
print ("It is a direct hit")
gameover ()
elif control == "3":
elevator1()
def floor3():
print ("A lone enemy Android stands in front of you. Behind it is the security control panel for the PYTHON. You can:")
print ("[1] Fire your laser")
print ("[3] Return to the Teleportation Deck")
controllist = ("1","2",)
control = maincontrol(controllist)
if control == "1":
print ("[LOCKING ON TARGET]")
sleep (2)
print ("...")
print ("[DIRECT HIT]")
print ("...")
print ("The Enemy Android sustains heavy damage to the CPU. It is exterminated. You aprroach the panel. You MUST:")
print ("[1] Access the security tapes")
controllist = ("1")
control = maincontrol(controllist)
if control == "1":
print ("You view the tapes.")
print ("1800: Several men in special exo-suits emblazoned with a globe enter through the airlock. Audio is limited.'We must access the cargo hold and steal project TITAN before the RAVENWOOD institute opens the fissure through time', one Android says. The feed stops. You Attempt to access scanners.")
print ("...")
sleep (2)
print ("Scans indicate several Androids located in the Airlock and one Android in the Control Room")
print ("...")
sleep (2)
("You MUST download these tapes.")
print ("[1] Download security tapes")
controllist = ("1",)
control = maincontrol(controllist)
if control == "1":
print ("[DOWNLOADING SECURITY FOOTAGE]")
print ("...")
sleep (2)
print ("[DOWNLOAD COMPLETE]")
print ("...")
print ("[RETURNING TO TELPORTATION DECK IN 4 SECONDS]")
sleep (4)
return elevator1()
elif control == "2":
print ("[YOU CANNOT LEAVE THIS AREA UNTIL YOU RECOVER SECURITY FOOTAGE]")
return floor3()
#The move used to destroy all enemies was inspired by the one used in the film Alien by Ripley.
def floor4():
print ("8 armed Androids appear in front of you. Behind them is their shuttle, which they used to board the PYTHON. You are severely outnumbered. The Enemy Androids are not prepared for battle and will take aproximately 5 seconds to charge their lasers. You can:")
print ("[1] Fire your laser")
print ("[2] Fire at the control panel")
print ("[3] Retreat to the Teleportation Deck")
controllist = ("1","2","3",)
control = maincontrol(controllist)
if control == "1":
print ("[LOCKING ON TARGET]")
sleep (2)
print ("...")
print ("[DIRECT HIT]")
print ("...")
print ("The Enemy Android you fire at sustains heavy damage to the CPU. It is exterminated. The rest have finished charging their lasers. You can:")
print ("[1] Retreat to the Teleportation Deck")
controllist = ("1")
control = maincontrol(controllist)
if control == "1":
print ("The Androids fires at you")
print ("...")
sleep (2)
print ("It is a direct hit")
gameover()
elif control == "2":
print ("You fire at the control panel.")
print ("...")
sleep (2)
print ("[DIRECT HIT]")
sleep (2)
print ("...")
print ("The Airlock opens, sucking in all the enemy Androids and their ship into space, where they are all immediately Exterminated.")
print ()
print ("You manage to hold on with all your strengyh before the overide closes the Airlock")
sleep (2)
print ("You have one enemy droid remaining. You open the blasted control panel and find a private teleporter. You engage it.")
print ()
sleep (5)
print ("[TELEPORTATION IN 5 SECONDS")
print ("...")
floor5()
elif control == "3":
print ("You attempt to reach the telportation deck. You are too slow and several lasers fire at you")
print ("...")
print ("They are all direct hits")
gameover()
def floor5():
print ("You are beamed on the Control room. C380 Android is there. It is significantly larger and more powerful than most other enemy androids. 'You there', it says. 'Disable your weapon, Via vocal overide code ABFH4517SD'.")
sleep (4)
print ("...")
print ("[OVERIDE CODE, 'ABFH4517SD' ACCEPTED]")
print ("...")
sleep (3)
print ("weapon systems offline")
sleep (3)
print ("...")
print ("'Now Android, tell me how to get to the cargo hold and obtain Project TITAN'.")
print ("...")
print ("T3000:>'Negative, programming disallows distrituing secrets to Enemy Androids'")
print ("...")
sleep (4)
print ("'But I'm not an Android a human working for the rebelian. This is all your programming. It makes you think you live in a world of Androids, but only you and few others exist. You are called Titans and Titan Industries wants to turn the whole world into Titans, unless I deliver the project TITAN to the rebelian")
sleep (5)
print ("...")
print ("[OVERIDE CODE, 'REBELIAN' ACCEPTED]")
sleep (3)
print ("...")
print ("weapon systems online")
print ()
print ("You can:")
print ("[1] Fire at its Right foot ")
print ("[2] Fire at its left foot")
print ("[3] Fire at its CPU ")
controllist = ("1","2","3",)
control = maincontrol(controllist)
if control == "1":
print ("[LOCKING ON TARGET]")
sleep (2)
print ("...")
print ("[MISS]")
print ("...")
sleep (2)
print ("C380 Android fires")
sleep (2)
print ("...")
gameover()
elif control == "2":
print ("[LOCKING ON TARGET]")
sleep (2)
print ("...")
print ("[MISS]")
print ("...")
sleep (2)
print ("C380 Android fires")
sleep (2)
print ("...")
gameover()
elif control == "3":
print ("[LOCKING ON TARGET]")
sleep (2)
print ("...")
print ("[DIRECT HIT]")
print ("...")
sleep (2)
print ("'Wait', says the Enemy Android. 'You can't let the cargo into RAVENWOOD institute. You must stop it by using code A113....................................'")
print ("......")
sleep (6)
print ("C380 Android has been Exterminated")
sleep (2)
print ("...")
print ("[CONNECTING PORT TO MAIN CONTROL PANEL]")
print ("...")
sleep (4)
print ("tracking beacon online")
sleep (4)
print ("...")
print ("Your location has been transmited. Reinforcements Imbound.")
sleep (5)
print ("...")
print ("[MISSION COMPLETED]")
sleep (2)
print ("...")
print ("[SELF DESTRUCT SEQUENCE INITIATED]")
sleep (2)
print ("...")
print ("[TITAN T3000 HAS BEEN EXTERMINATED]")
sleep (3)
print ("...")
print ("[GAME OVER]")
#Main Game
print ("-------------TITAN INDUSTRIES ©-------------")
sleep (2)
print ("...")
print ("-------------boot sequence initiated-------------")
sleep (1)
print ("...")
print ("[DW Software VER. 18.156]")
sleep (1)
print ("...")
print ("[WARNING]")
sleep (1)
print ("...")
print ("weapon system online")
sleep (1)
print ("...")
print ("tracking beacon offline")
print ("...")
print ("optical sensors online")
sleep (2)
print ("...")
sleep (1)
print ("You are on the cargo cruiser, The PYTHON on route to The RAVENWOOD Institute located at The City of Androids. The Cruiser has been ambushed by enemy Androids and have redirected it from its flight path. Titan Industries protocols have engaged Emergency code 1. Your mission is to exterminate all enemy Androids on the PYTHON and transmit its location to Titan Industries ©.")
sleep (2)
print ("Do you accept your mission?")
sleep (1)
print ("[1] Yes")
print ("[2] No")
controllist = ("1","2", )
control = maincontrol(controllist)
if control == "1":
print ("Your mission starts now.")
sleep (1)
elevator1 ()
elif control == "2":
print ("[MISSION DENIED]")
sleep (2)
print ("...")
print ("[SELF DESTRUCT SEQUENCE INITIATED]")
sleep (2)
print ("...")
print ("[TITAN T3000 HAS BEEN EXTERMINATED]")
sleep (3)
print ("...")
print ("[GAME OVER]")