RNGesus has not forgiven my sins yet

It’s because NPC trainers have a team accuracy parameter while players don’t; players individual mons and attacks have accuracy parameters but the entire team doesn’t. When calculating accuracy when each individual move is used, even if it calculates a miss for the NPC’s mon itself, team accuracy is the last calculation before the NPC’s attack is called out on-screen, and if it rolls a hit for the team accuracy calculation the move will hit. This has been how NPC accuracy has worked since Gen I. Sub-100 accuracy moves are generally 3% to 12% likelier to hit when used by an NPC versus a player. NPC trainers mons usually don’t have OHKO moves for this reason.

Gen I missing is well-known but a lesser-known 1/256 hit in similar circumstances is also possible, it’s just very difficult to spot because you can very really tell. I believe it can be manipulated into happening by switching out into moves a mon is immune to that the NPC would prioritize, like STAB or priority moves (I.e. switching to Gengar on Quick Attack or Alakazam on Night Shade). I’ve never personally tried this but it might be an interesting experiment.

/r/stunfisk Thread Link - i.redd.it