[FE7] Fix for calculated Might on AI

This patch will make the enemies consider your STR/MAG bonus for the weapon.

Download (using STR as MAG)
Download (using RES as MAG)

And this is the code (Not a source code since I’m not using any assembler)

00	B40C	push r2,r3
01	0600	lsl r0,r0,0x18
02	0E00	lsr r0,r0,0x18
03	00C1	lsl r1,r0,0x03
04	1840	r0 = r0 + r1
05	0080	lsl r0,r0,0x02
06	490A	r1 = 08BE222C
07	1843	r3 = r0 + r1
08	68DA	ldr r2(r3,0x0C)
09	7A18	ldrb r0(r3,0x08)
10	2146	r1 = 0x46
11	4001	r1 = r1 and r0
12	7E58	ldrb r0(r3,0x19)
13	2900	cmp r1,0x00
14	D100	bne #16
15	3200	r2 = r2 + 0x00 //Change into 0x04 if MAG = RES
16	2A05	cmp r2,0x05
17	DB01	blt #20
18	7852	ldrb r2(r2,0x01)
19	1880	r0 = r0 + r2
20	4548	cmp r0,r9
21	DD01	ble #24
22	46A0	r8 = r4
23	4681	r9 = r0
24	BC0C	pop r2,r3
25	4902	r1 = 0803945B
26	4708	bx r1
27	0000	----
28	222C	08BE222C
29	08BE	
30	945B	0803945B
31	0803	

What offset is the code at?

At 08039444.

One other thing, I actually meant not just str/mag bonuses, but all bonuses totaled. If a weapon gives +25 SKL, and it’s equal to another weapon in every way (Except the SKL bonus giving it more hit/critrate) the enemy will not notice the SKL bonus. Same for a weapon that gives the enemy +25 DEF and would make them invincible if they attacked with it. Thing is, I’d like enemies to note all bonuses a weapon has attached so they can make smarter decisions based on the weapon bonuses.

In any case though, this is a great code. I’ll add it ingame and see how it works for me.