-
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
init python:
from getpath import getpath
from lambcalc import *
# https://www.renpy.org/doc/html/save_load_rollback.html
# terms is a Ren'Py list with rollback capabilities
label level(id, terms):
narrator "Level [id]"
$ N = len(terms)
$ i = 1
if id == 10:
narrator "[i].1 Select eater" (interact=False)
$ fn = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
narrator "[i].2 Select food" (interact=False)
$ arg = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
$ names = ["", "foxes", "cats", "frogs", "pigs", "pandas"]
if terms[fn] == 4 and terms[arg] == 4:
narrator "Feeding the pigs bacon? How evil. I like it!"
if fn == arg:
narrator "Nooooo!!! Cannibalism is bad!"
else:
narrator "Nooooo!!! Why are you making [names[terms[fn]]] eat [names[terms[arg]]]?"
narrator "Level cleared! Select any option to continue." (interact=False)
$ renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
return
if id == 15:
$ clicked = [False] * N
while not all(clicked):
narrator "[i].1 Select eater" (interact=False)
$ fn = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
$ assert False
narrator "[i].2 Select food" (interact=False)
$ arg = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
$ assert False
$ clicked[fn] = True
$ clicked[arg] = True
$ i += 1
narrator "Level cleared! Select any option to continue." (interact=False)
$ renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
return
if id == "this":
while not any(term == " call level(\"this\", [1, 1, 1, 1, 1, 1, 19])" or term == " # TROLL" for term in terms):
narrator "[i].1 Select eater" (interact=False)
$ fn = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
narrator "[i].2 Select food" (interact=False)
$ arg = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
if terms[fn] == 19:
# THIS CODE IS A CRIME I'M SORRY
$ terms[arg] = list(filter(lambda x: x != '\n', (open(getpath() + "/script.rpy").readlines() + open(getpath() + "/level.rpy").readlines() + open(getpath() + "/poetry.rpy").readlines())))[size(terms[arg])][:-1]
else:
$ terms[arg] = red_dumb(A(terms[fn], terms[arg]))
$ i += 1
narrator "Level cleared! Select any option to continue." (interact=False)
$ renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
return
while not all(type(term) is int for term in terms):
# https://www.renpy.org/doc/html/statement_equivalents.html
narrator "[i].1 Select eater" (interact=False)
$ fn = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
narrator "[i].2 Select food" (interact=False)
$ arg = renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
# $ terms[arg] = red(A(terms[fn], terms[arg]))
# Replace arg because if we did the other way around
# Then it would be impossible to get rid of A terms because they aren't funcs
# How to destroy A terms???
# It's impossible
# Because if we run it through a func
# Then if it ends up as an A.fn it's not reducible
# If it ends up as an A.arg we're just back where we started
# And if it's in a L.body the L can't capture free vars so it'll stay whole
# So we can't destroy A terms
# Unless we have L.body doesn't contain L.var
# So proposal: Disable alphaconv
# Then L *can* capture free vars and no vars ever get renamed
# So maybe then the puzzles will be more interesting?
$ terms[arg] = red_dumb(A(terms[fn], terms[arg]))
$ i += 1
if id == 88888888 and terms[1] == L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(2, L(1, L(2, 2)))))))))))))))):
narrator "Geez, that's enough! Level cleared I guess."
return
if id == 69 and size(terms[arg]) == 420:
narrator "Nice"
if id == 69 and size(terms[arg]) == 69:
jump loopend
label loopend:
narrator "Level cleared! Select any option to continue." (interact=False)
$ renpy.display_menu(list(zip(map(animal_repr_canon, terms), range(N))))
return