Mercurial > vba-clojure
diff clojure/com/aurellem/exp/pokemon.clj @ 168:04dfda91db9c
discovered locations of Stat experience and lost location of DV values
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 20 Mar 2012 20:26:00 -0500 |
parents | bfd06de5a934 |
children | 4857f59f63a6 |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/exp/pokemon.clj Tue Mar 20 19:17:14 2012 -0500 1.2 +++ b/clojure/com/aurellem/exp/pokemon.clj Tue Mar 20 20:26:00 2012 -0500 1.3 @@ -554,6 +554,8 @@ 1.4 (defn crazy-pid [] 1.5 (read-state "crazy-pidgeot")) 1.6 1.7 +(def unknown "[[[UNKNOWN]]]") 1.8 + 1.9 (def unknown "") 1.10 1.11 (def pokemon-1-info 1.12 @@ -574,16 +576,16 @@ 1.13 0xD178 "Exp. Points (h)" ;; 14 1.14 0xD179 "Exp. Points (m)" ;; 15 1.15 0xD17A "Exp. Points (l)" ;; 16 1.16 - 0xD17B "HP DV" ;; 17 1.17 - 0xD17C unknown ;; 18 1.18 - 0xD17D "Attack DV" ;; 19 1.19 - 0xD17E unknown ;; 20 1.20 - 0xD17F "Defense DV" ;; 21 1.21 - 0xD180 unknown ;; 22 1.22 - 0xD181 "Speed DV" ;; 23 1.23 - 0xD182 unknown ;; 24 1.24 - 0xD183 "Special DV" ;; 25 1.25 - 0xD184 unknown ;; 26 1.26 + 0xD17B "HP Exp. (h)" ;; 17 1.27 + 0xD17C "HP Exp. (l)" ;; 18 1.28 + 0xD17D "Attack Exp. (h)" ;; 19 1.29 + 0xD17E "Attack Exp. (l)" ;; 20 1.30 + 0xD17F "Defense Exp. (h)" ;; 21 1.31 + 0xD180 "Defense Exp. (l)" ;; 22 1.32 + 0xD181 "Speed Exp. (h)" ;; 23 1.33 + 0xD182 "Speed Exp. (l)" ;; 24 1.34 + 0xD183 "Special Exp. (h)" ;; 25 1.35 + 0xD184 "Special Exp. (l)" ;; 26 1.36 0xD185 unknown ;; 27 1.37 0xD186 unknown ;; 28 1.38 0xD187 "PP Move 1" ;; 29 1.39 @@ -600,7 +602,7 @@ 1.40 0xD192 "Speed (h)" ;; 40 1.41 0xD193 "Speed (l)" ;; 41 1.42 0xD194 "Special (h)" ;; 42 1.43 - 0xD195 "Special (h)" ;; 43 1.44 + 0xD195 "Special (l)" ;; 43 1.45 }) 1.46 1.47 (defn pokemon-data 1.48 @@ -624,13 +626,26 @@ 1.49 (assert (<= 0 pokemon-num 5)) 1.50 (let [poke-data (pokemon-data state pokemon-num) 1.51 backbone (sort (keys pokemon-1-info))] 1.52 - (println "Pokemon " pokemon-num 1.53 - "------------------------") 1.54 + (println "Pokemon " pokemon-num " -- " 1.55 + (nth (party-names state) 1.56 + pokemon-num) \newline) 1.57 + 1.58 + (println " Desc. | Hex | Dec | Binary |") 1.59 + (println "-------------------+------+-----+----------+") 1.60 (dorun 1.61 (map 1.62 (comp println 1.63 (fn [desc data] 1.64 - (format "%-16s : 0x%02X" desc data))) 1.65 + (format "%-16s | 0x%02X | %3d | %s |" 1.66 + desc data data 1.67 + (let [s (Integer/toBinaryString data)] 1.68 + (apply 1.69 + str 1.70 + (concat (repeat (- 8 (count s)) "0" ) 1.71 + s))) 1.72 + 1.73 + 1.74 + ))) 1.75 1.76 (map pokemon-1-info backbone) 1.77 poke-data)))) 1.78 @@ -641,3 +656,7 @@ 1.79 1.80 (defn pre-battle [] (read-state "prepare-for-battle")) 1.81 1.82 + 1.83 + 1.84 + 1.85 +