Renamed EVO_DEFEAT_WITH_ITEM to EVO_DEFEAT_THREE_WITH_ITEM (#5046)

This commit is contained in:
Eduardo Quezada 2024-07-27 15:41:05 -04:00 committed by GitHub
parent 1e8773356c
commit bb471746d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 11 deletions

View file

@ -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_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_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_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 #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 // Evolution 'modes,' for GetEvolutionTargetSpecies

View file

@ -16948,7 +16948,7 @@ static void TryUpdateEvolutionTracker(u32 evolutionMethod, u32 upAmount, u16 use
val = 0; val = 0;
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_EVOLUTION_TRACKER, &val); SetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_EVOLUTION_TRACKER, &val);
break; 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) 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) && GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerTarget]], MON_DATA_HELD_ITEM) == evolutions[i].param)
SetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_EVOLUTION_TRACKER, &val); SetMonData(&gPlayerParty[gBattlerPartyIndexes[gBattlerAttacker]], MON_DATA_EVOLUTION_TRACKER, &val);
@ -16981,7 +16981,7 @@ void BS_TryUpdateRecoilTracker(void)
void BS_TryUpdateLeadersCrestTracker(void) void BS_TryUpdateLeadersCrestTracker(void)
{ {
NATIVE_ARGS(); NATIVE_ARGS();
TryUpdateEvolutionTracker(EVO_DEFEAT_WITH_ITEM, 1, MOVE_NONE); TryUpdateEvolutionTracker(EVO_DEFEAT_THREE_WITH_ITEM, 1, MOVE_NONE);
gBattlescriptCurrInstr = cmd->nextInstr; gBattlescriptCurrInstr = cmd->nextInstr;
} }

View file

@ -9863,7 +9863,7 @@ const struct SpeciesInfo gSpeciesInfoGen5[] =
) )
.levelUpLearnset = sBisharpLevelUpLearnset, .levelUpLearnset = sBisharpLevelUpLearnset,
.teachableLearnset = sBisharpTeachableLearnset, .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 #if P_GEN_9_CROSS_EVOS

View file

@ -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_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_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_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_OVERWORLD_STEPS[] = _("{LV}{UP_ARROW} after {STR_VAR_2} steps");
static const u8 sText_EVO_UNKNOWN[] = _("Method unknown"); static const u8 sText_EVO_UNKNOWN[] = _("Method unknown");
static const u8 sText_EVO_NONE[] = _("{STR_VAR_1} has no evolution."); static const u8 sText_EVO_NONE[] = _("{STR_VAR_1} has no evolution.");
@ -6629,11 +6629,11 @@ static void PrintEvolutionTargetSpeciesAndMethod(u8 taskId, u16 species, u8 dept
CopyItemName(item, gStringVar2); CopyItemName(item, gStringVar2);
StringExpandPlaceholders(gStringVar4, sText_EVO_ITEM_COUNT_999); StringExpandPlaceholders(gStringVar4, sText_EVO_ITEM_COUNT_999);
break; break;
case EVO_DEFEAT_WITH_ITEM: case EVO_DEFEAT_THREE_WITH_ITEM:
item = evolutions[i].param; item = evolutions[i].param;
CopyItemName(item, gStringVar2); CopyItemName(item, gStringVar2);
StringCopy(gStringVar3, GetSpeciesName(species)); StringCopy(gStringVar3, GetSpeciesName(species));
StringExpandPlaceholders(gStringVar4, sText_EVO_DEFEAT_WITH_ITEM); StringExpandPlaceholders(gStringVar4, sText_EVO_DEFEAT_THREE_WITH_ITEM);
break; break;
case EVO_OVERWORLD_STEPS: case EVO_OVERWORLD_STEPS:
ConvertIntToDecimalStringN(gStringVar2, evolutions[i].param, STR_CONV_MODE_LEADING_ZEROS, 4); ConvertIntToDecimalStringN(gStringVar2, evolutions[i].param, STR_CONV_MODE_LEADING_ZEROS, 4);

View file

@ -4704,7 +4704,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 mode, u16 evolutionItem, s
if (evolutionTracker >= evolutions[i].param && GetMonGender(mon) == MON_FEMALE) if (evolutionTracker >= evolutions[i].param && GetMonGender(mon) == MON_FEMALE)
targetSpecies = evolutions[i].targetSpecies; targetSpecies = evolutions[i].targetSpecies;
break; break;
case EVO_DEFEAT_WITH_ITEM: case EVO_DEFEAT_THREE_WITH_ITEM:
if (evolutionTracker >= 3) if (evolutionTracker >= 3)
targetSpecies = evolutions[i].targetSpecies; targetSpecies = evolutions[i].targetSpecies;
break; break;

View file

@ -116,9 +116,7 @@ TEST("No species has two evolutions that use the evolution tracker")
for (i = 0; evolutions[i].method != EVOLUTIONS_END; i++) for (i = 0; evolutions[i].method != EVOLUTIONS_END; i++)
{ {
if (evolutions[i].method == EVO_USE_MOVE_TWENTY_TIMES if (evolutions[i].method == EVO_USE_MOVE_TWENTY_TIMES
#ifdef EVO_DEFEAT_WITH_ITEM || evolutions[i].method == EVO_DEFEAT_THREE_WITH_ITEM
|| evolutions[i].method == EVO_DEFEAT_WITH_ITEM
#endif //EVO_DEFEAT_WITH_ITEM
) )
evolutionTrackerEvolutions++; evolutionTrackerEvolutions++;