annotate clojure/com/aurellem/run/save_corruption.clj @ 152:9367bb5e55e6

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