Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed EVO_DEFEAT_WITH_ITEM to EVO_DEFEAT_THREE_WITH_ITEM #5046

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/constants/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
#define EVO_RECOIL_DAMAGE_MALE 48 // Pokémon levels up after having suffered specified amount of non-fainting recoil damage as a male
#define EVO_RECOIL_DAMAGE_FEMALE 49 // Pokémon levels up after having suffered specified amount of non-fainting recoil damage as a female
#define EVO_ITEM_COUNT_999 50 // Pokémon levels up after trainer has collected 999 of a specific item
#define EVO_DEFEAT_WITH_ITEM 51 // Pokémon levels up after having defeat 3 Pokémon of the same species holding the specified item
#define EVO_DEFEAT_THREE_WITH_ITEM 51 // Pokémon levels up after having defeat 3 Pokémon of the same species holding the specified item
#define EVO_OVERWORLD_STEPS 52 // Pokémon levels up after having taken a specific amount of steps in the overworld (or as the party lead if OW_FOLLOWERS_ENABLED is FALSE) without switching

// Evolution 'modes,' for GetEvolutionTargetSpecies
Expand Down
4 changes: 2 additions & 2 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -16948,7 +16948,7 @@ static void TryUpdateEvolutionTracker(u32 evolutionMethod, u32 upAmount, u16 use
val = 0;
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_EVOLUTION_TRACKER, &val);
break;
case EVO_DEFEAT_WITH_ITEM:
case EVO_DEFEAT_THREE_WITH_ITEM:
if (GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_SPECIES) == GetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_SPECIES)
&& GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_HELD_ITEM) == evolutions[i].param)
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_EVOLUTION_TRACKER, &val);
Expand Down Expand Up @@ -16981,7 +16981,7 @@ void BS_TryUpdateRecoilTracker(void)
void BS_TryUpdateLeadersCrestTracker(void)
{
NATIVE_ARGS();
TryUpdateEvolutionTracker(EVO_DEFEAT_WITH_ITEM, 1, MOVE_NONE);
TryUpdateEvolutionTracker(EVO_DEFEAT_THREE_WITH_ITEM, 1, MOVE_NONE);
gBattlescriptCurrInstr = cmd->nextInstr;
}

Expand Down
2 changes: 1 addition & 1 deletion src/data/pokemon/species_info/gen_5_families.h
Original file line number Diff line number Diff line change
Expand Up @@ -9863,7 +9863,7 @@ const struct SpeciesInfo gSpeciesInfoGen5[] =
)
.levelUpLearnset = sBisharpLevelUpLearnset,
.teachableLearnset = sBisharpTeachableLearnset,
.evolutions = EVOLUTION({EVO_DEFEAT_WITH_ITEM, ITEM_LEADERS_CREST, SPECIES_KINGAMBIT}),
.evolutions = EVOLUTION({EVO_DEFEAT_THREE_WITH_ITEM, ITEM_LEADERS_CREST, SPECIES_KINGAMBIT}),
},

#if P_GEN_9_CROSS_EVOS
Expand Down
6 changes: 3 additions & 3 deletions src/pokedex_plus_hgss.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static const u8 sText_EVO_USE_MOVE_TWENTY_TIMES[] = _("{LV}{UP_ARROW} after 20x
static const u8 sText_EVO_RECOIL_DAMAGE_MALE[] = _("{LV}{UP_ARROW} with {STR_VAR_2} recoil, male");
static const u8 sText_EVO_RECOIL_DAMAGE_FEMALE[] = _("{LV}{UP_ARROW} with {STR_VAR_2} recoil, female");
static const u8 sText_EVO_ITEM_COUNT_999[] = _("{LV}{UP_ARROW} with 999 {STR_VAR_2} in bag");
static const u8 sText_EVO_DEFEAT_WITH_ITEM[] = _("{LV}{UP_ARROW} defeating {STR_VAR_3} holding {STR_VAR_2}");
static const u8 sText_EVO_DEFEAT_THREE_WITH_ITEM[] = _("{LV}{UP_ARROW} defeating 3 {STR_VAR_3} holding {STR_VAR_2}");
static const u8 sText_EVO_OVERWORLD_STEPS[] = _("{LV}{UP_ARROW} after {STR_VAR_2} steps");
static const u8 sText_EVO_UNKNOWN[] = _("Method unknown");
static const u8 sText_EVO_NONE[] = _("{STR_VAR_1} has no evolution.");
Expand Down Expand Up @@ -6629,11 +6629,11 @@ static void PrintEvolutionTargetSpeciesAndMethod(u8 taskId, u16 species, u8 dept
CopyItemName(item, gStringVar2);
StringExpandPlaceholders(gStringVar4, sText_EVO_ITEM_COUNT_999);
break;
case EVO_DEFEAT_WITH_ITEM:
case EVO_DEFEAT_THREE_WITH_ITEM:
item = evolutions[i].param;
CopyItemName(item, gStringVar2);
StringCopy(gStringVar3, GetSpeciesName(species));
StringExpandPlaceholders(gStringVar4, sText_EVO_DEFEAT_WITH_ITEM);
StringExpandPlaceholders(gStringVar4, sText_EVO_DEFEAT_THREE_WITH_ITEM);
break;
case EVO_OVERWORLD_STEPS:
ConvertIntToDecimalStringN(gStringVar2, evolutions[i].param, STR_CONV_MODE_LEADING_ZEROS, 4);
Expand Down
2 changes: 1 addition & 1 deletion src/pokemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -4704,7 +4704,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
if (evolutionTracker >= evolutions[i].param && GetMonGender(mon) == MON_FEMALE)
targetSpecies = evolutions[i].targetSpecies;
break;
case EVO_DEFEAT_WITH_ITEM:
case EVO_DEFEAT_THREE_WITH_ITEM:
if (evolutionTracker >= 3)
targetSpecies = evolutions[i].targetSpecies;
break;
Expand Down
4 changes: 1 addition & 3 deletions test/species.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ TEST("No species has two evolutions that use the evolution tracker")
for (i = 0; evolutions[i].method != EVOLUTIONS_END; i++)
{
if (evolutions[i].method == EVO_USE_MOVE_TWENTY_TIMES
#ifdef EVO_DEFEAT_WITH_ITEM
|| evolutions[i].method == EVO_DEFEAT_WITH_ITEM
#endif //EVO_DEFEAT_WITH_ITEM
|| evolutions[i].method == EVO_DEFEAT_THREE_WITH_ITEM
)
evolutionTrackerEvolutions++;

Expand Down
Loading