diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-03-18 13:14:08 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-03-18 13:14:08 -0400 |
commit | c779411957262dc5971813a3f75d157190d9db51 (patch) | |
tree | 7022ca6bee723c3ff0bfffe5425e7a787cf83a2f /src | |
parent | d86c9b097628577e91a6ab5b0609fa61790945a2 (diff) |
Sync EVO_MODE consts from emerald
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_main.c | 2 | ||||
-rw-r--r-- | src/party_menu.c | 6 | ||||
-rw-r--r-- | src/pokemon.c | 12 | ||||
-rw-r--r-- | src/trade_scene.c | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/src/battle_main.c b/src/battle_main.c index 14e44cb45..af2a02c52 100644 --- a/src/battle_main.c +++ b/src/battle_main.c @@ -3791,7 +3791,7 @@ static void TryEvolvePokemon(void) levelUpBits &= ~(gBitTable[i]); gLeveledUpInBattle = levelUpBits; - species = GetEvolutionTargetSpecies(&gPlayerParty[i], EVOTRIGGER_LEVEL_UP, levelUpBits); + species = GetEvolutionTargetSpecies(&gPlayerParty[i], EVO_MODE_NORMAL, levelUpBits); if (species != SPECIES_NONE) { gBattleMainFunc = WaitForEvoSceneToFinish; diff --git a/src/party_menu.c b/src/party_menu.c index 740667980..e521484e0 100644 --- a/src/party_menu.c +++ b/src/party_menu.c @@ -855,7 +855,7 @@ static bool8 DisplayPartyPokemonDataForMoveTutorOrEvolutionItem(u8 slot) DisplayPartyPokemonDataToTeachMove(slot, item, 0); break; case 2: // Evolution stone - if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVOTRIGGER_STONE_2, item) != SPECIES_NONE) + if (!GetMonData(currentPokemon, MON_DATA_IS_EGG) && GetEvolutionTargetSpecies(currentPokemon, EVO_MODE_ITEM_CHECK, item) != SPECIES_NONE) return FALSE; DisplayPartyPokemonDescriptionData(slot, PARTYBOX_DESC_NO_USE); break; @@ -5197,7 +5197,7 @@ static void Task_TryLearningNextMove(u8 taskId) static void PartyMenuTryEvolution(u8 taskId) { struct Pokemon *mon = &gPlayerParty[gPartyMenu.slotId]; - u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVOTRIGGER_LEVEL_UP, 0); + u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_NORMAL, 0); if (targetSpecies != SPECIES_NONE) { @@ -5353,7 +5353,7 @@ static void sub_8126BD4(void) static bool8 MonCanEvolve(void) { if (!IsNationalPokedexEnabled() - && GetEvolutionTargetSpecies(&gPlayerParty[gPartyMenu.slotId], EVOTRIGGER_STONE, gSpecialVar_ItemId) > KANTO_DEX_COUNT) + && GetEvolutionTargetSpecies(&gPlayerParty[gPartyMenu.slotId], EVO_MODE_ITEM_USE, gSpecialVar_ItemId) > KANTO_DEX_COUNT) return FALSE; else return TRUE; diff --git a/src/pokemon.c b/src/pokemon.c index ae95cab41..d2135b4ed 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -4259,7 +4259,7 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov break; case 7: // EVO_STONE { - u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVOTRIGGER_STONE, item); + u16 targetSpecies = GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item); if (targetSpecies != SPECIES_NONE) { @@ -4623,7 +4623,7 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo } break; case 7: - if (GetEvolutionTargetSpecies(mon, EVOTRIGGER_STONE, item) != SPECIES_NONE) + if (GetEvolutionTargetSpecies(mon, EVO_MODE_ITEM_USE, item) != SPECIES_NONE) return FALSE; break; } @@ -4905,7 +4905,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) switch (type) { - case EVOTRIGGER_LEVEL_UP: + case EVO_MODE_NORMAL: level = GetMonData(mon, MON_DATA_LEVEL, 0); friendship = GetMonData(mon, MON_DATA_FRIENDSHIP, 0); @@ -4970,7 +4970,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) } } break; - case EVOTRIGGER_TRADE: + case EVO_MODE_TRADE: for (i = 0; i < 5; i++) { switch (gEvolutionTable[species][i].method) @@ -4993,8 +4993,8 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) } } break; - case EVOTRIGGER_STONE: - case EVOTRIGGER_STONE_2: + case EVO_MODE_ITEM_USE: + case EVO_MODE_ITEM_CHECK: for (i = 0; i < 5; i++) { if (gEvolutionTable[species][i].method == EVO_ITEM diff --git a/src/trade_scene.c b/src/trade_scene.c index 37550dc09..b259ba939 100644 --- a/src/trade_scene.c +++ b/src/trade_scene.c @@ -1725,7 +1725,7 @@ static bool8 DoTradeAnim_Cable(void) case 72: // Only if in-game trade TradeMons(gSpecialVar_0x8005, 0); gCB2_AfterEvolution = CB2_RunTradeAnim_InGameTrade; - evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[0]], EVOTRIGGER_TRADE, ITEM_NONE); + evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[0]], EVO_MODE_TRADE, ITEM_NONE); if (evoTarget != SPECIES_NONE) { TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[0]], evoTarget, sTradeData->pokePicSpriteIdxs[1], gSelectedTradeMonPositions[0]); @@ -2246,7 +2246,7 @@ static bool8 DoTradeAnim_Wireless(void) case 72: // Only if in-game trade TradeMons(gSpecialVar_0x8005, 0); gCB2_AfterEvolution = CB2_RunTradeAnim_InGameTrade; - evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[0]], EVOTRIGGER_TRADE, ITEM_NONE); + evoTarget = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[0]], EVO_MODE_TRADE, ITEM_NONE); if (evoTarget != SPECIES_NONE) { TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[0]], evoTarget, sTradeData->pokePicSpriteIdxs[1], gSelectedTradeMonPositions[0]); @@ -2290,7 +2290,7 @@ static void sub_8053788(void) break; case 4: gCB2_AfterEvolution = sub_8053E8C; - evoSpecies = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[0]], EVOTRIGGER_TRADE, 0); + evoSpecies = GetEvolutionTargetSpecies(&gPlayerParty[gSelectedTradeMonPositions[0]], EVO_MODE_TRADE, 0); if (evoSpecies != SPECIES_NONE) TradeEvolutionScene(&gPlayerParty[gSelectedTradeMonPositions[0]], evoSpecies, sTradeData->pokePicSpriteIdxs[1], gSelectedTradeMonPositions[0]); else |