Users browsing this thread: 1 Guest(s)
Bugfix: Ignore Charm 1.0.1
Drakkhen's Ignore Charm patch is pretty neat since it fixes one of the ultimate cheese moves, Gau's Nightshade Rage. What it does is makes Charm miss if the target is immune to Muddle. Or, that's what it intended to do, but it does in fact do the opposite: makes Charm miss on vulnerable targets, and allows it on protected ones.
I've dissected his code and come up with a bugfix. Open up a hex editor, navigate to C2/67CD and change the "D0" to an "F0". It seems Drakkhen got misled by the fact that status immunities in $331D,index are signified by a bit being cleared, not set.
My commented disassembly of his code follows. I'm very happy that so many hackers these days release asm code patches, or at least documentation, instead of just providing .ips files. It saves a lot of time. ;[
I've dissected his code and come up with a bugfix. Open up a hex editor, navigate to C2/67CD and change the "D0" to an "F0". It seems Drakkhen got misled by the fact that status immunities in $331D,index are signified by a bit being cleared, not set.
My commented disassembly of his code follows. I'm very happy that so many hackers these days release asm code patches, or at least documentation, instead of just providing .ips files. It saves a lot of time. ;[
Code:
C2/67C0: A3 05 LDA $05,S
C2/67C2: AA TAX
C2/67C3: BD 94 33 LDA $3394,X
C2/67C6: 10 10 BPL return ;(Miss if attacker already charmed a target)
C2/67C8: B9 1D 33 LDA $331D,Y
C2/67CB: 89 20 BIT #$20 ;(Is Muddle blocked?)
C2/67CD: D0 09 BNE miss ;(Miss if it isn't)
--------------------------------------------------------------------------------
Fixed:
C2/67CD: F0 09 BEQ miss ;(Miss if it is)
;(In $331D,index, blocked status is
signified by bit = 0)
--------------------------------------------------------------------------------
C2/67CF: 98 TYA
C2/67D0: 9D 94 33 STA $3394,X ;(Attacker data: save which target they charmed)
C2/67D3: 8A TXA
C2/67D4: 99 95 33 STA $3395,Y ;(Target data: save who has charmed them)
return:
C2/67D7: 60
miss:
C2/67D8: 4C 75 3C JMP $3C75 ;Makes attack miss
C2/3C91: 20 C0 67 JSR $67C0
C2/3C94: 60 RTS
C2/3C95: EA NOP
C2/3C96: EA NOP
C2/3C97: EA NOP
C2/3C98: EA NOP
C2/3C99: EA NOP
C2/3C9A: EA NOP
C2/3C9B: EA NOP
C2/3C9C: EA NOP
C2/3C9D: EA NOP
C2/3C9E: EA NOP
C2/3C9F: EA NOP
C2/3CA0: EA NOP
C2/3CA1: EA NOP
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)