annotate clojure/com/aurellem/run/save_corruption.clj @ 360:51aa6486c2ab

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