comparison org/rom.org @ 472:69d1787522c7

Fixed type effectiveness; added it to the ROM map. (I've been remiss...)
author Dylan Holmes <ocsenave@gmail.com>
date Wed, 02 May 2012 19:52:06 -0500
parents 5f87c3e46c22
children 9a7fae5afd8f
comparison
equal deleted inserted replaced
471:5f87c3e46c22 472:69d1787522c7
928 928
929 929
930 930
931 ;;; TYPE EFFECTIVENESS 931 ;;; TYPE EFFECTIVENESS
932 932
933 (println (take 15 (drop 0x3E62D (rom)))) 933 (println (take 15 (drop 0x3E5FA (rom))))
934 (println (partition 3 (take 15 (drop 0x3E62D (rom))))) 934 (println (partition 3 (take 15 (drop 0x3E5FA (rom)))))
935 935
936 (println 936 (println
937 (map 937 (map
938 (fn [[atk-type def-type multiplier]] 938 (fn [[atk-type def-type multiplier]]
939 (list atk-type def-type (/ multiplier 10.))) 939 (list atk-type def-type (/ multiplier 10.)))
940 940
941 (partition 3 941 (partition 3
942 (take 15 (drop 0x3E62D (rom)))))) 942 (take 15 (drop 0x3E5FA (rom))))))
943 943
944 944
945 (println 945 (println
946 (map 946 (map
947 (fn [[atk-type def-type multiplier]] 947 (fn [[atk-type def-type multiplier]]
950 (get pkmn-types def-type) 950 (get pkmn-types def-type)
951 (/ multiplier 10.) 951 (/ multiplier 10.)
952 ]) 952 ])
953 953
954 (partition 3 954 (partition 3
955 (take 15 (drop 0x3E62D (rom)))))) 955 (take 15 (drop 0x3E5FA (rom))))))
956 956
957 #+end_src 957 #+end_src
958 958
959 #+results: 959 #+results:
960 : [:normal :fighting :flying :poison :ground :rock :bird :bug :ghost :A :B :C :D :E :F :G :H :I :J :K :fire :water :grass :electric :psychic :ice :dragon] 960 : [:normal :fighting :flying :poison :ground :rock :bird :bug :ghost :A :B :C :D :E :F :G :H :I :J :K :fire :water :grass :electric :psychic :ice :dragon]
961 : ([0 :normal] [1 :fighting] [2 :flying] [3 :poison] [4 :ground] [5 :rock] [6 :bird] [7 :bug] [8 :ghost] [9 :A] [10 :B] [11 :C] [12 :D] [13 :E] [14 :F] [15 :G] [16 :H] [17 :I] [18 :J] [19 :K] [20 :fire] [21 :water] [22 :grass] [23 :electric] [24 :psychic] [25 :ice] [26 :dragon]) 961 : ([0 :normal] [1 :fighting] [2 :flying] [3 :poison] [4 :ground] [5 :rock] [6 :bird] [7 :bug] [8 :ghost] [9 :A] [10 :B] [11 :C] [12 :D] [13 :E] [14 :F] [15 :G] [16 :H] [17 :I] [18 :J] [19 :K] [20 :fire] [21 :water] [22 :grass] [23 :electric] [24 :psychic] [25 :ice] [26 :dragon])
962 : 962 :
963 : (0 5 5 0 8 0 8 8 20 20 7 20 20 5 5) 963 : (21 20 20 20 22 20 20 25 20 22 21 20 23 21 20)
964 : ((0 5 5) (0 8 0) (8 8 20) (20 7 20) (20 5 5)) 964 : ((21 20 20) (20 22 20) (20 25 20) (22 21 20) (23 21 20))
965 : ((0 5 0.5) (0 8 0.0) (8 8 2.0) (20 7 2.0) (20 5 0.5)) 965 : ((21 20 2.0) (20 22 2.0) (20 25 2.0) (22 21 2.0) (23 21 2.0))
966 : ([:normal :rock 0.5] [:normal :ghost 0.0] [:ghost :ghost 2.0] [:fire :bug 2.0] [:fire :rock 0.5]) 966 : ([:water :fire 2.0] [:fire :grass 2.0] [:fire :ice 2.0] [:grass :water 2.0] [:electric :water 2.0])
967 967
968 968
969 *** 969 ***
970 970
971 #+name: type-advantage 971 #+name: type-advantage
983 (fn [[atk def mult]] [(get pkmn-types atk (hex atk)) 983 (fn [[atk def mult]] [(get pkmn-types atk (hex atk))
984 (get pkmn-types def (hex def)) 984 (get pkmn-types def (hex def))
985 (/ mult 10)]) 985 (/ mult 10)])
986 (partition 3 986 (partition 3
987 (take-while (partial not= 0xFF) 987 (take-while (partial not= 0xFF)
988 (drop 0x3E62D rom)))))) 988 (drop 0x3E5FA rom))))))
989 #+end_src 989 #+end_src
990
990 991
991 992
992 993
993 * Moves 994 * Moves
994 ** Names of moves 995 ** Names of moves
1468 | 39B05-39DD0. | unknown | | | 1469 | 39B05-39DD0. | unknown | | |
1469 | 39DD1-39E2E | Pointers to trainer Pok\eacute{}mon | Pairs of low-high bits. | The first pair is 0x2F 0x5E, which corresponds to memory location 5E2F relative to this 38000-3C000 bank, i.e.[fn::For details about how relative bank pointers work, see the relevant Appendix.] position 39E2F overall. | 1470 | 39DD1-39E2E | Pointers to trainer Pok\eacute{}mon | Pairs of low-high bits. | The first pair is 0x2F 0x5E, which corresponds to memory location 5E2F relative to this 38000-3C000 bank, i.e.[fn::For details about how relative bank pointers work, see the relevant Appendix.] position 39E2F overall. |
1470 | 39E2F-3A5B2 | Trainer Pok\eacute{}mon | Specially-formatted lists of various length, separated by 0x00. If the list starts with 0xFF, the rest of the list will alternate between levels and internal-ids. Otherwise, start of the list is the level of the whole team, and the rest of the list is internal-ids. | The first entry is (11 165 108 0), which means a level 11 team consisting of Rattata and Ekans. The entry for MISTY is (255 18 27 21 152 0), which means a team of various levels consisting of level 18 Staryu and level 21 Starmie. [fn::Incidentally, if you want to change your rival's starter Pok\eacute{}mon, it's enough just to change its species in all of your battles with him.].) | 1471 | 39E2F-3A5B2 | Trainer Pok\eacute{}mon | Specially-formatted lists of various length, separated by 0x00. If the list starts with 0xFF, the rest of the list will alternate between levels and internal-ids. Otherwise, start of the list is the level of the whole team, and the rest of the list is internal-ids. | The first entry is (11 165 108 0), which means a level 11 team consisting of Rattata and Ekans. The entry for MISTY is (255 18 27 21 152 0), which means a team of various levels consisting of level 18 Staryu and level 21 Starmie. [fn::Incidentally, if you want to change your rival's starter Pok\eacute{}mon, it's enough just to change its species in all of your battles with him.].) |
1471 | 3B1E5-3B361 | Pointers to evolution/learnset data. | One high-low byte pair for each of the 190 Pok\eacute{}mon in internal order. | | 1472 | 3B1E5-3B361 | Pointers to evolution/learnset data. | One high-low byte pair for each of the 190 Pok\eacute{}mon in internal order. | |
1472 |-----------------------+-----------------+-----------------+-----------------| 1473 |-----------------------+-----------------+-----------------+-----------------|
1473 | 3B361-3BBAA | Evolution and learnset data. [fn::Evolution data consists of how to make Pok\eacute{}mon evolve, and what they evolve into. Learnset data consists of the moves that Pok\eacute{}mon learn as they level up.] | Variable-length evolution information (see below), followed by a list of level/move-id learnset pairs. | | 1474 | 3B361-3BBAA | *Evolution and learnset data*. [fn::Evolution data consists of how to make Pok\eacute{}mon evolve, and what they evolve into. Learnset data consists of the moves that Pok\eacute{}mon learn as they level up.] | Variable-length evolution information (see below), followed by a list of level/move-id learnset pairs. | |
1474 | 3BBAA-3C000 | (empty) | | 0 0 0 0 ... | 1475 | 3BBAA-3C000 | (empty) | | 0 0 0 0 ... |
1475 |-----------------------+-----------------+-----------------+-----------------| 1476 |-----------------------+-----------------+-----------------+-----------------|
1476 | 3D131-3D133 | The inventory of both OLD MAN and PROF. OAK when they battle for you. | Pairs of [item-id quantity], terminated by 0xFF. | (0x04 0x01 0xFF) They only have one Pok\eacute{}ball [fn::If you give them any ball, OAK will catch the enemy Pok\eacute{}mon and OLD MAN will miss. (OLD MAN misses even if he throws a MASTER BALL, which is a sight to see!) If you give them some other item first in the list, you'll be able to use that item normally but then you'll trigger the Safari Zone message: Pa will claim you're out of SAFARI BALLs and the battle will end. If you engage in either an OLD MAN or OAK battle with a Gym Leader, you will [1] get reprimanded if you try to throw a ball [2] incur the Safari Zone message [3] automatically win no matter which item you use [4] earn whichever reward they give you as usual [5] permanently retain the name OLD MAN / PROF. OAK.]. | 1477 | 3D131-3D133 | The inventory of both OLD MAN and PROF. OAK when they battle for you. | Pairs of [item-id quantity], terminated by 0xFF. | (0x04 0x01 0xFF) They only have one Pok\eacute{}ball [fn::If you give them any ball, OAK will catch the enemy Pok\eacute{}mon and OLD MAN will miss. (OLD MAN misses even if he throws a MASTER BALL, which is a sight to see!) If you give them some other item first in the list, you'll be able to use that item normally but then you'll trigger the Safari Zone message: Pa will claim you're out of SAFARI BALLs and the battle will end. If you engage in either an OLD MAN or OAK battle with a Gym Leader, you will [1] get reprimanded if you try to throw a ball [2] incur the Safari Zone message [3] automatically win no matter which item you use [4] earn whichever reward they give you as usual [5] permanently retain the name OLD MAN / PROF. OAK.]. |
1477 | 3D6C7-3D6D6 | Two miscellaneous strings. | Variable length, separated by 0x50 | Disabled!#TYPE | 1478 | 3D6C7-3D6D6 | Two miscellaneous strings. | Variable length, separated by 0x50 | Disabled!#TYPE |
1478 | 3E190-3E194 | Which moves have an increased critical-hit ratio? | List of move ids, terminated by 0xFF. | (0x02 0x4B 0x98 0xA3 0xFF) corresponding to karate-chop, razor-leaf, crabhammer, slash, end-of-list. | 1479 | 3E190-3E194 | Which moves have an increased critical-hit ratio? | List of move ids, terminated by 0xFF. | (0x02 0x4B 0x98 0xA3 0xFF) corresponding to karate-chop, razor-leaf, crabhammer, slash, end-of-list. |
1479 | 3E200-3E204 | " (???) | " | " | 1480 | 3E200-3E204 | " (???) | " | " |
1480 | 3E231. | Besides normal-type, which type of move can COUNTER counter? | A single byte representing a type id. | This is set to 1, the id of the FIGHTING type. | 1481 | 3E231. | Besides normal-type, which type of move can COUNTER counter? | A single byte representing a type id. | This is set to 1, the id of the FIGHTING type. |
1482 | 3E5FA-3E6F0. | *Type effectiveness* | Triples of bytes: =atk-type=, =def-type=, =multiplier=. The multiplier is stored as 10x its actual value to allow for fractions; so, 20 means 2.0x effective, 5 means 0.5x effective. Unlisted type combinations have 1.0x effectiveness by default. | The first few entries are (21 20 20) (20 22 20) (20 25 20) (22 21 20) (23 21 20), corresponding to [:water :fire 2.0] [:fire :grass 2.0] [:fire :ice 2.0] |
1481 |-----------------------+-----------------+-----------------+-----------------| 1483 |-----------------------+-----------------+-----------------+-----------------|
1482 | 40252-4027B | Pok\eacute{}dex menu text | Variable-length strings separated by 0x50. | SEEN#OWN#CONTENTS#... | 1484 | 40252-4027B | Pok\eacute{}dex menu text | Variable-length strings separated by 0x50. | SEEN#OWN#CONTENTS#... |
1483 | 40370-40386 | Important constants for Pok\eacute{}dex entries | | HT _ _ *?′??″* [newline] WT _ _ _ *???* lb [0x50] *POK\Eacute{}* [0x50] | 1485 | 40370-40386 | Important constants for Pok\eacute{}dex entries | | HT _ _ *?′??″* [newline] WT _ _ _ *???* lb [0x50] *POK\Eacute{}* [0x50] |
1484 | 40687-41072 | Species data from the Pok\eacute{}dex: species name, height, weight, etc. | Variable-length species names, followed by 0x50, followed by fixed-length height/weight/etc. data. | The first entry is (*146 132 132 131*, 80, *2 4*, *150 0*, 23, 0 64 46, 80), which are the the stats of Bulbasaur: the first entry spells "SEED", then 0x80, then the height (2' 4"), then the weight (formatted as a low-high byte pair), then various Pokédex pointer data (see elsewhere). | 1486 | 40687-41072 | Species data from the Pok\eacute{}dex: species name, height, weight, etc. | Variable-length species names, followed by 0x50, followed by fixed-length height/weight/etc. data. | The first entry is (*146 132 132 131*, 80, *2 4*, *150 0*, 23, 0 64 46, 80), which are the the stats of Bulbasaur: the first entry spells "SEED", then 0x80, then the height (2' 4"), then the weight (formatted as a low-high byte pair), then various Pokédex pointer data (see elsewhere). |
1485 | 41072- | Pok\eacute{} placeholder species, "???" | | | 1487 | 41072- | Pok\eacute{} placeholder species, "???" | | |
1508 | E8000-E876C | Names of the \ldquo{}190\rdquo{} species of Pok\eacute{}mon in memory. | Fixed length (10-letter) Pok\eacute{}mon names. Any extra space is padded with the character 0x50. The names are in \ldquo{}internal order\rdquo{}. | RHYDON####KANGASKHANNIDORAN♂#... | 1510 | E8000-E876C | Names of the \ldquo{}190\rdquo{} species of Pok\eacute{}mon in memory. | Fixed length (10-letter) Pok\eacute{}mon names. Any extra space is padded with the character 0x50. The names are in \ldquo{}internal order\rdquo{}. | RHYDON####KANGASKHANNIDORAN♂#... |
1509 |-----------------------+-----------------+-----------------+-----------------| 1511 |-----------------------+-----------------+-----------------+-----------------|
1510 | E9BD5- | The text PLAY TIME (see above, 70442) | | | 1512 | E9BD5- | The text PLAY TIME (see above, 70442) | | |
1511 | F1A44-F1A45 | Which Pok\eacute{}mon does Officer Jenny give you? | A level/internal-id pair. | (10 177), corresponding to a level 10 Squirtle. | 1513 | F1A44-F1A45 | Which Pok\eacute{}mon does Officer Jenny give you? | A level/internal-id pair. | (10 177), corresponding to a level 10 Squirtle. |
1512 | F21BF-F21C0 | Which Pok\eacute{}mon does the salesman at the Mt. Moon Pok\eacute{}mon center give you? | A level/internal-id pair | (5 133), corresponding to a level 5 Magikarp. | 1514 | F21BF-F21C0 | Which Pok\eacute{}mon does the salesman at the Mt. Moon Pok\eacute{}mon center give you? | A level/internal-id pair | (5 133), corresponding to a level 5 Magikarp. |
1513 | | | 1515 | | | | |
1514 #+TBLFM: 1516 #+TBLFM:
1515 1517
1516 ** COMMENT 1518 ** COMMENT
1517 Locations where Give Pokemon is used in a nonstraightforward way 1519 Locations where Give Pokemon is used in a nonstraightforward way
1518 0x5287C 1520 0x5287C