pret / pokecrystal

Disassembly of Pokémon Crystal
https://pret.github.io/pokecrystal/
2.07k stars 778 forks source link

Fixed the wrong CheckHiddenOpponent bugfix #1046

Closed DamienDoury closed 1 year ago

DamienDoury commented 1 year ago

The old bugfix caused more bugs than it fixed. It allowed the moves that called CheckHiddenOpponent to always hit in the semi-invulnerable turn of Fly and Dig, regardless of the Lock-On state of the opponent.

The new check accounts for the Lock-On state of the opponent, and reinstates the vanilla code that checked for the Flying and Underground states of the opponent.