How to make a direction of the first node in finding a path

I’m making a Turn-based Game and I’ve found a thing to change in pathfinding

I want to raise a priority depending on moving direction of a player when monsters decide their path from startPath.

   *         Z
   *         |
   *         |
   *
   *      6  2  5
   *       \ | /
   * --  3 - X - 1  ----- X
   *       / | \
   *      7  0  4
   *
   *         |
   *         |

Seeing the related post on ‘GridGenerator.cs’, I understood about moving of Path but I don’t know how to do what I want.

Is there any easy way to do this?

one monster(the left one) has two choice alternatives to go, to the right and above, but he always goes to the right regardless of player because the system has its fixed priority(down, right, above, left).
I want to fix this to make the monster decide his way depeding on a player’s choice.(If the player goes to the right, then the monster goes to the right also and if the player goes above, then the monster goes above)

I enclosed an image to make this clear.

Hm…
First, make sure the player IS NOT an obstacle in the graph (during movement you may then have to make sure that the path doesn’t lead the character right in to the player).
I think you should be able to get the desired result by offsetting the target position of the path by a small constant times the players chosen direction. Just make sure the A* Inspector -> Settings -> Heuristic is not set to None. When you have done this the pathfinding calculator will find that it gets slightly closer to the goal by moving up first.
This only applies if the player is not an obstacle since otherwise the system will pick the closest point to the target it can find (which will be an arbitrary point around the player since every point has the same distance to the target) and it will find a path to that node.