devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

Fix Wall Spells on objects

Open kphoenix137 opened this issue 1 year ago • 2 comments

Fixes: https://github.com/diasurgical/devilutionX/issues/7323

@NiteKat enjoy

Completely removes the check for objects when attempting to find a valid position for Fire Wall/Lightning Wall. Seems rather absurd that objects force walls to move to another position, but the wall will happily grow over objects.

kphoenix137 avatar Aug 24 '24 02:08 kphoenix137

How does this behave with casting on closed doors/shrines/other solid objects that are not destructible? Does it feel weird the way it behaves in those cases?

NiteKat avatar Aug 24 '24 15:08 NiteKat

How does this behave with casting on closed doors/shrines/other solid objects that are not destructible? Does it feel weird the way it behaves in those cases?

@NiteKat

Original logic:

Wall casting logic:

  • Is there a solid tile at this location? (If an arrow cannot occupy this tile, that's a good indication it's considered solid)
    • Bad location, find another nearby tile to cast
  • Is there an object in any state in this tile?
    • Bad location, find another nearby tile to cast

Wall growing logic:

  • Is there a solid tile at this location? (If an arrow cannot occupy this tile, that's a good indication it's considered solid)
    • Bad location, don't grow wall and stop growing it in this direction
  • Is there an object in any state in this tile?
    • Good to go!

Revised logic:

Wall casting logic:

  • Is there a solid tile at this location? (If an arrow cannot occupy this tile, that's a good indication it's considered solid)
    • Bad location, find another nearby tile to cast
  • Is there an object in any state in this tile?
    • Good to go!

Wall growing logic:

  • Is there a solid tile at this location? (If an arrow cannot occupy this tile, that's a good indication it's considered solid)
    • Bad location, don't grow wall and stop growing it in this direction
  • Is there an object in any state in this tile?
    • Good to go!

Expanding upon this explanation, a closed door counts as a solid tile, so a wall cannot grow or be casted on these no matter what. I'm sure in the original logic, an open doorway counts as a non-solid tile, however that tile is occupied by an object which would prevent casting a wall on its location, however with my fix you can.

kphoenix137 avatar Aug 24 '24 20:08 kphoenix137