summaryrefslogtreecommitdiff
path: root/src/battle_util.c
diff options
context:
space:
mode:
authorDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-02-15 14:54:35 -0500
committerDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-02-15 14:54:35 -0500
commit7b2bf8c7e2249f66a04eabdbaeb2a8018855955f (patch)
treefd9c56262c4ef44569f313e5e067523a6a3546bf /src/battle_util.c
parentb89c3e901e1de2f3513d74fa548373d82d3f26d0 (diff)
Rename obedient/fatefulEncounter to eventLegal
Per discussion on pret, `obedient`/`fatefulEncounter` has been renamed to `eventLegal`, and all related functions and constants have been modified with this in mind. Additionally, fixed some whitespace alignment issues in `script_cmd_table.h`, `pokemon.h`, and `tv.c` from the last commit.
Diffstat (limited to 'src/battle_util.c')
-rw-r--r--src/battle_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/battle_util.c b/src/battle_util.c
index 7914356dc..2bf06f331 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -3949,14 +3949,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
return targetBattler;
}
-static bool32 IsNotEventMewOrDeoxys(u8 battlerId)
+static bool32 IsNotEventLegalMewOrDeoxys(u8 battlerId)
{
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
return TRUE;
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS
&& GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW)
return TRUE;
- return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_FATEFUL_ENCOUNTER, NULL);
+ return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL);
}
u8 IsMonDisobedient(void)
@@ -3970,7 +3970,7 @@ u8 IsMonDisobedient(void)
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
return 0;
- if (IsNotEventMewOrDeoxys(gBattlerAttacker)) // only if species is Mew or Deoxys
+ if (IsNotEventLegalMewOrDeoxys(gBattlerAttacker)) // only if species is Mew or Deoxys
{
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2)
return 0;