view clojure/com/aurellem/run/save_corruption.clj @ 255:d9e0752da684

unicode walking :)
author Robert McIntyre <rlm@mit.edu>
date Mon, 26 Mar 2012 06:00:30 -0500
parents b7f682bb3090
children 8d1a354f7471
line wrap: on
line source
1 (ns com.aurellem.run.save-corruption
2 (:use (com.aurellem.gb gb-driver vbm))
3 (:use (com.aurellem.run title)))
5 (use 'clojure.repl)
7 (defn-memo start-walking
8 ([script]
9 (->> script
10 (advance [:b] [:b :r])))
11 ([] (start-walking (finish-title))))
14 (def move
15 (partial advance []))
17 (defn-memo walk-to-stairs
18 ([] (walk-to-stairs (start-walking)))
19 ([script]
20 (->> script
21 (move [:u])
22 (move [:u])
23 (move [:u])
24 (move [:u])
25 (move [:u])
26 (move [:r])
27 (move [:r])
28 (move [:r]))))
30 (defn-memo walk-to-door
31 ([] (walk-to-door (walk-to-stairs)))
32 ([script]
33 (->> script
34 (move [:d])
35 (move [:d])
36 (move [:d])
37 (move [:d])
38 (move [:d])
39 (move [:d])
40 (move [:l])
41 (move [:l])
42 (move [:l])
43 (move [:l]))))
45 (defn-memo activate-menu
46 ([] (activate-menu (walk-to-door)))
47 ([script]
48 (->> script
49 (advance [:b] [:a :b :start]))))
51 (defn-memo save-game
52 ([] (save-game (activate-menu)))
53 ([script]
54 (->> script
55 (advance [] [:d])
56 (play-moves [[] [] [] [:d] [] [] [] [:d] [] [] [:a]])
57 scroll-text)))
59 (defn-memo corrupt-save
60 ([] (corrupt-save (save-game)))
61 ([script]
62 (->>
63 script
64 (play-moves
65 ;; this section is copied from speedrun-2942 and corrupts
66 ;; the save so that the end-of-list marker for the pokemon
67 ;; roster is destroyed, but the save is still playable.
68 [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
69 [] [] [] [] [] [] [] [] [] [] [] [:select] [:restart]]))))
71 (defn-memo start-game
72 ([] (start-game (corrupt-save)))
73 ([script]
74 (->> script
75 (title)
76 (advance [] [:start])
77 (advance [] [:a])
78 (advance [:a] [:a :start]))))
80 (defn-memo destroy-item-end-of-list-marker
81 ([] (destroy-item-end-of-list-marker (start-game)))
82 ([script]
83 (->>
84 script
85 (play-moves
86 [[:start] [] [] [] [] [] [] [] [] [] [] [] [] [] []
87 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
88 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
89 [] [] [:d] [] [] [] [:a] [] [] [:d] [] [] [:a] [] []
90 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] []
91 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
92 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
93 [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
94 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
95 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
96 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] []
97 [] [] [] [] [] [] [] [] [:u] [] [] [] [] [:u] [] []
98 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
99 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
100 [] [] [] [] [] [] [] [] [] [] [] []]))))
102 (defn warp-to-elite-four
103 "This is copied from speedrun-2942 to ensure that
104 everything is good up to this point."
105 []
106 (->> (corrupt-save)
107 (play-moves
108 [ [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
109 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
110 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
111 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
112 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
113 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
114 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
115 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
116 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
117 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
118 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
119 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
120 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
121 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
122 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
123 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
124 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
125 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
126 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] []
127 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
128 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
129 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
130 [] [] [] [] [] [] [] [] [:start] [] [] [] [] [] []
131 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
132 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
133 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
134 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
135 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
136 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
137 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
138 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
139 [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
140 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
141 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
142 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
143 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
144 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
145 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
146 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
147 [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
148 [:start] [] [] [] [] [] [] [] [] [] [] [] [] [] []
149 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
150 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
151 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
152 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
153 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
154 [:start] [] [] [] [] [] [] [] [] [] [] [] [] [] []
155 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
156 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
157 [] [] [:d] [] [] [] [:a] [] [] [:d] [] [] [:a] [] []
158 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] []
159 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
160 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
161 [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
162 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
163 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
164 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] []
165 [] [] [] [] [] [] [] [] [:u] [] [] [] [] [:u] [] []
166 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
167 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
168 [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] []
169 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
170 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
171 [] [] [] [] [:d] [] [] [:a] [] [] [] [] [] [] [] []
172 [] [] [] [] [] [] [] [:d] [] [] [] [:d] [] [] []
173 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
174 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
175 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
176 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
177 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
178 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
179 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
180 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
181 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
182 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
183 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
184 [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] []
185 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:select]
186 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
187 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b]
188 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
189 [] [] [] [] [:d] [] [] [] [] [] [] [] [] [:b] [] []
190 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
191 [] [] [:select] [] [] [] [] [] [] [] [] [] [] [] []
192 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
193 [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] [] []
194 [] [] [] [] [:d] [] [] [] [] [] [] [] [] [] [] []
195 [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
196 [:d] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] []
197 [] [] [] [] [] [] [:select] [] [] [] [] [] [] [] []
198 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b]
199 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
200 [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [] [:d]
201 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
202 [] [] [] [] [] [] [] [] [] [:select] [] [] [] [] []
203 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
204 [] [] [] [] [] [] [] [] [] [] [:a] [] [] [:d] [] []
205 [:a] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
206 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
207 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
208 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
209 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
210 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
211 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
212 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
213 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
214 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
215 [] [:u] [] [:u] [:a] [] [] [] [] [] [:a] [] [] []
216 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
217 [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
218 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] []
219 [] [] [] [] [] [] [:b] [:d] [:d] [:d] [:d] [:d] [:d]
220 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
221 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
222 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
223 [:d] [:d] [:d] [:d] [] [] [] [] [] [] [] [] [] [] []
224 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
225 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
226 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
227 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
228 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
229 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
230 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
231 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
232 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
233 [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
234 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] []
235 [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] []
236 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
237 [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
238 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
239 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
240 [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] []
241 [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] []
242 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a]
243 [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] []
244 [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] []
245 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
246 [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
247 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] []
248 [:b]])))