BrogueCE icon indicating copy to clipboard operation
BrogueCE copied to clipboard

Lever placement can be impossible

Open brturn opened this issue 1 month ago • 0 comments

Reported by saltcooler on Reddit.

Lever was placed entirely surrounded by walls, inaccessible without shatter or tunneling.

Seed #411762472, depth 11:

Image

Analysis:

This is caused because the MF_IN_PASSABLE_VIEW_OF_ORIGIN field-of-view check originates at the "origin" to the underworm tunnels, even though that location is filled with a wall. This allows a tile "inside" the machine room to be chosen which would otherwise be blocked.

Machine construction here:

Image

Magenta - machine room tiles filled with granite to make a maze Dark blue - machine room tiles filled with crumbling granite with will progressively reveal the maze Magenta "statue" - the "origin" of the machine room from which the field-of-view is computed Green - tiles which are visible from the "origin"

Possible fix:

Change WORM_TUNNEL_OUTER_WALL to be FLOOR, and remove the DF effect. This will place a basic floor tile at the origin so the field-of-view check works as intended. A minor change in behavior is that the wall may not immediately explode when the lever is pulled, since the trail may begin deeper in the wall and work its way out instead.

THIS: https://github.com/tmewett/BrogueCE/blob/af0d25995221a51591ae7da4ba95c2fd28b1acc0/src/variants/GlobalsBrogue.c#L543

BECOMES: {0, FLOOR, DUNGEON, {1,1}, ...

brturn avatar Dec 01 '25 02:12 brturn