PokéBase - Pokémon Q&A
1 vote

When the player uses Shedinja against an NPC, it seems that they'll switch their Pokemon if the active Pokemon can't hit Shedinja but a teammate can. In addition to super effective attacks, they seem to recognize leech seed as "can hit Shedinja", but not stuff like swagger and hail. Which other damaging status moves are also recognized as "can't hit Shedinja" by NPCs? Please answer for every generation when Shedinja existed.

Edit: I already got a lot of detailed responses about how Pokemon AI works, but stuff like, "A gym leader, elite 4 member, maybe an ace trainer, etc would have a higher level" doesn't answer my question. I still don't really know what "higher level" means, or why it lets them recognize leech seed but not hail.

closed with the note: Very trivial and finding an answer would take too much work for what it's worth.
closed by
I think you are ForretressExplosioning his/her/its mind.
Based on rom hack editing, you can adjust how optimally the AI plays against the player, so the game makes decisions based mostly on type advantage, remaining HP, the moves it has listed, etc.

It's not necessarily that it recognizes what can and can't hit shedinja, but how wisely the opponent thinks based on difficulty. A youngster or generic trainer like that might have a lower setting, so that's why they use tail whip or something on you when you're low HP and could just win but don't. A gym leader, elite 4 member, maybe an ace trainer, etc would have a higher level. It's basically a general way of attacking that works well, but can have varied results when you have more complex Pokemon abilities or situations like Shedinja, Zoroark, etc.
In the example in my question, the leech seed and swagger were both known by Sidney's Pokemon in Emerald, and Sidney would use leech seed on my Shedinja but not swagger. I don't think it's likely that Sidney was using different "wisdom levels" when using different Pokemon. Can you explain that?
She had the 'wisdom' to recognize that Leech Seed would work but not Swagger, likely because Swagger doesn't immediately or isn't 100% certain to beat Shedninja unlike Leech Seed
@PX That's exactly the answer I was looking for, but for status moves in general.