-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathattic_room.py
More file actions
255 lines (232 loc) · 8.01 KB
/
Copy pathattic_room.py
File metadata and controls
255 lines (232 loc) · 8.01 KB
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
import _CORE_ as c
import os
from colorify import *
from time import sleep
import sys
def boxLeft():
pencil.cls()
pencil.readw(
mitm.process +
"The box is made of wood and can hold many things, but it is locked...",
0.05)
if c.flags["_smallKey"]:
cho = pencil.read(mitm.question + "Want to try to unlock it using " +
mitm.item + "SMALL KEY" + mitm.question + "?(Y/N):" +
mitm.reset + " " + mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.process)
print()
pencil.readw("You insert and turn the key in the box, and it opens...",
0.05)
pencil.read("YOU FOUND " + mitm.item + "CLAY" + mitm.reset)
c.flags["_clay"] = True
def boxRight():
pencil.cls()
pencil.readw(
mitm.process +
"The box is made of wood and can hold many things, but it is locked...",
0.05)
if c.flags["_smallKey"]:
cho = pencil.read(mitm.question + "Want to try to unlock it using " +
mitm.item + "SMALL KEY?(Y/N):" + mitm.reset + " " +
mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.process)
print()
pencil.readw(
"You insert and try to turn the key in the box, but it doesn't open...",
0.05)
def furnace():
pencil.cls()
if not c.flags[".copperMolten"]:
pencil.readw(mitm.process + "You go to the machine and inspect it. It is a furnace which can even melt metal. This is what that has been heating the room...")
if c.flags[".copperMolten"]:
pencil.readw(mitm.process + "There is the molten copper in this furnace...")
if c.flags["_clay"]:
cho = pencil.read(mitm.question + "Want to use the " + mitm.item +
"CLAY" + mitm.question + "?(Y/N):" + mitm.reset + " " +
mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.process)
print()
pencil.readw(
"You make a cup out of clay and scoop the molten copper into it...",
0.05)
c.flags[".smelt"] = True
return
if c.flags["_copper"] and not c.flags[".copperMolten"]:
cho = pencil.read(mitm.question + "Want to use it to melt the " +
mitm.item + "PIECE OF COPPER" + mitm.question +
"?(Y/N):" + mitm.reset + " " + mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.process)
print()
pencil.readw(
"You put the piece of copper and melt it. Only if there was something to hold it...",
0.05)
c.flags[".copperMolten"] = True
if c.flags["_clay"]:
cho = pencil.read(mitm.question + "Want to use the " + mitm.item +
"CLAY" + mitm.question + "?(Y/N):" + mitm.reset +
" " + mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.process)
print()
pencil.readw(
"You make a cup out of clay and scoop the molten copper into it...",
0.05)
c.flags[".smelt"] = True
def bed():
pencil.cls()
pencil.readw(
mitm.process +
"You look at the bed on which you were lying. It seems pretty old, and now you start inspecting it..."
)
pencil.readw("Nothing on it...")
pencil.readw(
"You then see under the bed and find a piece of copper. It might be useful later..."
)
pencil.read("YOU FOUND " + mitm.item + "COPPER" + mitm.reset)
c.flags["_copper"] = True
def window():
pencil.cls()
pencil.writew(mitm.process + "You go to the window and push it.")
sleep(0.5)
pencil.writew(
" It opens a little and closes shut, but drops a small key down.")
sleep(0.5)
pencil.readw(" You pick it up...")
pencil.read("YOU FOUND " + mitm.item + "SMALL KEY" + mitm.reset)
c.flags["_smallKey"] = True
def door():
pencil.cls()
pencil.readw(mitm.process +
"You go to the door and try to open it, but it is locked...")
if c.flags["_smallKey"]:
cho = pencil.read(mitm.question + "Want to try to unlock it using " +
mitm.item + "SMALL KEY" + mitm.question + "?(Y/N):" +
mitm.reset + " " + mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.process)
print()
pencil.readw("You try to fit the key but it's too small...", 0.05)
if c.flags[".smelt"]:
cho = pencil.read(mitm.question + "Want to mess with the " +
mitm.item + "MOLTEN COPPER" + mitm.question +
"?(Y/N):" + mitm.reset + " " +
mitm.userChoice).upper()
if cho == 'N':
return
elif cho != 'Y':
print()
pencil.write(bg.black + fg.red + "Invalid option!" + mitm.reset)
return
else:
pencil.write(mitm.reset)
pencil.cls()
pencil.writew(
mitm.cutscene +
"You dip the key in the molten copper and immediately put in into the keyhole.\n"
)
sleep(0.5)
pencil.readw(
"It solidifies and then you turn it, and the lock clicks open as you enter what feels like an attic..."
)
c.stackCommand = "ADD atticMain"
return
def exe(firstTime):
options = {}
pencil.write(pencil.reset)
pencil.cls()
pencil.write(mitm.process)
if firstTime:
pencil.readw(
"You wake up on a bed in a small room. The room has two boxes, a weird machine, a small window and a door...",
0.05)
pencil.readw(
"You are profusely sweating due to the air being unnaturally hot...",
0.05)
else:
pencil.write(
"You wake up on a bed in a small room. The room has two boxes, a weird machine, a small window and a door.\n"
)
pencil.write(
"You are profusely sweating due to the air being unnaturally hot.\n")
pencil.write(mitm.reset)
if not c.flags["_clay"]:
sleep(0.5)
pencil.write(mitm.reset + " " + mitm.option + "1]" + mitm.reset +
" Inspect the box on the left\n")
options[1] = boxLeft
if not False:
sleep(0.5)
pencil.write(mitm.reset + " " + mitm.option + "2]" + mitm.reset +
" Inspect the box on the right\n")
options[2] = boxRight
if not c.flags[".smelt"]:
sleep(0.5)
pencil.write(mitm.reset + " " + mitm.option + "3]" + mitm.reset +
" Inspect the machine\n")
options[3] = furnace
if not c.flags["_copper"]:
sleep(0.5)
pencil.write(mitm.reset + " " + mitm.option + "4]" + mitm.reset +
" Inspect the bed\n")
options[4] = bed
if not c.flags["_smallKey"]:
sleep(0.5)
pencil.write(mitm.reset + " " + mitm.option + "5]" + mitm.reset +
" Inspect the window\n")
options[5] = window
if not False:
sleep(0.5)
pencil.write(mitm.reset + " " + mitm.option + "6]" + mitm.reset +
" Inspect the door\n")
options[6] = door
sleep(0.5)
choice = pencil.read("Enter your choice: " + mitm.userChoice)
if choice.isdigit():
choice = int(choice)
pencil.write(mitm.reset)
if choice in options:
options[choice]()
else:
pencil.read("Invalid option!")
else:
pencil.read("Enter an integer")