more PR #1051 - water-vault escape item

When generating an "escape item" inside one of the chests in the
"water-surrounded vault" theme room, make sure that the chest is not
locked if the item is made of glass or crystal.  Otherwise kicking the
chest to get access to its contents might destroy the item.

I imagine that this could be done more cleanly, but after quite a bit
of thrashing about I have something which seems to work.  To test, I
temporarily modified object shuffling to force wand of digging to be
made out of crystal and gave the water-vault a very high generation
frequency.
This commit is contained in:
PatR
2023-07-21 15:00:54 -07:00
parent ca99dfaeeb
commit d99b549bb0
2 changed files with 15 additions and 3 deletions

View File

@@ -188,6 +188,7 @@ l_obj_objects_to_table(lua_State *L)
if (otyp == -1) {
nhl_error(L, "l_obj_objects_to_table: Wrong args");
/*NOTREACHED*/
return 0;
}
@@ -489,7 +490,6 @@ l_obj_timer_has(lua_State *L)
return 0;
}
/* peek at an object timer. return the turn when timer triggers.
returns 0 if no such timer attached to the object. */
/* local timeout = o:peek_timer("hatch-egg"); */