Oh! I-in that case, then... what you said! Sorry for the misunderstanding...
Welp... I've really gone and messed up this time. (Or done something
at least.) LINK: Spellcasting Functions
That's not even half a Document yet, but it may give all of us an idea of what it takes, to explain the most important algorithms in this game!
Note that this is mostly a copy/paste from the "Documentation" that I've mentioned several times, a copy of which someone gave to me. Because this person asked me not to, I am not at liberty to say their name, but this "Documentation" is the disassembly, and analysis, that I'm getting a lot of concrete info from. Maybe Enker and Regrs gave up their sanity for these documents, since it seems as though nobody has had any contact with them, publically. Not in this thread, anyway.
As mentioned prior, Regrs may not be active right now on these boards. zhaDe, who has also seen and expanded upon them, does still have his Account here. But he might be working on another project, or taking a break from ROMhacking. I don't know...
The spell functions may not be in such need of spelling out, with the custom script for altering them in zhaDe/Queue's ZPS file being up and running, but working on it is getting me all pumped up for the Monster/Boss AI Documents. So that's alright then...
I'm still working on it right now. You can go there and see my cursor hovering around somewhere, if you have time...
Shucks, 'tweren't no big thing! Seriously though, you're very welcome.
It might be... that my second version of the Petrify tweak made the monsters unkillable, due to 100 points being quite a high boost to Defence (or Mag. Def. as the case may be). In the first version, multiplying Defence by 2 would only help the monsters with a non-zero Defence to start with (and a non-zero Evade%). Only very few of them have high Defence, high Mag. Def. is a little more common than that. An example would be the Nitro Pumpkins and Shapeshifters. Both of them eg. have a high Defence to go with their 99 Evade%, making Moon Energy more attractive for "whacking" them, har har.
The damage/effect of most things in the battle system is basically "TempAttPwr" - "TempDefPwr", just with a whole lotta steps taken to calculate each of those. Soooo... if the latter is high enough, the damage/effect will be either 1 or 0. 1 if it's Magic-based, 0 if it's Weapon-based. That's my only hypothesis right now, as nothing else I can think of, would be making Petrified targets suddenly be temporarily immortal.
Hope you are still enjoying the ROMhacking studies... cheers!