Users browsing this thread: 1 Guest(s)
Looking for a Poach Command

#2
Posts: 377
Threads: 34
Thanks Received: 10
Thanks Given: 7
Joined: Dec 2018
Reputation: 18
Status
Moog
Poach? Like, poaching an egg?

Huh, doesn't matter.

The success/fail check in the code you shared is between C2/3A67 and C2/3A74... it checks certain bits in the A that's restored from earlier and then decides to skip the actual transformation code if the roll fails. This'd be where you want to start; you'll want to change it to check something else instead of rolling.

A good place to start might be checking if the monster has the "Near Fatal" status, and using that as the success condition. The game already has code in place to set/remove Near Fatal when a target is at 1/8th HP.
That has the advantage of being relatively simple to implement. You load Status Byte 2 relative to the target "Y" (that's RAM address $3EE5 I think), run a bit test for bit 2 (that's the Near Fatal status), and then branch accordingly. A BEQ command will skip code if the bit is clear, which is what you'd want.

My best guess (untested)...
Code:
B9 E5 3E       LDA $3EE5,Y
89 02            BIT $#02
F0 ??            BEQ skip ?? bytes to go to exit at C2/3A8A, if bit 2 was clear

or

B9 E5 3E       LDA $3EE5,Y
89 02            BIT $#02
D0 03            BNE skip next line if bit 2 was set
4C 76 3A       JMP $3A76       Continue Metamorph code
4C 1B 3B       JMP $3B1B       or mark as a miss

Both will fit in line, but I'm wary of the relative value load to A after the branch in the original code, since I don't understand what it does.
Try it, but I give no guarantees.

Using Near Fatal as the failure condition does have the disadvantage of being tied to the status, though... which means if you want to tweak the proportion of HP that makes the move work, you're also tweaking when Desperation Attacks become available and when character animate as 'hurt'.
  Find
Quote  
[-] The following 1 user says Thank You to C-Dude for this post:
  • Morendo (09-03-2020)



Messages In This Thread
Looking for a Poach Command - by Morendo - 09-02-2020, 10:40 PM
RE: Looking for a Poach Command - by C-Dude - 09-02-2020, 11:38 PM
RE: Looking for a Poach Command - by Morendo - 09-03-2020, 01:02 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite