Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for WEBWALK flag #50760

Merged
merged 3 commits into from
Aug 14, 2021
Merged

Fix for WEBWALK flag #50760

merged 3 commits into from
Aug 14, 2021

Conversation

khudson13
Copy link
Contributor

@khudson13 khudson13 commented Aug 13, 2021

Adds code to is_immune_field() for handling WEBWALK flag

Summary

Bugfixes "WEBWALK flag works now"

Purpose of change

Fixes #50654 and Fixes #48639

Describe the solution

Added a couple lines to is_immune_field() within monmove.cpp. There just wasn't any code to handle the specific immunity before.

Describe alternatives you've considered

This was my first dive into Cata's C++ and you don't need to know how long it took me to find the relevant function. This is the only solution I could find, but as far as I can tell it's the right one.

Testing

I first tested the bug in the latest experimental to make sure it's properly broken. Spawned in one of those spider web forest things and a clairvoyance artifact so I could see, and watched as all the sad giant mutant spiders struggled in their own webs.

Then I compiled a new build with my new code and did the same thing there. All the spiders rushed out to kill me horribly, totally unobstructed by their own webs as hoped. Those big web areas should be substantially more dangerous now.

I specifically spawned in several different kinds of spider, including Magiclysm's Demon Spider, to make sure everyone got to come along for the horrible, spidery ride.

Additional context

Adds code to is_immune_field() for handling WEBWALK flag
@actual-nh actual-nh added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Monsters Monsters both friendly and unfriendly. labels Aug 13, 2021
@actual-nh
Copy link
Contributor

Ping: @Venera3?

src/monmove.cpp Outdated Show resolved Hide resolved
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
src/monmove.cpp Outdated Show resolved Hide resolved
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
@Venera3
Copy link
Member

Venera3 commented Aug 14, 2021

There's an (obviously broken) bit in map_field.cpp that tries to handle this, I'd remove that to prevent confusion.

@ZhilkinSerg ZhilkinSerg merged commit badd5e3 into CleverRaven:master Aug 14, 2021
@khudson13 khudson13 deleted the WebwalkFix branch August 14, 2021 21:35
BrettDong added a commit that referenced this pull request Nov 27, 2021
ZhilkinSerg pushed a commit that referenced this pull request Nov 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WEBWALK monster flag doesn't work Demon spiders' WEBWALK flag doesn't work
5 participants