annotate clojure/com/aurellem/save_corruption.clj @ 91:613353b7e012

got original speedrun to work with modified beginning
author Robert McIntyre <rlm@mit.edu>
date Sun, 11 Mar 2012 13:53:27 -0500
parents 778cb84a2244
children 7f7cc8858d2e
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@91 65 (advance [] [:a])))
rlm@91 66
rlm@91 67 (defn warp-to-elite-four
rlm@91 68 "This is copied from speedrun-2942 to ensure that everything is good
rlm@91 69 up to this point."
rlm@91 70 []
rlm@91 71 (->> (corrupt-save)
rlm@91 72 (play-moves
rlm@91 73 [ [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 74 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 75 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 76 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 77 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 78 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 79 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 80 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 81 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 82 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 83 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 84 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 85 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 86 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 87 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 88 [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 89 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 90 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 91 [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 92 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 93 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 94 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 95 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 96 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 97 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 98 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@91 99 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 100 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 101 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 102 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 103 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 104 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 105 [] [] [] [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] []
rlm@91 106 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 107 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a]
rlm@91 108 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 109 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 110 [] [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] [] [] []
rlm@91 111 [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@91 112 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
rlm@91 113 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] [] [] [] [] []
rlm@91 114 [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@91 115 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] []
rlm@91 116 [] [] [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 117 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 118 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:a] [] [] [:d]
rlm@91 119 [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [:u] [] []
rlm@91 120 [] [] [:u] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 121 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 122 [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] []
rlm@91 123 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 124 [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [:a] [] []
rlm@91 125 [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:d] []
rlm@91 126 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@91 127 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@91 128 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] []
rlm@91 129 [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] []
rlm@91 130 [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] []
rlm@91 131 [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
rlm@91 132 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
rlm@91 133 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@91 134 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@91 135 [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] []
rlm@91 136 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:select] [] []
rlm@91 137 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 138 [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] []
rlm@91 139 [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] []
rlm@91 140 [] [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 141 [] [] [] [:select] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 142 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 143 [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] []
rlm@91 144 [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] []
rlm@91 145 [] [] [] [] [] [:d] [] [] [] [] [:b] [] [] [] [] [] [] [] []
rlm@91 146 [] [] [] [] [] [] [] [] [:select] [] [] [] [] [] [] [] [] []
rlm@91 147 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] []
rlm@91 148 [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] []
rlm@91 149 [:d] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] []
rlm@91 150 [] [] [] [:d] [] [] [] [] [] [] [] [] [] [] [] [:select] [] []
rlm@91 151 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 152 [] [] [] [] [] [] [] [] [] [:a] [] [] [:d] [] [] [:a] [:u] []
rlm@91 153 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 154 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 155 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 156 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 157 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 158 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 159 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@91 160 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@91 161 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [:a] [] [] [] []
rlm@91 162 [] [:a] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 163 [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 164 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] []
rlm@91 165 [] [] [] [:b] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@91 166 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@91 167 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@91 168 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [] [] [] [] [] [] [] [] []
rlm@91 169 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 170 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 171 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 172 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 173 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 174 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 175 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 176 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
rlm@91 177 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 178 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
rlm@91 179 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@91 180 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
rlm@91 181 [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@91 182 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] []
rlm@91 183 [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@91 184 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] []
rlm@91 185 [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@91 186 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@91 187 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] []
rlm@91 188 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@91 189 [] [] [] [:b]])))
rlm@91 190
rlm@91 191
rlm@90 192
rlm@90 193
rlm@90 194