end
});
- des.room({ type = "food shop", chance=90, lit=1, x=24,y=5, w=3,h=4,
+ des.room({ type = monkfoodshop(), chance=90, lit=1, x=24,y=5, w=3,h=4,
contents = function()
des.door({ state="closed", wall="north" })
end
end
})
- des.room({ type = "food shop", chance=90,lit=1,x=26,y=8,w=3,h=2,
+ des.room({ type = monkfoodshop(), chance=90,lit=1,x=26,y=8,w=3,h=2,
contents = function()
des.door({ state="closed", wall="west" })
end
end
})
- des.room({ type = "food shop", chance=90, lit=1, x=11, y=11, w=3, h=2,
+ des.room({ type = monkfoodshop(), chance=90, lit=1, x=11, y=11, w=3, h=2,
contents = function()
des.door({ state = "closed", wall="east" })
end
des.door("closed",66,08)
des.region({ region={57,13, 60,15}, lit=1, type="tool shop", prefilled=0 })
des.door("closed",56,14)
-des.region({ region={05,09, 08,10}, lit=1, type="food shop", prefilled=0 })
+des.region({ region={05,09, 08,10}, lit=1, type=monkfoodshop(), prefilled=0 })
des.door("closed",07,11)
-- Gnome homes
des.door("closed",04,14)
des.region({ region={09,07, 11,09}, lit=1, type="candle shop", prefilled=0 })
des.region({ region={16,04, 18,06}, lit=1, type="tool shop", prefilled=0 })
des.region({ region={23,01, 25,03}, lit=1, type="shop", prefilled=0 })
-des.region({ region={22,12, 24,13}, lit=1, type="food shop", prefilled=0 })
+des.region({ region={22,12, 24,13}, lit=1, type=monkfoodshop(), prefilled=0 })
des.region({ region={31,12, 36,14}, lit=1, type="temple", prefilled=0 })
des.altar({ x=35,y=13,align=align[1],type="shrine"})
})
end
- des.room({ type="food shop", chance=50, lit=1, x=19,y=5, w=2,h=3,
+ des.room({ type=monkfoodshop(), chance=50, lit=1, x=19,y=5, w=2,h=3,
contents = function()
des.door({ state = "closed", wall="south" })
end
})
end
- des.room({ type="food shop", chance=50, lit=1, x=25,y=11, w=3,h=2,
+ des.room({ type=monkfoodshop(), chance=50, lit=1, x=25,y=11, w=3,h=2,
contents = function()
des.door({ state = "closed", wall="east" })
end
function percent(threshold)
return math.random(0, 99) < threshold
end
+
+function monkfoodshop()
+ if (u.role == "Monk") then
+ return "health food shop";
+ end
+ return "food shop";
+end
if (!strcmp(tkey, "inventory")) {
nhl_push_obj(L, g.invent);
return 1;
+ } else if (!strcmp(tkey, "role")) {
+ lua_pushstring(L, g.urole.name.m);
+ return 1;
}
nhl_error(L, "Unknown u table index");
int name_wanted;
s_level *sptr;
- if (nlp == shkfoods && In_mines(&u.uz) && Role_if(PM_MONK)
- && (sptr = Is_special(&u.uz)) != 0 && sptr->flags.town) {
- /* special-case override for minetown food store for monks */
- nlp = shkhealthfoods;
- ESHK(shk)->shoptype = FODDERSHOP;
- }
-
if (nlp == shklight && In_mines(&u.uz)
&& (sptr = Is_special(&u.uz)) != 0 && sptr->flags.town) {
/* special-case minetown lighting shk */
if (shp->shknms == shkrings)
(void) mongets(shk, TOUCHSTONE);
nameshk(shk, shp->shknms);
- /* might have changed delicatessen to health food store */
- sroom->rtype = eshkp->shoptype;
return sh;
}