Is the damage type whether physical or magical determined by the formula itself or by the AI behavior Flag in FFTP?In order to change whether an ability is effected by attack/defense up or magic attack/defense up,do you have to change the formula itself?
Nevermind,i think its determind by the XA and MA in the formula
It's the other way around. A formula is really a small program that runs upon skill use (and prediction). Whether Attack Up affects the damage depends on whether the formula's code decides to check for it.
Formula 4E (http://ffhacktics.com/wiki/4E_Dmg_%28MA*Y%29) (Fire Bracelet, etc.) calls "Truth/Formula 5E-5F Magical damage (http://ffhacktics.com/wiki/Truth/Formula_5E-5F_Magical_damage)":
0018a440: 0c062259 jal 0x 00188964 Truth/Formula 5E-5F Magical damage
which calls "Magical Support/Status/Compat (http://ffhacktics.com/wiki/Magical_Support/Status/Compat)":
00188974: 0c0621d1 jal 0x00188744 Magical Support/Status/Compat
which calls functions adjusting for supports and Shell:
0018874c: 0c061881 jal 0x00186204 Magic Attack Up routine
00188750: 00000000 nop
00188754: 0c0618c7 jal 0x0018631c Magic Defense Up routine
00188758: 00000000 nop
0018875c: 0c061918 jal 0x00186460 Target's Status Affecting XA (Magical)