Right now, targeting a ranged weapon or wand has a lot of problems.
If you aim for an enemy around a corner, you have to work out whether the number of squares between you, the corner, and the enemy will allow the weapon to pass the corner or hit the wall.
However, under some circumstances you can actually hit an enemy around a sharp corner by aiming for a point past that enemy instead. (Particularly noticeable if you aim for an enemy further down and hit the closer one instead; that often happens with pirahnas.)
If you aim for an enemy down a straight corridor, and unintentionally touch the wall instead of the enemy, your weapon will hit a wall between you and the enemy and stop. Particularly deadly if it's your boomerang and you're also using it as your primary melee weapon.
And worst of all, if you misjudge the ability to hit an enemy with a wand, and hit the wall instead, you'll typically hurt yourself with it.
I don't think it makes sense to introduce artificial difficulty through a difficult-to-use interface that makes it easy to shoot yourself in the foot.
A few possible improvements:
One possibility would be to say that you can always hit anything you have line-of-sight to. At a minimum, if it's possible to hit an enemy at all, targeting that enemy directly should work, rather than aiming for a point past them.
Alternatively, if it remains possible to see something but not hit it, then if you attempt to throw something at a location, or fire a wand at a location, and your shot won't actually hit that location, don't do it; instead, produce a message "You can't hit (that location | the $enemy) from here.". To hit a spot, you should actually aim at that spot, and if you can't hit it, the game should prevent you from trying.
Related to that, you should only be able to target yourself if you touch the actual square you're on. And doing so should produce a warning message, similar to the one for attempting to throw a beneficial potion.
Finally, you might consider adding a "targeting" mode when aiming a weapon or wand, which dims squares you can't hit and puts a targeting reticle over enemies.
Quirk Fixed in development