view clojure/com/aurellem/run/save_corruption.clj @ 259:b2f9a0cb13e3

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