changeset 326:8484e6f6db2c

saving progress before trip to Liberal.
author Robert McIntyre <rlm@mit.edu>
date Wed, 04 Apr 2012 14:55:43 -0500
parents a5cdb2f76307
children fe6fd2323264
files clojure/com/aurellem/gb/gb_driver.clj clojure/com/aurellem/gb/pokemon.clj clojure/com/aurellem/gb/pokemon_presets.clj save-states/good-team-cereulan.sav
diffstat 4 files changed, 97 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/gb_driver.clj	Wed Apr 04 03:25:14 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/gb_driver.clj	Wed Apr 04 14:55:43 2012 -0500
     1.3 @@ -142,7 +142,7 @@
     1.4    ([]
     1.5      (continue! @current-state)))
     1.6  
     1.7 -(defn run-moves [moves state]
     1.8 +(defn run-moves [state moves]
     1.9    (set-state! state)
    1.10    (dorun (map #(Gb/step (button-mask %))
    1.11                moves))
     2.1 --- a/clojure/com/aurellem/gb/pokemon.clj	Wed Apr 04 03:25:14 2012 -0500
     2.2 +++ b/clojure/com/aurellem/gb/pokemon.clj	Wed Apr 04 14:55:43 2012 -0500
     2.3 @@ -1,7 +1,7 @@
     2.4  (ns com.aurellem.gb.pokemon
     2.5    (:use (com.aurellem.gb gb-driver util constants characters
     2.6                           moves types items status dv species
     2.7 -                         experience stats
     2.8 +                         experience stats pokemon-presets
     2.9                           ))
    2.10    (:import [com.aurellem.gb.gb_driver SaveState]))
    2.11  
    2.12 @@ -356,32 +356,6 @@
    2.13    ([status]
    2.14       (give-status-all @current-state status)))
    2.15  
    2.16 -
    2.17 -(def pokemon-base
    2.18 -  {:dv {:attack 15 :hp 15 :defense 15
    2.19 -        :special 15 :speed 15}
    2.20 -   :species :ditto
    2.21 -   :original-trainer "RLM"
    2.22 -   :ID 5195
    2.23 -   :status :normal
    2.24 -   :experience
    2.25 -   {:main-exp 500
    2.26 -    :attack-exp 0xFFFF
    2.27 -    :defense-exp 0xFFFF
    2.28 -    :speed-exp 0xFFFF
    2.29 -    :special-exp 0xFFFF
    2.30 -    :hp-exp 0xFFFF}
    2.31 -
    2.32 -   :stats
    2.33 -   {:level 7
    2.34 -    :current-hp 30
    2.35 -    :hp 30
    2.36 -    :attack 18
    2.37 -    :defense 18
    2.38 -    :speed 18
    2.39 -    :special 18}
    2.40 -   :moves [[:transform {:pp-ups 0 :current-pp 5}]]})
    2.41 -
    2.42  (defn expand-pokemon
    2.43    "Given a map describing a pokemon, fill in any missing
    2.44     values based on the ones already present."
    2.45 @@ -463,3 +437,16 @@
    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 +(defn give-powerful-party
    2.51 +  ([^SaveState state]
    2.52 +     (-> state
    2.53 +          (give-pokemon 0 tauros)
    2.54 +          (give-pokemon 1 chansey)
    2.55 +          (give-pokemon 2 alakazam)
    2.56 +          (give-pokemon 3 golem)
    2.57 +          (give-pokemon 4 exeggutor)
    2.58 +          (give-pokemon 5 starmie)
    2.59 +
    2.60 +          ))
    2.61 +  ([] (give-powerful-party @current-state)))
    2.62 \ No newline at end of file
     3.1 --- a/clojure/com/aurellem/gb/pokemon_presets.clj	Wed Apr 04 03:25:14 2012 -0500
     3.2 +++ b/clojure/com/aurellem/gb/pokemon_presets.clj	Wed Apr 04 14:55:43 2012 -0500
     3.3 @@ -1,25 +1,19 @@
     3.4  (ns com.aurellem.gb.pokemon-presets)
     3.5  
     3.6 -
     3.7 -(def base-mew
     3.8 -  {:species :mew
     3.9 +(def pokemon-base
    3.10 +  {:dv {:attack 15 :hp 15 :defense 15
    3.11 +        :special 15 :speed 15}
    3.12 +   :species :ditto
    3.13 +   :original-trainer "RLM"
    3.14     :ID 5195
    3.15 -   :original-trainer "RLM"
    3.16 -
    3.17 -   :dv
    3.18 -   {:hp 15
    3.19 -    :attack 15
    3.20 -    :defense 15
    3.21 -    :speed 15
    3.22 -    :special 15}
    3.23 -      
    3.24 +   :status :normal
    3.25     :experience
    3.26 -   {:main-exp 20
    3.27 -    :hp-exp 0xFFFF
    3.28 +   {:main-exp 500
    3.29      :attack-exp 0xFFFF
    3.30      :defense-exp 0xFFFF
    3.31      :speed-exp 0xFFFF
    3.32 -    :special-exp 0xFFFF}
    3.33 +    :special-exp 0xFFFF
    3.34 +    :hp-exp 0xFFFF}
    3.35  
    3.36     :stats
    3.37     {:level 2
    3.38 @@ -29,8 +23,14 @@
    3.39      :defense 10
    3.40      :speed 10
    3.41      :special 10}
    3.42 -   
    3.43 -   :moves [:pound]})
    3.44 +      
    3.45 +   :moves [[:transform {:pp-ups 0 :current-pp 5}]]})
    3.46 +
    3.47 +(def base-mew
    3.48 +  (merge
    3.49 +   pokemon-base
    3.50 +   {:species :mew
    3.51 +    :moves [:pound]}))
    3.52     
    3.53  (def HM-mew
    3.54    (merge
    3.55 @@ -38,35 +38,10 @@
    3.56     {:moves [:fly :flash :cut :strength]}))
    3.57  
    3.58  (def ideal-pikachu
    3.59 -  {:species :pikachu
    3.60 -   :ID 5195
    3.61 -   :original-trainer "RLM"
    3.62 -
    3.63 -   :dv
    3.64 -   {:hp 15
    3.65 -    :attack 15
    3.66 -    :defense 15
    3.67 -    :speed 15
    3.68 -    :special 15}
    3.69 -   
    3.70 -   :experience
    3.71 -   {:main-exp 20
    3.72 -    :hp-exp 0xFFFF
    3.73 -    :attack-exp 0xFFFF
    3.74 -    :defense-exp 0xFFFF
    3.75 -    :speed-exp 0xFFFF
    3.76 -    :special-exp 0xFFFF}
    3.77 -
    3.78 -   :stats
    3.79 -   {:level 2
    3.80 -    :current-hp 15
    3.81 -    :hp 15
    3.82 -    :attack 9
    3.83 -    :defense 8
    3.84 -    :speed 10
    3.85 -    :special 8}
    3.86 -
    3.87 -   :moves [:thundershock :growl :surf]})
    3.88 +  (merge
    3.89 +   pokemon-base
    3.90 +   {:species :pikachu
    3.91 +    :moves [:thundershock :growl :surf]}))
    3.92  
    3.93  
    3.94  (def young-jigglypuff
    3.95 @@ -82,3 +57,64 @@
    3.96     :stats {:level 3, :current-hp 5, :hp 20, :attack 8, :defense 6,
    3.97             :speed 6, :special 7}, 
    3.98     :ID 5195})
    3.99 +
   3.100 +(def tauros
   3.101 +  (merge
   3.102 +   pokemon-base
   3.103 +   {:species :tauros
   3.104 +    :stats {:level 3, :current-hp 20, :hp 20,
   3.105 +            :attack 13, :defense 13, :speed 14, :special 11}
   3.106 +    :moves [:body-slam :hyper-beam
   3.107 +            :earthquake :blizzard]}))
   3.108 +
   3.109 +(def chansey
   3.110 +  (merge
   3.111 +   pokemon-base
   3.112 +   {:species :chansey
   3.113 +    :stats {:level 3, :current-hp 30, :hp 30,
   3.114 +            :attack 8, :defense 8, :speed 10, :special 14}
   3.115 +    :moves [:ice-beam :thunderbolt
   3.116 +            :softboiled :thunder-wave]}))
   3.117 +
   3.118 +(def starmie
   3.119 +  (merge
   3.120 +   pokemon-base
   3.121 +   {:species :starmie
   3.122 +    :stats {:level 3, :current-hp 19, :hp 19,
   3.123 +            :attack 12, :defense 12, :speed 14, :special 13}
   3.124 +    :moves [:thunderbolt :blizzard
   3.125 +            :thunder-wave :recover]}))
   3.126 +
   3.127 +(def golem
   3.128 +  (merge
   3.129 +   pokemon-base
   3.130 +   {:species :golem
   3.131 +    :stats {:level 3, :current-hp 20, :hp 20,
   3.132 +            :attack 14, :defense 15, :speed 10, :special 11}
   3.133 +    :moves [:earthquake :body-slam
   3.134 +            :rock-slide :explosion]}))
   3.135 +
   3.136 +(def exeggutor
   3.137 +  (merge
   3.138 +   pokemon-base
   3.139 +   {:species :exeggutor
   3.140 +    :stats {:level 3, :current-hp 21, :hp 21,
   3.141 +            :attack 13, :defense 12, :speed 11, :special 15}
   3.142 +    :moves [:psychic :sleep-powder
   3.143 +            :mega-drain :explosion]}))
   3.144 +
   3.145 +(def alakazam
   3.146 +  (merge
   3.147 +   pokemon-base
   3.148 +   {:species :alakazam
   3.149 +    :stats {:level 3, :current-hp 19, :hp 19,
   3.150 +            :attack 10, :defense 10, :speed 14, :special 15}
   3.151 +    :moves [:psychic :thunder-wave
   3.152 +            :recover :seismic-toss]}))
   3.153 +            
   3.154 +(def zapdos
   3.155 +  (merge
   3.156 +   pokemon-base
   3.157 +   {:species :zapdos
   3.158 +    :moves [:thunderbolt :drill-peck
   3.159 +            :thunder-wave :agility]}))
   3.160 \ No newline at end of file
     4.1 Binary file save-states/good-team-cereulan.sav has changed