Made 12 patches. One of them lets you change the allegiance of the demon king summons, and other 11 let you change the targetting of status staves, restore, warp, rescue, and hammerne.
Demon King Summons Allegiance
Change 0x7B2E8 to 0 for playable, 2 for NPC, 4 for Enemy (default value) or 6 for Fourth Allegiance (requires the patch with the same name to work, otherwise it’ll summon nothing)

Staff targetting
There are 11 patches so I’ll just link a .7z file with all of them. https://cdn.discordapp.com/attachments/470029781795078175/1105388951461691484/StaffTargettingPatches.7z



EDIT: Made an ASMC, called CUSF. It changes a unit into the 4th allegiance (like CUSA, CUSE, and CUSN). Put the unit you want to change in Slot1 and call CUSF.
CUSF
.align 4
.macro blh to, reg=r3
ldr \reg, =\to
mov lr, \reg
.short 0xf800
.endm
@author = Shuusuke
.thumb
.equ MemorySlot0, 0x30004B8 @FE8U
@.equ MemorySlot0, 0x30004B8 @FE8J
.equ GetUnitByEventParameter, 0x800bc50
.equ HandleAllegianceChange, 0x08018430 @FE8U
@.equ HandleAllegianceChange, 0x08018144 @FE8J
@s1 = unit
push {r4,lr}
ldr r4,=MemorySlot0
ldr r0,[r4,#0x4]
blh GetUnitByEventParameter
mov r1,#0xC0
blh HandleAllegianceChange
blh 0x0801a1f4 @RefreshFogAndUnitMaps {U}
blh 0x080271a0 @SMS_UpdateFromGameData {U}
blh 0x08019c3c @UpdateGameTilesGraphics {U}
POP {r4}
POP {r0}
BX r0

