intended behavior? (damage_near_loc)

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: intended behavior? (damage_near_loc)
Shock Trooper
Member # 4180
Profile #0
OK... I decided my spiders still weren't quite challenging enough, so I decided to have them spit poison every couple of turns to soften up the melee types standing adjacent to them and hacking at them. damage_near_loc seemed the perfect candidate for that, and works perfectly EXCEPT... a shopkeeper on the other side of a stone wall from the spiders also gets poisoned. :)

It's a simple enough matter to move the shopkeeper far enough away from the wall to not get poisoned. I just expected intervening impassible terrain to block the damage, so I'm wondering if the current behavior is intended or a bug.

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Bob's Big Date
Member # 3151
Profile Homepage #1
Unfortunately, this goes back to the Exiles -- had Jeff felt like adding area-of-effect spells to the Av series ( :rolleyes: ), this sort of thing would have been avoided, among other things.

For you and all who come after you, no, nothing stops you from taking damage on terrain. Not even intervening impassible terrain -- even if you found yourself IN one of the walls, you'd take damage.

--------------------
The biggest, the baddest, and the fattest.
Posts: 2367 | Registered: Friday, June 27 2003 07:00
Shock Trooper
Member # 4180
Profile #2
You wouldn't need AoE spells to have what (to me) would be correct behavior for this call. Seems to me it would just be a check with the pathfinding algorithm to see if the path from the damager's current loc to the loc in question is range squares or less. Sure, my spider COULD go out the door, around the building and into the shop in question, but not in 'range' moves. So it shouldn't do damage there.

Of course, not knowing the particulars of the implementation, such a call to the pathfinding algorithm might be prohibitively expensive. In that case, current behavior would be correct (not to say optimal ;) ).

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Apprentice
Member # 3618
Profile #3
Actually, it might be possible to code it to behave properly, using the calls that we have. Isn't there a call for checking whether something is within line-of-sight and x range from something else?
Posts: 33 | Registered: Thursday, October 30 2003 08:00
Apprentice
Member # 4127
Profile #4
quote:
Originally written by spyderbytes:

You wouldn't need AoE spells to have what (to me) would be correct behavior for this call. Seems to me it would just be a check with the pathfinding algorithm to see if the path from the damager's current loc to the loc in question is range squares or less.
The simplest solution is probably just to use the can_see calls for area effect attacks. If you cannot see the square, then some terrain is blocking it. This differs from the pathfinding as it would allow stuff to go through windows (which is probably a desirable effect).
Posts: 48 | Registered: Saturday, March 20 2004 08:00
Shake Before Using
Member # 75
Profile #5
.\|/.
..*..
==|==
.....
.....
..C..
Basically, don't try to make area-of-effect projectile attacks like this. It's fine if the center of the area is the caster, though.
Posts: 3234 | Registered: Thursday, October 4 2001 07:00