annotate clojure/com/aurellem/run/save_corruption.clj @ 181:4ea8ff49af87

modified give-items to work with glitched items.
author Robert McIntyre <rlm@mit.edu>
date Thu, 22 Mar 2012 02:02:07 -0500
parents 09caf6a5bbf4
children b7f682bb3090
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@91 7 (defn-memo start-walking []
rlm@91 8 (->> (finish-title)
rlm@91 9 (advance [:b] [:b :r])))
rlm@91 10
rlm@91 11 (def walk (partial advance []))
rlm@91 12
rlm@91 13 (defn-memo walk-to-stairs []
rlm@91 14 (->> (start-walking)
rlm@91 15 (walk [:u])
rlm@91 16 (walk [:u])
rlm@91 17 (walk [:u])
rlm@91 18 (walk [:u])
rlm@91 19 (walk [:u])
rlm@91 20 (walk [:r])
rlm@91 21 (walk [:r])
rlm@91 22 (walk [:r])))
rlm@91 23
rlm@91 24 (defn-memo walk-to-door []
rlm@91 25 (->> (walk-to-stairs)
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 [:d])
rlm@91 32 (walk [:l])
rlm@91 33 (walk [:l])
rlm@91 34 (walk [:l])
rlm@91 35 (walk [:l])))
rlm@91 36
rlm@91 37
rlm@90 38 (defn-memo activate-menu []
rlm@91 39 (->> (walk-to-door)
rlm@90 40 (advance [:b] [:a :b :start])))
rlm@90 41
rlm@90 42 (defn-memo save-game []
rlm@90 43 (->> (activate-menu)
rlm@90 44 (advance [] [:d])
rlm@90 45 (play-moves [[] [] [] [:d] [] [] [] [:d] [] [] [:a]])
rlm@90 46 scroll-text))
rlm@90 47
rlm@91 48 (defn-memo corrupt-save []
rlm@91 49 (->> (save-game)
rlm@91 50 (play-moves
rlm@91 51 ;; this section is copied from speedrun-2942
rlm@91 52 ;; and corrupts the save so that the end-of-list marker
rlm@91 53 ;; for the pokemon roster is destroyed, but the save is still
rlm@91 54 ;; playable.
rlm@91 55 [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 56 [] [] [] [] [] [] [] [] [] [] [:select] [:restart]])))
rlm@90 57
rlm@91 58 (defn-memo skip-title-again []
rlm@91 59 (->> (corrupt-save)
rlm@91 60 (play-moves
rlm@91 61 (first (title)))))
rlm@90 62
rlm@91 63 (defn-memo start-game []
rlm@91 64 (->> (skip-title-again)
rlm@91 65 (advance [] [:start])
rlm@131 66 (advance [] [:a])
rlm@131 67 (advance [:a] [:a :start])))
rlm@131 68
rlm@131 69 (defn-memo destroy-item-end-of-list-marker []
rlm@131 70 (->> (start-game)
rlm@131 71 (play-moves
rlm@131 72 [
rlm@131 73 [:start] [] [] [] [] [] [] [] [] [] [] []
rlm@131 74 [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@131 75 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
rlm@131 76 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] [] [] [] [] []
rlm@131 77 [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@131 78 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] []
rlm@131 79 [] [] [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@131 80 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@131 81 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:a] [] [] [:d]
rlm@131 82 [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [:u] [] []
rlm@131 83 [] [] [:u] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@131 84 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@131 85 [] [] [] [] [] [] [] [] [] [] []
rlm@131 86
rlm@131 87 ;; [:b] [] [] [] [] [] [] [] []
rlm@170 88 ;; [] [] [] [] [] [] [] [] [] [] [] [] [] [] [][][][][] [] []
rlm@131 89 ;; [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [:a] [] []
rlm@131 90 ;; [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:d] []
rlm@131 91 ])))
rlm@131 92
rlm@131 93
rlm@91 94
rlm@91 95 (defn warp-to-elite-four
rlm@91 96 "This is copied from speedrun-2942 to ensure that everything is good
rlm@91 97 up to this point."
rlm@91 98 []
rlm@91 99 (->> (corrupt-save)
rlm@91 100 (play-moves
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 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 116 [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 117 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 118 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 119 [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 120 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 121 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 122 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 123 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 124 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 125 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 126 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@91 127 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 128 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 129 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 130 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 131 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 132 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 133 [] [] [] [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] []
rlm@91 134 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 135 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a]
rlm@91 136 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 137 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 138 [] [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] [] [] []
rlm@91 139 [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@91 140 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
rlm@91 141 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] [] [] [] [] []
rlm@91 142 [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@91 143 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] []
rlm@91 144 [] [] [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 145 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 146 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:a] [] [] [:d]
rlm@91 147 [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [:u] [] []
rlm@91 148 [] [] [:u] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 149 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 150 [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] []
rlm@91 151 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 152 [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [:a] [] []
rlm@91 153 [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:d] []
rlm@91 154 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@91 155 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@91 156 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] []
rlm@91 157 [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] []
rlm@91 158 [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] []
rlm@91 159 [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
rlm@91 160 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
rlm@91 161 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@91 162 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@91 163 [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] []
rlm@91 164 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:select] [] []
rlm@91 165 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 166 [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] []
rlm@91 167 [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] []
rlm@91 168 [] [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 169 [] [] [] [:select] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 170 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 171 [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] []
rlm@91 172 [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] []
rlm@91 173 [] [] [] [] [] [:d] [] [] [] [] [:b] [] [] [] [] [] [] [] []
rlm@91 174 [] [] [] [] [] [] [] [] [:select] [] [] [] [] [] [] [] [] []
rlm@91 175 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] []
rlm@91 176 [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] []
rlm@91 177 [:d] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] []
rlm@91 178 [] [] [] [:d] [] [] [] [] [] [] [] [] [] [] [] [:select] [] []
rlm@91 179 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 180 [] [] [] [] [] [] [] [] [] [:a] [] [] [:d] [] [] [:a] [:u] []
rlm@91 181 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 182 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 183 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 184 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 185 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 186 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 187 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 188 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 189 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [:a] [] [] [] []
rlm@91 190 [] [:a] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 191 [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 192 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] []
rlm@91 193 [] [] [] [:b] [: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] [:d] [:d] [:d] [:d] [:d]
rlm@91 196 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [] [] [] [] [] [] [] [] []
rlm@91 197 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 198 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 199 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 200 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 201 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 202 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 203 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 204 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
rlm@91 205 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 206 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
rlm@91 207 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 208 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [: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 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@91 217 [] [] [] [:b]])))
rlm@91 218
rlm@91 219
rlm@90 220
rlm@90 221
rlm@90 222