I'm pretty new to the Mathematics section of StackExchange and need some guidance on some math for a 2d topdown game I am making. In my game there is an Archer boss, who can shoot reflective arrows, which reflect on the walls similar to light i.e. the angle of incidence is the angle of reflection. In order to make the boss smart I want to add a system which shoots an arrow to the wall which reflects to the player. All I need is to find the angle to shoot at so that it reflects to the player (i.e. angle A in the figure). The actual angle I need refers to angle relative to a line drawn from the player towards the top of the stage, the angles increase clockwise (so 0 deg is top, 90 deg is right, 270 is left etc). This is not needed as I can adjust.
What is given for the function is the boss' and player's coordinates and their height towards the nearest wall (Remember that this is a 2d topdown game therefore height towards wall is the shortest distance towards the wall). Using these parameters how to find angle A in the figure?