Users browsing this thread: 1 Guest(s)
Changing physical damage calculations?
05-11-2012, 11:06 PM
(05-11-2012, 09:32 PM)Marketa Lazarova Wrote: I'm not quite sure what it is, in the "2x damage against humans" code that actually points to the "human" status, if any.
Code:
C2/38F2: B9 95 3C LDA $3C95,Y (load special byte 3)
C2/38F5: 89 10 BIT #$10 (check if target is human)
C2/38F7: F0 04 BEQ $38FD (Exit if target not human)
C2/38F9: E6 BC INC $BC
C2/38FB: E6 BC INC $BC (Double damage dealt)
C2/38FD: 60 RTS
It'S the BIT #$10 that checks for that. First the special byte 3 is loaded from the RAM. Here what is on special byte 3:
Code:
$3C95 : Special Byte 3 (Bit 0 = Dies at 0 MP, 1 = ???, 2 = No name, 3 = ???
4 = Human, 5 = ???, 6 = Auto critical if Imp, 7 = Undead)
So it's bit 4 (00001000) which equal 16 (#$10). You could check anything else on that byte. To check bit 0 you would do a BIT #$01, bit 1 you do a BIT #$02, bit 2 you do a BIT #$04 and so on...
Now you would need to find the RAM byte which contain you status (which I haven't found) and replace the byte number (LDA $3C95,Y).
I have a thread with the RAM info I collected: https://www.ff6hacking.com/forums/showth...p?tid=1408
You could have a look at it.
Edit: I was looking way too far. the status you are looking for is bit 0 on special byte 3.
You can also check for any of 2 status which would leave the 2x human damage. (bit 0 + bit 4 = 16+1 = #$11)
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)