From 1f349e0fb9753f070bc6f0504b5ae1ea47fc1bc3 Mon Sep 17 00:00:00 2001 From: LOuroboros Date: Thu, 15 Feb 2024 11:22:25 -0300 Subject: [PATCH] Renamed NUM_ABILITY_VANILLA to NUM_ABILITY_PERSONALITY (#4196) --- include/constants/pokemon.h | 4 ++-- src/script_pokemon_util.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h index 49de31f1b3..186ef5de59 100644 --- a/include/constants/pokemon.h +++ b/include/constants/pokemon.h @@ -323,8 +323,8 @@ #define NUM_NORMAL_ABILITY_SLOTS 2 #define NUM_HIDDEN_ABILITY_SLOTS 1 -// Used as a signal for givemon to generate a default ability in the vanilla Pokémon Emerald way. -#define NUM_ABILITY_VANILLA 0xFF +// Used as a signal for givemon to generate a default ability by personality. +#define NUM_ABILITY_PERSONALITY 0xFF #define LEGENDARY_PERFECT_IV_COUNT 3 diff --git a/src/script_pokemon_util.c b/src/script_pokemon_util.c index 8ed44e8f59..358e02e5d9 100644 --- a/src/script_pokemon_util.c +++ b/src/script_pokemon_util.c @@ -345,7 +345,7 @@ u32 ScriptGiveMonParameterized(u16 species, u8 level, u16 item, u8 ball, u8 natu } // ability - if (abilityNum == NUM_ABILITY_VANILLA) + if (abilityNum == NUM_ABILITY_PERSONALITY) { abilityNum = GetMonData(&mon, MON_DATA_PERSONALITY) & 1; } @@ -414,7 +414,7 @@ u32 ScriptGiveMon(u16 species, u8 level, u16 item) MAX_PER_STAT_IVS + 1, MAX_PER_STAT_IVS + 1, MAX_PER_STAT_IVS + 1}; // ScriptGiveMonParameterized won't touch the stats' IV. u16 moves[MAX_MON_MOVES] = {MOVE_NONE, MOVE_NONE, MOVE_NONE, MOVE_NONE}; - return ScriptGiveMonParameterized(species, level, item, ITEM_POKE_BALL, NUM_NATURES, NUM_ABILITY_VANILLA, MON_GENDERLESS, evs, ivs, moves, FALSE, FALSE, NUMBER_OF_MON_TYPES); + return ScriptGiveMonParameterized(species, level, item, ITEM_POKE_BALL, NUM_NATURES, NUM_ABILITY_PERSONALITY, MON_GENDERLESS, evs, ivs, moves, FALSE, FALSE, NUMBER_OF_MON_TYPES); } #define PARSE_FLAG(n, default_) (flags & (1 << (n))) ? VarGet(ScriptReadHalfword(ctx)) : (default_) @@ -428,7 +428,7 @@ void ScrCmd_givemon(struct ScriptContext *ctx) u16 item = PARSE_FLAG(0, ITEM_NONE); u8 ball = PARSE_FLAG(1, ITEM_POKE_BALL); u8 nature = PARSE_FLAG(2, NUM_NATURES); - u8 abilityNum = PARSE_FLAG(3, NUM_ABILITY_VANILLA); + u8 abilityNum = PARSE_FLAG(3, NUM_ABILITY_PERSONALITY); u8 gender = PARSE_FLAG(4, MON_GENDERLESS); // TODO: Find a better way to assign a random gender. u8 hpEv = PARSE_FLAG(5, 0); u8 atkEv = PARSE_FLAG(6, 0);