annotate clojure/com/aurellem/run/save_corruption.clj @ 251:40b5bff9576c

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