mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Merge branch 'RHH/master' into RHH/upcoming
This commit is contained in:
commit
4bbb3a1e51
2
src/battle_anim_throw.c
Executable file → Normal file
2
src/battle_anim_throw.c
Executable file → Normal file
@ -2495,7 +2495,7 @@ void TryShinyAnimation(u8 battler, struct Pokemon *mon)
|
||||
otId = GetMonData(mon, MON_DATA_OT_ID);
|
||||
personality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
|
||||
if (IsBattlerSpriteVisible(battler))
|
||||
if (IsBattlerSpriteVisible(battler) && IsValidForBattle(mon))
|
||||
{
|
||||
shinyValue = GET_SHINY_VALUE(otId, personality);
|
||||
if (shinyValue < SHINY_ODDS)
|
||||
|
@ -1377,7 +1377,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
u8 battlerId = gTasks[taskId].tExpTask_battler;
|
||||
s32 gainedExp = GetTaskExpValue(taskId);
|
||||
|
||||
if (IsDoubleBattle() == TRUE || monId != gBattlerPartyIndexes[battlerId]) // Give exp without moving the expbar.
|
||||
if (WhichBattleCoords(battlerId) == 1 || monId != gBattlerPartyIndexes[battlerId]) // Give exp without moving the expbar.
|
||||
{
|
||||
struct Pokemon *mon = &gPlayerParty[monId];
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
|
@ -552,7 +552,7 @@ static void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battlerId, bool32 op
|
||||
if (illusionMon != NULL)
|
||||
mon = illusionMon;
|
||||
|
||||
if (GetMonData(mon, MON_DATA_IS_EGG)) // Don't load GFX of egg pokemon.
|
||||
if (GetMonData(mon, MON_DATA_IS_EGG) || GetMonData(mon, MON_DATA_SPECIES) == SPECIES_NONE) // Don't load GFX of egg pokemon.
|
||||
return;
|
||||
|
||||
monsPersonality = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
|
@ -4052,9 +4052,7 @@ static void Cmd_getexp(void)
|
||||
|
||||
for (viaSentIn = 0, i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES) == SPECIES_NONE || GetMonData(&gPlayerParty[i], MON_DATA_HP) == 0)
|
||||
continue;
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
|
||||
if (!IsValidForBattle(&gPlayerParty[i]))
|
||||
continue;
|
||||
if (gBitTable[i] & sentIn)
|
||||
viaSentIn++;
|
||||
@ -4145,8 +4143,7 @@ static void Cmd_getexp(void)
|
||||
gBattleStruct->wildVictorySong++;
|
||||
}
|
||||
|
||||
if (GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_HP)
|
||||
&& !GetMonData(&gPlayerParty[gBattleStruct->expGetterMonId], MON_DATA_IS_EGG))
|
||||
if (IsValidForBattle(&gPlayerParty[gBattleStruct->expGetterMonId]))
|
||||
{
|
||||
if (gBattleStruct->sentInPokes & 1)
|
||||
gBattleMoveDamage = *exp;
|
||||
|
@ -1254,8 +1254,9 @@ static void ApplyOffsetSpriteValues(struct PokemonDebugMenu *data)
|
||||
gSprites[data->backspriteId].y = DEBUG_MON_BACK_Y + gMonBackPicCoords[species].y_offset + data->offsetsSpriteValues.offset_back_picCoords;
|
||||
//Front
|
||||
gSprites[data->frontspriteId].y = GetBattlerSpriteFinal_YCustom(species, data->offsetsSpriteValues.offset_front_picCoords, data->offsetsSpriteValues.offset_front_elevation);
|
||||
//Shadow if one was added
|
||||
UpdateShadowSpriteInvisible(data);
|
||||
|
||||
if (data->currentSubmenu == 2)
|
||||
UpdateShadowSpriteInvisible(data);
|
||||
}
|
||||
|
||||
static void UpdateSubmenuOneOptionValue(u8 taskId, bool8 increment)
|
||||
|
@ -254,9 +254,7 @@ static void CreateBattlerSprite(u8 battler)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_HP) == 0)
|
||||
return;
|
||||
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_IS_EGG))
|
||||
if (!IsValidForBattle(&gPlayerParty[gBattlerPartyIndexes[battler]]))
|
||||
return;
|
||||
|
||||
SetMultiuseSpriteTemplateToPokemon(GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_SPECIES), GetBattlerPosition(battler));
|
||||
@ -309,7 +307,7 @@ static void CreateHealthboxSprite(u8 battler)
|
||||
}
|
||||
else if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI))
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_HP) == 0 || GetMonData(&gPlayerParty[gBattlerPartyIndexes[battler]], MON_DATA_IS_EGG))
|
||||
if (!IsValidForBattle(&gPlayerParty[gBattlerPartyIndexes[battler]]))
|
||||
SetHealthboxSpriteInvisible(healthboxSpriteId);
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void CB2_TestRunner(void)
|
||||
if (gTestRunnerState.test->runner->tearDown)
|
||||
gTestRunnerState.test->runner->tearDown(gTestRunnerState.test->data);
|
||||
|
||||
if (gTestRunnerState.result == gTestRunnerState.expectedResult
|
||||
if (gTestRunnerState.result == TEST_RESULT_PASS
|
||||
&& !gTestRunnerState.expectLeaks)
|
||||
{
|
||||
const struct MemBlock *head = HeapHead();
|
||||
|
Loading…
Reference in New Issue
Block a user