Skip to content

Commit

Permalink
update shiny data for battle mons (#4788)
Browse files Browse the repository at this point in the history
  • Loading branch information
DizzyEggg authored Jun 13, 2024
1 parent 2b64546 commit 8ff1cbe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/battle_controllers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,7 @@ static u32 GetBattlerMonData(u32 battler, struct Pokemon *party, u32 monId, u8 *
battleMon.abilityNum = GetMonData(&party[monId], MON_DATA_ABILITY_NUM);
battleMon.otId = GetMonData(&party[monId], MON_DATA_OT_ID);
battleMon.metLevel = GetMonData(&party[monId], MON_DATA_MET_LEVEL);
battleMon.isShiny = GetMonData(&party[monId], MON_DATA_IS_SHINY);
GetMonData(&party[monId], MON_DATA_NICKNAME, nickname);
StringCopy_Nickname(battleMon.nickname, nickname);
GetMonData(&party[monId], MON_DATA_OT_NAME, battleMon.otName);
Expand Down
1 change: 1 addition & 0 deletions src/battle_gfx_sfx_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ void BattleLoadMonSpriteGfx(struct Pokemon *mon, u32 battler)
if (B_TRANSFORM_SHINY >= GEN_4)
{
currentPersonality = gTransformedPersonalities[battler];
isShiny = gTransformedShininess[battler];
}
else
{
Expand Down
1 change: 1 addition & 0 deletions src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -3394,6 +3394,7 @@ void PokemonToBattleMon(struct Pokemon *src, struct BattlePokemon *dst)
dst->type1 = gSpeciesInfo[dst->species].types[0];
dst->type2 = gSpeciesInfo[dst->species].types[1];
dst->type3 = TYPE_MYSTERY;
dst->isShiny = IsMonShiny(src);
dst->ability = GetAbilityBySpecies(dst->species, dst->abilityNum);
GetMonData(src, MON_DATA_NICKNAME, nickname);
StringCopy_Nickname(dst->nickname, nickname);
Expand Down

0 comments on commit 8ff1cbe

Please sign in to comment.