devilutionX icon indicating copy to clipboard operation
devilutionX copied to clipboard

[Issue Report]: Wall spells produce twice as many visible missiles on the center tile

Open kphoenix137 opened this issue 1 year ago • 7 comments

Operating System

Windows x64

DevilutionX version

1.5.2

Describe

Fire Wall (and Lightning Wall?) use a control missile to move over tiles, creating Fire Wall tiles that are visible to the player and damage entities. The incorrect implementation of this spell logic ends up placing 2 Fire Wall tiles at the direct center of where the Fire Wall spreads out from, which result in 2 visual Fire Wall tiles that end up dealing more damage to entities as a result. This should be corrected by modifying the implementation of GrowWall() so that one of the AddMissile() calls skips the first frame. (Credit to @StephenCWills)

To Reproduce

Observe Fire Wall derp

Expected Behavior

No response

Additional context

No response

kphoenix137 avatar Jul 24 '24 07:07 kphoenix137

Nice find. Was the double damage issue documented before?

julealgon avatar Jul 24 '24 19:07 julealgon

@NiteKat mentioned the double damage when I was watching him stream his speedrun attempts the other day. That was the first I'd heard of it.

Fire Wall is created by 2 control missiles.

This isn't true. There's only one control missile, and it makes liberal use of missile vars to keep track of state when growing in both directions. You'd have to change the implementation of GrowWall() so that one of the two calls to AddMissile() can be skipped on the first frame.

StephenCWills avatar Jul 24 '24 19:07 StephenCWills

Might want to add the vanilla tag to this for documentation purposes.

julealgon avatar Jul 24 '24 19:07 julealgon

@NiteKat mentioned the double damage when I was watching him stream his speedrun attempts the other day. That was the first I'd heard of it.

Fire Wall is created by 2 control missiles.

This isn't true. There's only one control missile, and it makes liberal use of missile vars to keep track of state when growing in both directions. You'd have to change the implementation of GrowWall() so that one of the two calls to AddMissile() can be skipped on the first frame.

My mistake, I was a bit too quick on the jump to document this issue before I forgot about it and didn't properly review the code (went from memory). I will update original post.

kphoenix137 avatar Jul 25 '24 18:07 kphoenix137

Can someone confirm this issue affects Lightning Wall as well?

kphoenix137 avatar Jul 25 '24 19:07 kphoenix137

The reason why I've added the "insufficient information" label is because of "Observe Fire Wall derp" - the least you could do is provide a screenshot/gif :/

qndel avatar Jul 25 '24 19:07 qndel

The reason why I've added the "insufficient information" label is because of "Observe Fire Wall derp" - the least you could do is provide a screenshot/gif :/

I'm not saying you're wrong :D Problem is fixed with PR now. I intended to fix this myself but I wanted to quickly address it with an issue report in case it took me too long or someone else wanted to fix first.

kphoenix137 avatar Jul 25 '24 19:07 kphoenix137