Now for my most ambitious hack yet. Turning the Pray command into the Hunt command.
Now I absolutely love Final Fantasy Tactics and one of things I always thought was really neat in it was Poaching and the Fur Shop where you could use your ill-gotten gains to get powerful equipment.
So I thought "Why not add a similar thing to FFIV?"
Originally I scoffed at myself, but after completing the Barrage commands, I got to thinking that it Might be possible... so I wrote up a check list of what it would need.
Hunt Command - Can be used to automatically kill a Critical Beast and Obtain an Item
-Load Weapon Swing Animation
-Load Boss Byte (2770)
-If a Boss, branch to Fight Routine
-----------------------------
-Load Creature Type (2740)
-If Not Reptile branch to Fight Routine
-----------------------------------------
-Load Enemy's Status Byte 4. (2706)
-If Not Critical, branch to Fight Routine
------------------------------------------
- Jump to Steal Command Success (03E249)
- Place 80 in Status Byte 1 (Dead)
- Place 80 in Creature Type (Zombie, to prevent Revival)
- Jump to Return
-----------------------
- Jump to Fight Routine (03C499)
- Return
Not a very difficult thing to make work on paper. But is there enough room in Pray for this? Well only one way to find out...
Hunt Command
$03/E852 A9 C0 LDA #$C0 A:0003 X:0016 Y:0000 P:envMxdizc - Load Weapon Swing into A.
$03/E854 8D C4 33 STA $33C4 [$7E:33C4] A:00C0 X:0016 Y:0000 P:eNvMxdizc - Store A in Audiovisual Code
$03/E857 AD 40 27 LDA $2740 [$7E:2740] A:00C0 X:0016 Y:0000 P:eNvMxdizc - Load Creature Type into A.
$03/E85A C9 04 CMP #$04 A:0004 X:0016 Y:0000 P:envMxdizc - Is it Reptile?
$03/E85C D0 13 BNE $13 [$E871] A:0004 X:0016 Y:0000 P:envMxdiZC - If not branch to 03E871
---------------------------------------------
$03/E85E AD 06 27 LDA $2706 [$7E:2706] A:0004 X:0016 Y:0000 P:envMxdiZC - Load Creature Status Byte 4.
$03/E861 C9 01 CMP #$01 A:0001 X:0016 Y:0000 P:envMxdizC - Is it in Critical?
$03/E863 D0 0C BNE $0C [$E871] A:0001 X:0016 Y:0000 P:envMxdiZC - If not branch to 03E871.
---------------------------------------
$03/E865 20 49 E2 JSR $E3FF [$03:E3FF] A:0001 X:0016 Y:0000 P:envMxdiZC - Jump to Hunt Rewards Routine.
$03/E868 A9 7B LDA #$7B A:001D X:0008 Y:0002 P:envMxdizc - Load Vanish into A.
$03/E86A 8D D2 26 STA $26D2 [$7E:26D2] A:007B X:0008 Y:0002 P:envMxdizc - Store Vanish in Next Action to Take.
$03/E86D 4C 3E CD JMP $CD3E [$03:CD3E] A:007B X:0008 Y:0002 P:envMxdizc - Jump and Stay with Magic Call Routine
--------------------------------------------
$03/E871 4C 99 C4 JMP $C499 [$03:C499] A:0000 X:0016 Y:0000 P:eNvMxdizc - Jump and Stay with Fight Routine
And that's all it took! Granted I had to make a few concessions because of space and weirdness (apparently in "commands" you're unable to inflict status but you can in Spell Subroutines or Fight... go figure. I also had to get rid of the boss check, which means... well be careful with placing your boss Reptiles. Just be sure to give them another creature type in addition and that will send it down to the normal fight routine.
I would also ideally want the stealing procedure to be different so you would steal one item, while poaching another. Unfortunately that is currently not possible. You can steal what you poach and vice-versa. Now the game doesn't tell you what you've stolen, likely because those are programmed only to appear at the end of the Steal Routine, but you can see you have a new Item in the Item menu.
Note: In the pictures I use Imps changed to the Reptile Creature Type. So no worries there.



And that will do it! This is probably my favorite command I've created yet. I just need to differentiate it from Steal and it will be golden!
:edit:Updated with JSR to Hunt Rewards System.