# HG changeset patch # User Robert McIntyre # Date 1332929304 18000 # Node ID 57e0314e488d1a2c3d50e79f853ab34da741149e # Parent 516acb83410f604cfd1eb76ebeae99a820d859e5 script: bought 96 burn heals diff -r 516acb83410f -r 57e0314e488d clojure/com/aurellem/run/bootstrap_0.clj --- a/clojure/com/aurellem/run/bootstrap_0.clj Wed Mar 28 04:52:09 2012 -0500 +++ b/clojure/com/aurellem/run/bootstrap_0.clj Wed Mar 28 05:08:24 2012 -0500 @@ -1,5 +1,5 @@ (ns com.aurellem.run.bootstrap-0 - (:use (com.aurellem.gb gb-driver vbm characters money)) + (:use (com.aurellem.gb gb-driver util items vbm characters money)) (:use (com.aurellem.run title save-corruption)) (:use (com.aurellem.exp item-bridge)) (:import [com.aurellem.gb.gb_driver SaveState])) @@ -443,10 +443,11 @@ (range (dec quantity))) buy-items (->> request-items - (do-nothing 3) + (do-nothing 10) (play-moves [[:a]]) (scroll-text) (scroll-text) + (do-nothing 10) (play-moves [[:a]]) (scroll-text))] buy-items))) @@ -507,7 +508,10 @@ (do-nothing 3) (play-moves [[:d]]) (do-nothing 10) - (buy-item 0 (item-lookup 3)))))) + (buy-item 0 (item-lookup 3))) + (and (= 0 (item-lookup 3)) + (= 0 (item-lookup 4))) + initial-purchase))) (defn test-buy-items @@ -552,7 +556,8 @@ (do-nothing 100) (play-moves [[:b]]) (do-nothing 100) - (play-moves [[:b] []])))) + (play-moves [[:b] []]) + (advance [:b] [:b :start])))) (defn-memo do-save-corruption @@ -560,7 +565,6 @@ (buy-initial-items))) ([script] (->> script - (advance [:b] [:b :start]) (advance [] [:d]) (play-moves [[] [] [] [:d] [] [] [] [:d] @@ -578,6 +582,104 @@ (advance [] [:a]) (advance [:a] [:a :start])))) +(def menu walk) + +(defn-memo corrupt-item-list + ([] (corrupt-item-list + (do-save-corruption))) + ([script] + (->> script + (do-nothing 200) + (menu [↓ [:a]]) ; select "POKEMON" from + ; from main menu + (menu [↓ ↓ ↓ ↓ ↓ ↓ ; go to 6th pokemon + [:a] ↓ [:a] ; select "switch" + ↓ ↓ ↓ [:a]]) ; switch with 9th "pokemon" + + (do-nothing 1)))) + + +(defn slowly + [delay moves script] + (reduce + (fn [script move] + (->> script + (do-nothing delay) + (play-moves (vector move)))) + script moves)) + +(defn-memo get-burn-heals + ([] (get-burn-heals + (corrupt-item-list))) + ([script] + (->> script + (menu [[:b] [:b]]) + (menu [[:a]]) + (do-nothing 100) + (menu [↓ [:a]]) + (do-nothing 100) + (menu [[:a] ↓ [:a]]) + (scroll-text) + (menu [[:b][:b]]) + (menu [[:a]]) + + (do-nothing 50) + (buy-items [[0 1]]) + (do-nothing 60) + (menu [[:a]]) + (scroll-text) + + (do-nothing 50) + (buy-items [[0 1]]) + (do-nothing 60) + ;;(menu [[:a]]) + ;;(scroll-text) + + ;;(do-nothing 300) + ;;(menu [[:b] [:b]]) + ;;(do-nothing 300) + + (buy-items [[0 1] + [1 1] + [1 1] + [2 1] + [3 1] + [4 97]]) + + (do-nothing 10)))) + +(defn save-game-properly + [number-down script] + (->> + (reduce (fn [script _] + (->> script + (advance [] [:d]))) + script + (range number-down)) + (play-moves [[] [] [:a]]) + (scroll-text) + (do-nothing 300))) + + + +(defn-memo corrupt-item-list-again + ([] (corrupt-item-list-again (get-burn-heals))) + ([script] + (->> script + (do-nothing 10) + (play-moves [[:b]]) + (do-nothing 100) + (play-moves [[:b]]) + (do-nothing 40) + (play-moves [[:b]]) + (advance [:b] [:start :b]) + (menu [[:a] ↑ ↑ ↑ ↑ ↑ ; get fifth pokemon + [:a] ↓ [:a] ; and corrupt the + ↓ ↓ ↓ ↓ ↓ [:a]]) ; item list again by + ; switching it to + ))) ; tenth place. + + (defn viridian-store->viridian-poke-center []