Want FE7’s weapon effectiveness to be x3 like FE8? Never fear!
(This routine is at 028B3E…)
Use this instead
29 1C 5A 31 01 28 07 D1 30 88 EE F7 34 FB 0A 88 XX 20 50 43 08 80 C0 46
,
Edit yet again: 29 1C 5A 31 01 28 07 D1 30 78 C0 46 C0 46 0A 88 XX 20 50 43 08 80 C0 46
where XX is the effectiveness factor
As before, if you want some different half-factor, like 2.5x, then replace the XX 20 50 43 08 80 C0 46
with XX 20 50 43 40 10 08 80
Where XX is effectiveness2
(This can also be done with quarter-factors, like 2.75x, but go compile that on your own. asr by 2 instead of 1 and use effectiveness4)
Also, I wanted this to be as flexible as possible, but if you’re into ASM-ing, you can find a smarter way than a mul command. Like for x3, just lsr by 1 and add. Anyway, the source code is yours to mess with.
[source code][1]
[dump file][2]
[1]: Dropbox - Error - Simplify your life
[2]: Dropbox - Error - Simplify your life
WAIT I SPOKE TOO SOON
Those two commands aren’t unnecessary, but they’re called in both cases of a branch, so I can shift them to being done before the branch. Same solution, but a bit more code.
I’m leaving it here for the documentation, however.
Original:
@r2 holds the attack
lsl r0, r2, #0x1
strh r0, [r1]
@two unnecessary commands
@
into a
mov r0, #EFFECTIVENESS
mul r0, r2
strh r0, [r1]
nop @do nothing to let the number of commands line up
How do we do that?
at 028B4E you’ll see50 00 08 80 29 1C 5A 31
Change that intoXX 20 50 43 08 80 C0 46
,
where XX is how many times you want the effectiveness to be. (e.g. 03 for FE8 style 3x effectiveness)
Also, if you want something weird like 2.5 times effectiveness, we can put that extra instruction to good use by right shifting by 2. Namely,
mov r0, #EFFECTIVENESS*2
mul r0, r2
asr r0, #0x1
strh r0, [r1]
Which is
XX 20 50 43 40 10 08 80
Where XX is effectiveness*2, 05 in this case.
Edit: Prettifying the formatting.