The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




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

#1
Posts: 22
Threads: 11
Thanks Received: 0
Thanks Given: 0
Joined: May 2019
Reputation: 2
Status
None
Hi everyone! Long time no see!

My thief character for my hack is looking to add a Poach command to his arsenal. My plan is to use Metamorph (Ragnarok's esper spell) as the command. I'd like to make it so the command checks how many remaining HP the target has, and fail if it is not below a certain threshold. The threshold can be a set value (seems a lot easier than using a percentage). How/where can I add that check? Here's what the vanilla C2 disassembly has for us:

Code:
Metamorph

C2/3A3C: C0 08        CPY #$08       (Checks if target is monster)
C2/3A3E: 90 4A        BCC $3A8A      (branch if not)
C2/3A40: B9 94 3C     LDA $3C94,Y    (Metamorph info: Morph chance in bits 5-7,
                                     and Morph pack in bits 0-4)
C2/3A43: 48           PHA
C2/3A44: 29 1F        AND #$1F       (isolate pack #)
C2/3A46: 20 53 4B     JSR $4B53      (Random number 0 or 1)
C2/3A49: 2A           ROL
C2/3A4A: 20 53 4B     JSR $4B53      (Random number 0 or 1)
C2/3A4D: 2A           ROL
C2/3A4E: AA           TAX            (now we have the Metamorph pack # in bits 2-6,
                                     and a random 0-3 index into that pack in bits 0-1)
C2/3A4F: BF 40 7F C4  LDA $C47F40,X  (get the item we're attempting to Metamorph
                                     the enemy into)
C2/3A53: 8D 35 2F     STA $2F35      (save it in message parameter 1, bottom byte)
C2/3A56: A9 02        LDA #$02
C2/3A58: 8D 28 3A     STA $3A28      (temporary byte 1 for ($76) animation buffer)
C2/3A5B: A9 1D        LDA #$1D
C2/3A5D: 8D 29 3A     STA $3A29      (temporary byte 2 for ($76) animation buffer)
C2/3A60: 20 BE 35     JSR $35BE      (Update a previous entry in ($76) animation buffer
                                     with data in $3A28 - $3A2B)
C2/3A63: 20 AD 35     JSR $35AD      (Write data in $B4 - $B7 to current slot in ($76)
                                     animation buffer, and point $3A71 to this slot)
C2/3A66: 68           PLA
C2/3A67: 4A           LSR
C2/3A68: 4A           LSR
C2/3A69: 4A           LSR
C2/3A6A: 4A           LSR
C2/3A6B: 4A           LSR            (isolate 0-7 Metamorph Chance index)
C2/3A6C: AA           TAX            (copy it to X)
C2/3A6D: 20 5A 4B     JSR $4B5A      (Random number 0 to 255)
C2/3A70: DF C5 3D C2  CMP $C23DC5,X  (compare to actual Metamorph Chance)
C2/3A74: B0 14        BCS $3A8A      (if greater than or equal, branch and fail to
                                     Metamorph)
C2/3A76: A3 05        LDA $05,S
C2/3A78: AA           TAX
C2/3A79: AD 35 2F     LDA $2F35      (get ID of Metamorphed item)
C2/3A7C: 9D F4 32     STA $32F4,X    (save it in this character's
                                     "Item to add to inventory" variable)
C2/3A7F: BD 18 30     LDA $3018,X
C2/3A82: 0C 8C 3A     TSB $3A8C      (flag this character to have their inventory
                                     variable checked when the turn ends)
C2/3A85: A9 80        LDA #$80
C2/3A87: 4C 32 0E     JMP $0E32      (Mark death status to be set)
C2/3A8A: 4C 1B 3B     JMP $3B1B      (flag Miss message)

Any suggestions would be greatly appreciated. Thanks!
  Find
Quote  



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