# HG changeset patch # User Robert McIntyre # Date 1333741288 18000 # Node ID 61a096a533305189875a8ea669429d851c0199e0 # Parent 5c2041d1cdda7c9b22b89982a29964c0e0a62551 fixed problem with rival's name. diff -r 5c2041d1cdda -r 61a096a53330 clojure/com/aurellem/run/bootstrap_0.clj --- a/clojure/com/aurellem/run/bootstrap_0.clj Fri Apr 06 13:52:08 2012 -0500 +++ b/clojure/com/aurellem/run/bootstrap_0.clj Fri Apr 06 14:41:28 2012 -0500 @@ -28,38 +28,15 @@ [] [] [:r] [] [:d] [:a] ;; L [:r] [] [:r] [] [:r] [] [:r] [] [:r] [] [:d] [] [:d] [:a] ;; [PK] - [:u] [] [:l] [] [:l] [] [:l] [] - [:l] [] [:l] [] [:a] ;; U - [:r] [] [:r] [] [:r] [] [:r] [] - [:r] [] [] [:d] [:a] ;; [PK] + [:u] [] [:l] [] [:l] [] + [:l] [] [:l] [] [:l] [:a] ;; U + [:r] [] [:r] [] [:r] [] + [:r] [] [:r] [] [:d] [:a] ;; [PK] [] [:a] ;; [PK] [] [:a] ;; [PK] [:r] [] [:d] [:a] ;; END ])))) -;; (defn-memo name-rival-bootstrap -;; ([] (name-rival-bootstrap (to-rival-name))) -;; ([script] -;; (->> script -;; (first-difference [] [:a] AF) -;; (first-difference [] [:r] DE) -;; (play-moves -;; [[] -;; [] [] [:r] [] -;; [:r] [] [:r] [] [:r] [] [:r] [] -;; [:r] [] [:d] [] [:d] [] [:d] [:a];; PK -;; [] [:a] ;; PK -;; [:u] [] [:l] [] [:l] [] [:l] [] -;; [:l] [] [:l] [:a] ;; U -;; [:d] [] [:r] [] [:r] [] [:r] [] -;; [:r] [] [:r] [:a] ;; PK -;; [:u] [] [:l] [] [:l] [] [:l] [] -;; [:l] [] [:l] [] [:u] [:a] ;; L -;; [:d] [] [:r] [] [:r] [] [:r] [] -;; [:r] [] [:r] [] [:d] [:a] ;; PK -;; [:r] [] [:d] [:a] ;; END -;; ])))) - (defn-memo leave-house ([] (leave-house (name-rival-bootstrap))) ([script] @@ -293,9 +270,9 @@ → → → ↓]) (walk-thru-grass - [↓ ↓ ↓ ↓]) + [↓ ↓ ↓]) - (walk [← ← ↓ ↓ ↓ ↓ ↓ ↓]) + (walk [↓ ← ← ↓ ↓ ↓ ↓ ↓ ↓]) (walk-thru-grass [↓ ↓ ↓ ↓ ↓ ↓]) @@ -375,6 +352,8 @@ (aget mem list-cursor-offset-address)))) ([] (list-offset @current-state))) + + (defn exp-item-selection [] (clojure.pprint/pprint (apply memory-compare @@ -488,16 +467,6 @@ (defn close-menu [script] (first-difference [] [:b] AF script)) - - -;; (defn select-menu-entry* [script] -;; (let [wait-time -;; (- (dec (count (first (set-cursor-relative 1 script)))) -;; (count (first script)))] -;; (println "wait-time" wait-time) -;; (play-moves (concat (repeat wait-time []) [[:a] []]) script))) - - (defn purchase-item "Assumes that the cursor is over the desired item, and purchases quantity of that item." @@ -514,8 +483,8 @@ "Corrupt the num-of-items variable by switching a corrupted pokemon into out-of-bounds memory." ([] (corrupt-item-list - ;;(corrupted-checkpoint) - (do-save-corruption) + (corrupted-checkpoint) + ;;(do-save-corruption) )) ([script] (->> script @@ -530,7 +499,7 @@ (set-cursor 9) select-menu-entry ; switch 6th with 10th close-menu - close-menu ))) + close-menu))) (defn-memo get-lots-of-money "Sell 0xFE cancel buttons to make a tremendous amount of money." @@ -546,9 +515,7 @@ (set-quantity 0xFF 0xF7) (first-difference [] [:a] AF) select-menu-entry - close-menu - ))) - + close-menu))) (defn note [str script] (println str) script) @@ -604,29 +571,56 @@ select-menu-entry ; do switch close-menu close-menu))) - -(defn-memo viridian-store->viridian-poke-center - ([] (viridian-store->viridian-poke-center - (corrupt-item-list-again))) + +(defn leave-viridian-store + ([] (leave-viridian-store (corrupt-item-list-again))) ([script] (->> script ;; leave store - (walk [↓ ↓ - → ↓ ↓]) - (walk [← ← ← - ↓ ↓ ↓ ↓ ↓ - ← ← ← ↑])))) + (walk [↓ ↓ → ↓]) + (do-nothing 1)))) + +(defn force-encounter [direction script] + (delayed-improbability-search + 600 + #(search-string % "Wild") + (partial move direction) script)) + +(defn-memo fight-wild-pokemon + ([] (fight-wild-pokemon (leave-viridian-store))) + ([script] + (->> script + (walk [↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ + ← ← ← ← ← ← ← ← + ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓]) + (force-encounter →)))) + +(defn-memo run-from-pokemon + ([] (run-from-pokemon (fight-wild-pokemon))) + ([script] + (->> script + (scroll-text) + (wait-until select-menu-entry) + (set-cursor 1) + (first-difference [] → AF) + (scroll-text) + (scroll-text)))) (defn-memo to-poke-center-computer ([] (to-poke-center-computer - (viridian-store->viridian-poke-center))) + (run-from-pokemon))) ([script] (->> script - (walk [→ → + (walk-thru-grass [→ ↑]) + (walk [↑ ← ← ← + ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ + ← ← + ↑ ↑ ↑ ↑ + → → → → ↑]) + (walk [→ → ↑ ↑ ↑ - → → → → → → → → →]) - (do-nothing 1)))) - + → → → → → → → → →])))) + (defn-memo begin-deposits ([] (begin-deposits (to-poke-center-computer))) @@ -732,9 +726,9 @@ [;; first part of item manipulation program 0x00 - 0x21 ;; load target + 1 into HL + 0x21 ;; load target into HL - 0x95 ;; this is the target address + 1 + 0x94 ;; this is the target address 0xD5 0x00 ;; relative jump back to first part diff -r 5c2041d1cdda -r 61a096a53330 moves/cor-checkpoint.vbm Binary file moves/cor-checkpoint.vbm has changed diff -r 5c2041d1cdda -r 61a096a53330 save-states/cor-checkpoint.sav Binary file save-states/cor-checkpoint.sav has changed