Rename eventLegal to fatefulEncounter

This commit is contained in:
Eduardo Quezada
2023-02-11 17:13:53 -03:00
parent c32fbf594a
commit 6da5e0a280
17 changed files with 56 additions and 56 deletions

View File

@@ -3885,14 +3885,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
return targetBattler;
}
static bool32 IsMonEventLegal(u8 battlerId)
static bool32 IsBattlerFatefulEncounter(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_EVENT_LEGAL, NULL);
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_FATEFUL_ENCOUNTER, NULL);
}
u8 IsMonDisobedient(void)
@@ -3906,7 +3906,7 @@ u8 IsMonDisobedient(void)
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
return 0;
if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys
if (IsBattlerFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys
{
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2)
return 0;