mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
parent
4b64433816
commit
380af442c3
@ -181,6 +181,7 @@ void UndoMegaEvolution(u32 monId);
|
||||
void UndoFormChange(u32 monId, u32 side, bool32 isSwitchingOut);
|
||||
bool32 DoBattlersShareType(u32 battler1, u32 battler2);
|
||||
bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId);
|
||||
u32 GetIllusionMonSpecies(u32 battlerId);
|
||||
struct Pokemon *GetIllusionMonPtr(u32 battlerId);
|
||||
void ClearIllusionMon(u32 battlerId);
|
||||
bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId);
|
||||
|
@ -1149,7 +1149,9 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
|
||||
ClearTemporarySpeciesSpriteData(battlerId, dontClearSubstituteBit);
|
||||
gBattlerPartyIndexes[battlerId] = gBattleResources->bufferA[battlerId][1];
|
||||
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
species = GetIllusionMonSpecies(battlerId);
|
||||
if (species == SPECIES_NONE)
|
||||
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
gBattleControllerData[battlerId] = CreateInvisibleSpriteWithCallback(SpriteCB_WaitForBattlerBallReleaseAnim);
|
||||
BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId));
|
||||
|
@ -1177,7 +1177,9 @@ static void StartSendOutAnim(u8 battlerId, bool8 dontClearSubstituteBit)
|
||||
|
||||
ClearTemporarySpeciesSpriteData(battlerId, dontClearSubstituteBit);
|
||||
gBattlerPartyIndexes[battlerId] = gBattleResources->bufferA[battlerId][1];
|
||||
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
species = GetIllusionMonSpecies(battlerId);
|
||||
if (species == SPECIES_NONE)
|
||||
species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES);
|
||||
gBattleControllerData[battlerId] = CreateInvisibleSpriteWithCallback(SpriteCB_WaitForBattlerBallReleaseAnim);
|
||||
BattleLoadOpponentMonSpriteGfx(&gEnemyParty[gBattlerPartyIndexes[battlerId]], battlerId);
|
||||
SetMultiuseSpriteTemplateToPokemon(species, GetBattlerPosition(battlerId));
|
||||
|
@ -10266,6 +10266,14 @@ void ClearIllusionMon(u32 battlerId)
|
||||
memset(&gBattleStruct->illusion[battlerId], 0, sizeof(gBattleStruct->illusion[battlerId]));
|
||||
}
|
||||
|
||||
u32 GetIllusionMonSpecies(u32 battlerId)
|
||||
{
|
||||
struct Pokemon *illusionMon = GetIllusionMonPtr(battlerId);
|
||||
if (illusionMon != NULL)
|
||||
return GetMonData(illusionMon, MON_DATA_SPECIES);
|
||||
return SPECIES_NONE;
|
||||
}
|
||||
|
||||
bool32 SetIllusionMon(struct Pokemon *mon, u32 battlerId)
|
||||
{
|
||||
struct Pokemon *party, *partnerMon;
|
||||
|
Loading…
x
Reference in New Issue
Block a user