View Single Post
Old June 25, 2009, 22:07   #29
RogerN's Avatar
Join Date: Jul 2008
Posts: 308
RogerN is on a distinguished road
Originally Posted by d_m View Post
I can imagine using the current project_path() algorithm but just skipping blockages by walls. I can also imagine either skipping both o and y (as you indicate) or various probabilistic approaches (e.g. where y and o both have a 50% chance of blocking the arrow).
The project_path() algorithm could be rewritten to treat both walls and monsters as diamonds instead of squares. In this case, then neither y nor o will block the arrow. In fact, even if both of them were present at the same time the arrow could still squeeze between them... but that could be handled by a special case since it's probably not desired behavior.

I don't like the idea of having a 50% chance of one of them blocking the arrow. But if both o and y are present, you could randomly choose which one gets hit.

I think it's important to ensure the projection paths are symmetrical. If o or y is blocking for @ then it should also be blocking for p.
RogerN is offline   Reply With Quote