1002
« on: March 10, 2008, 10:16:00 PM »
the instruction at C2/1897 is what enables "Ignore Damage Modification", which causes target (Magic) Defense and random variance to be skipped in the damage calculation. you can't get rid of the instruction entirely, because it'll screw up plain Items too -- e.g. Tonic will no longer do the guaranteed 50 healing. instead, you only want it to be executed conditionally.
it's sort of messy to handle. as the comments indicate, 4 different types of attacks use the function: normal Items, Item magic, Tools, and Skeans (the last two enter at C2/189E rather than the top). my best stab at it is to zap the "STZ $3414" at the start of the function, then add this code after the C2/18BF instruction:
BCS tool_or_skean (branch if command # >=2. iow, it's not 1.)
STZ $3414 (it's a plain Item, so Set ignore damage modification)
tool_or_skean:
of course, you'll need to find some free ROM space (unless you come up with a way to shave 2 bytes from this function), and you'll need to shift around code and adjust at least one branch. that is, if you go with this approach of moderating damage.
EDIT: i typoed. C2/189F corrected to C2/18BF.