diff clojure/com/aurellem/run/bootstrap_0.clj @ 271:3266bd0a6300

script: went back to viridian store.
author Robert McIntyre <rlm@mit.edu>
date Tue, 27 Mar 2012 00:33:07 -0500
parents 49096b8b99d5
children 210b465e4720
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Mon Mar 26 23:54:52 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Tue Mar 27 00:33:07 2012 -0500
     1.3 @@ -230,7 +230,7 @@
     1.4       (->> script 
     1.5            (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓]))))
     1.6  
     1.7 -(defn-memo  oaks-lab->pallet-town-edge
     1.8 +(defn-memo oaks-lab->pallet-town-edge
     1.9    ([] (oaks-lab->pallet-town-edge
    1.10         (leave-oaks-lab)))
    1.11    ([script]
    1.12 @@ -239,7 +239,6 @@
    1.13                   ↑ ↑ ↑ ↑
    1.14                   ↑ ↑ ↑ ↑ ↑ ↑
    1.15                   → ↑]))))
    1.16 -                 
    1.17  
    1.18  (defn move-thru-grass
    1.19    [direction script]
    1.20 @@ -266,10 +265,17 @@
    1.21            script directions))
    1.22  
    1.23  (defn-memo pallet-edge->viridian-mart
    1.24 -  ([] (pallet-edge->viridian-mart
    1.25 +  ([] (pallet-edge->viridian-mart true
    1.26         (oaks-lab->pallet-town-edge)))
    1.27 -  ([script]
    1.28 -     (->> script
    1.29 +  ([dodge-stupid-guy? script]
    1.30 +     (let [dodge-1 (if dodge-stupid-guy?
    1.31 +                    [→ →]
    1.32 +                    [→])
    1.33 +           dodge-2 (if dodge-stupid-guy?
    1.34 +                     [↑ ↑ ←]
    1.35 +                     [↑ ↑ ←])]
    1.36 +       
    1.37 +       (->> script
    1.38            ;; leave straight grass
    1.39            (walk-thru-grass
    1.40             [↑ ↑ ↑ ↑ ↑])
    1.41 @@ -288,20 +294,21 @@
    1.42              ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
    1.43              → → → → ])
    1.44  
    1.45 -          ;; this part it dependent on that
    1.46 +          ;; this part is dependent on that
    1.47            ;; stupid NPC in the grass patch
    1.48            (walk-thru-grass
    1.49 -           [→ →
    1.50 -            ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ])
    1.51 -           
    1.52 +           (concat dodge-1
    1.53 +                [↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ]))
    1.54 +          
    1.55            (walk
    1.56 -           [↑ ↑
    1.57 -            ← ← ← ←
    1.58 -            ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
    1.59 -            ← ←
    1.60 -            ↑ ↑ ↑ ↑
    1.61 -            → → → → → → → → → →
    1.62 -            ↑ ↑ ↑ ↑ ↑ ↑ ↑])))) 
    1.63 +           (concat
    1.64 +            dodge-2
    1.65 +            [← ← ←
    1.66 +             ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
    1.67 +             ← ←
    1.68 +             ↑ ↑ ↑ ↑
    1.69 +             → → → → → → → → → →
    1.70 +             ↑ ↑ ↑ ↑ ↑ ↑ ↑])))))) 
    1.71              
    1.72  (defn-memo get-oaks-parcel
    1.73    ([] (get-oaks-parcel
    1.74 @@ -391,6 +398,12 @@
    1.75            (scroll-text 7)
    1.76            (end-text)
    1.77  
    1.78 -          (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓])
    1.79 -          
    1.80 -          )))
    1.81 \ No newline at end of file
    1.82 +          (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓]))))
    1.83 +
    1.84 +(defn-memo return-to-viridian-mart
    1.85 +  ([] (return-to-viridian-mart
    1.86 +       (deliver-oaks-parcel)))
    1.87 +  ([script]
    1.88 +     (->> script
    1.89 +          oaks-lab->pallet-town-edge
    1.90 +          (pallet-edge->viridian-mart false))))
    1.91 \ No newline at end of file