MCPcopy Create free account
hub / github.com/NetHack/NetHack / nhl_is_genocided

Function nhl_is_genocided

src/nhlua.c:969–986  ·  view source on GitHub ↗

local x = nh.is_genocided("vampire") */

Source from the content-addressed store, hash-verified

967
968/* local x = nh.is_genocided("vampire") */
969staticfn int
970nhl_is_genocided(lua_State *L)
971{
972 int argc = lua_gettop(L);
973
974 if (argc == 1) {
975 const char *paramstr = luaL_checkstring(L, 1);
976 int mgend;
977 int i = name_to_mon(paramstr, &mgend);
978
979 lua_pushboolean(L, (i != NON_PM)
980 && (svm.mvitals[i].mvflags & G_GENOD)
981 ? TRUE : FALSE);
982 } else {
983 nhl_error(L, "Wrong args");
984 }
985 return 1;
986}
987
988/* local debug_themerm = nh.debug_themerm(isfill)
989 * if isfill is false, returns value of env variable THEMERM

Callers

nothing calls this directly

Calls 2

name_to_monFunction · 0.85
nhl_errorFunction · 0.85

Tested by

no test coverage detected