Files
nethack/include
copperwater cc04bf9d8f Fix selection "random" grow direction, and other code cleanup
Noticed that when I set a selection to grow in a random direction, it
instead grew in all directions, which is not what I wanted. Turns out
the -1 random dir ended up being passed straight to the code which
checks bitmasks, without any form of randomizing among directions.

So this adds code to do that, and defines W_RANDOM as -1 rather than
using a magic number. In the process I also noticed that specifying
"random" as the wall for a door in a room made it rerandomize the
direction every iteration of its loop, essentially rolling two rn2(4)s
and only proceeding if they matched. That was pointless so I cleaned it
up a bit.

Also added safety checks in the form of an impossible for des.corridor()
being called with "random" as either walldir, because this is not
implemented currently.

And lastly, I noticed that create_secret_door was entirely unused
(secret door creation is handled in create_door), so I deleted it.

The only behavior change caused by this is that the Valkyrie quest lava
pools will be a little smaller, which is the only place grow is
currently used. If it's desired to keep them the same, that should be
changed to "all".
2022-03-15 07:44:56 +02:00
..
2022-02-04 11:01:20 -05:00
2022-03-13 13:58:56 -07:00
2021-02-07 22:25:25 -06:00
2020-10-14 09:25:45 -07:00
2022-01-29 11:13:01 -08:00
2022-03-11 07:33:28 -05:00
2022-03-04 13:07:14 -08:00
2022-03-07 02:06:55 -08:00
2022-02-22 14:41:20 +02:00
2021-01-26 21:06:16 -05:00
2022-03-12 17:25:54 -08:00
2022-03-11 07:33:28 -05:00
2021-01-20 22:18:34 -06:00
2021-12-26 00:16:55 -08:00
2020-12-04 09:30:21 +02:00
2022-02-16 23:04:02 +02:00
2022-02-19 17:31:34 -08:00
2022-02-02 05:26:03 -08:00
2022-01-28 08:30:08 +02:00
2022-03-12 17:25:54 -08:00
2021-12-19 19:31:19 -08:00
2022-02-23 12:53:09 +02:00
2022-03-09 07:06:37 -08:00
2021-09-18 19:51:04 -04:00
2022-03-02 13:09:42 -08:00
2022-02-01 13:03:41 -05:00
2020-08-12 16:15:28 -07:00
2022-03-13 14:50:07 +02:00
2022-02-24 16:24:02 +02:00
2021-10-21 08:48:23 -04:00
2021-12-20 08:16:13 -08:00
2021-09-20 09:32:40 -04:00
2022-01-29 16:28:06 -05:00
2021-01-26 10:27:51 -05:00
2022-02-27 01:55:25 -08:00
2022-01-11 10:25:50 -08:00