While poking through btCalcDmg.p, I came up with the following technical notes regarding the game's battle system and thought I'd share.
- Anyone having max vitality in hard mode adds 10 to their attack power when attacking and subtracts 10 from their attacker's attack power when being attacked. Vitality maxes out at 100, though I have no stats regarding how fast it goes up as of yet.
- Also in hard mode only, if certain characters are 1 tile away from an other character, they gain a 25% increase to their attack and defense before applying elemental affinities. These characters are any of the six girls (Doriy and Guraa clearly refer to themselves as men in the game, therefore they are not included) around Hakuoro, Doriy/Guraa around Oboro, and four other characters around one other (IDs 1A/1B/1C/1D around 13. Your guess is as good as mine.)
- Attacks can specify elements, otherwise they default to the character's. Oddly enough, the game seems to ignore entirely all elements other than the four "base" elements. This means light and dark have absolutely no impact on one another (unless there are other damage calculations elsewhere; seems odd to me though); I gather the PS2 version doesn't do this but then again it's an almost completely different battle engine... Anyhow.
Basically, elements offer a 20% bonus/penalty after character proximity bonuses are applied.
- Healing works as follows: (Attack * (100 + Lv * 10) * X) / 10000 (X is the ability's power after all modifiers are applied to it. Seems to be maybe 100-ish for Eruru's healing?) Caps at the difference between the target's max and current HP.
- With 2000 or more defense, damage is always 0. The physical damage formula is ((Attack * (100 + Lv * 10) * X) / 100 - (TargetDefense * TargetLv) / 3) / 100, where 'X' is the same as above (dunno what the value is though). Caps down to 1, up to the difference between the target's max and current HP.
- Levels cap at 99. Whoever ID 81 is, they don't gain levels unless in Hard Mode 4 or 5. Exp: Lv * (100 + (Lv - 1) * 10) HP: (X * 1000 + X * 200 * (Lv - 1)) / 1000, dunno what 'X' is (maybe some "HP growth" stat). "Something" gets counted each level up in Hard Mode. Not sure what.
Might stumble on more stuff later... Much of this is uncertain and depends on my proper interpretation of the bytecode making up the battle system's scripts, so take this info with a grain of salt.