Mercurial > vba-clojure
changeset 237:ff37bc3004a7
continuing work on map-function-addresses.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 24 Mar 2012 23:38:21 -0500 |
parents | 30ced394823a |
children | e23ab90fcc86 |
files | clojure/com/aurellem/exp/map-functions.txt clojure/com/aurellem/gb/pokemon.clj clojure/com/aurellem/gb/pokemon_presets.clj save-states/rlm-pewter-2.sav save-states/rlm-pewter.sav save-states/rlm-pokemon-prepared.sav save-states/rlm-prepare-hm-mew.sav save-states/rlm-viridian-2.sav save-states/rlm-viridian-3.sav save-states/rlm-viridian-forest.sav save-states/rlm-viridian.sav |
diffstat | 11 files changed, 58 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/exp/map-functions.txt Sat Mar 24 20:06:25 2012 -0500 1.2 +++ b/clojure/com/aurellem/exp/map-functions.txt Sat Mar 24 23:38:21 2012 -0500 1.3 @@ -13,3 +13,14 @@ 1.4 Viridian House #2 0xD3 0x4D 1.5 Route 22 0xB3 0x4E 1.6 League Front Gate 0x8D 0x5F 1.7 +Route 2 0xF7 0x54 1.8 +Viridian Forest 0xF9 0x50 1.9 +Pewter City 0xF5 0x52 1.10 +Pewter Museum F1 0xEF 0x40 1.11 +Pewter Museum F2 0xC0 0x41 1.12 +Pewter Gym 0x63 0x42 1.13 +Pewter Mart 0xEA 0x44 1.14 +Pewter PkmnCenter 0x7A 0x44 1.15 +Pewter House #1 0x92 0x4E 1.16 +Pewter House #2 0x3C 0x4E 1.17 +
2.1 --- a/clojure/com/aurellem/gb/pokemon.clj Sat Mar 24 20:06:25 2012 -0500 2.2 +++ b/clojure/com/aurellem/gb/pokemon.clj Sat Mar 24 23:38:21 2012 -0500 2.3 @@ -9,7 +9,9 @@ 2.4 2.5 (defn set-party-number 2.6 ([^SaveState state new-party-num] 2.7 - (set-memory state 0xD162 new-party-num)) 2.8 + (-> state 2.9 + (set-memory 0xD162 new-party-num) 2.10 + (set-memory (+ 0xD162 new-party-num 1) 0xFF))) 2.11 ([new-party-num] 2.12 (set-party-number @current-state new-party-num))) 2.13 2.14 @@ -201,8 +203,6 @@ 2.15 ([pokemon-num] 2.16 (print-pokemon-record @current-state pokemon-num))) 2.17 2.18 -(def mint-berry-item-code-gsc 0x54) 2.19 - 2.20 (defn pokemon 2.21 ([^SaveState state poke-num] 2.22 (assert (<= 0 poke-num 5)) 2.23 @@ -429,6 +429,8 @@ 2.24 (pokemon->type (:species pokemon))) 2.25 pokemon))))) 2.26 2.27 +(def mint-berry-item-code-gsc 0x54) 2.28 + 2.29 (defn give-pokemon 2.30 ([^SaveState state poke-num pokemon] 2.31 (let [pokemon* (expand-pokemon pokemon)] 2.32 @@ -448,11 +450,9 @@ 2.33 (give-status poke-num (:status pokemon*)) 2.34 (give-stats poke-num (:stats pokemon*)) 2.35 (give-experience poke-num (:experience pokemon*)) 2.36 - 2.37 - ;; this was 11 dec 2.38 (set-memory (+ 0xD16D 2.39 (* pokemon-record-width poke-num)) 2.40 - 0x00)))) 2.41 + mint-berry-item-code-gsc)))) 2.42 ([poke-num pokemon] 2.43 (give-pokemon @current-state poke-num pokemon))) 2.44 2.45 @@ -463,16 +463,3 @@ 2.46 new-pokemon-data))) 2.47 ([poke-num new-pokemon-data] 2.48 (edit-pokemon @current-state poke-num new-pokemon-data))) 2.49 - 2.50 -(def young-jigglypuff 2.51 - {:name "JIGGLYPUFF", :species :jigglypuff, :species2 :jigglypuff, 2.52 - :status :normal, 2.53 - :moves [[:sing {:pp-ups 0, :current-pp 4}]], 2.54 - :dv {:attack 8, :defense 7, :speed 4, :special 12, :hp 4}, 2.55 - :experience {:main-exp 21, :hp-exp 0, :attack-exp 0, :defense-exp 2.56 - 0, :speed-exp 0, :special-exp 0}, 2.57 - :type [:normal], 2.58 - :original-trainer "RLM", 2.59 - :stats {:level 3, :current-hp 5, :hp 20, :attack 8, :defense 6, 2.60 - :speed 6, :special 7}, 2.61 - :ID 5195})
3.1 --- a/clojure/com/aurellem/gb/pokemon_presets.clj Sat Mar 24 20:06:25 2012 -0500 3.2 +++ b/clojure/com/aurellem/gb/pokemon_presets.clj Sat Mar 24 23:38:21 2012 -0500 3.3 @@ -1,18 +1,41 @@ 3.4 (ns com.aurellem.gb.pokemon-presets) 3.5 3.6 3.7 -(def HM-mew 3.8 +(def base-mew 3.9 {:species :mew 3.10 :ID 5195 3.11 :original-trainer "RLM" 3.12 + 3.13 + :dv 3.14 + {:hp 15 3.15 + :attack 15 3.16 + :defense 15 3.17 + :speed 15 3.18 + :special 15} 3.19 + 3.20 :experience 3.21 - {:main-exp 200 3.22 + {:main-exp 20 3.23 :hp-exp 0xFFFF 3.24 :attack-exp 0xFFFF 3.25 :defense-exp 0xFFFF 3.26 :speed-exp 0xFFFF 3.27 :special-exp 0xFFFF} 3.28 - :moves [:fly :surf :cut :strength]}) 3.29 + 3.30 + :stats 3.31 + {:level 2 3.32 + :current-hp 17 3.33 + :hp 17 3.34 + :attack 10 3.35 + :defense 10 3.36 + :speed 10 3.37 + :special 10} 3.38 + 3.39 + :moves [:pound]}) 3.40 + 3.41 +(def HM-mew 3.42 + (merge 3.43 + base-mew 3.44 + {:moves [:fly :flash :cut :strength]})) 3.45 3.46 (def ideal-pikachu 3.47 {:species :pikachu 3.48 @@ -44,3 +67,18 @@ 3.49 :special 8} 3.50 3.51 :moves [:thundershock :growl :surf]}) 3.52 + 3.53 + 3.54 +(def young-jigglypuff 3.55 + {:name "JIGGLYPUFF", :species :jigglypuff, :species2 :jigglypuff, 3.56 + :status :normal, 3.57 + :moves [[:sing {:pp-ups 0, :current-pp 4}]], 3.58 + :dv {:attack 15, :defense 15, :speed 15, :special 15, :hp 15}, 3.59 + :experience 3.60 + {:main-exp 21, :hp-exp 0xFF, :attack-exp 0xFF, 3.61 + :defense-exp 0xFF, :speed-exp 0xFF, :special-exp 0xFF}, 3.62 + :type [:normal], 3.63 + :original-trainer "RLM", 3.64 + :stats {:level 3, :current-hp 5, :hp 20, :attack 8, :defense 6, 3.65 + :speed 6, :special 7}, 3.66 + :ID 5195})
4.1 Binary file save-states/rlm-pewter-2.sav has changed
5.1 Binary file save-states/rlm-pewter.sav has changed
6.1 Binary file save-states/rlm-pokemon-prepared.sav has changed
7.1 Binary file save-states/rlm-prepare-hm-mew.sav has changed
8.1 Binary file save-states/rlm-viridian-2.sav has changed
9.1 Binary file save-states/rlm-viridian-3.sav has changed
10.1 Binary file save-states/rlm-viridian-forest.sav has changed
11.1 Binary file save-states/rlm-viridian.sav has changed