diff --git a/.replit b/.replit new file mode 100644 index 0000000000..43a23f640c --- /dev/null +++ b/.replit @@ -0,0 +1,2 @@ +language = "c" +run = "make all -k && clear && $(find -name nethack)" \ No newline at end of file diff --git a/_nethackdir/paniclog b/_nethackdir/paniclog new file mode 100644 index 0000000000..4ba8c2e1aa --- /dev/null +++ b/_nethackdir/paniclog @@ -0,0 +1,4 @@ +3.7.0-50 20220302 163201 1000 -: impossible nhl_loadlua: Error loading (nhlib.lua) +3.7.0-50 20220302 163216 1000 -: panic 'nhl_init' failed; can't continue. +3.7.0-50 20220302 193819 1000 -: impossible nhl_loadlua: Error loading (nhlib.lua) +3.7.0-50 20220302 193828 1000 -: panic 'nhl_init' failed; can't continue. diff --git a/_nethackdir/perm b/_nethackdir/perm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/_nethackdir/record b/_nethackdir/record new file mode 100644 index 0000000000..e69de29bb2 diff --git a/_nethackdir/sysconf b/_nethackdir/sysconf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/config.h b/include/config.h index 29ff94b621..31c0d36589 100644 --- a/include/config.h +++ b/include/config.h @@ -389,7 +389,7 @@ * otherwise it will be the current directory. */ #ifndef HACKDIR -#define HACKDIR "/usr/games/lib/nethackdir" +#define HACKDIR "./_nethackdir" #endif /* diff --git a/src/mondata.c b/src/mondata.c index b8b31b2313..7e750ddb7d 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -413,6 +413,7 @@ can_be_strangled(struct monst* mon) who don't need to breathe (brain, if any, doesn't care). Mindless creatures who do need to breath are vulnerable, as are non-breathing creatures which have higher brain function. */ +#if 0 if (!has_head(mon->data)) return FALSE; if (mon == &g.youmonst) { @@ -421,13 +422,16 @@ can_be_strangled(struct monst* mon) nobrainer = mindless(g.youmonst.data); nonbreathing = Breathless; } else { +#endif nobrainer = mindless(mon->data); /* monsters don't wear amulets of magical breathing, so second part doesn't achieve anything useful... */ nonbreathing = (breathless(mon->data) || ((mamul = which_armor(mon, W_AMUL)) != 0 && (mamul->otyp == AMULET_OF_MAGICAL_BREATHING))); +#if 0 } +#endif return (boolean) (!nobrainer || !nonbreathing); } diff --git a/sys/unix/hints/replit b/sys/unix/hints/replit new file mode 100644 index 0000000000..2eabc95cce --- /dev/null +++ b/sys/unix/hints/replit @@ -0,0 +1,36 @@ +# +# NetHack 3.7 linux $NHDT-Date: 1596498416 2020/08/03 23:46:56 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.2 $ +# Copyright (c) Patric Mueller +# NetHack may be freely redistributed. See license for details. +# +#-PRE +# Hints file for a minimal build +# This hints file provides the base for a minimal tty build for Linux + +PREFIX=/home/runner/builtprefix/ +HACKDIR=$(PREFIX)/games/lib/$(GAME)dir +SHELLDIR=$(PREFIX)/games +INSTDIR=$(HACKDIR) +VARDIR=$(HACKDIR) + +CFLAGS=-g -I../include + +# when building liblua.a, avoid warning that use of tmpnam() should be +# replaced by mkstemp(); the lua code doesn't use nethack's config.h so +# this needs to be passed via make rather than defined in unixconf.h +SYSCFLAGS=-DLUA_USE_POSIX + +LINK=$(CC) + +WINSRC = $(WINTTYSRC) +WINOBJ = $(WINTTYOBJ) +WINLIB = $(WINTTYLIB) + +WINTTYLIB=-lncurses -ltinfo + +CHOWN=true +CHGRP=true + +VARDIRPERM = 0755 +VARFILEPERM = 0600 +GAMEPERM = 0755