I'm not familiar with Fire Emblem, but you could just loop through all the tiles surrounding the enemy to check if the player is there. If the player is within range, store the player's coordinates and use some basic algebra to figure out what direction to move towards. Hopefully this is somewhat helpful; if you could describe the movement style more I might be able to come up with something more specific