des.object()
des.object()
des.object()
+-- since vegetarian monks shouldn't eat giant corpses, give a chance for
+-- Str boost that isn't throttled by exercise restrictions;
+-- make a modest effort (Elbereth only) to prevent xorns from eating the tins
+local tinplace = selection.negate():filter_mapchar('.')
+local tinloc = tinplace:rndcoord(0)
+des.object({ id="tin", coord=tinloc, quantity=2, buc="blessed",
+ montype="spinach" })
+des.engraving({ coord=tinloc, type="burn", text="Elbereth" })
-- Random traps
des.trap()
des.trap()
for i = 1, 4 do
des.monster("xorn", spacelocs:rndcoord(1))
end
+-- next to leader, so possibly tricky to pick up if not ready for quest yet;
+-- there's no protection against a xorn eating these tins; BUC state is random
+des.object({ id="tin", coord = {29, 9}, quantity=2, montype="spinach" })
experimental #saveoptions command to allow saving configuration settings
mouse buttons can be bound to extended commands
hero poly'd into purple worm can gain intrinsics from digesting whole monster
+add some tins of spinach to monk's quest (vegan => no Str from giant corpses)
Platform- and/or Interface-Specific New Features
|| tmpobj.id == CORPSE || tmpobj.id == TIN
|| tmpobj.id == FIGURINE) {
struct permonst *pm = NULL;
+ boolean nonpmobj = FALSE;
int i;
char *montype = get_table_str_opt(L, "montype", NULL);
if (montype) {
- if (strlen(montype) == 1
- && def_char_to_monclass(*montype) != MAXMCLASSES) {
+ if ((tmpobj.id == TIN && (!strcmpi(montype, "spinach")
+ /* id="tin",montype="empty" produces an empty tin */
+ || !strcmpi(montype, "empty")))
+ /* id="egg",montype="empty" produces a generic, unhatchable
+ egg rather than an "empty egg" */
+ || (tmpobj.id == EGG && !strcmpi(montype, "empty"))) {
+ tmpobj.corpsenm = NON_PM;
+ tmpobj.spe = !strcmpi(montype, "spinach") ? 1 : 0;
+ nonpmobj = TRUE;
+ } else if (strlen(montype) == 1
+ && def_char_to_monclass(*montype) != MAXMCLASSES) {
pm = mkclass(def_char_to_monclass(*montype),
G_NOGEN | G_IGNORE);
} else {
free((genericptr_t) montype);
if (pm)
tmpobj.corpsenm = monsndx(pm);
- else
+ else if (!nonpmobj)
nhl_error(L, "Unknown montype");
}
if (tmpobj.id == STATUE || tmpobj.id == CORPSE) {
tmpobj.spe = lflags;
} else if (tmpobj.id == EGG) {
tmpobj.spe = get_table_boolean_opt(L, "laid_by_you", 0) ? 1 : 0;
- } else {
+ } else if (!nonpmobj) { /* tmpobj.spe is already set for nonpmobj */
tmpobj.spe = 0;
}
}