00-Evan / shattered-pixel-dungeon

Shattered Pixel Dungeon is an open-source traditional roguelike dungeon crawler with randomized levels and enemies, and hundreds of items to collect and use. It's based on the source code of Pixel Dungeon, by Watabou.
https://shatteredpixel.com/shatteredpd/
GNU General Public License v3.0
4.68k stars 1.09k forks source link

Grim Trap Targeting Issues #1729

Closed ashinckley closed 3 months ago

ashinckley commented 3 months ago

There was a grim trap room in the distance in the demon halls. I positioned myself far in the distance and allowed my prismatic image occupy several mobs between me and the grim trap room. There was a clear line-of-fire between the mobs and grim trap, however the distance was so great that I could no longer see the mobs or prismatic image. I fired off a wand of blast wave, and I was targeted by the grim traps which fully utilized my ankh. I assumed all the mobs were killed if I had been targeted, but when I approached, the mobs and prismatic image were still between me and the grim traps. I took a few steps back, making sure there was a clear line of fire between the mobs and remaining grim trap and tried again by throwing an item at a selected trap. This time I was instantly killed. The bolt went right between the mobs and prismatic image (unseen from my field of view). Perhaps there's a bug where grim traps only target characters that are visible to the hero?

00-Evan commented 3 months ago

It's a bit hard to be sure about this without seeing the environment your describing.

Grim traps do respect line of sight rules, so if something blocks the grim trap from attacking a certain target (e.g. the corner of a wall) then it would shoot at a farther target which it does have a clear path to.

I do think it would be fair to give traps like this a max range either way though, they aren't intended to be able to hit things at great distances.

00-Evan commented 3 months ago

Closing this as there was no reply, feel free to comment again and I'll re-open.

I will add giving these traps a max range to my to-do list regardless though, I think that's a sensible change to make.