diff clojure/com/aurellem/run/bootstrap_0.clj @ 284:57e0314e488d

script: bought 96 burn heals
author Robert McIntyre <rlm@mit.edu>
date Wed, 28 Mar 2012 05:08:24 -0500
parents d5e5c73af7e6
children dc9a0060e7cb
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Wed Mar 28 04:52:09 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Wed Mar 28 05:08:24 2012 -0500
     1.3 @@ -1,5 +1,5 @@
     1.4  (ns com.aurellem.run.bootstrap-0
     1.5 -  (:use (com.aurellem.gb gb-driver vbm characters money))
     1.6 +  (:use (com.aurellem.gb gb-driver util items vbm characters money))
     1.7    (:use (com.aurellem.run title save-corruption))
     1.8    (:use (com.aurellem.exp item-bridge))
     1.9    (:import [com.aurellem.gb.gb_driver SaveState]))
    1.10 @@ -443,10 +443,11 @@
    1.11                    (range (dec quantity)))
    1.12            buy-items
    1.13            (->> request-items
    1.14 -               (do-nothing 3)
    1.15 +               (do-nothing 10)
    1.16                 (play-moves [[:a]])
    1.17                 (scroll-text)
    1.18                 (scroll-text)
    1.19 +               (do-nothing 10)
    1.20                 (play-moves [[:a]])
    1.21                 (scroll-text))]
    1.22        buy-items)))
    1.23 @@ -507,7 +508,10 @@
    1.24             (do-nothing 3)
    1.25             (play-moves [[:d]])
    1.26             (do-nothing 10)
    1.27 -           (buy-item 0 (item-lookup 3))))))
    1.28 +           (buy-item 0 (item-lookup 3)))
    1.29 +      (and (= 0 (item-lookup 3))
    1.30 +           (= 0 (item-lookup 4)))
    1.31 +      initial-purchase)))
    1.32  
    1.33  
    1.34  (defn test-buy-items
    1.35 @@ -552,7 +556,8 @@
    1.36            (do-nothing 100)
    1.37            (play-moves [[:b]])
    1.38            (do-nothing 100)
    1.39 -          (play-moves [[:b] []]))))
    1.40 +          (play-moves [[:b] []])
    1.41 +          (advance [:b] [:b :start]))))
    1.42  
    1.43  
    1.44  (defn-memo do-save-corruption
    1.45 @@ -560,7 +565,6 @@
    1.46         (buy-initial-items)))
    1.47    ([script]
    1.48       (->> script
    1.49 -          (advance [:b] [:b :start])
    1.50            (advance [] [:d])
    1.51            (play-moves [[] [] [] [:d]
    1.52                         [] [] [] [:d]
    1.53 @@ -578,6 +582,104 @@
    1.54            (advance [] [:a])
    1.55            (advance [:a] [:a :start]))))
    1.56  
    1.57 +(def menu walk)
    1.58 +
    1.59 +(defn-memo corrupt-item-list
    1.60 +  ([] (corrupt-item-list
    1.61 +       (do-save-corruption)))
    1.62 +  ([script]
    1.63 +     (->> script
    1.64 +          (do-nothing 200)
    1.65 +          (menu [↓ [:a]])               ; select "POKEMON" from
    1.66 +                                        ; from main menu
    1.67 +          (menu [↓ ↓ ↓ ↓ ↓ ↓            ; go to 6th pokemon
    1.68 +                 [:a] ↓ [:a]            ; select "switch"
    1.69 +                 ↓ ↓ ↓ [:a]])           ; switch with 9th "pokemon"
    1.70 +                 
    1.71 +          (do-nothing 1))))
    1.72 +
    1.73 +
    1.74 +(defn slowly
    1.75 +  [delay moves script]
    1.76 +  (reduce
    1.77 +   (fn [script move]
    1.78 +     (->> script
    1.79 +          (do-nothing delay)
    1.80 +          (play-moves (vector move))))
    1.81 +   script moves))
    1.82 +                     
    1.83 +(defn-memo get-burn-heals
    1.84 +  ([] (get-burn-heals
    1.85 +       (corrupt-item-list)))
    1.86 +  ([script]
    1.87 +     (->> script
    1.88 +          (menu [[:b] [:b]])
    1.89 +          (menu [[:a]])
    1.90 +          (do-nothing 100)
    1.91 +          (menu [↓ [:a]])
    1.92 +          (do-nothing 100)
    1.93 +          (menu [[:a] ↓ [:a]])
    1.94 +          (scroll-text)
    1.95 +          (menu [[:b][:b]])
    1.96 +          (menu [[:a]])
    1.97 +
    1.98 +          (do-nothing 50)
    1.99 +          (buy-items [[0 1]])
   1.100 +          (do-nothing 60)
   1.101 +          (menu [[:a]])
   1.102 +          (scroll-text)
   1.103 +          
   1.104 +          (do-nothing 50)
   1.105 +          (buy-items [[0 1]])
   1.106 +          (do-nothing 60)
   1.107 +          ;;(menu [[:a]])
   1.108 +          ;;(scroll-text)
   1.109 +          
   1.110 +          ;;(do-nothing 300)
   1.111 +          ;;(menu [[:b] [:b]])
   1.112 +          ;;(do-nothing 300)
   1.113 +
   1.114 +          (buy-items [[0 1]
   1.115 +                      [1 1]
   1.116 +                      [1 1]
   1.117 +                      [2 1]
   1.118 +                      [3 1]
   1.119 +                      [4 97]])
   1.120 +                      
   1.121 +          (do-nothing 10))))
   1.122 +
   1.123 +(defn save-game-properly
   1.124 +  [number-down script]
   1.125 +  (->> 
   1.126 +   (reduce (fn [script _]
   1.127 +             (->> script
   1.128 +                  (advance [] [:d])))
   1.129 +           script
   1.130 +           (range number-down))
   1.131 +   (play-moves [[] [] [:a]])
   1.132 +   (scroll-text)
   1.133 +   (do-nothing 300)))
   1.134 +  
   1.135 +       
   1.136 +
   1.137 +(defn-memo corrupt-item-list-again
   1.138 +  ([] (corrupt-item-list-again (get-burn-heals)))
   1.139 +  ([script]
   1.140 +     (->> script
   1.141 +          (do-nothing 10)
   1.142 +          (play-moves [[:b]])
   1.143 +          (do-nothing 100)
   1.144 +          (play-moves [[:b]])
   1.145 +          (do-nothing 40)
   1.146 +          (play-moves [[:b]])
   1.147 +          (advance [:b] [:start :b])
   1.148 +          (menu [[:a] ↑ ↑ ↑ ↑ ↑         ; get fifth pokemon
   1.149 +                 [:a] ↓ [:a]            ; and corrupt the
   1.150 +                 ↓ ↓ ↓ ↓ ↓ [:a]])       ; item list again by
   1.151 +                                        ; switching it to
   1.152 +          )))                           ; tenth place.
   1.153 +          
   1.154 +          
   1.155  
   1.156  (defn viridian-store->viridian-poke-center
   1.157    []