changeset 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
files clojure/com/aurellem/exp/pokemon-layout clojure/com/aurellem/exp/pokemon.clj
diffstat 2 files changed, 101 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/pokemon-layout	Tue Mar 20 19:17:14 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/pokemon-layout	Tue Mar 20 20:26:00 2012 -0500
     1.3 @@ -18,21 +18,21 @@
     1.4  D173                   Move 2 ID  			  
     1.5  D174                   Move 3 ID  			  
     1.6  D175                   Move 4 ID                          
     1.7 -D176                   /    Pokemon 1 OT ID
     1.8 -D177                   \
     1.9 +D176                   /h   Pokemon 1 OT ID
    1.10 +D177                   \l
    1.11  D178                   /h				    
    1.12  D179                   |m   Pokemon 1 Experience Points   
    1.13  D17A                   \l				    
    1.14 -D17B                   HP  DV     				    
    1.15 -D17C                    	  				    
    1.16 -D17D                   Attack DV  				    
    1.17 -D17E                    	  				    
    1.18 -D17F                   Defense DV 				    
    1.19 -D180                    	  				    
    1.20 -D181                   Speed DV	  				    
    1.21 -D182                    	  				    
    1.22 -D183                   Special DV 				    
    1.23 -D184                    				    
    1.24 +D17B                   /h HP Stat Expeience		    
    1.25 +D17C                   \l	  				    
    1.26 +D17D                   /h Attack Stat Experience
    1.27 +D17E                   \l	  				    
    1.28 +D17F                   /h Defense Stat Experience
    1.29 +D180                   \l	  				    
    1.30 +D181                   /h Speed Stat Experience
    1.31 +D182                   \l	  				    
    1.32 +D183                   /h Special Stat Experience
    1.33 +D184                   \l				    
    1.34  D185                     				    
    1.35  D186                    				    
    1.36  D187                   Current/Maximum PP Move 1		    
    1.37 @@ -67,16 +67,16 @@
    1.38  D1A4                   /h				      
    1.39  D1A5                   |m   Pokemon 2 Experience Points     
    1.40  D1A6                   \l				      
    1.41 -D1A7                   HP  DV             		      
    1.42 -D1A8                    	 			      
    1.43 -D1A9                   Attack DV 			      
    1.44 -D1AA                    	 			      
    1.45 -D1AB                   Defense DV			      
    1.46 -D1AC                    	 			      
    1.47 -D1AD                   Speed DV	 			      
    1.48 -D1AE                    	 			      
    1.49 -D1AF                   Special DV			      
    1.50 -D1B0                    				      
    1.51 +D1A7                   /h HP Stat Expeience		      
    1.52 +D1A8                   \l	 			      
    1.53 +D1A9                   /h Attack Stat Experience
    1.54 +D1AA                   \l	 			      
    1.55 +D1AB                   /h Defense Stat Experience
    1.56 +D1AC                   \l	 			      
    1.57 +D1AD                   /h Speed Stat Experience
    1.58 +D1AE                   \l	 			      
    1.59 +D1AF                   /h Special Stat Experience
    1.60 +D1B0                   \l				      
    1.61  D1B1                     				      
    1.62  D1B2                    				      
    1.63  D1B3                   Current/Maximum PP Move 1	      
    1.64 @@ -106,21 +106,21 @@
    1.65  D1CB                   Move 2 ID  			  
    1.66  D1CC                   Move 3 ID  			  
    1.67  D1CD                   Move 4 ID                            
    1.68 -D1CE                   /    Pokemon 3 OT ID
    1.69 -D1CF                   \
    1.70 +D1CE                   /h   Pokemon 3 OT ID
    1.71 +D1CF                   \l
    1.72  D1D0                   /h				    
    1.73  D1D1                   |m   Pokemon 3 Experience Points   
    1.74  D1D2                   \l				    
    1.75 -D1D3                   HP  DV     				    
    1.76 -D1D4                    	  				    
    1.77 -D1D5                   Attack DV  				    
    1.78 -D1D6                    	  				    
    1.79 -D1D7                   Defense DV 				    
    1.80 -D1D8                    	  				    
    1.81 -D1D9                   Speed DV	  				    
    1.82 -D1DA                    	  				    
    1.83 -D1DB                   Special DV 				    
    1.84 -D1DC                    				    
    1.85 +D1D3                   /h HP Stat Expeience	    
    1.86 +D1D4                   \l	  				    
    1.87 +D1D5                   /h Attack Stat Experience
    1.88 +D1D6                   \l	  				    
    1.89 +D1D7                   /h Defense Stat Experience
    1.90 +D1D8                   \l	  				    
    1.91 +D1D9                   /h Speed Stat Experience
    1.92 +D1DA                   \l	  				    
    1.93 +D1DB                   /h Special Stat Experience
    1.94 +D1DC                   \l				    
    1.95  D1DD                     				    
    1.96  D1DE                    				    
    1.97  D1DF                   Current/Maximum PP Move 1		    
    1.98 @@ -150,21 +150,21 @@
    1.99  D1F7                   Move 2 ID  			  
   1.100  D1F8                   Move 3 ID  			  
   1.101  D1F9                   Move 4 ID                          
   1.102 -D1FA                   /    Pokemon 4 OT ID
   1.103 -D1FB                   \
   1.104 +D1FA                   /h   Pokemon 4 OT ID
   1.105 +D1FB                   \l
   1.106  D1FC                   /h				    
   1.107  D1FD                   |m   Pokemon 4 Experience Points   
   1.108  D1FE                   \l				    
   1.109 -D1FF                   HP  DV     				    
   1.110 -D200                    	  				    
   1.111 -D201                   Attack DV  				    
   1.112 -D202                    	  				    
   1.113 -D203                   Defense DV 				    
   1.114 -D204                    	  				    
   1.115 -D205                   Speed DV	  				    
   1.116 -D206                    	  				    
   1.117 -D207                   Special DV 				    
   1.118 -D208                    				    
   1.119 +D1FF                   /h HP Stat Expeience    
   1.120 +D200                   \l	  				    
   1.121 +D201                   /h Attack Stat Experience
   1.122 +D202                   \l	  				    
   1.123 +D203                   /h Defense Stat Experience
   1.124 +D204                   \l	  				    
   1.125 +D205                   /h Speed Stat Experience
   1.126 +D206                   \l	  				    
   1.127 +D207                   /h Special Stat Experience
   1.128 +D208                   \l				    
   1.129  D209                     				    
   1.130  D20A                    				    
   1.131  D20B                   Current/Maximum PP Move 1		    
   1.132 @@ -194,21 +194,21 @@
   1.133  D223                   Move 2 ID  			    
   1.134  D224                   Move 3 ID  			    
   1.135  D225                   Move 4 ID                            
   1.136 -D226                   /    Pokemon 5 OT ID		    
   1.137 -D227                   \				    
   1.138 +D226                   /h   Pokemon 5 OT ID		    
   1.139 +D227                   \l				    
   1.140  D228                   /h				    
   1.141  D229                   |m   Pokemon 5 Experience Points      
   1.142  D22A                   \l				     
   1.143 -D22B                   HP  DV     				     
   1.144 -D22C                    	  				     
   1.145 -D22D                   Attack DV  				     
   1.146 -D22E                    	  				     
   1.147 -D22F                   Defense DV 				     
   1.148 -D230                    	  				     
   1.149 -D231                   Speed DV	  				     
   1.150 -D232                    	  				     
   1.151 -D233                   Special DV 				     
   1.152 -D234                    				     
   1.153 +D22B                   /h HP Stat Expeience		     
   1.154 +D22C                   \l	  				     
   1.155 +D22D                   /h Attack Stat Experience
   1.156 +D22E                   \l	  				     
   1.157 +D22F                   /h Defense Stat Experience
   1.158 +D230                   \l	  				     
   1.159 +D231                   /h Speed Stat Experience
   1.160 +D232                   \l	  				     
   1.161 +D233                   /h Special Stat Experience
   1.162 +D234                   \l				     
   1.163  D235                     				     
   1.164  D236                    				     
   1.165  D237                   Current/Maximum PP Move 1		     
   1.166 @@ -243,16 +243,16 @@
   1.167  D254                   /h				     
   1.168  D255                   |m   Pokemon 6 Experience Points      
   1.169  D256                   \l				     
   1.170 -D257                   HP  DV     				     
   1.171 -D258                    	  				     
   1.172 -D259                   Attack DV  				     
   1.173 -D25A                    	  				     
   1.174 -D25B                   Defense DV 				     
   1.175 -D25C                    	  				     
   1.176 -D25D                   Speed DV	  				     
   1.177 -D25E                    	  				     
   1.178 -D25F                   Special DV 				     
   1.179 -D260                    				     
   1.180 +D257                   /h HP Stat Expeience     
   1.181 +D258                   \l	  				     
   1.182 +D259                   /h Attack Stat Experience
   1.183 +D25A                   \l	  				     
   1.184 +D25B                   /h Defense Stat Experience
   1.185 +D25C                   \l	  				     
   1.186 +D25D                   /h Speed Stat Experience
   1.187 +D25E                   \l	  				     
   1.188 +D25F                   /h Special Stat Experience
   1.189 +D260                   \l				     
   1.190  D261                     				     
   1.191  D262                    				     
   1.192  D263                   Current/Maximum PP Move 1		     
     2.1 --- a/clojure/com/aurellem/exp/pokemon.clj	Tue Mar 20 19:17:14 2012 -0500
     2.2 +++ b/clojure/com/aurellem/exp/pokemon.clj	Tue Mar 20 20:26:00 2012 -0500
     2.3 @@ -554,6 +554,8 @@
     2.4  (defn crazy-pid []
     2.5    (read-state "crazy-pidgeot"))
     2.6  
     2.7 +(def unknown "[[[UNKNOWN]]]")
     2.8 +
     2.9  (def unknown "")
    2.10  
    2.11  (def pokemon-1-info
    2.12 @@ -574,16 +576,16 @@
    2.13     0xD178 "Exp. Points (h)"      ;; 14
    2.14     0xD179 "Exp. Points (m)"      ;; 15
    2.15     0xD17A "Exp. Points (l)"      ;; 16
    2.16 -   0xD17B "HP DV"                ;; 17
    2.17 -   0xD17C unknown                ;; 18
    2.18 -   0xD17D "Attack DV"            ;; 19
    2.19 -   0xD17E unknown                ;; 20
    2.20 -   0xD17F "Defense DV"           ;; 21
    2.21 -   0xD180 unknown                ;; 22
    2.22 -   0xD181 "Speed DV"             ;; 23
    2.23 -   0xD182 unknown                ;; 24
    2.24 -   0xD183 "Special DV"           ;; 25
    2.25 -   0xD184 unknown                ;; 26
    2.26 +   0xD17B "HP Exp. (h)"          ;; 17
    2.27 +   0xD17C "HP Exp. (l)"          ;; 18
    2.28 +   0xD17D "Attack Exp. (h)"      ;; 19
    2.29 +   0xD17E "Attack Exp. (l)"      ;; 20
    2.30 +   0xD17F "Defense Exp. (h)"     ;; 21
    2.31 +   0xD180 "Defense Exp. (l)"     ;; 22
    2.32 +   0xD181 "Speed Exp. (h)"       ;; 23
    2.33 +   0xD182 "Speed Exp. (l)"       ;; 24
    2.34 +   0xD183 "Special Exp. (h)"     ;; 25
    2.35 +   0xD184 "Special Exp. (l)"     ;; 26
    2.36     0xD185 unknown                ;; 27
    2.37     0xD186 unknown                ;; 28
    2.38     0xD187 "PP Move 1"            ;; 29
    2.39 @@ -600,7 +602,7 @@
    2.40     0xD192 "Speed    (h)"         ;; 40
    2.41     0xD193 "Speed    (l)"         ;; 41
    2.42     0xD194 "Special  (h)"         ;; 42
    2.43 -   0xD195 "Special  (h)"         ;; 43
    2.44 +   0xD195 "Special  (l)"         ;; 43
    2.45     })
    2.46     
    2.47  (defn pokemon-data
    2.48 @@ -624,13 +626,26 @@
    2.49       (assert (<= 0 pokemon-num 5))
    2.50       (let [poke-data (pokemon-data state pokemon-num)
    2.51             backbone (sort (keys pokemon-1-info))]
    2.52 -       (println "Pokemon " pokemon-num
    2.53 -                "------------------------")
    2.54 +       (println "Pokemon " pokemon-num  " -- "
    2.55 +                (nth (party-names state)
    2.56 +                     pokemon-num) \newline)
    2.57 +
    2.58 +       (println "    Desc.          | Hex  | Dec |  Binary  |")
    2.59 +       (println "-------------------+------+-----+----------+")
    2.60         (dorun
    2.61          (map
    2.62           (comp println
    2.63                 (fn [desc data]
    2.64 -                 (format "%-16s  :  0x%02X" desc data)))
    2.65 +                 (format "%-16s   | 0x%02X | %3d | %s |"
    2.66 +                         desc data data
    2.67 +                         (let [s (Integer/toBinaryString data)]
    2.68 +                           (apply
    2.69 +                            str 
    2.70 +                            (concat (repeat (- 8 (count s)) "0" )
    2.71 +                                    s)))
    2.72 +
    2.73 +
    2.74 +                         )))
    2.75           
    2.76           (map pokemon-1-info backbone)
    2.77           poke-data))))
    2.78 @@ -641,3 +656,7 @@
    2.79  
    2.80  (defn pre-battle [] (read-state "prepare-for-battle"))
    2.81  
    2.82 +
    2.83 +
    2.84 +
    2.85 +