Sync pokemon.c
This commit is contained in:
@@ -2105,15 +2105,15 @@ static void BufferMonInfo(void)
|
||||
return;
|
||||
}
|
||||
|
||||
sMonSummaryScreen->monTypes[0] = gBaseStats[dexNum].type1;
|
||||
sMonSummaryScreen->monTypes[1] = gBaseStats[dexNum].type2;
|
||||
sMonSummaryScreen->monTypes[0] = gSpeciesInfo[dexNum].types[0];
|
||||
sMonSummaryScreen->monTypes[1] = gSpeciesInfo[dexNum].types[1];
|
||||
|
||||
GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_NICKNAME, tempStr);
|
||||
StringCopyN_Multibyte(sMonSummaryScreen->summary.nicknameStrBuf, tempStr, POKEMON_NAME_LENGTH);
|
||||
StringGet_Nickname(sMonSummaryScreen->summary.nicknameStrBuf);
|
||||
|
||||
gender = GetMonGender(&sMonSummaryScreen->currentMon);
|
||||
dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
|
||||
dexNum = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
|
||||
|
||||
if (gender == MON_FEMALE)
|
||||
StringCopy(sMonSummaryScreen->summary.genderSymbolStrBuf, gText_FemaleSymbol);
|
||||
@@ -2224,7 +2224,7 @@ static void BufferMonSkills(void)
|
||||
if (level < 100)
|
||||
{
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES);
|
||||
expToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - exp;
|
||||
expToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - exp;
|
||||
}
|
||||
|
||||
ConvertIntToDecimalStringN(sMonSummaryScreen->summary.expToNextLevelStrBuf, expToNextLevel, STR_CONV_MODE_LEFT_ALIGN, 7);
|
||||
@@ -2646,7 +2646,7 @@ static void PokeSum_PrintTrainerMemo_Mon_HeldByOT(void)
|
||||
// but Japanese uses different grammar for Bold and Gentle natures.
|
||||
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // Hatched
|
||||
{
|
||||
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter
|
||||
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
|
||||
{
|
||||
if (PokeSum_IsMonBoldOrGentle(nature))
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_FatefulEncounterHatched_BoldGentleGrammar);
|
||||
@@ -2743,7 +2743,7 @@ static void PokeSum_PrintTrainerMemo_Mon_NotHeldByOT(void)
|
||||
// but Japanese uses different grammar for Bold and Gentle natures.
|
||||
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MET_LEVEL) == 0) // hatched from an EGG
|
||||
{
|
||||
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1) // Fateful encounter
|
||||
if (GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
|
||||
{
|
||||
if (PokeSum_IsMonBoldOrGentle(nature))
|
||||
DynamicPlaceholderTextUtil_ExpandPlaceholders(natureMetOrHatchedAtLevelStr, gText_PokeSum_ApparentlyFatefulEncounterHatched_BoldGentleGrammar);
|
||||
@@ -2797,7 +2797,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void)
|
||||
|
||||
if (sMonSummaryScreen->monList.mons != gEnemyParty)
|
||||
{
|
||||
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1)
|
||||
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
|
||||
chosenStrIndex = 4;
|
||||
else
|
||||
{
|
||||
@@ -2815,7 +2815,7 @@ static void PokeSum_PrintTrainerMemo_Egg(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_EVENT_LEGAL) == 1)
|
||||
if (metLocation == METLOC_FATEFUL_ENCOUNTER || GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_MODERN_FATEFUL_ENCOUNTER) == TRUE)
|
||||
chosenStrIndex = 4;
|
||||
else
|
||||
{
|
||||
@@ -4014,7 +4014,7 @@ static void PokeSum_CreateMonPicSprite(void)
|
||||
|
||||
sMonPicBounceState = AllocZeroed(sizeof(struct MonPicBounceState));
|
||||
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
|
||||
personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY);
|
||||
trainerId = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_OT_ID);
|
||||
|
||||
@@ -4142,7 +4142,7 @@ static void PokeSum_CreateMonIconSprite(void)
|
||||
u16 species;
|
||||
u32 personality;
|
||||
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
|
||||
personality = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_PERSONALITY);
|
||||
|
||||
SafeLoadMonIconPalette(species);
|
||||
@@ -4178,7 +4178,7 @@ static void PokeSum_ShowOrHideMonIconSprite(bool8 invisible)
|
||||
static void PokeSum_DestroyMonIconSprite(void)
|
||||
{
|
||||
u16 species;
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2);
|
||||
species = GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG);
|
||||
SafeFreeMonIconPalette(species);
|
||||
DestroyMonIcon(&gSprites[sMonSummaryScreen->monIconSpriteId]);
|
||||
}
|
||||
@@ -4622,8 +4622,8 @@ static void UpdateExpBarObjs(void)
|
||||
|
||||
if (level < 100)
|
||||
{
|
||||
totalExpToNextLevel = gExperienceTables[gBaseStats[species].growthRate][level + 1] - gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
curExpToNextLevel = exp - gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
totalExpToNextLevel = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
curExpToNextLevel = exp - gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
pointsPerTile = ((totalExpToNextLevel << 2) / 8);
|
||||
totalPoints = (curExpToNextLevel << 2);
|
||||
|
||||
@@ -5183,9 +5183,9 @@ static void PokeSum_TryPlayMonCry(void)
|
||||
if (!GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_IS_EGG))
|
||||
{
|
||||
if (ShouldPlayNormalMonCry(&sMonSummaryScreen->currentMon) == TRUE)
|
||||
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_NORMAL);
|
||||
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_NORMAL);
|
||||
else
|
||||
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES2), 0, CRY_MODE_WEAK);
|
||||
PlayCry_ByMode(GetMonData(&sMonSummaryScreen->currentMon, MON_DATA_SPECIES_OR_EGG), 0, CRY_MODE_WEAK);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user