# 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 show_more = false default_manual_training = true skill_focus = false default_show_all_skills = true force_more_message += (?!An|As|You|There)(?-i:[A-Z]{1}[a-z]+).*(come.*into.*view|open.*door|break.*door) { add_autopickup_func(function(it, name) if it.is_useless then return false end if it.artefact then if name:find("%*Rage") then if you.god() == "Trog" or (you.god() == "Ashenzari" and you.piety_rank() >= 3) or you.get_base_mutation_level("Clarity") == 1 or items.equipped_at("Amulet") and items.equipped_at("Amulet").name():find("Clar") or items.equipped_at("Body Armour") and items.equipped_at("Body Armour").name():find("Clar") then return true end return false end if name:find("Harm") or name:find("%*Noise") or name:find("%*Corrode") then return false end if name:find("%*Slow") then if you.race() == "Formicid" then return true end return false end if name:find("slick") then return false end if name:find("Mesm") then return false end if name:find("Charlatan") then return false end if name:find("mace of Variability") then if you.god() ~= "Xom" then return false end end return true end local class = it.class(true) local sub_type = it.subtype() if (class == "armour") then local armour_slots = { boots="Boots", cloak="Cloak", gloves="Gloves", helmet="Helmet", shield="Shield" } local equipped_item = items.equipped_at(armour_slots[sub_type]) if (sub_type == "boots") then if equipped_item then local plus = items.equipped_at("Boots").plus local nobrand = items.equipped_at("Boots").branded == false if nobrand then if plus < 2 and name:find("[" .. (plus + 1) .. "-2].*boots") then return true end if plus < 4 and name:find("[" .. (plus + 1) .. "-4].*barding") then return true end end return it.branded or it.ego else return true end end if (sub_type == "cloak") then if name:find("scarf.*harm") then return false elseif equipped_item then local plus = items.equipped_at("Cloak").plus local nobrand = items.equipped_at("Cloak").branded == false if plus < 2 and nobrand and name:find("[" .. (plus + 1) .. "-2].*cloak") then return true end return it.branded or it.ego else return true end end if (sub_type == "gloves") then if equipped_item then local plus = items.equipped_at("Gloves").plus local nobrand = items.equipped_at("Gloves").branded == false if plus < 2 and nobrand and name:find("[" .. (plus + 1) .. "-2].*gloves") then return true end return it.branded or it.ego elseif you.has_claws() ~= 0 then return it.branded or it.ego else return true end end if (sub_type == "helmet") then if equipped_item then local plus = items.equipped_at("Helmet").plus local a_hat = items.equipped_at("Helmet").ac local nobrand = items.equipped_at("Helmet").branded == false if plus < 2 and nobrand then if a_hat == 0 and plus < 2 and name:find("[" .. (plus + 1) .. "-2].*hat") then return true end if a_hat == 0 and name:find("[0-2].*helmet") then return true end if a_hat == 1 and plus < 2 and name:find("[" .. (plus + 1) .. "-2].*helmet") then return true end end return it.branded or it.ego else return true end end if (sub_type == "shield") then if equipped_item then local light = items.equipped_at("Shield").name():find("orb.*light") local buck = items.equipped_at("Shield").name():find("buck") local kite = items.equipped_at("Shield").name():find("kite") local plus = items.equipped_at("Shield").plus local ac = items.equipped_at("Shield").ac local nobrand = (items.equipped_at("Shield").branded) == false if nobrand then if ac == 3 and plus < 3 and name:find("[" .. (plus + 1) .. "-3].*buck") then return true end if ac == 8 and plus < 5 and name:find("[" .. (plus + 1) .. "-5].*kite") then return true end if ac == 13 and plus < 8 and name:find("[" .. (plus + 1) .. "-8].*tower") then return true end end if light and name:find("buck") then return true end if buck and name:find("kite") then return true end if kite and name:find("tower") then return true end if name:find("orb") then return false end return it.branded or it.ego elseif name:find("buck") then return true else return false end end end end) } { function version() local check_crawl_version = tonumber(string.sub(crawl.version("major"), 3, 4)) return check_crawl_version end } { function turn_0() local t_0 = you.turns() == 0 return t_0 end } { function ctrl_school_list() local school_list = { "Conjurations", "Hexes", "Summonings", "Necromancy", "Translocations", "Charms", "Fire Magic", "Ice Magic", "Air Magic", "Earth Magic", "Transmutations", "Poison Magic" } for k = #school_list, 1, -1 do local school = school_list[k] if version() >= 26 and school == "Charms" then table.remove(school_list, k) elseif version() >= 31 then if school == "Transmutations" or school == "Poison Magic" then table.remove(school_list, k) end end end if version() >= 31 then table.insert(school_list, "Alchemy") end return school_list end } { function set_target(skill) local level = you.base_skill(skill) if skill == "Fighting" or skill == "Spellcasting" then for target = 1, 27, 2 do if level < target then you.set_training_target(skill, target) break end end elseif skill == "Unarmed Combat" then for target = 0, 27, 5.4 do if level < target then you.set_training_target("Unarmed Combat", math.ceil(target)) break end end elseif skill == "Throwing" then local throw = { 2, 6, 12, 16 } for k = 1, 4 do if level < throw[k] then you.set_training_target(skill, throw[k]) break end end elseif skill == "Stealth" then if level < 1 then you.set_training_target(skill, 1) elseif you.train_skill(skill) == 2 then you.train_skill(skill, 0) end else for target = 9, 27, 9 do if level < target and target < 27 then you.set_training_target(skill, target) break end end end end } { function ctrl_invo() local god_list = { { name = "Cheibriados", invo = { 6, 9, 10, 15 } }, { name = "Dithmenos", invo = { 2, 0, 0, 15 } }, { name = "Dithmenos", invo = { 0, 6, 10, 15 }, remake = 32 }, { name = "Elyvilon", invo = { 3, 5, 0, 15 } }, { name = "Fedhas Madash", invo = { 2, 11, 0, 15 }, remake = 24}, { name = "Hepliaklqana", invo = { 0, 5, 10, 0 } }, { name = "Okawaru", invo = { 3, 0, 0, 10 } }, { name = "Okawaru", invo = { 3, 0, 10, 15 }, remake = 28 }, { name = "Uskayaw", invo = { 0, 0, 0, 21 } }, { name = "Zin", invo = { 3, 6, 9, 15 } }, { name = "The Shining One", invo = { 5, 0, 13, 15 } } } local invo_base = you.base_skill("Invocations") local believe = you.god() local piety = you.piety_rank() local remake_version = nil local no_remake = true for _, god in ipairs(god_list) do if god.name == believe then if god.remake then if god.remake <= version() then if not remake_version or god.remake > remake_version then remake_version = god.remake end end end end end if remake_version and remake_version <= version() then for _, god in ipairs(god_list) do if god.name == believe then if god.remake == remake_version then for rank, invo in ipairs(god.invo) do if piety <= rank then if invo ~= 0 then if invo_base < invo then you.set_training_target("Invocations", invo) no_remake = false break end end end end end end end end if no_remake then for _, god in ipairs(god_list) do if god.name == believe then if god.remake == nil then for rank, invo in ipairs(god.invo) do if piety <= rank then if invo ~= 0 then if invo_base < invo then you.set_training_target("Invocations", invo) break end end end end end end end end end } { function ctrl_evo() local function log2(x) return math.log(x) / math.log(2) end local evo_base = you.base_skill("Evocations") local tin = 1 local water = 1 local evo_tin = {} local evo_water = {} local evo_beast = {} local evo_spider = {} for slot = 0, 51 do key = items.inslot(slot) if key then check_tin = key.name():find("tin.*tremor") check_water = key.name():find("phial.*floo") for evo = 6, 27, 0.1 do local each_boom = math.floor(1 + 2 * log2(1 + evo / 6)) local evo_boom = math.ceil(evo) if check_tin and each_boom > tin then tin = each_boom if evo_boom > evo then table.insert(evo_tin, evo_boom) end end local base_dur = math.floor(2.1 + 2 * evo / 5) local evo_dur = math.ceil(evo) if check_water and base_dur > water then water = base_dur if evo_dur > evo then table.insert(evo_water, evo_dur) end end end if version() >= 26 then check_beast = key.name():find("box.*beast") if check_beast then evo_beast = { 9, 15, 21 } end end if version() >= 31 then check_spider = key.name():find("sack.*spider") if check_spider then evo_spider = { 14, 18, 21 } end end end end local evo_blink = false local evo_invi = false for _, evo_abil in ipairs(you.ability_table()) do if evo_abil == "Evoke Blink" then evo_blink = true end if evo_abil == "Evoke Invisibility" then evo_invi = true end end local memo_blink = spells.memorised("Blink") if evo_blink then if memo_blink then evo_blink = false else evo_blink = 12 end end local memo_invi = spells.memorised("Invisibility") if evo_invi then if version() < 32 then if memo_invi then evo_invi = false else evo_invi = 22 end else evo_invi = 12 end end if evo_blink and evo_base < evo_blink then you.set_training_target("Evocations", evo_blink) elseif evo_invi and evo_invi == 12 and evo_base < evo_invi then you.set_training_target("Evocations", evo_invi) elseif evo_base < 6 then you.set_training_target("Evocations", 6) else local evo_all = {} if next(evo_tin) then for _, evo in ipairs(evo_tin) do table.insert(evo_all, evo) end end if next(evo_water) then for _, evo in ipairs(evo_water) do table.insert(evo_all, evo) end end if next(evo_beast) then for _, evo in ipairs(evo_beast) do table.insert(evo_all, evo) end end if next(evo_spider) then for _, evo in ipairs(evo_spider) do table.insert(evo_all, evo) end end if evo_invi then table.insert(evo_all, evo_invi) end if next(evo_all) then table.sort(evo_all) for _, evo in ipairs(evo_all) do if evo_base < evo then you.set_training_target("Evocations", evo) break end end end end end } { function ctrl_trans() local form_now = you.transform() local form_base = you.base_skill("Shapeshifting") local form_target = you.get_training_target("Shapeshifting") local form_list = { [7] = { min = 0, form = { "beast" } }, [14] = { min = 7, form = { "flux" } }, [19] = { min = 10, form = { "blade", "maw", "snake" } }, [25] = { min = 16, form = { "statue", "dragon" } }, [27] = { min = 23, form = { "storm", "death" } } } for target, list in pairs(form_list) do for _, form in ipairs(list.form) do if form_now == form then if form_base < target then if you.mutation_overview():find("reduced hp") then if you.train_skill("Shapeshifting") == 0 then you.train_skill("Shapeshifting", 2) you.set_training_target("Shapeshifting", list.min) break end else you.set_training_target("Shapeshifting", target) break end end end end end end } { function ctrl_weapon() local equipped_weapon = items.equipped_at("Weapon") if equipped_weapon then weapon_type = equipped_weapon.weap_skill weapon_delay = equipped_weapon.delay delay_09 = weapon_delay >= 10 and (weapon_delay - 9) * 2 or 0 delay_min = (weapon_delay - (math.min(7, math.floor(weapon_delay / 2)))) * 2 target_weapon_09 = you.base_skill(weapon_type) < delay_09 target_weapon_min = you.base_skill(weapon_type) < delay_min if turn_0() then you.train_skill(weapon_type, 0) elseif target_weapon_09 then you.set_training_target(weapon_type, delay_09) elseif target_weapon_min then you.set_training_target(weapon_type, delay_min) end else if turn_0() then you.train_skill("Unarmed Combat", 0) end set_target("Unarmed Combat") end end } { function ctrl_skill() if you.race() ~= "Gnoll" then if turn_0() then you.train_skill("Fighting", 2) ctrl_weapon() you.train_skill("Armour", 0) you.train_skill("Shields", 0) you.train_skill("Dodging", 0) you.train_skill("Stealth", 2) you.train_skill("Spellcasting", 0) --[[ you.train_skill("Conjurations", 0) you.train_skill("Hexes", 0) you.train_skill("Summonings", 0) you.train_skill("Necromancy", 0) you.train_skill("Translocations", 0) if version() < 26 then you.train_skill("Charms", 0) end you.train_skill("Fire Magic", 0) you.train_skill("Ice Magic", 0) you.train_skill("Air Magic", 0) you.train_skill("Earth Magic", 0) if version() < 31 then you.train_skill("Transmutations", 0) you.train_skill("Poison Magic", 0) else you.train_skill("Shapeshifting", 0) you.train_skill("Alchemy", 0) end ]] for _, school in pairs(ctrl_school_list()) do you.train_skill(school, 0) end if version() >= 31 then you.train_skill("Shapeshifting", 0) end you.train_skill("Invocations", 0) you.train_skill("Evocations", 0) you.train_skill("Throwing", 0) else ctrl_weapon() set_target("Fighting") set_target("Armour") set_target("Shields") set_target("Dodging") set_target("Stealth") set_target("Throwing") if you.god() ~= "Trog" then set_target("Spellcasting") end ctrl_invo() ctrl_evo() ctrl_trans() end end end } { function ctrl_1() local check_crawl_version = tonumber(string.sub(crawl.version("major"), 3, 4)) local skill_list = { "Fighting", "Short Blades", "Long Blades", "Maces & Flails", "Axes", "Polearms", "Staves", "Unarmed Combat", "Bows", "Crossbows", "Slings", "Ranged Weapons", "Armour", "Shields", "Dodging", "Stealth", "Invocations", "Evocations", "Throwing", "Spellcasting", "Conjurations", "Hexes", "Summonings", "Necromancy", "Translocations", "Charms", "Fire Magic", "Ice Magic", "Air Magic", "Earth Magic", "Transmutations", "Shapeshifting", "Poison Magic", "Alchemy", } for k = #skill_list, 1, -1 do local school = skill_list[k] if check_crawl_version >= 26 then if school == "Charms" then table.remove(skill_list, k) end end if check_crawl_version < 29 then if school == "Ranged Weapons" then table.remove(skill_list, k) end else if school == "Bows" or school == "Crossbows" or school == "Slings" then table.remove(skill_list, k) end end if check_crawl_version < 31 then if school == "Alchemy" or school == "Shapeshifting" then table.remove(skill_list, k) end else if school == "Transmutations" or school == "Poison Magic" then table.remove(skill_list, k) end end end for _, skill in ipairs(skill_list) do local base_skill = you.base_skill(skill) for target = 1, 27 do if base_skill < target then you.set_training_target(skill, target) break end end end end } { local bin_head = true local bin_hand = true local bin_foot = true local bin_back = true local bin_buck = true function ctrl_bag() local acq_slot = false local exp_slot = false local fully_id_not = false local id_slot = nil local cu_slot = nil local tele_slot = nil local heal_slot = nil local useless_scroll_slot = nil local useless_potion_slot = nil local bin_hat_slot = nil local bin_hel_slot = nil local bin_hand_slot = nil local bin_foot_slot = nil local bin_back_slot = nil local bin_buck_slot = nil for slot = 0, 51 do key = items.inslot(slot) if key then acq = key.name():find("scroll.*acq") exp = key.name():find("potion.*exp") id = key.name():find("scroll.*id") cu = key.name():find("potion.*cu") tele = key.name():find("scroll.*tele") heal = key.name():find("potion.*heal") useless_scroll = key.name():find("scroll.*noise") useless_potion = key.name():find("potion.*degen") no_bin_hat = key.name():find("hat") no_bin_hel = key.name():find("helmet") no_bin_hand = key.name():find("pair.*glov") no_bin_foot = key.name():find("pair.*boots") no_bin_bard = key.name():find("barding") no_bin_back = key.name():find("cloak") no_bin_buck = key.name():find("buck") fully_id = key.fully_identified if acq then if slot ~= 17 then if items.inslot(17) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 17) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(slot, 17) end else items.swap_slots(slot, 17) end end acq_slot = true end if exp then if slot ~= 16 then if items.inslot(16) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 16) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(slot, 16) end else items.swap_slots(slot, 16) end end exp_slot = true end if fully_id == false then fully_id_not = true end if id then id_slot = slot end if cu then cu_slot = slot end if tele then tele_slot = slot end if heal then heal_slot = slot end if useless_scroll then useless_scroll_slot = slot end if useless_potion then useless_potion_slot = slot end if not (key.artefact) then if not (key.branded) then if bin_foot then if no_bin_bard then bin_foot_slot = slot elseif no_bin_foot then bin_foot_slot = slot end end if bin_back and no_bin_back then bin_back_slot = slot end if bin_hand and no_bin_hand then bin_hand_slot = slot end if bin_head and no_bin_hat then bin_hat_slot = slot end if bin_head and no_bin_hel then bin_hel_slot = slot end if bin_buck and no_bin_buck then bin_buck_slot = slot end end end end end if you.feel_safe() then if useless_scroll_slot then items.inslot(useless_scroll_slot).drop() end if useless_potion_slot then items.inslot(useless_potion_slot).drop() end if you.transform() == "" or you.transform() == "Death" then if bin_foot then if items.equipped_at("Boots") then bin_foot = false elseif bin_foot_slot then items.inslot(bin_foot_slot).wear() bin_foot = false end end if bin_back then if items.equipped_at("Cloak") then bin_back = false elseif bin_back_slot then items.inslot(bin_back_slot).wear() bin_back = false end end if bin_hand then if you.has_claws() ~= 0 then bin_hand = false elseif items.equipped_at("Gloves") then bin_hand = false elseif bin_hand_slot then items.inslot(bin_hand_slot).wear() bin_hand = false end end if bin_head then if items.equipped_at("Helmet") then bin_head = false elseif bin_hat_slot then items.inslot(bin_hat_slot).wear() bin_head = false elseif bin_hel_slot then items.inslot(bin_hel_slot).wear() bin_head = false end end if bin_buck then if items.equipped_at("Shield") then bin_buck = false elseif bin_buck_slot then items.inslot(bin_buck_slot).wear() bin_buck = false end end end end if not acq_slot then if id_slot then if fully_id_not then if id_slot ~= 17 then if items.inslot(17) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 17) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(id_slot, 17) end else items.swap_slots(id_slot, 17) end end elseif tele_slot then if tele_slot ~= 17 then if id_slot == 17 then items.swap_slots(id_slot, tele_slot) end end elseif id_slot ~= 17 then if items.inslot(17) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 17) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(id_slot, 17) end else items.swap_slots(id_slot, 17) end end elseif tele_slot then if tele_slot ~= 17 then if items.inslot(17) then local find_bin_slot = false for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 17) find_bin_slot = true break end end if not find_bin_slot then items.swap_slots(tele_slot, 17) end else items.swap_slots(tele_slot, 17) end end end end if not exp_slot then if cu_slot then if you.poisoned() or you.confused() then if cu_slot ~= 16 then if items.inslot(16) then for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 16) break end end end items.swap_slots(cu_slot, 16) end elseif heal_slot then if heal_slot ~= 16 then if items.inslot(16) then for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 16) break end end end items.swap_slots(heal_slot, 16) end elseif cu_slot ~= 16 then if items.inslot(16) then for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 16) break end end end items.swap_slots(cu_slot, 16) end elseif heal_slot then if heal_slot ~= 16 then if items.inslot(16) then for bin_slot = 0, 51 do if not items.inslot(bin_slot) then items.swap_slots(bin_slot, 16) break end end end items.swap_slots(heal_slot, 16) end end end end } { function ctrl_travel() local fly_1 = you.race() == "Gargoyle" and you.mutation("big wings") ~= 0 local fly_2 = you.race() == "Tengu" and you.mutation("evasive flight") ~= 0 local fly_3 = you.race() == "Djinni" and you.mutation("float") ~= 0 local fly = fly_1 or fly_2 or fly_3 local amphibious = you.race() == "Merfolk" or you.race() == "Octopode" or you.race() == "Barachi" local form_large = you.transform() == "Ice" or you.transform() == "Snake" local form_giant = you.transform() == "Dragon" local size_large = you.race() == "Troll" or you.race() == "Ogre" or you.race() == "Oni" local size_hybrid = you.race() == "Centaur" or you.race() == "Naga" or you.race() == "Palentonga" or you.race() == "Armataur" local deep = fly or amphibious or form_large or form_giant local shallow = size_large or size_hybrid if deep then if you.branch() == "Shoals" then crawl.setopt("travel_avoid_terrain = deep water") else crawl.setopt("travel_avoid_terrain = ") end elseif shallow then if version() < 30 then -- Large species move at normal speed through shallow water. crawl.setopt("travel_avoid_terrain = shallow water, deep water") else crawl.setopt("travel_avoid_terrain = deep water") end else crawl.setopt("travel_avoid_terrain = shallow water, deep water") end if you.god() == "No God" then crawl.setopt("explore_stop += altars") else crawl.setopt("explore_stop -= altars") end end } { function c_answer_prompt(prompt) local current_crawl_version = tonumber(string.sub(crawl.version("major"), 3, 4)) if prompt:find("Die?") then return false end if current_crawl_version < 25 and prompt:find("Memorise Iskenderun's Mystic Blast") then return false end if current_crawl_version < 27 and prompt:find("Memorise Chain Lightning") then return false end if current_crawl_version < 32 and prompt:find("Memorise Teleport Other") then return false end if prompt:find("Really.*attack.*wielding.*nothing?") then return false end end }