--- lib/core/auto.lua.orig Sun Jul 20 17:10:14 2003 +++ lib/core/auto.lua Mon Aug 25 21:43:31 2003 @@ -243,6 +243,10 @@ local s = find_skill_i(r[1]) assert(s ~= -1, "no skill "..r[1]) return function(object) if get_skill(%s) >= tonumber(%r.args.min) and get_skill(%s) <= tonumber(%r.args.max) then return TRUE end end + elseif r.label == "ability" then + local s = find_ability(r[1]) + assert(s ~= -1, "no ability "..r[1]) + return function(object) if has_ability(%s) == TRUE then return TRUE end end end end end @@ -721,6 +725,17 @@ return xml:collect(s) end, + }, + ["ability"] = + { + "Check is true if player has the ability", + xml:collect([[Ammo creation]]), + function() + local n = input_box("Ability name?", 79) + if n == "" then return end + if find_ability(n) == -1 then return end + return xml:collect(""..n.."") + end, }, } --- lib/core/xml.lua.orig Sun Jul 20 17:10:14 2003 +++ lib/core/xml.lua Mon Aug 25 21:51:28 2003 @@ -198,6 +198,21 @@ xml.write(TERM_WHITE, tostring(t.args.max)) xml.write(TERM_WHITE, "\n") end + elseif t.label == "ability" then + local s = t[1] + if not_flag then + xml.write(TERM_WHITE, tab) + xml.write(ecol, "You do not have the ") + xml.write(bcol, s) + xml.write(ecol, " ability") + xml.write(TERM_WHITE, "\n") + else + xml.write(TERM_WHITE, tab) + xml.write(ecol, "You have the ") + xml.write(bcol, s) + xml.write(ecol, " ability") + xml.write(TERM_WHITE, "\n") + end elseif t.label == "level" then if not_flag then xml.write(TERM_WHITE, tab) --- src/squeltch.c.orig Sun Jul 20 17:10:16 2003 +++ src/squeltch.c Sun Aug 24 12:07:16 2003 @@ -154,6 +154,7 @@ "class", "level", "skill", + "ability", "comment", NULL, };