Config to limit the moves called by Metronome (by generation)

This commit is contained in:
Eduardo Quezada 2022-09-16 11:04:30 -03:00
parent ed81ec41bc
commit 672f572ff8
2 changed files with 16 additions and 1 deletions

View file

@ -86,6 +86,7 @@
#define B_HEAL_BLOCKING GEN_LATEST // In Gen5+, Heal Block prevents healing by Black Sludge, Leftovers, Shell Bell. Affected Pokémon will not consume held HP-restoring Berries or Berry Juice.
// Draining abilities will not heal but will prevent damage. In Gen6+, Heal Block prevents the use of most HP-draining moves.
#define B_ROOTED_GROUNDING GEN_LATEST // In Gen4+, Ingrain causes the affected Pokémon to become grounded.
#define B_METRONOME_MOVES GEN_LATEST // This config will determine up to which generation will Metronome pull moves from.
// Ability settings
#define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters.

View file

@ -11472,9 +11472,23 @@ static void Cmd_mimicattackcopy(void)
static void Cmd_metronome(void)
{
#if B_METRONOME_MOVES >= GEN_8
u16 moveCount = MOVES_COUNT_GEN8;
#elif B_METRONOME_MOVES >= GEN_7
u16 moveCount = MOVES_COUNT_GEN7;
#elif B_METRONOME_MOVES >= GEN_6
u16 moveCount = MOVES_COUNT_GEN6;
#elif B_METRONOME_MOVES >= GEN_5
u16 moveCount = MOVES_COUNT_GEN5;
#elif B_METRONOME_MOVES >= GEN_4
u16 moveCount = MOVES_COUNT_GEN4;
#elif B_METRONOME_MOVES >= GEN_3
u16 moveCount = MOVES_COUNT_GEN3;
#endif
while (TRUE)
{
gCurrentMove = (Random() % (MOVES_COUNT - 1)) + 1;
gCurrentMove = (Random() % (moveCount - 1)) + 1;
if (gBattleMoves[gCurrentMove].effect == EFFECT_PLACEHOLDER)
continue;