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.
This commit is contained in:
Deokishisu
2021-02-15 14:54:35 -05:00
parent b89c3e901e
commit 7b2bf8c7e2
18 changed files with 70 additions and 70 deletions

View File

@@ -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;