changeset 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 1ff2c546f5ad
files clojure/com/aurellem/save_corruption.clj clojure/com/aurellem/title.clj
diffstat 2 files changed, 198 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/save_corruption.clj	Sat Mar 10 19:44:32 2012 -0600
     1.2 +++ b/clojure/com/aurellem/save_corruption.clj	Sun Mar 11 13:53:27 2012 -0500
     1.3 @@ -3,8 +3,39 @@
     1.4  
     1.5  (use 'clojure.repl)
     1.6  
     1.7 +(defn-memo start-walking [] 
     1.8 +  (->> (finish-title)
     1.9 +       (advance [:b] [:b :r])))
    1.10 +
    1.11 +(def walk (partial advance []))
    1.12 +
    1.13 +(defn-memo walk-to-stairs []
    1.14 +  (->> (start-walking)
    1.15 +       (walk [:u])
    1.16 +       (walk [:u])
    1.17 +       (walk [:u])
    1.18 +       (walk [:u])
    1.19 +       (walk [:u])
    1.20 +       (walk [:r])
    1.21 +       (walk [:r])
    1.22 +       (walk [:r])))
    1.23 +
    1.24 +(defn-memo walk-to-door []
    1.25 +  (->> (walk-to-stairs)
    1.26 +       (walk [:d])
    1.27 +       (walk [:d])
    1.28 +       (walk [:d])
    1.29 +       (walk [:d])
    1.30 +       (walk [:d])
    1.31 +       (walk [:d])
    1.32 +       (walk [:l])
    1.33 +       (walk [:l])
    1.34 +       (walk [:l])
    1.35 +       (walk [:l])))
    1.36 +  
    1.37 +
    1.38  (defn-memo activate-menu []
    1.39 -  (->> (intro)
    1.40 +  (->> (walk-to-door)
    1.41         (advance [:b] [:a :b :start])))
    1.42  
    1.43  (defn-memo save-game []
    1.44 @@ -13,8 +44,151 @@
    1.45         (play-moves [[] [] [] [:d] [] [] [] [:d] [] [] [:a]])
    1.46         scroll-text))
    1.47  
    1.48 +(defn-memo corrupt-save []
    1.49 +  (->> (save-game)
    1.50 +       (play-moves
    1.51 +        ;; this section is copied from speedrun-2942
    1.52 +        ;; and corrupts the save so that the end-of-list marker
    1.53 +        ;; for the pokemon roster is destroyed, but the save is still
    1.54 +        ;; playable.
    1.55 +         [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.56 +         [] [] [] [] [] [] [] [] [] [] [:select] [:restart]])))
    1.57  
    1.58 +(defn-memo skip-title-again []
    1.59 +  (->> (corrupt-save)
    1.60 +       (play-moves
    1.61 +        (first (title)))))
    1.62  
    1.63 +(defn-memo start-game []
    1.64 +  (->> (skip-title-again)
    1.65 +       (advance [] [:start])
    1.66 +       (advance [] [:a])))       
    1.67 +
    1.68 +(defn warp-to-elite-four
    1.69 +  "This is copied from speedrun-2942 to ensure that everything is good
    1.70 +   up to this point."
    1.71 +  []
    1.72 +  (->> (corrupt-save)
    1.73 +       (play-moves
    1.74 +        [ [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.75 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.76 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.77 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.78 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.79 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.80 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.81 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.82 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.83 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.84 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.85 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.86 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.87 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.88 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.89 +        [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
    1.90 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.91 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.92 +        [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] [] [] [] []
    1.93 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.94 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.95 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.96 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.97 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.98 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
    1.99 +        [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
   1.100 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.101 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.102 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.103 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.104 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.105 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.106 +        [] [] [] [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] []
   1.107 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.108 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a]
   1.109 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.110 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.111 +        [] [] [] [] [] [] [] [:start] [] [] [] [] [] [] [] [] [] [] []
   1.112 +        [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
   1.113 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
   1.114 +        [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] [] [] [] [] []
   1.115 +        [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
   1.116 +        [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] []
   1.117 +        [] [] [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
   1.118 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.119 +        [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:a] [] [] [:d]
   1.120 +        [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [:u] [] []
   1.121 +        [] [] [:u] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
   1.122 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.123 +        [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] []
   1.124 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.125 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [:a] [] []
   1.126 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [:d] []
   1.127 +        [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
   1.128 +        [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
   1.129 +        [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] []
   1.130 +        [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] []
   1.131 +        [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] []
   1.132 +        [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
   1.133 +        [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
   1.134 +        [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
   1.135 +        [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
   1.136 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] []
   1.137 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:select] [] []
   1.138 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.139 +        [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] []
   1.140 +        [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] []
   1.141 +        [] [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.142 +        [] [] [] [:select] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.143 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.144 +        [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] []
   1.145 +        [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] []
   1.146 +        [] [] [] [] [] [:d] [] [] [] [] [:b] [] [] [] [] [] [] [] []
   1.147 +        [] [] [] [] [] [] [] [] [:select] [] [] [] [] [] [] [] [] []
   1.148 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] []
   1.149 +        [] [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] []
   1.150 +        [:d] [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] []
   1.151 +        [] [] [] [:d] [] [] [] [] [] [] [] [] [] [] [] [:select] [] []
   1.152 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.153 +        [] [] [] [] [] [] [] [] [] [:a] [] [] [:d] [] [] [:a] [:u] []
   1.154 +        [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
   1.155 +        [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
   1.156 +        [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
   1.157 +        [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
   1.158 +        [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
   1.159 +        [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
   1.160 +        [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
   1.161 +        [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
   1.162 +        [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [:a] [] [] [] []
   1.163 +        [] [:a] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.164 +        [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
   1.165 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] []
   1.166 +        [] [] [] [:b] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
   1.167 +        [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
   1.168 +        [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
   1.169 +        [:d] [:d] [:d] [:d] [:d] [:d] [:d] [] [] [] [] [] [] [] [] []
   1.170 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.171 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.172 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.173 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.174 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.175 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.176 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.177 +        [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
   1.178 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.179 +        [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
   1.180 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
   1.181 +        [:a] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] []
   1.182 +        [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
   1.183 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] []
   1.184 +        [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
   1.185 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] []
   1.186 +        [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
   1.187 +        [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
   1.188 +        [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] []
   1.189 +        [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
   1.190 +        [] [] [] [:b]])))
   1.191 +
   1.192 +        
   1.193         
   1.194  
   1.195  
     2.1 --- a/clojure/com/aurellem/title.clj	Sat Mar 10 19:44:32 2012 -0600
     2.2 +++ b/clojure/com/aurellem/title.clj	Sun Mar 11 13:53:27 2012 -0500
     2.3 @@ -47,10 +47,11 @@
     2.4         scroll-text
     2.5         scroll-text
     2.6         scroll-text
     2.7 -       (advance [] [:a])))
     2.8 +       ))
     2.9  
    2.10 -(defn-memo name-entry []
    2.11 +(defn-memo name-entry-rlm []
    2.12    (->> (oak)
    2.13 +       (advance [] [:a])
    2.14         (advance [] [:r] DE)
    2.15         (play-moves
    2.16          [[]
    2.17 @@ -61,9 +62,15 @@
    2.18           [:r] [] [:r] [] [:r] [] [:r] []
    2.19           [:r] [] [:d] [] [:d] [] [:d] [:a]
    2.20           ])))
    2.21 -          
    2.22 -(defn-memo rival-name-entry []
    2.23 -  (->> (name-entry)
    2.24 +
    2.25 +(defn-memo name-entry-ash []
    2.26 +  (->> (oak)
    2.27 +       (advance [] [:d])
    2.28 +       (advance [] [:d])
    2.29 +       (advance [] [:a])))
    2.30 +       
    2.31 +(defn-memo rival-name-entry-gary []
    2.32 +  (->> (name-entry-ash)
    2.33         scroll-text
    2.34         scroll-text
    2.35         scroll-text
    2.36 @@ -73,8 +80,18 @@
    2.37         (advance [] [:d])
    2.38         (advance [] [:a])))
    2.39  
    2.40 +(defn-memo rival-name-entry-blue []
    2.41 +  (->> (name-entry-ash)
    2.42 +       scroll-text
    2.43 +       scroll-text
    2.44 +       scroll-text
    2.45 +       scroll-text
    2.46 +       scroll-text
    2.47 +       (advance [] [:d])
    2.48 +       (advance [] [:a])))
    2.49 +
    2.50  (defn-memo finish-title []
    2.51 -  (->> (rival-name-entry)
    2.52 +  (->> (rival-name-entry-blue)
    2.53         scroll-text
    2.54         scroll-text
    2.55         scroll-text