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 bash spells doing nothing to walls and windows #1949

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Oct 4, 2022

Summary

SUMMARY: Bugfixes "Trivial bugfix for bash spell effect not working against impassible terrain"

Purpose of change

This fixes a long-running bug that @foulman reported in DDA ages ago: CleverRaven/Cataclysm-DDA#38077 in which bash spells do absolutely nothing to solid terrain like doors, walls, or even windows.

Turns out, the code for it is immensely, hilariously easy to fix. As in, the sort of thing @KorGgenT could've fixed over 2 years ago with literally just the flip of a single boolean.

Describe the solution

Literally just set the ignore_walls boolean in area defintion for spell_effect::bash to true.

Describe alternatives you've considered

Pestering someone else to do it.

Testing

  1. Loaded in an existing release, debugged all spells plus 1000 INT, tested Artifact Pulse to confirm that windows only get yote when they're opened.
  2. Compiled and load-tested.
  3. Repeated step one in compiled build, terrain correctly suffers bashing even when impassible.

Additional context

This will allow me to remove the "ter_transform subspells as a workaound" hack I've been using to deal with this for Arcana's bash spell effects.

Ideally if we get someone to port this to DDA that'd be nice. Tested and it looks like somehow their version of spell shape code properly bashes walls if it has IGNORES_WALLS, so it's actually fixed on their end but no one took notice of it.

@Coolthulhu Coolthulhu self-assigned this Oct 5, 2022
@Coolthulhu Coolthulhu merged commit 0d3d54d into cataclysmbnteam:upload Oct 5, 2022
@chaosvolt chaosvolt deleted the holy-shit-it-was-seriously-this-easy-all-along branch October 5, 2022 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants