comparison clojure/com/aurellem/exp/item_bridge.clj @ 319:92c47a9cdaea

adapting bootstrap to new util functions.
author Robert McIntyre <rlm@mit.edu>
date Tue, 03 Apr 2012 04:16:20 -0500
parents 8e63b0bb8ea3
children 3b3cd62b6106
comparison
equal deleted inserted replaced
318:9a4d3f801c89 319:92c47a9cdaea
1 (ns com.aurellem.exp.item-bridge 1 (ns com.aurellem.exp.item-bridge
2 (:use (com.aurellem.gb saves util constants gb-driver vbm items assembly)) 2 (:use (com.aurellem.gb saves util constants gb-driver vbm items assembly))
3 (:use (com.aurellem.run title save-corruption)) 3 (:use (com.aurellem.run util title save-corruption))
4 ;;(:use (com.aurellem.exp pokemon)) 4 ;;(:use (com.aurellem.exp pokemon))
5 (:import [com.aurellem.gb.gb_driver SaveState])) 5 (:import [com.aurellem.gb.gb_driver SaveState]))
6 6
7 (defn corrupt-item-state [] 7 (defn corrupt-item-state []
8 (second (destroy-item-end-of-list-marker))) 8 (second (destroy-item-end-of-list-marker)))
86 (defn-memo corrupt-moves [] 86 (defn-memo corrupt-moves []
87 (concat 87 (concat
88 (first 88 (first
89 (->> 89 (->>
90 [[] (mid-game)] 90 [[] (mid-game)]
91 (advance [:b] [:b :start]) 91 (first-difference [:b] [:b :start] AF)
92 (advance [] [:d]) 92 (first-difference [] [:d] AF)
93 (play-moves [[] [] [] [:d] [] [] [] [:d] [] [] [:a]]) 93 (play-moves [[] [] [] [:d] [] [] [] [:d] [] [] [:a]])
94 scroll-text 94 (do-nothing 200)
95 (play-moves [[:a]])
95 (play-moves 96 (play-moves
96 ;; this section is copied from speedrun-2942 97 ;; this section is copied from speedrun-2942
97 ;; and corrupts the save so that the end-of-list marker 98 ;; and corrupts the save so that the end-of-list marker
98 ;; for the pokemon roster is destroyed, but the save is still 99 ;; for the pokemon roster is destroyed, but the save is still
99 ;; playable. 100 ;; playable.
100 [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] 101 [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
101 [] [] [] [] [] [] [] [] [] [] [:select] [:restart]]) 102 [] [] [] [] [] [] [] [] [] [] [:select] [:restart]])
102 (title) 103 (title)
103 (advance [] [:start]) 104 (first-difference [] [:start] AF)
104 (advance [] [:a]) 105 (first-difference [] [:a] AF)
105 (advance [:a] [:a :start]))) 106 (first-difference [:a] [:a :start] AF)))
106 [[]])) 107 [[]]))
107 108
108 (defn corrupt 109 (defn corrupt
109 "enter the codes to destroy the 110 "enter the codes to destroy the
110 pokemon list using save corruption" 111 pokemon list using save corruption"
117 (defn mid-game-corrupt [] 118 (defn mid-game-corrupt []
118 (read-state "corrupt-mid-game")) 119 (read-state "corrupt-mid-game"))
119 120
120 (defn gen-start-game-corrupt [] 121 (defn gen-start-game-corrupt []
121 (->> (second (intro)) 122 (->> (second (intro))
122 (advance [:b] [:a :b :start]) 123 (first-difference [:b] [:a :b :start] AF)
123 (play-moves (corrupt-moves)))) 124 (play-moves (corrupt-moves))))
124 125
125 (defn start-game-corrupt [] 126 (defn start-game-corrupt []
126 (read-state "corrupt-start-game")) 127 (read-state "corrupt-start-game"))
127 128