-
Notifications
You must be signed in to change notification settings - Fork 0
/
chapter1.rpy
467 lines (464 loc) · 18.8 KB
/
chapter1.rpy
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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
init -2 python:
import random
import renpy.exports as renpy
# Test minigame
label first_test:
"[mc.name] received his first test of the day: Biochemistry."
"He looked at the first question on the test."
window hide
menu:
"What chemical is used as energy in the cell?"
"ATP":
"Yeah, that seems right."
$ boy.intelligence += 5
"DNA":
"I'm really just guessing here..."
"Glucose":
"Cells need sugar, right?"
$ boy.intelligence += 1
"Mitochondria":
"The powerhouse of the cell, of course."
window show
mc "{i}OK, that was a tough one but most of these are pretty easy.{\i}"
mc "{i}Hmm. This one's a little tricky though."
window hide
menu:
"Is the cell membrane hydrophobic or hydrophillic?"
"Hydrophobic":
"Cell membranes are lipids, so they must be hydrophobic. Right?"
$ boy.intelligence += 1
"Hydrophillic":
"The cell membrane is permeable, so it has to be hydrophillic. Right?"
$ boy.intelligence += 1
"Hydroponic":
"The right answer is always C."
"Both":
"Cell membranes are made of two layers of lipids, with a hydrophobic head and hydrophillic tails."
$ boy.intelligence += 5
window show
mc "{i}Nearly finished. Just one question still stumping me...{\i}"
window hide
menu:
"How many amino acids can human cells synthesize?"
"22":
"That's the number of amino acids used to build proteins."
$ boy.intelligence += 1
"20":
"Two of the amino acids used in protein sysnthesis aren't encoded in DNA, so human cells can't synthesize them."
$ boy.intelligence += 1
"11":
"Of the 20 standard amino acids, human cells cannot synthesize 9."
$ boy.intelligence += 5
"4":
"There are 4 types of rungs in the DNA ladder, which must mean there are 4 amino acids."
window show
mc "{i}All done. And just in time, too.{\i}"
# jump after_test
label second_test:
"[mc.name] received his second test of the day: Genetics."
window hide
menu:
"What is the proper way of indicating that an individual is a carrier of a recessive allele?"
"AA":
"That's how I'm used to seeing alleles talked about in my books"
"aA":
"Little and then big like pH, right?"
"Aa":
"Dominant traits are represented by capital letters, and recessive traits by lowercase letters."
$ boy.intelligence += 5
"aa":
"I recall something similar for blue eyes. Those are recessive traits."
$ boy.intelligence += 1
window show
mc "{i}That one was pretty easy. I hope the rest are like this.{\i}"
mc "{i}Hey, that question looks pretty easy.{\i}"
window hide
menu:
"What are the 4 letters used to represent the nucleotides in RNA?"
"ABCD":
"I think my finger slipped..."
"GCAT":
"The same nucleotides as DNA, of course."
$ boy.intelligence += 1
"GCAU":
"Uracil replaces Thymine in RNA."
$ boy.intelligence += 5
"GCRT":
"The A is replaced by an R because it's RNA."
window show
"[mc.name] continued answering questions. He started to slow as he felt the effects of the caffeine fading."
mc "{i}Wow, I am getting pretty tired. I feel like I should know the answer to this question...{\i}"
window hide
menu:
"What how did the peppered moth evolve due to human influence?"
"Humans domesticated the moths, making them larger and more docile":
"Moths sure are useful!"
"The peppered moth remained the same color because humans took them from the wild when their habitat was destroyed":
"I remember that the moths were white before and after the industrial revolution..."
$ boy.intelligence += 1
"The peppered moth developed weaker eyesight because the lights of humans attracted the moths and killed many of them":
"Moths do like light."
"The peppered moth evolved camouflage in response to humans altering the environment":
"Yeah, they got darker when the industrial revolution made the trees sooty and they got lighter when environmental protection policies were enacted."
$ boy.intelligence += 5
window show
jump after_test_2
init -2:
screen letter_a:
imagebutton:
idle "letter a"
action [ToggleDict(key_flags, "s"),
ToggleDict(key_flags, "n"),
SetDict(key_flags, "a", True),
ToggleDict(key_flags, "c"),
ToggleDict(key_flags, "k")]
pos positions[0]
screen right_a:
add "letter a" xpos 170 ypos 534
screen letter_b:
imagebutton:
idle "letter b"
action [SetDict(key_flags, "b", True),
ToggleDict(key_flags, "e"),
ToggleDict(key_flags, "a"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "d")]
pos positions[1]
screen right_b:
add "letter b" xpos 560 ypos 627
screen letter_c:
imagebutton:
idle "letter c"
action [SetDict(key_flags, "c", True),
ToggleDict(key_flags, "b"),
ToggleDict(key_flags, "u"),
ToggleDict(key_flags, "s"),
ToggleDict(key_flags, "t")]
pos positions[2]
screen right_c:
add "letter c" xpos 370 ypos 627
screen letter_d:
imagebutton:
idle "letter d"
action [SetDict(key_flags, "d", True),
ToggleDict(key_flags, "w"),
ToggleDict(key_flags, "v"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "s")]
pos positions[3]
screen right_d:
add "letter d" xpos 360 ypos 534
screen letter_e:
imagebutton:
idle "letter e"
action [SetDict(key_flags, "e", True),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "u"),
ToggleDict(key_flags, "s"),
ToggleDict(key_flags, "t")]
pos positions[4]
screen right_e:
add "letter e" xpos 350 ypos 441
screen letter_f:
imagebutton:
idle "letter f"
action [SetDict(key_flags, "f", True),
ToggleDict(key_flags, "a"),
ToggleDict(key_flags, "l"),
ToggleDict(key_flags, "e"),
ToggleDict(key_flags, "x")]
pos positions[5]
screen right_f:
add "letter f" xpos 455 ypos 534
screen letter_g:
imagebutton:
idle "letter g"
action [SetDict(key_flags, "g", True),
ToggleDict(key_flags, "c"),
# ToggleDict(key_flags, "a"),
ToggleDict(key_flags, "u"),
ToggleDict(key_flags, "m")]
pos positions[6]
screen right_g:
add "letter g" xpos 550 ypos 534
screen letter_h:
imagebutton:
idle "letter h"
action [SetDict(key_flags, "h", True),
ToggleDict(key_flags, "e"),
ToggleDict(key_flags, "u"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "o")]
pos positions[7]
screen right_h:
add "letter h" xpos 645 ypos 534
screen letter_i:
imagebutton:
idle "letter i"
action [SetDict(key_flags, "i", True),
ToggleDict(key_flags, "c"),
ToggleDict(key_flags, "h"),
ToggleDict(key_flags, "a"),
ToggleDict(key_flags, "d")]
pos positions[8]
screen right_i:
add "letter i" xpos 825 ypos 441
screen letter_j:
imagebutton:
idle "letter j"
action [SetDict(key_flags, "j", True),
ToggleDict(key_flags, "n"),
ToggleDict(key_flags, "g"),
ToggleDict(key_flags, "l"),
ToggleDict(key_flags, "e")]
pos positions[9]
screen right_j:
add "letter j" xpos 740 ypos 534
screen letter_k:
imagebutton:
idle "letter k"
action [SetDict(key_flags, "k", True),
ToggleDict(key_flags, "i"),
ToggleDict(key_flags, "c"),
ToggleDict(key_flags, "u"),
ToggleDict(key_flags, "p")]
pos positions[10]
screen right_k:
add "letter k" xpos 835 ypos 534
screen letter_l:
imagebutton:
idle "letter l"
action [SetDict(key_flags, "l", True),
ToggleDict(key_flags, "i"),
ToggleDict(key_flags, "z"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "d")]
pos positions[11]
screen right_l:
add "letter l" xpos 930 ypos 534
screen letter_m:
imagebutton:
idle "letter m"
action [SetDict(key_flags, "m", True),
ToggleDict(key_flags, "i"),
ToggleDict(key_flags, "t"),
ToggleDict(key_flags, "x"),
ToggleDict(key_flags, "n")]
pos positions[12]
screen right_m:
add "letter m" xpos 750 ypos 627
screen letter_n:
imagebutton:
idle "letter n"
action [SetDict(key_flags, "n", True),
ToggleDict(key_flags, "o"),
ToggleDict(key_flags, "s"),
ToggleDict(key_flags, "u"),
ToggleDict(key_flags, "p")]
pos positions[13]
screen right_n:
add "letter n" xpos 655 ypos 627
screen letter_o:
imagebutton:
idle "letter o"
action [SetDict(key_flags, "o", True),
ToggleDict(key_flags, "w"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "s"),
ToggleDict(key_flags, "t")]
pos positions[14]
screen right_o:
add "letter o" xpos 920 ypos 441
screen letter_p:
imagebutton:
idle "letter p"
action [SetDict(key_flags, "p", True),
ToggleDict(key_flags, "s"),
ToggleDict(key_flags, "c"),
ToggleDict(key_flags, "y"),
ToggleDict(key_flags, "h")]
pos positions[15]
screen right_p:
add "letter p" xpos 1015 ypos 441
screen letter_q:
imagebutton:
idle "letter q"
action [SetDict(key_flags, "q", True),
ToggleDict(key_flags, "a"),
ToggleDict(key_flags, "c"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "b")]
pos positions[16]
screen right_q:
add "letter q" xpos 160 ypos 441
screen letter_r:
imagebutton:
idle "letter r"
action [SetDict(key_flags, "r", True),
ToggleDict(key_flags, "w"),
ToggleDict(key_flags, "h"),
ToggleDict(key_flags, "o"),
ToggleDict(key_flags, "e")]
pos positions[17]
screen right_r:
add "letter r" xpos 445 ypos 441
screen letter_s:
imagebutton:
idle "letter s"
action [SetDict(key_flags, "s", True),
ToggleDict(key_flags, "l"),
ToggleDict(key_flags, "g"),
ToggleDict(key_flags, "h"),
ToggleDict(key_flags, "r")]
pos positions[18]
screen right_s:
add "letter s" xpos 265 ypos 534
screen letter_t:
imagebutton:
idle "letter t"
action [SetDict(key_flags, "t", True),
ToggleDict(key_flags, "i"),
ToggleDict(key_flags, "e"),
ToggleDict(key_flags, "v"),
ToggleDict(key_flags, "l")]
pos positions[19]
screen right_t:
add "letter t" xpos 540 ypos 441
screen letter_u:
imagebutton:
idle "letter u"
action [SetDict(key_flags, "u", True),
ToggleDict(key_flags, "q"),
ToggleDict(key_flags, "t"),
ToggleDict(key_flags, "p"),
ToggleDict(key_flags, "i")]
pos positions[20]
screen right_u:
add "letter u" xpos 730 ypos 441
screen letter_v:
imagebutton:
idle "letter v"
action [SetDict(key_flags, "v", True),
ToggleDict(key_flags, "i"),
ToggleDict(key_flags, "x"),
ToggleDict(key_flags, "e"),
ToggleDict(key_flags, "n")]
pos positions[21]
screen right_v:
add "letter v" xpos 465 ypos 627
screen letter_w:
imagebutton:
idle "letter w"
action [SetDict(key_flags, "w", True),
ToggleDict(key_flags, "v"),
ToggleDict(key_flags, "x"),
ToggleDict(key_flags, "y"),
ToggleDict(key_flags, "z")]
pos positions[22]
screen right_w:
add "letter w" xpos 255 ypos 441
screen letter_x:
imagebutton:
idle "letter x"
action [SetDict(key_flags, "x", True),
ToggleDict(key_flags, "g"),
ToggleDict(key_flags, "o"),
ToggleDict(key_flags, "l"),
ToggleDict(key_flags, "d")]
pos positions[23]
screen right_x:
add "letter x" xpos 275 ypos 627
screen letter_y:
imagebutton:
idle "letter y"
action [SetDict(key_flags, "y", True),
ToggleDict(key_flags, "k"),
ToggleDict(key_flags, "w"),
ToggleDict(key_flags, "r"),
ToggleDict(key_flags, "j")]
pos positions[24]
screen right_y:
add "letter y" xpos 635 ypos 441
screen letter_z:
imagebutton:
idle "letter z"
action [SetDict(key_flags, "z", True),
ToggleDict(key_flags, "j"),
ToggleDict(key_flags, "o"),
ToggleDict(key_flags, "g"),
ToggleDict(key_flags, "m")]
pos positions[25]
screen right_z:
add "letter z" xpos 180 ypos 627
screen empty_keyboard:
add "keyboard" xpos 0 ypos 350
screen clear_keys:
imagebutton:
idle "gui/resetbutton.png"
action [SetDict(key_flags, "a", False), SetDict(key_flags, "b", False), SetDict(key_flags, "c", False),
SetDict(key_flags, "d", False), SetDict(key_flags, "e", False), SetDict(key_flags, "f", False),
SetDict(key_flags, "g", False), SetDict(key_flags, "h", False), SetDict(key_flags, "i", False),
SetDict(key_flags, "j", False), SetDict(key_flags, "k", False), SetDict(key_flags, "l", False),
SetDict(key_flags, "m", False), SetDict(key_flags, "n", False), SetDict(key_flags, "o", False),
SetDict(key_flags, "p", False), SetDict(key_flags, "q", False), SetDict(key_flags, "r", False),
SetDict(key_flags, "s", False), SetDict(key_flags, "t", False), SetDict(key_flags, "u", False),
SetDict(key_flags, "v", False), SetDict(key_flags, "w", False), SetDict(key_flags, "x", False),
SetDict(key_flags, "y", False), SetDict(key_flags, "z", False)]
pos (0.9, 0.85)
label drunk_text:
window hide
scene drunk typing
"You lost control and went a little overboard there. Unfortunately you have an urgent text to send!"
"Click on the bouncing letters to fill the keyboard. Each letter will affect several other letters, so be careful!"
"When you make a mistake use the blue button to clear the keyboard."
python:
event_check=False
config.rollback_enabled=False
letters = [ "a","b","c","d","e","f","g","h","i","j","k","l","m",
"n","o","p","q","r","s","t","u","v","w","x","y","z"]
positions = [(random.randrange(0,1200), random.randrange(0, 350)) for l in letters]
directions = [(random.randrange(-8,9), random.randrange(-4,5)) for l in letters]
key_flags = {} # Used to determine when all the buttons have been placed.
for letter in letters:
key_flags[letter] = False
renpy.show_screen("letter_" + letter)
renpy.show("hint1")
hintTimer = 0
renpy.show_screen("empty_keyboard")
renpy.show_screen("clear_keys")
while False in key_flags.values():
for i in range(0, 26):
if not key_flags[letters[i]]:
renpy.show_screen("letter_" + letters[i])
renpy.hide_screen("right_" + letters[i])
if directions[i][0] == 0 and directions[i][1] == 0:
directions[i] = (random.randrange(-8,9), random.randrange(-4,5))
positions[i] = tuple(map(sum, zip(positions[i], directions[i])))
if positions[i][0] <= 0:
positions[i] = (0, positions[i][1])
directions[i] = (random.randrange(0, 9), directions[i][1])
elif positions[i][0] >= 1200:
positions[i] = (1200, positions[i][1])
directions[i] = (random.randrange(-8, 1), directions[i][1])
if positions[i][1] <= 0:
positions[i] = (positions[i][0], 0)
directions[i] = (directions[i][0], random.randrange(0, 5))
elif positions[i][1] >= 350:
positions[i] = (positions[i][0], 350)
directions[i] = (directions[i][0], random.randrange(-4, 1))
else:
renpy.show_screen("right_" + letters[i])
renpy.hide_screen("letter_" + letters[i])
if hintTimer > 1000:
renpy.show("hint2")
if hintTimer > 5000:
renpy.show("hint3")
hintTimer += 1
renpy.pause(0.01)
for l in letters:
renpy.hide_screen("right_" + l)
renpy.hide_screen("letter_" + l)
renpy.hide_screen("empty_keyboard")
renpy.hide_screen("clear_keys")
window show
jump chp_1_party