# HG changeset patch # User Dylan Holmes # Date 1332822318 18000 # Node ID 82ee2704c9739b0d272c4e865f0b331ccb71e9f3 # Parent 498af3c3cf152432f89a0e31bc74f44866c0db1e Since the game uses zeros as delimiters in the evolution/learnset section, it increments all of the move/pokemon indices by 1. Altered my code so that all returned values are consistently non-incremented. diff -r 498af3c3cf15 -r 82ee2704c973 clojure/com/aurellem/gb/hxc.clj --- a/clojure/com/aurellem/gb/hxc.clj Mon Mar 26 23:18:22 2012 -0500 +++ b/clojure/com/aurellem/gb/hxc.clj Mon Mar 26 23:25:18 2012 -0500 @@ -469,7 +469,8 @@ (interleave (map format-name (hxc-pokenames rom)) (map (comp - (partial map vec) + (partial map + (fn [[lvl mv]] [lvl (dec mv)])) (partial partition 2) ;; keep the learnset data (partial take-while (comp not zero?)) @@ -487,7 +488,7 @@ (let [moves (vec(map format-name (hxc-move-names)))] (into {} (map (fn [[pkmn learnset]] - [pkmn (map (fn [[lvl mv]] [lvl (moves (dec mv))]) + [pkmn (map (fn [[lvl mv]] [lvl (moves mv)]) learnset)]) (hxc-learnsets rom))))))