-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
init python:
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):
$ N = len(terms)
$ i = 1
narrator "Level [id]"
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, terms), range(N))))
narrator "[i].2 Select food" (interact=False)
$ arg = renpy.display_menu(list(zip(map(animal_repr, terms), range(N))))
# 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
$ terms[arg] = red(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, terms), range(N))))
return