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

Function get_table_buc

src/sp_lev.c:3441–3452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3439RESTORE_WARNING_UNREACHABLE_CODE
3440
3441staticfn int
3442get_table_buc(lua_State *L)
3443{
3444 static const char *const bucs[] = {
3445 "random", "blessed", "uncursed", "cursed",
3446 "not-cursed", "not-uncursed", "not-blessed", NULL,
3447 };
3448 static const int bucs2i[] = { 0, 1, 2, 3, 4, 5, 6, 0 };
3449 int curse_state = bucs2i[get_table_option(L, "buc", "random", bucs)];
3450
3451 return curse_state;
3452}
3453
3454int
3455get_table_objclass(lua_State *L)

Callers 1

lspo_objectFunction · 0.85

Calls 1

get_table_optionFunction · 0.85

Tested by

no test coverage detected