# CRAWL.NEMELEX.CARDS ##### Crawl Init file ############################################### # For descriptions of all options, as well as some more in-depth information # on setting them, consult the file # options_guide.txt # in your /docs directory. If you can't find it, the file is also available # online at: # https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt # # Crawl uses the first file of the following list as its option file: # * init.txt in the -rcdir directory (if specified) # * .crawlrc in the -rcdir directory (if specified) # * init.txt (in the Crawl directory) # * ~/.crawl/init.txt (Unix only) # * ~/.crawlrc (Unix only) # * ~/init.txt (Unix only) # * settings/init.txt (in the Crawl directory) ##### Some basic explanation of option syntax ####################### # Lines beginning with '#' are comments. The basic syntax is: # # field = value or field.subfield = value # # Only one specification is allowed per line. # # The terms are typically case-insensitive except in the fairly obvious # cases (the character's name and specifying files or directories when # on a system that has case-sensitive filenames). # # White space is stripped from the beginning and end of the line, as # well as immediately before and after the '='. If the option allows # multiple comma/semicolon-separated terms (such as # autopickup_exceptions), all whitespace around the separator is also # trimmed. All other whitespace is left intact. # # There are three broad types of Crawl options: true/false values (booleans), # arbitrary values, and lists of values. The first two types use only the # simple =, with later options - which includes your options that are different # from the defaults - overriding earlier ones. List options allow using +=, ^=, # -=, and = to append, prepend, remove, and reset, respectively. Usually you will # want to use += to add to a list option. Lastly, there is := which you can use # to create an alias, like so: # ae := autopickup_exceptions # From there on, 'ae' will be treated as if it you typed autopickup_exceptions, # so you can save time typing it. # ##### Other files ################################################### # You can include other files from your options file using the 'include' # option. Crawl will treat it as if you copied the whole text of that file # into your options file in that spot. You can uncomment some of the following # lines by removing the beginning '#' to include some of the other files in # this folder. # Some useful, more advanced options, implemented in LUA. # include = advanced_optioneering.txt # Alternative vi bindings for Dvorak users. # include = dvorak_command_keys.txt # Alternative vi bindings for Colemak users. # include = colemak_command_keys.txt # Alternative vi bindings for Neo users. # include = neo_command_keys.txt # Override the vi movement keys with a non-command. # include = no_vi_command_keys.txt # Turn the shift-vi keys into safe move, instead of run. # include = safe_move_shift.txt # LANGUAGE setting translation_language = ko # MY GLOBAL setting show_more = false show_gold_status = true runrest_ignore_monster += butterfly:1 autofight_stop = 70 default_manual_training = true tile_font_crt_family = Consolas tile_font_stat_family = Consolas tile_font_msg_family = Consolas tile_font_lbl_family = Consolas autopickup_on = true pickup_thrown = true # scripts < ---- rule base local rules = {} local function add_rule(cond_fn, act_fn, opts) opts = opts or {} table.insert(rules, { cond = cond_fn, act = act_fn, once = (opts.once ~= false), -- once default:true name = opts.name or 'unnamed', }) end local function watching() for i = #rules, 1, -1 do local r = rules[i] local ok_cond, cond_result = pcall(r.cond) if not ok_cond then crawl.mpr('rule cond error [' .. r.name .. ']: ' .. tostring(cond_result)) elseif cond_result then local ok_act, act_result = pcall(r.act) if not ok_act then crawl.mpr('rule act error [' .. r.name .. ']: ' .. tostring(act_result)) else -- once rule: success 시 제거 -- act()가 false를 반환하면 "아직 완료 아님"으로 보고 유지 if r.once and act_result ~= false then table.remove(rules, i) end end end end end ---- base utilities local function cond_all(...) local conds = {...} return function() for _, c in ipairs(conds) do if not c() then return false end end end end ---- preset conditions local NO_INVO_GODS = { ["Trog"] = true, ["Jiyva"] = true, ["Ashenzari"] = true, ["Gozag"] = true, ["Kikubaaqudgha"] = true, ["Xom"] = true, ["Wu Jian"] = true, ["Vehumet"] = true, } local function cond_need_invocations() local g = you.god() if g==nil or g=='' or g=='No God' then return false end return (not NO_INVO_GODS[g]) end local function cond_believe_in(god_name) return function() return you.god() == god_name end end ---- preset actions local function act_set_skill(skill, mode, target) return function() if target ~= nil then local cur = you.get_training_target(skill) or 0 if cur < target then you.set_training_target(skill, target) end end you.train_skill(skill, mode or 1) return true end end ---- background presets local function kh_set_mifi() -- skill you.train_skill("Axes", 2) -- autopickup crawl.setopt("autopickup_exceptions ^=