1 **********************************************************************
\r
3 **********************************************************************
\r
5 There are 224 enemies in Lufia 2. Most of their properties are stored
\r
6 in what I call the "Monster Compendium".
\r
8 -----------------------------------------------------------------------
\r
9 Monster data - the "Monster Compendium"
\r
10 -----------------------------------------------------------------------
\r
12 [$0B07C0 -> $0B097F]: pointers to data at [$0B0980]
\r
13 (2 bytes, little-endian (i.e. "least significant
\r
16 448 bytes => 224 pointers.
\r
17 Add $0B07C0 to the pointers to find the offsets
\r
18 of the Monster Compendium "entries".
\r
21 [$0B07C0 -> $0B07C1]: $C0 01
\r
23 => offset: $01C0 + $0B07C0 = $0B0980
\r
24 => The first Monster Compendium entry starts
\r
27 [$0B0980 -> $0B5168]: "Monster Compendium"
\r
31 [$0B09A5]: Armor goblin
\r
36 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
37 Format of the Monster Compendium entries:
\r
38 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
43 [+ 3 bytes for the pointer to the attack script]
\r
44 [+ 3 bytes for the pointer to the defense script]
\r
45 + 1 "end byte" ($00)
\r
46 [+ a variable number of bytes for the attack script]
\r
47 [+ a variable number of bytes for the defense script]
\r
50 ([+ ...] = optional)
\r
53 Start offset of the Monster Compendium entry:
\r
56 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
58 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
60 [+$0000 -> +$000C] (bytes 0 -> 12): Name of the monster
\r
65 $ 52 65 64 20 A4 65 6C 6C 79 20 20 20 20
\r
66 "R" "e" "d" " " "J" "e" "l" "l" "y" " " " " " " " "
\r
68 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
70 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
72 [+$000D] (byte 13) : Level
\r
74 [+$000E] (byte 14) : ???
\r
76 The use of this byte is unkown.
\r
79 $36 for 'Armor goblin' and 'Regal Goblin'
\r
80 $32 for all other monsters
\r
82 [+$000F] (byte 15) : Battle sprite
\r
84 There are 134 enemy battle sprites ($01 -> $86)
\r
86 [+$0010] (byte 16) : Palette for battle sprite
\r
90 Monster: Battle sprite number: Palette number:
\r
101 !!! This doesn't mean that 'Torrent', 'Red Jelly' and 'Tank'
\r
102 share the same palette (this is not the case).
\r
104 [+$0011 -> +$0012] (bytes 17 -> 18): Max HP
\r
106 2 bytes, little-endian.
\r
108 [+$0013 -> +$0014] (bytes 19 -> 20): Max MP
\r
110 2 bytes, little-endian.
\r
112 [+$0015 -> +$0016] (bytes 21 -> 22): ATP
\r
114 2 bytes, little-endian.
\r
116 [+$0017 -> +$0018] (bytes 23 -> 24): DFP
\r
118 2 bytes, little-endian.
\r
120 [+$0019] (byte 25) : AGL / 2
\r
122 [+$001A] (byte 26) : INT / 2
\r
124 [+$001B] (byte 27) : GUT / 2
\r
126 [+$001C] (byte 28) : MGR / 2
\r
128 [+$001D -> +$001E] (bytes 29 -> 30): EXP
\r
130 2 bytes, little-endian.
\r
132 [+$001F -> +$0020] (bytes 31 -> 32): GOLD
\r
134 2 bytes, little-endian.
\r
136 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
138 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
\r
140 If there's a $03 after the EXP and GOLD bytes (=> at offset [+$0021],
\r
141 it means that the enemy can drop an item.
\r
143 Format of the "gift bytes"
\r
146 (!!! this $03 is not the L2BASM opcode $03)
\r
148 $XX = the low byte of the item number
\r
150 $YY = high byte of the item number (always $00 or $01) + p
\r
152 p is a number related to the probability of getting
\r
153 the item, maybe probability * 4. It's always an even number.
\r
157 Gift bytes of the Vampire: $03 73 65
\r
159 => item number: $0173 (Bat rock)
\r
160 => p = $64 = 100 = 4 * 25
\r
161 => 25 % (?) chances that a defeated Vampire
\r
162 will drop a Bat rock
\r