# HG changeset patch # User Robert McIntyre # Date 1332650301 18000 # Node ID ff37bc3004a7cd6c15a2ab1d99b6ad21fdac5c8e # Parent 30ced394823a8438140e8147bb849b143898daa3 continuing work on map-function-addresses. diff -r 30ced394823a -r ff37bc3004a7 clojure/com/aurellem/exp/map-functions.txt --- a/clojure/com/aurellem/exp/map-functions.txt Sat Mar 24 20:06:25 2012 -0500 +++ b/clojure/com/aurellem/exp/map-functions.txt Sat Mar 24 23:38:21 2012 -0500 @@ -13,3 +13,14 @@ Viridian House #2 0xD3 0x4D Route 22 0xB3 0x4E League Front Gate 0x8D 0x5F +Route 2 0xF7 0x54 +Viridian Forest 0xF9 0x50 +Pewter City 0xF5 0x52 +Pewter Museum F1 0xEF 0x40 +Pewter Museum F2 0xC0 0x41 +Pewter Gym 0x63 0x42 +Pewter Mart 0xEA 0x44 +Pewter PkmnCenter 0x7A 0x44 +Pewter House #1 0x92 0x4E +Pewter House #2 0x3C 0x4E + diff -r 30ced394823a -r ff37bc3004a7 clojure/com/aurellem/gb/pokemon.clj --- a/clojure/com/aurellem/gb/pokemon.clj Sat Mar 24 20:06:25 2012 -0500 +++ b/clojure/com/aurellem/gb/pokemon.clj Sat Mar 24 23:38:21 2012 -0500 @@ -9,7 +9,9 @@ (defn set-party-number ([^SaveState state new-party-num] - (set-memory state 0xD162 new-party-num)) + (-> state + (set-memory 0xD162 new-party-num) + (set-memory (+ 0xD162 new-party-num 1) 0xFF))) ([new-party-num] (set-party-number @current-state new-party-num))) @@ -201,8 +203,6 @@ ([pokemon-num] (print-pokemon-record @current-state pokemon-num))) -(def mint-berry-item-code-gsc 0x54) - (defn pokemon ([^SaveState state poke-num] (assert (<= 0 poke-num 5)) @@ -429,6 +429,8 @@ (pokemon->type (:species pokemon))) pokemon))))) +(def mint-berry-item-code-gsc 0x54) + (defn give-pokemon ([^SaveState state poke-num pokemon] (let [pokemon* (expand-pokemon pokemon)] @@ -448,11 +450,9 @@ (give-status poke-num (:status pokemon*)) (give-stats poke-num (:stats pokemon*)) (give-experience poke-num (:experience pokemon*)) - - ;; this was 11 dec (set-memory (+ 0xD16D (* pokemon-record-width poke-num)) - 0x00)))) + mint-berry-item-code-gsc)))) ([poke-num pokemon] (give-pokemon @current-state poke-num pokemon))) @@ -463,16 +463,3 @@ new-pokemon-data))) ([poke-num new-pokemon-data] (edit-pokemon @current-state poke-num new-pokemon-data))) - -(def young-jigglypuff - {:name "JIGGLYPUFF", :species :jigglypuff, :species2 :jigglypuff, - :status :normal, - :moves [[:sing {:pp-ups 0, :current-pp 4}]], - :dv {:attack 8, :defense 7, :speed 4, :special 12, :hp 4}, - :experience {:main-exp 21, :hp-exp 0, :attack-exp 0, :defense-exp - 0, :speed-exp 0, :special-exp 0}, - :type [:normal], - :original-trainer "RLM", - :stats {:level 3, :current-hp 5, :hp 20, :attack 8, :defense 6, - :speed 6, :special 7}, - :ID 5195}) diff -r 30ced394823a -r ff37bc3004a7 clojure/com/aurellem/gb/pokemon_presets.clj --- a/clojure/com/aurellem/gb/pokemon_presets.clj Sat Mar 24 20:06:25 2012 -0500 +++ b/clojure/com/aurellem/gb/pokemon_presets.clj Sat Mar 24 23:38:21 2012 -0500 @@ -1,18 +1,41 @@ (ns com.aurellem.gb.pokemon-presets) -(def HM-mew +(def base-mew {:species :mew :ID 5195 :original-trainer "RLM" + + :dv + {:hp 15 + :attack 15 + :defense 15 + :speed 15 + :special 15} + :experience - {:main-exp 200 + {:main-exp 20 :hp-exp 0xFFFF :attack-exp 0xFFFF :defense-exp 0xFFFF :speed-exp 0xFFFF :special-exp 0xFFFF} - :moves [:fly :surf :cut :strength]}) + + :stats + {:level 2 + :current-hp 17 + :hp 17 + :attack 10 + :defense 10 + :speed 10 + :special 10} + + :moves [:pound]}) + +(def HM-mew + (merge + base-mew + {:moves [:fly :flash :cut :strength]})) (def ideal-pikachu {:species :pikachu @@ -44,3 +67,18 @@ :special 8} :moves [:thundershock :growl :surf]}) + + +(def young-jigglypuff + {:name "JIGGLYPUFF", :species :jigglypuff, :species2 :jigglypuff, + :status :normal, + :moves [[:sing {:pp-ups 0, :current-pp 4}]], + :dv {:attack 15, :defense 15, :speed 15, :special 15, :hp 15}, + :experience + {:main-exp 21, :hp-exp 0xFF, :attack-exp 0xFF, + :defense-exp 0xFF, :speed-exp 0xFF, :special-exp 0xFF}, + :type [:normal], + :original-trainer "RLM", + :stats {:level 3, :current-hp 5, :hp 20, :attack 8, :defense 6, + :speed 6, :special 7}, + :ID 5195}) diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-pewter-2.sav Binary file save-states/rlm-pewter-2.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-pewter.sav Binary file save-states/rlm-pewter.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-pokemon-prepared.sav Binary file save-states/rlm-pokemon-prepared.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-prepare-hm-mew.sav Binary file save-states/rlm-prepare-hm-mew.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-viridian-2.sav Binary file save-states/rlm-viridian-2.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-viridian-3.sav Binary file save-states/rlm-viridian-3.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-viridian-forest.sav Binary file save-states/rlm-viridian-forest.sav has changed diff -r 30ced394823a -r ff37bc3004a7 save-states/rlm-viridian.sav Binary file save-states/rlm-viridian.sav has changed