• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM & Hex] Fixing the Lock-On/Mind Reader oversight in PokeCrystal?

130
Posts
8
Years
  • Age 28
  • Seen Jun 14, 2023
So I just got back to the hacking scene and I'm going back to PokeCrystal. It's kind of a special version for myself, but seeing as how other might want to do the same thing I'll post here for help. I want to fix as many bugs as I can. Some of them have already been given fixes using commented lines by the people who've given us PokeCrystal. Those are relatively simple ones. But I want to fix 90% of the bugs in the game, and I'm stuck on the Lock On & Mind Reader bug.

Here's what I've found so far (I could be wrong so please correct me if I am)

In pokecrystal\battle\moves\moves_effects.asm it gives us the steps to which mind reader and lock on work
checkobedience
usedmovetext
doturn
checkhit
lockon
endmove

Now that pretty much sets up the Locked On status.

I'll be using attract to start out with for the applicable moves.

In pokecrystal\battle\effects\attract.asm (the effects folder has most of the applicable moves separated) we find the asm related to how attract is executed. This is where I believe the bug comes into play.

At the first part of the asm, it basically figures out whether or not the move hits. And if you take a look, the only checks it does are to see if the opponent is the opposite gender (if it isn't it fails) and whether the opponent is hidden due to Fly or Dig (if it is, it fails). There's no check to see if lock on or mind reader has been used and no jump to where it executes if it is.

This is where I'm stumped. I've been looking around for a while, trying to find a call function that I can put between the gender check and the hidden check to make the engine check to see if the opponent has been locked on.

Or I could be wrong and it should be put before checking the gender, somewhere around the attack missed section.

Bleeeghh..... If someone wants to help me figure this out I would appreciate it. Or if you've already figured it out please let me know. Or if you've figured out how to fix other bugs that the people who brought us PokeCrystal haven't given a fix to please let me know.........

I'm just going to leave this here now.
 
Back
Top