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 obsidian treated as water #678

Merged
merged 1 commit into from
Apr 15, 2024
Merged

Conversation

zenzombie
Copy link
Collaborator

Fixes #372

The problem was the liquid layer retains SHALLOW_WATER when a tile is turned to obsidian by dragonfire.

@pender
Copy link
Contributor

pender commented Apr 7, 2024

This is really a category of bug, where terrain with a superior priority can hide terrain on other layers visually and in terms of tile description text, but the other layers continue to affect game behavior. For example, IIRC, bloat pits can cover doors, but the underlying door still obstructs vision, so field of view stops at that pit cell and thrown objects can't pass over it. I wonder if a more general fix would make sense. Two speculative ideas:

  • New dungeon feature flag: DFF_OVERWRITE_LOWER_PRIORITY_TERRAIN where terrain on other layers with inferior priority is cleared when the terrain is spawned
  • New terrain mechanical flag: TM_MASK_LOWER_PRIORITY_TERRAIN where the functions that check for terrain flags at a location ignore any terrain layers on the cell with terrain that has an inferior priority to the terrain with this flag set at the same location.

The first would be easier to implement and more efficient, but the second would enable e.g. bloat pits to temporarily mask inferior terrain before they evaporate.

@zenzombie
Copy link
Collaborator Author

If I understand correctly, these ideas address separate issues. DFF_OVERWRITE_LOWER_PRIORITY_TERRAIN would fix the obsidian issue where we want to permanently alter the tile.

TM_MASK_LOWER_PRIORITY_TERRAIN is a temporary effect to deal with the pit bloats as in issue #424?

For me this bug falls into the category of "I don't understand enough about layers, terrain and related mechanics, so I don't want to break anything." :-)

@zenzombie
Copy link
Collaborator Author

Ok I implemented DFF_CLEAR_LOWER_PRIORITY_TERRAIN instead.

@zenzombie
Copy link
Collaborator Author

I'm going to submit a separate PR for the door/descent issue. The change will impact visibility only (increased draw priority of closed wooden doors and barricades) so that they remain visible but continue to block line of sight and blinking like they currently do. A behavior change can be undertaken as a separate PR.

@tmewett tmewett merged commit 3e4e27f into tmewett:master Apr 15, 2024
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.

Creatures can still 'swim' in obsidian created from dragonfire water
3 participants