As for Fire Staff casting Gifoi, go to address $268F: you should see the value 01. That's the id for Foi. So change it to 02 (Gifoi). Do you want the addresses of where the functionality is implemented and where to change id values?
If you want to implement anything else, feel free to ask. I'll try and see if I can work it out. I'll post again if I find something odd, bugs and whatnot.
This is also Phantasy Star IV topic. I wish I could help out with that game as well, but before that, I wish I could also study PSIII code first, so it'll take a while.
A bit off-topic, but this reminds me... Even fedorajoe had some things he wanted to implement in his hack (PSII Modernization), like weapons with different techniques effects, shift cast on any party member, etc. Maybe he could take a look at this thread as well to check what's been found. Has he been around recently?