repl.it
@TreyvanMcDonald/

The game of death and avoiding it.

Python

No description

fork
loading
Files
  • main.py
main.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
import sys as s
import replit as i
import random as r
import time as t

def fight():
  phealth = health
  ehealth = health-5
  pname = name
  etype = enemy
  pdam = damage
  hit = r.randint(1, 10)
  if etype == "Swordsman":
    edam = 2
  elif etype == "Golem":
    edam = 5
  while True:
    i.clear()
    print(pname+"'s health:", phealth)
    print(etype+"'s health:", ehealth)
    print()
    print("Press a to attack")
    print("Press d to defend")
    turn = input(">>> ").lower()
    if turn == "a":
      print("You attacked!")
      print()
      attack = r.randint(1, 10)
      if attack >= 5:
        print("You hit the enemy!")
        input("Press ENTER to continue")
        ehealth -= pdam
        if ehealth <= 0:
          print("You won!")
          input("Press ENTER to continue.")
          i.clear()
          break
      else:
        print("You missed!")
        input("Press ENTER to continue.")
    elif turn == "d":
      hit = r.randint(1, 20)
      print("You defended!")
      print("The chances of the enemy hitting decreased!")
      input("Press ENTER to continue.")
    else:
      print("I don't understand that.")
      input("Press ENTER to try again.")
    if hit <= 5:
      print(etype, "hit you!")
      print()
      phealth-=edam
      if phealth <= 0:
        if etype == "Golem":
          print("You died!")
          input("GAME OV2982377Ewioend")
          i.clear()
          break
        else:
          print("You died!")
          input("GAME OVER!")
          s.exit()
      else:
        print(name+"'s health:", phealth)
        input("Press ENTER to continue.")
    if etype == "Golem":
      print(etype, "hit you!")
      input("Press ENTER to continue.")
      print()
      phealth-=edam
      if phealth <= 0:
        print("You died!")
        input("GAME OV2982377Ewioend")
        i.clear()
        break


i.clear()
print("Welcome human.")
print("I see that you have come to play this game.")
print("I will now allow you to proceed onto the game...")
print("Good luck!")
print("You will need it...")
input("Press ENTER to continue.")
i.clear()
print("I am the narrator")
print("'I am the announcer!'")
print("'Let the testing begin!'")
print("'Hello human! Tell us, what is your name?'")
name = input(">>> ")
i.clear()
print("'Thank you!'")
print("'Now let us welcome", name, "into the battle arena!'")
print("The crowd cheers.")
print("You step into a giant ring with people everywhere.")
print("Most of them are holding swords and some of them are holding shields as well.")
print("'You will be fighting everyone in here for the entertainment of the crowd. Make sure to make it as interesting as possible. They really like to see people make a mess.'")
print("Press s to step into the light.")

while True:
  step = input(">>> ")
  if step == "s":
    break
  else:
    print("I do not understand that.")

i.clear()
print("You step out into the light of the arena and the crowd cheers. Some of them are even screaming your name.")
print("You can't seem to remember anything before finding yourself at this arena.")
print("Because of that, you don't understand why there are people with posters that have your name on it.")
print("All of the sudden, a giant gate closes behind you with a bang and your only exit has been sealed off.")
print("'It looks like all of the contestents are ready!'")
print("'Let the fight...'")
print("'BEGIN!!'")
print("One of the people rushes over towards you and you realize that you have a rusty sword in your hands.")
input("Press ENTER to start the fight.")
health = 10
enemy = "Swordsman"
damage = 2
fight()
print("'And we have a winner!'")
print("'It looks like", name, "has won once again!'")
print("The crowd cheers frantically.")
print("Suddenly, the light in the arena flickers and you catch a glimpse of the empty arena before the light comes back on and everything is back to normal.")
print("'Anyways, let us begin the next fight!'")
print("'Oh! Before I forget, I need to heal "+name+"!'")
print("You got healed.")
health = 10
print("'Now let the next fight begin!'")
input("Press ENTER to start the next fight.")
fight()
print("'Good job "+name+"! Here, let me heal you!'")
print("You got healed!")
print("'Oh! Well would you look at that! The Swordsman dropped something!'")
print("You found a chestplate that fell off of the Swordsman!")
print("For some reason, equiping this makes your HP go up by 5...")
health = 15
print("'Uh Oh! It looks like", name, "will have to defeat a golem!'")
print("The crowd goes 'ooooooooooh'.")
print("'Let's see what will happen!'")
input("Press ENTER to continue.")
enemy = "Golem"
fight()
print("You wake up to the sight of what looks to be a medic room.")
print("You realize that there are no people in the room and the entire thing looks abandoned.")
print()

while True:
  print("Press s to stand up...")
  stand = input(">>> ").lower()
  if stand == "s":
    print("You stood up...")
    break
  else:
    print("I don't understand that.")
    input("Press ENTER to try again.")
    i.clear()

print("You then realize that you can't stand up.")
print("You are strapped onto the bed thing that you are laying on.")
print("Yet... you are standing up...")
print()

while True:
  print("Press c to call out for help.")
  call = input(">>> ").lower()
  if call == "c":
    print("You call out 'Hello? Is there anyone there!?'")
    break
  else:
    print("You did not understand that "+name+".")
    input("Press ENTER to try again.")
    i.clear()

print("Nobody responds...")
t.sleep(3)
i.clear()
print("N")
t.sleep(.5)
i.clear()
print("No")
t.sleep(.5)
i.clear()
print("Nob")
t.sleep(.5)
i.clear()
print("Nobo")
t.sleep(.5)
i.clear()
print("Nobod")
t.sleep(.5)
i.clear()
print("Nobody")
t.sleep(.5)
i.clear()
print("Nobody r")
t.sleep(.5)
i.clear()
print("Nobody re")
t.sleep(.5)
i.clear()
print("Nobody res")
t.sleep(.5)
i.clear()
print("Nobody resp")
t.sleep(.5)
i.clear()
print("Nobody respo")
t.sleep(.5)
i.clear()
print("Nobody respon")
t.sleep(.5)
i.clear()
print("Nobody respond")
t.sleep(.5)
i.clear()
print("Nobody responds")
t.sleep(.5)
i.clear()
print("Nobody responds.")
t.sleep(.5)
i.clear()
print("Nobody responds..")
t.sleep(.5)
i.clear()
print("Nobody responds...")
t.sleep(1)
i.clear()
print("'Hello?'")
print("'Is anyone there?'")

while True:
  print("c")
  c = input(">>> ").lower()
  if c == "c":
    print("Yes")
    break
  else:
    input("No")

print("'Is anybody there?'")
print("You call out.")
print("You call out for help123ioruqwebefs")
print("'I hearhoueabd you!'3eewd")
print("She hesaarwed e you eirwojein'helphelphelpeo32qrhewifad' hehehhehehehe3456532")
input("Press UgEVYHAS to coigw8qguv3e......001001")
i.clear()
print("Malfunctions deuifbsd893yuwe")
t.sleep(.5)
i.clear()
print("Malfunctions detected.")
t.sleep(.5)
print("Commencing clean-up.")
input("Press ENTER to begin the process.")
i.clear()
for x in range(1, 10):
  print("Loading")
  t.sleep(.5)
  i.clear()
  print("Loading.")
  t.sleep(.5)
  i.clear()
  print("Loading..")
  t.sleep(.5)
  i.clear()
  print("Loading...")
  t.sleep(.5)
  i.clear()

print("Loading complete!")
t.sleep(1)
i.clear()
print("'It looks like", name, "Has been defeated by the Golem!'")