changeset 257:8d1a354f7471

continued work on unoptimized script
author Robert McIntyre <rlm@mit.edu>
date Mon, 26 Mar 2012 07:20:30 -0500
parents c7b002525041
children 2a46422902be
files clojure/com/aurellem/run/bootstrap_0.clj clojure/com/aurellem/run/save_corruption.clj
diffstat 2 files changed, 52 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Mon Mar 26 06:11:49 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Mon Mar 26 07:20:30 2012 -0500
     1.3 @@ -70,5 +70,56 @@
     1.4            start-walking
     1.5            (walk [→ → → → →
     1.6                   ↑ ↑ ↑ ↑ ↑ ↑]))))
     1.7 -     
     1.8  
     1.9 +(defn end-text [script]
    1.10 +  (->> script
    1.11 +       (scroll-text)
    1.12 +       (play-moves [[] [:a]])))
    1.13 +
    1.14 +(defn-memo start-pikachu-battle
    1.15 +  ([] (start-pikachu-battle
    1.16 +       (to-pallet-town-edge)))
    1.17 +  ([script]
    1.18 +     (->> script
    1.19 +          (advance [:b] [:b :a] DE)
    1.20 +          (scroll-text)
    1.21 +          (play-moves [[:b]])
    1.22 +          (scroll-text)
    1.23 +          (end-text) ;; battle begins
    1.24 +          (scroll-text))))
    1.25 +
    1.26 +(defn-memo capture-pikachu
    1.27 +  ([] (capture-pikachu (start-pikachu-battle)))
    1.28 +  ([script]
    1.29 +     (->> script
    1.30 +          (scroll-text 2)
    1.31 +          (end-text))))
    1.32 +
    1.33 +(defn-memo go-to-lab
    1.34 +  ([] (go-to-lab (capture-pikachu)))
    1.35 +  ([script]
    1.36 +     (->> script
    1.37 +          (scroll-text 5)
    1.38 +          (end-text)
    1.39 +          (scroll-text)
    1.40 +          (end-text)
    1.41 +          (scroll-text 8)
    1.42 +          (end-text)
    1.43 +          (scroll-text)
    1.44 +          (end-text))))
    1.45 +
    1.46 +(defn-memo obtain-pikachu
    1.47 +  ([] (obtain-pikachu (go-to-lab)))
    1.48 +  ([script]
    1.49 +     (->> script
    1.50 +          (scroll-text)
    1.51 +          (play-moves
    1.52 +           (concat 
    1.53 +            (repeat 51 [])
    1.54 +            [[:a] []]))
    1.55 +          (walk [↓ ↓ → → ↑])
    1.56 +          (play-moves [[:a]]))))
    1.57 +      
    1.58 +
    1.59 +
    1.60 +
     2.1 --- a/clojure/com/aurellem/run/save_corruption.clj	Mon Mar 26 06:11:49 2012 -0500
     2.2 +++ b/clojure/com/aurellem/run/save_corruption.clj	Mon Mar 26 07:20:30 2012 -0500
     2.3 @@ -10,7 +10,6 @@
     2.4            (advance [:b] [:b :r])))
     2.5    ([] (start-walking (finish-title))))
     2.6  
     2.7 -
     2.8  (def move
     2.9    (partial advance []))
    2.10