Vesly's ASM / C

Make Berserk not attack the same allegiance

PUSH 
ORG $39722 
SHORT $2100 
POP 

mGBA_lU3ib60mpQ
Note: Eirika moves towards enemies while O’Neill does not (because his ai2 is “do not attack” in the LOAD). Enemies no longer attack each other, too.

mGBA_FTdKn0lKb7

AiData 0x203AA04 + 0x7B u8 aiConfig; is normally set to 4 for Berserk phase and the 2 bitflag is removed partway through. All I did was change it to 0 instead of 4 and it seems to work so far. I’m not sure what the bitflags for aiConfig do.

Enjoy.

Edit: As a bonus, this treats all units that haven’t acted as Berserked:

PUSH 
ORG $397F6
SHORT $46C0 
POP 

You could make a turn event where if there are enemies alive, then automatically end the turn (so all units will be AI-controlled that turn). It can be called by doing ASMC 0x8022739

6 Likes