GitHub issue #1254

> If there's a trap on a no-dig level, the floor beneath it will always be "too hard to dig into", making it impossible to remove the trap.
>
> As you can still dig pits in these levels (just not holes), the floor under the trap itself resisting to become a pit seems inconsistent.
>
> Steps to reproduce:
>
> Go to no-dig level like Mine's End
> Make a trap
> Dig a pit next to it -> works
> Dig on the trap -> does not work

Return more information about the dig_check() results to caller (was
just a boolean).

Move the messaging that was in dig_check() into a separate
digcheck_fail_message() function that uses the expanded return
information.

Resolves #1254

.
This commit is contained in:
nhmall
2024-07-23 01:06:24 -04:00
parent dfa9d9df3c
commit d5785f287e
4 changed files with 123 additions and 39 deletions

View File

@@ -327,6 +327,28 @@ struct _create_particular_data {
boolean sleeping, saddled, invisible, hidden;
};
/* dig_check() results */
enum digcheck_result {
DIGCHECK_PASSED = 1,
DIGCHECK_PASSED_DESTROY_TRAP = 2,
DIGCHECK_PASSED_PITONLY = 3,
DIGCHECK_FAILED = 4,
DIGCHECK_FAIL_ONSTAIRS = DIGCHECK_FAILED,
DIGCHECK_FAIL_ONLADDER,
DIGCHECK_FAIL_THRONE,
DIGCHECK_FAIL_ALTAR,
DIGCHECK_FAIL_AIRLEVEL,
DIGCHECK_FAIL_WATERLEVEL,
DIGCHECK_FAIL_TOOHARD,
DIGCHECK_FAIL_UNDESTROYABLETRAP,
DIGCHECK_FAIL_CANTDIG,
DIGCHECK_FAIL_BOULDER,
DIGCHECK_FAIL_OBJ_POOL_OR_TRAP
};
/* Dismount: causes for why you are no longer riding */
enum dismount_types {
DISMOUNT_GENERIC = 0,