typedef struct dungeon { /* basic dungeon identifier */
char dname[24]; /* name of the dungeon (eg. "Hell") */
char proto[15]; /* name of prototype file (eg. "tower") */
+ char fill_lvl[15]; /* name of "fill" level protype file */
char boneid; /* character to id dungeon in bones files */
d_flags flags; /* dungeon flags */
xchar entry_lev; /* entry level */
lua_pushnil(L); /* first key */
i = 0;
while (lua_next(L, tidx) != 0) {
- char *dgn_name, *dgn_bonetag, *dgn_protoname;
+ char *dgn_name, *dgn_bonetag, *dgn_protoname, *dgn_fill;
int dgn_base, dgn_range, dgn_align, dgn_entry, dgn_chance, dgn_flags;
if (!lua_istable(L, -1))
dgn_entry = get_table_int_opt(L, "entry", 0);
dgn_chance = get_table_int_opt(L, "chance", 100);
dgn_flags = get_dgn_flags(L);
+ dgn_fill = get_table_str_opt(L, "lvlfill", emptystr);
debugpline4("DUNGEON[%i]: %s, base=(%i,%i)", i, dgn_name, dgn_base, dgn_range);
pd.tmpdungeon[i].chance = dgn_chance;
pd.tmpdungeon[i].entry_lev = dgn_entry;
+ Strcpy(g.dungeons[i].fill_lvl, dgn_fill); /* FIXME: fill_lvl len */
Strcpy(g.dungeons[i].dname, dgn_name); /* FIXME: dname length */
Strcpy(g.dungeons[i].proto, dgn_protoname); /* FIXME: proto length */
g.dungeons[i].boneid = *dgn_bonetag ? *dgn_bonetag : 0;
} else if (g.dungeons[u.uz.dnum].proto[0]) {
makemaz("");
return;
- } else if (In_mines(&u.uz)) {
- makemaz("minefill");
+ } else if (g.dungeons[u.uz.dnum].fill_lvl[0]) {
+ makemaz(g.dungeons[u.uz.dnum].fill_lvl);
return;
} else if (In_quest(&u.uz)) {
char fillname[9];