GetSetPokedexCaughtFlag
This commit is contained in:
parent
6a65a7ba79
commit
790afb9460
12 changed files with 35 additions and 37 deletions
|
@ -2175,7 +2175,7 @@ static void TryAddPokeballIconToHealthbox(u8 healthboxSpriteId, bool8 noStatus)
|
||||||
battlerId = gSprites[healthboxSpriteId].hMain_Battler;
|
battlerId = gSprites[healthboxSpriteId].hMain_Battler;
|
||||||
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
if (GetBattlerSide(battlerId) == B_SIDE_PLAYER)
|
||||||
return;
|
return;
|
||||||
if (!GetSetPokedexFlag(SpeciesToNationalPokedexNum(GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES)), FLAG_GET_CAUGHT))
|
if (!GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(GetMonData(&gEnemyParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES)), FLAG_GET_CAUGHT))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
|
healthBarSpriteId = gSprites[healthboxSpriteId].hMain_HealthBarSpriteId;
|
||||||
|
|
|
@ -13970,7 +13970,7 @@ static void Cmd_handleballthrow(void)
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case ITEM_REPEAT_BALL:
|
case ITEM_REPEAT_BALL:
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species), FLAG_GET_CAUGHT))
|
||||||
#if B_REPEAT_BALL_MODIFIER >= GEN_7
|
#if B_REPEAT_BALL_MODIFIER >= GEN_7
|
||||||
ballMultiplier = 350;
|
ballMultiplier = 350;
|
||||||
#else
|
#else
|
||||||
|
@ -14232,7 +14232,7 @@ static void Cmd_trysetcaughtmondexflags(void)
|
||||||
u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_SPECIES, NULL);
|
u16 species = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_SPECIES, NULL);
|
||||||
u32 personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_PERSONALITY, NULL);
|
u32 personality = GetMonData(&gEnemyParty[gBattlerPartyIndexes[GetCatchingBattler()]], MON_DATA_PERSONALITY, NULL);
|
||||||
|
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,15 +65,15 @@ const u8 *GetPokedexRatingText(u16 count)
|
||||||
return gBirchDexRatingText_LessThan200;
|
return gBirchDexRatingText_LessThan200;
|
||||||
if (count == 200)
|
if (count == 200)
|
||||||
{
|
{
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT)
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT)
|
||||||
|| GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) // Jirachi or Deoxys is not counted towards the dex completion. If either of these flags are enabled, it means the actual count is less than 200.
|
|| GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) // Jirachi or Deoxys is not counted towards the dex completion. If either of these flags are enabled, it means the actual count is less than 200.
|
||||||
return gBirchDexRatingText_LessThan200;
|
return gBirchDexRatingText_LessThan200;
|
||||||
return gBirchDexRatingText_DexCompleted;
|
return gBirchDexRatingText_DexCompleted;
|
||||||
}
|
}
|
||||||
if (count == HOENN_DEX_COUNT - 1)
|
if (count == HOENN_DEX_COUNT - 1)
|
||||||
{
|
{
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT)
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT)
|
||||||
&& GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) // If both of these flags are enabled, it means the actual count is less than 200.
|
&& GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT)) // If both of these flags are enabled, it means the actual count is less than 200.
|
||||||
return gBirchDexRatingText_LessThan200;
|
return gBirchDexRatingText_LessThan200;
|
||||||
return gBirchDexRatingText_DexCompleted;
|
return gBirchDexRatingText_DexCompleted;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1560,7 +1560,7 @@ static void DeterminePokemonToShow(void)
|
||||||
// This basically packs all of the caught pokemon into the front of the array
|
// This basically packs all of the caught pokemon into the front of the array
|
||||||
for (dexNum = 1, j = 0; dexNum < NATIONAL_DEX_COUNT; dexNum++)
|
for (dexNum = 1, j = 0; dexNum < NATIONAL_DEX_COUNT; dexNum++)
|
||||||
{
|
{
|
||||||
if (GetSetPokedexFlag(dexNum, FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(dexNum, FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
sCreditsData->caughtMonIds[j] = dexNum;
|
sCreditsData->caughtMonIds[j] = dexNum;
|
||||||
j++;
|
j++;
|
||||||
|
|
|
@ -1465,10 +1465,9 @@ static void DebugAction_Flags_SetPokedexFlags(u8 taskId)
|
||||||
{
|
{
|
||||||
u16 i;
|
u16 i;
|
||||||
for (i = 0; i < NATIONAL_DEX_COUNT; i++)
|
for (i = 0; i < NATIONAL_DEX_COUNT; i++)
|
||||||
{
|
GetSetPokedexCaughtFlag(i + 1, FLAG_SET_CAUGHT);
|
||||||
GetSetPokedexFlag(i + 1, FLAG_SET_CAUGHT);
|
for (i = 0; i < NUM_SPECIES; i++)
|
||||||
GetSetPokedexFlag(i + 1, FLAG_SET_SEEN);
|
GetSetPokedexFlag(i + 1, FLAG_SET_SEEN);
|
||||||
}
|
|
||||||
Debug_DestroyMenu_Full(taskId);
|
Debug_DestroyMenu_Full(taskId);
|
||||||
ScriptContext_Enable();
|
ScriptContext_Enable();
|
||||||
}
|
}
|
||||||
|
@ -2726,7 +2725,7 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu
|
||||||
case MON_GIVEN_TO_PARTY:
|
case MON_GIVEN_TO_PARTY:
|
||||||
case MON_GIVEN_TO_PC:
|
case MON_GIVEN_TO_PC:
|
||||||
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
|
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(nationalDexNum, FLAG_SET_CAUGHT);
|
GetSetPokedexCaughtFlag(nationalDexNum, FLAG_SET_CAUGHT);
|
||||||
break;
|
break;
|
||||||
case MON_CANT_GIVE:
|
case MON_CANT_GIVE:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -372,9 +372,8 @@ static void AddHatchedMonToParty(u8 id)
|
||||||
GetSpeciesName(name, species);
|
GetSpeciesName(name, species);
|
||||||
SetMonData(mon, MON_DATA_NICKNAME, name);
|
SetMonData(mon, MON_DATA_NICKNAME, name);
|
||||||
|
|
||||||
species = SpeciesToNationalPokedexNum(species);
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(species, FLAG_SET_SEEN);
|
GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(species), FLAG_SET_CAUGHT);
|
||||||
GetSetPokedexFlag(species, FLAG_SET_CAUGHT);
|
|
||||||
|
|
||||||
GetMonNickname2(mon, gStringVar1);
|
GetMonNickname2(mon, gStringVar1);
|
||||||
|
|
||||||
|
|
|
@ -584,7 +584,7 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon *mon)
|
||||||
CalculatePlayerPartyCount();
|
CalculatePlayerPartyCount();
|
||||||
|
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_SEEN);
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_CAUGHT);
|
GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(gEvolutionTable[preEvoSpecies][1].targetSpecies), FLAG_SET_CAUGHT);
|
||||||
|
|
||||||
if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
if (GetMonData(shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA
|
||||||
&& GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
|
&& GetMonData(shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE
|
||||||
|
@ -776,7 +776,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||||
CalculateMonStats(mon);
|
CalculateMonStats(mon);
|
||||||
EvolutionRenameMon(mon, gTasks[taskId].tPreEvoSpecies, gTasks[taskId].tPostEvoSpecies);
|
EvolutionRenameMon(mon, gTasks[taskId].tPreEvoSpecies, gTasks[taskId].tPostEvoSpecies);
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_SEEN);
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_CAUGHT);
|
GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_CAUGHT);
|
||||||
IncrementGameStat(GAME_STAT_EVOLVED_POKEMON);
|
IncrementGameStat(GAME_STAT_EVOLVED_POKEMON);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1196,7 +1196,7 @@ static void Task_TradeEvolutionScene(u8 taskId)
|
||||||
CalculateMonStats(mon);
|
CalculateMonStats(mon);
|
||||||
EvolutionRenameMon(mon, gTasks[taskId].tPreEvoSpecies, gTasks[taskId].tPostEvoSpecies);
|
EvolutionRenameMon(mon, gTasks[taskId].tPreEvoSpecies, gTasks[taskId].tPostEvoSpecies);
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_SEEN);
|
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_CAUGHT);
|
GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(gTasks[taskId].tPostEvoSpecies), FLAG_SET_CAUGHT);
|
||||||
IncrementGameStat(GAME_STAT_EVOLVED_POKEMON);
|
IncrementGameStat(GAME_STAT_EVOLVED_POKEMON);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1934,7 +1934,7 @@ static void CheckBattleTypeFlag(void)
|
||||||
|
|
||||||
static u8 AppendCaughtBannedMonSpeciesName(u16 species, u8 count, s32 numBannedMonsCaught)
|
static u8 AppendCaughtBannedMonSpeciesName(u16 species, u8 count, s32 numBannedMonsCaught)
|
||||||
{
|
{
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
switch (count)
|
switch (count)
|
||||||
|
@ -2072,7 +2072,7 @@ static void CheckPartyIneligibility(void)
|
||||||
s32 species = gFrontierBannedSpecies[0];
|
s32 species = gFrontierBannedSpecies[0];
|
||||||
for (i = 0; species != 0xFFFF; i++, species = gFrontierBannedSpecies[i])
|
for (i = 0; species != 0xFFFF; i++, species = gFrontierBannedSpecies[i])
|
||||||
{
|
{
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(species), FLAG_GET_CAUGHT))
|
||||||
caughtBannedMons++;
|
caughtBannedMons++;
|
||||||
}
|
}
|
||||||
gStringVar1[0] = EOS;
|
gStringVar1[0] = EOS;
|
||||||
|
|
|
@ -2024,9 +2024,9 @@ static u8 GetPokedexRatingLevel(u16 numSeen)
|
||||||
if (numSeen < 200)
|
if (numSeen < 200)
|
||||||
return 19;
|
return 19;
|
||||||
|
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), FLAG_GET_CAUGHT))
|
||||||
numSeen--;
|
numSeen--;
|
||||||
if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), FLAG_GET_CAUGHT))
|
||||||
numSeen--;
|
numSeen--;
|
||||||
|
|
||||||
if (numSeen < 200)
|
if (numSeen < 200)
|
||||||
|
|
|
@ -340,7 +340,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
|
||||||
{
|
{
|
||||||
u16 pokedexNum = SpeciesToNationalPokedexNum(species);
|
u16 pokedexNum = SpeciesToNationalPokedexNum(species);
|
||||||
GetSetPokedexFlag(pokedexNum, FLAG_SET_SEEN);
|
GetSetPokedexFlag(pokedexNum, FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(pokedexNum, FLAG_SET_CAUGHT);
|
GetSetPokedexCaughtFlag(pokedexNum, FLAG_SET_CAUGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
heldItem = GetMonData(&gPlayerParty[PARTY_SIZE - 1], MON_DATA_HELD_ITEM);
|
heldItem = GetMonData(&gPlayerParty[PARTY_SIZE - 1], MON_DATA_HELD_ITEM);
|
||||||
|
|
|
@ -2211,7 +2211,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
temp_dexNum = HoennToNationalOrder(i + 1);
|
temp_dexNum = HoennToNationalOrder(i + 1);
|
||||||
sPokedexView->pokedexList[i].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[i].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[i].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN);
|
sPokedexView->pokedexList[i].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN);
|
||||||
sPokedexView->pokedexList[i].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT);
|
sPokedexView->pokedexList[i].owned = GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT);
|
||||||
if (sPokedexView->pokedexList[i].seen)
|
if (sPokedexView->pokedexList[i].seen)
|
||||||
sPokedexView->pokemonListCount = i + 1;
|
sPokedexView->pokemonListCount = i + 1;
|
||||||
}
|
}
|
||||||
|
@ -2228,7 +2228,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[r5].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[r5].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[r5].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN);
|
sPokedexView->pokedexList[r5].seen = GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN);
|
||||||
sPokedexView->pokedexList[r5].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT);
|
sPokedexView->pokedexList[r5].owned = GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT);
|
||||||
if (sPokedexView->pokedexList[r5].seen)
|
if (sPokedexView->pokedexList[r5].seen)
|
||||||
sPokedexView->pokemonListCount = r5 + 1;
|
sPokedexView->pokemonListCount = r5 + 1;
|
||||||
r5++;
|
r5++;
|
||||||
|
@ -2245,7 +2245,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT);
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].owned = GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT);
|
||||||
sPokedexView->pokemonListCount++;
|
sPokedexView->pokemonListCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2255,7 +2255,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
{
|
{
|
||||||
temp_dexNum = gPokedexOrder_Weight[i];
|
temp_dexNum = gPokedexOrder_Weight[i];
|
||||||
|
|
||||||
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||||
|
@ -2269,7 +2269,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
{
|
{
|
||||||
temp_dexNum = gPokedexOrder_Weight[i];
|
temp_dexNum = gPokedexOrder_Weight[i];
|
||||||
|
|
||||||
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||||
|
@ -2283,7 +2283,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
{
|
{
|
||||||
temp_dexNum = gPokedexOrder_Height[i];
|
temp_dexNum = gPokedexOrder_Height[i];
|
||||||
|
|
||||||
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||||
|
@ -2297,7 +2297,7 @@ static void CreatePokedexList(u8 dexMode, u8 order)
|
||||||
{
|
{
|
||||||
temp_dexNum = gPokedexOrder_Height[i];
|
temp_dexNum = gPokedexOrder_Height[i];
|
||||||
|
|
||||||
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
if (temp_dexNum <= NATIONAL_DEX_COUNT && (!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexCaughtFlag(temp_dexNum, FLAG_GET_CAUGHT))
|
||||||
{
|
{
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum;
|
||||||
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;
|
||||||
|
@ -4355,7 +4355,7 @@ u16 GetNationalPokedexCount(u8 caseID)
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
case FLAG_GET_CAUGHT:
|
case FLAG_GET_CAUGHT:
|
||||||
if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(i + 1, FLAG_GET_CAUGHT))
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4377,7 +4377,7 @@ u16 GetHoennPokedexCount(u8 caseID)
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
case FLAG_GET_CAUGHT:
|
case FLAG_GET_CAUGHT:
|
||||||
if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4399,7 +4399,7 @@ u16 GetKantoPokedexCount(u8 caseID)
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
case FLAG_GET_CAUGHT:
|
case FLAG_GET_CAUGHT:
|
||||||
if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
if (GetSetPokedexCaughtFlag(i + 1, FLAG_GET_CAUGHT))
|
||||||
count++;
|
count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4414,7 +4414,7 @@ bool16 HasAllHoennMons(void)
|
||||||
// -2 excludes Jirachi and Deoxys
|
// -2 excludes Jirachi and Deoxys
|
||||||
for (i = 0; i < HOENN_DEX_COUNT - 2; i++)
|
for (i = 0; i < HOENN_DEX_COUNT - 2; i++)
|
||||||
{
|
{
|
||||||
if (!GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
|
if (!GetSetPokedexCaughtFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -4427,7 +4427,7 @@ bool8 HasAllKantoMons(void)
|
||||||
// -1 excludes Mew
|
// -1 excludes Mew
|
||||||
for (i = 0; i < KANTO_DEX_COUNT - 1; i++)
|
for (i = 0; i < KANTO_DEX_COUNT - 1; i++)
|
||||||
{
|
{
|
||||||
if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
if (!GetSetPokedexCaughtFlag(i + 1, FLAG_GET_CAUGHT))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -4439,7 +4439,7 @@ bool16 HasAllMons(void)
|
||||||
|
|
||||||
for (i = 1; i < NATIONAL_DEX_COUNT + 1; i++)
|
for (i = 1; i < NATIONAL_DEX_COUNT + 1; i++)
|
||||||
{
|
{
|
||||||
if (!(gBaseStats[i].flags & SPECIES_FLAG_MYTHICAL) && !GetSetPokedexFlag(i, FLAG_GET_CAUGHT))
|
if (!(gBaseStats[i].flags & SPECIES_FLAG_MYTHICAL) && !GetSetPokedexCaughtFlag(i, FLAG_GET_CAUGHT))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u
|
||||||
case MON_GIVEN_TO_PARTY:
|
case MON_GIVEN_TO_PARTY:
|
||||||
case MON_GIVEN_TO_PC:
|
case MON_GIVEN_TO_PC:
|
||||||
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
|
GetSetPokedexFlag(nationalDexNum, FLAG_SET_SEEN);
|
||||||
GetSetPokedexFlag(nationalDexNum, FLAG_SET_CAUGHT);
|
GetSetPokedexCaughtFlag(nationalDexNum, FLAG_SET_CAUGHT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return sentToPc;
|
return sentToPc;
|
||||||
|
|
Loading…
Reference in a new issue