Closed tech-ticks closed 5 months ago
I took a quick look, it looks like the return value is not used when this function is called for the player or the enemies, but it is checked after executing the action of an ally. If the result is true, the AI is run again for the current ally, and it performs another action. This can happen up to three times. Quite interesting.
Thanks!
ExecuteMonsterAction
is supposed to have a return value, which became apparent after trying to hook calls to this function via a wrapper with avoid
return type and watching every Pokémon attack three times in a row. The actual return value seems to be abool
because either 0 or 1 are moved into r0 before the function returns.