Mercurial > vba-clojure
diff clojure/com/aurellem/gb/items.clj @ 185:c8ec477beeac
added world directory for practice worldbuilding.
author | Dylan Holmes <ocsenave@gmail.com> |
---|---|
date | Thu, 22 Mar 2012 07:02:50 -0500 |
parents | 8665160f0f3d |
children | 531e1342ff56 |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/gb/items.clj Thu Mar 22 06:58:18 2012 -0500 1.2 +++ b/clojure/com/aurellem/gb/items.clj Thu Mar 22 07:02:50 2012 -0500 1.3 @@ -24,6 +24,7 @@ 1.4 0x04 :poke-ball 1.5 0x05 :town-map 1.6 0x06 :bicycle 1.7 + 0x07 :surfboard 1.8 0x08 :safari-ball 1.9 0x09 :pokedex 1.10 0x0A :moon-stone 1.11 @@ -158,7 +159,8 @@ 1.12 0xFC :TM52 ;; "fly" 1.13 0xFD :TM53 ;; "surf" 1.14 0xFE :TM54 ;; "strength" 1.15 - 0xFF :end-of-list-sentinel)) 1.16 + 0xFF :end-of-list-sentinel ;; also "flash" 1.17 + )) 1.18 1.19 (def item-name->item-code 1.20 (zipmap (vals item-code->item-name) 1.21 @@ -170,7 +172,7 @@ 1.22 (fn [[item-code quantity]] 1.23 [(item-code->item-name 1.24 item-code 1.25 - (str ":0x" (.toUpperCase (Integer/toHexString item-code)))) 1.26 + item-code) 1.27 quantity]) 1.28 (partition 1.29 2 1.30 @@ -202,7 +204,7 @@ 1.31 (flatten 1.32 (concat [(count inventory)] 1.33 (map (fn [[item-name quantity]] 1.34 - [(item-name->item-code item-name) 1.35 + [(item-name->item-code item-name item-name) 1.36 quantity]) inventory) 1.37 [(item-name->item-code :end-of-list-sentinel)]))) 1.38