From 5592706a71170cb8064de999ff5f82ba0b0b6f47 Mon Sep 17 00:00:00 2001 From: Bassoonian Date: Mon, 23 Oct 2023 17:59:07 +0200 Subject: [PATCH] Fix Synchronize devnote + Gen9 behaviour --- include/config/battle.h | 2 +- src/wild_encounter.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/config/battle.h b/include/config/battle.h index aee79daee..5ce2e4f9f 100644 --- a/include/config/battle.h +++ b/include/config/battle.h @@ -115,7 +115,7 @@ #define B_SHADOW_TAG_ESCAPE GEN_LATEST // In Gen4+, if both sides have a Pokémon with Shadow Tag, all battlers can escape. Before, neither side could escape this situation. #define B_MOODY_ACC_EVASION GEN_LATEST // In Gen8, Moody CANNOT raise Accuracy and Evasion anymore. #define B_FLASH_FIRE_FROZEN GEN_LATEST // In Gen5+, Flash Fire can trigger even when frozen, when it couldn't before. -#define B_SYNCHRONIZE_NATURE GEN_LATEST // In Gen8, if a Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same ability, as opposed to 50% previously. +#define B_SYNCHRONIZE_NATURE GEN_LATEST // In Gen8, if a Pokémon with Synchronize is leading the party, it's 100% guaranteed that wild Pokémon will have the same Nature, as opposed to 50% previously. In Gen9, it has no out-of-battle effect. #define B_SYNCHRONIZE_TOXIC GEN_LATEST // In Gen5+, if a Pokémon with Synchronize is badly poisoned, the opponent will also become badly poisoned. Previously, the opponent would become regular poisoned. #define B_UPDATED_INTIMIDATE GEN_LATEST // In Gen8, Intimidate doesn't work on opponents with the Inner Focus, Scrappy, Own Tempo or Oblivious abilities. It also activates Rattled. #define B_OBLIVIOUS_TAUNT GEN_LATEST // In Gen6+, Pokémon with Oblivious can't be taunted. diff --git a/src/wild_encounter.c b/src/wild_encounter.c index 6016e08e6..5ea88f4c4 100644 --- a/src/wild_encounter.c +++ b/src/wild_encounter.c @@ -415,6 +415,7 @@ static u8 PickWildMonNature(void) } } } +#if B_SYNCHRONIZE_NATURE < GEN_9 // check synchronize for a pokemon with the same ability if (!GetMonData(&gPlayerParty[0], MON_DATA_SANITY_IS_EGG) && GetMonAbility(&gPlayerParty[0]) == ABILITY_SYNCHRONIZE @@ -425,6 +426,7 @@ static u8 PickWildMonNature(void) { return GetMonData(&gPlayerParty[0], MON_DATA_PERSONALITY) % NUM_NATURES; } +#endif // random nature return Random() % NUM_NATURES;