Update battle_script_commands.c

Included src/battle_util.c to call IsMoveMakingContact
This commit is contained in:
MissingNoL 2021-06-05 16:43:19 -07:00 committed by GitHub
parent 921b80de7c
commit d69cfcff70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@
#include "constants/rgb.h"
#include "data.h"
#include "constants/party_menu.h"
#include "src/battle_util.c"
extern struct MusicPlayerInfo gMPlayInfo_BGM;
@ -4708,7 +4709,7 @@ static void Cmd_moveend(void)
switch (gBattleScripting.moveendState)
{
case MOVEEND_PROTECT_LIKE_EFFECT:
if (gBattleMoves[gCurrentMove].flags & FLAG_MAKES_CONTACT) // needs to be IsMoveMakingContact, but this file does not reference include/battle_util.h or src/battle_util.c
if (IsMoveMakingContact(move, gBattlerAttacker))
{
if (gProtectStructs[gBattlerTarget].spikyShielded && GetBattlerAbility(gBattlerAttacker) != ABILITY_MAGIC_GUARD)
{