Skip to content

Commit

Permalink
Prevent polymorph of swap chest
Browse files Browse the repository at this point in the history
I think that putting this in obj_resists instead of poly_obj should
protect it from actual polymorph, system shock, drain life removing spe,
plus other things like somehow managing to drop it into lava.

Also restore missing punctuation to a swap chest-related pline.
  • Loading branch information
entrez committed Mar 21, 2023
1 parent e1c1140 commit 31e9e52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/zap.c
Expand Up @@ -1204,6 +1204,7 @@ int ochance, achance; /* percent chance for ordinary objects, artifacts */
|| obj->otyp == SPE_BOOK_OF_THE_DEAD
|| obj->otyp == CANDELABRUM_OF_INVOCATION
|| obj->otyp == BELL_OF_OPENING
|| obj->otyp == SWAP_CHEST /* TNNT - preserve swap chest */
|| (obj->otyp == CORPSE && is_rider(&mons[obj->corpsenm]))) {
return TRUE;
} else {
Expand Down Expand Up @@ -1950,8 +1951,8 @@ struct obj *obj, *otmp;
obj->dknown = 1;
if (Is_container(obj) || obj->otyp == STATUE) {
if (obj->otyp == SWAP_CHEST) {
pline ("The contents of %s seem to be in a state of flux",
the(xname(obj)));
pline_The("contents of %s seem to be in a state of flux.",
the(xname(obj)));
res = 1;
learn_it = TRUE;
break;
Expand Down

0 comments on commit 31e9e52

Please sign in to comment.