tmewett / BrogueCE

Brogue: Community Edition - a community-lead fork of the much-loved minimalist roguelike game
https://sites.google.com/site/broguegame/
GNU Affero General Public License v3.0
1.03k stars 109 forks source link

Fix obsidian treated as water #678

Closed zenzombie closed 7 months ago

zenzombie commented 7 months ago

Fixes #372

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

pender commented 7 months ago

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:

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 commented 7 months ago

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 commented 7 months ago

Ok I implemented DFF_CLEAR_LOWER_PRIORITY_TERRAIN instead.

zenzombie commented 7 months ago

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.