From 416fef2914ea3e0adef520c372334f9380ac52d6 Mon Sep 17 00:00:00 2001 From: JabLuszko Date: Sun, 24 Nov 2024 16:52:46 +0100 Subject: [PATCH] Filter out Mighty/Strong mons from Ditto detection logic Mighty/Strong mons have crazy levels (> 30, up to 50 in local in-person events) and some of those triggered Ditto check for "too high level for no weatherboost". --- mapadroid/utils/gamemechanicutil.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mapadroid/utils/gamemechanicutil.py b/mapadroid/utils/gamemechanicutil.py index 8d5edf4ed..782aec2d3 100644 --- a/mapadroid/utils/gamemechanicutil.py +++ b/mapadroid/utils/gamemechanicutil.py @@ -262,6 +262,9 @@ def form_mapper(mon_id, form_id): def is_mon_ditto_raw(pokemon_data: pogoprotos.PokemonProto): logger.debug3('Determining if mon is a ditto') logger.debug4(pokemon_data) + if pokemon_data.pokemon_display.is_strong_pokemon: + logger.debug3('Strong/Mighty mon, skipping ditto check') + return False weather_boost = pokemon_data.pokemon_display.weather_boosted_condition valid_atk = pokemon_data.individual_attack < 4 valid_def = pokemon_data.individual_defense < 4