##### Murphy's Crawl Init file ############################################### include +=HDamage.rc include +=HDAColors.rc include +=SpoilerAlerts.rc include +=HDAForceMore.rc #tile_player_tile = mons:jessica tile_player_tile = playermons #use_animations = false autofight_throw = true auto_switch = true auto_sacrifice = true sacrifice_before_explore = true explore_stop += book autofight_stop = 50 warn_hatches = true interrupt_eat = message_colour += mute:(HP|Magic) restored show_god_gift = unident auto_exclude +=electric eel auto_exclude +=a web warn_web = true # ---------------------- --------------------------- #shots will stop at the target (like "f.") rather than continuing past #autofight_fire_stop = true # don't auto-explore over deep water travel_avoid_terrain = deep water #When resting, if your HP or MP is below this percentage of being full, it will stop resting when this percent of maximum HP or MP is refilled. rest_wait_percent = 100 #auto-explore waits until your HP and MP are both at rest_wait_percent before moving. explore_auto_rest = true # no longer have to turn manual on for every starting character default_manual_training = true #skill_focus = false # automatically butcher edible corpses upon standing on them auto_butcher = true #never asks if u want to butcher any corpses confirm_butcher = never # show "Cloud" status when in a cloud cloud_status = true #never force capitals on Y/N questions easy_confirm = all # ------------------------ AUTOPICKUP EXCEPTIONS ----------------------------- ae := autopickup_exceptions # inclusions ae += < throwing nets #ae += < arrows|stones|sling bullets|bolts|needles|tomahawks| javelins|throwing net : if (you.race() == "Ogre" or you.race() == "Troll") then ae += scrolls? of (amnesia) ae += >ring of (wizardry|positive energy|protection from cold|protection from fire|protection from magic|fire|ice|magical power|stealth|strength|intelligence|dexterity) drop_filter += forbidden, useless, bad_item, dangerous_item # ------------------ CONSTANT ABILITY AND SPELL SLOTS ------------------------ spell_slot ^= Regeneration:r spell_slot ^= Repel Missiles:m spell_slot ^= Blink:B spell_slot ^= Passwall: p item_slot += bread:e item_slot += meat:e item_slot += scroll of identify:r item_slot += lightning rod:v item_slot += potion of curing:q item_slot += potion of blood:q ai := autoinscribe ai += identify:@r1 ai += remove curse:@r2 ai += scrolls? of teleportation:@r3 ai += scrolls? of blinking:@r4 ai += scrolls? of fear:@r5 #ai += scrolls? of fog:@r6 ai += curing:@q1 ai += potions? of heal wounds:@q2 ai += potions? of blood:@q3 ai += potions? of might:@q4 ai += potions? of agility:@q5 ai += wand of digging:@v1 ai += wand of enslavement:@v2 ai += (meat|bread) ration:@e1 ai += royal jelly:@e2 ai += staff of (power|energy|conjurations|summoning|wizardry]:@!a ###################################################################### # Force More Messages and the likes # ###################################################################### more += A sentinel's mark forms upon you more += Deactivating autopickup more += You now have enough gold to buy more += Your icy armour evaporates more += caustic.* comes? into view more += curse toe.*comes? into view more += dream sheep.*comes? into view more += entropy weaver.*comes? into view more += hits you.*distortion more += is wielding.*of more += Your toxic aura wanes stop += flesh start stop += Wait a moment # Skill level up more += skill increases to # Vehumet spell gift more += Vehumet offers you knowledge # A moth of wrath comes into view more += moth of wrath.*comes? into view # Gained mutation more += Gained mutation # A mob wielding a weapon of distortion shows up more += is wielding a .* of distortion # And flashes the screen flash_screen_message += distortion # Ignores butterflies runrest_ignore_monster += butterfly:1 # Documented as delay_safe_poison? Change it? runrest_ignore_poison = 3:30 # What's this line doing here? explore_stop = glowing_items,artefacts,runes,greedy_pickup_smart explore_stop += shops explore_stop += branches explore_stop += altars,portals,runed_doors explore_stop += stairs #explore_stop += greedy_sacrificeable ######################################################################### # Mute Messages # ######################################################################### message_colour ^= mute:Your.*(bites|misses|hits|claws|gores) message_colour ^= mute:accepts your kill message_colour ^= mute:returns to your pack message_colour ^= mute:appreciates : if you.god() == "Jiyva" then message_colour ^= mute:You hear a squelching noise message_colour ^= mute:You hear.*slurping noise. message_colour ^= mute:You feel a little less hungry. message_colour ^= mute:The jelly splits in two! : end ###################################################################### # Item Slots # ###################################################################### item_slot ^= amulet of guardian spirit:G item_slot ^= amulet of regeneration:R item_slot ^= arrows?:Q item_slot ^= blowgun:w item_slot ^= bolts?:Q item_slot ^= potion of blood:q item_slot ^= ring of poison resistance:P item_slot ^= ring of positive energy:N item_slot ^= ring of protection from cold:I item_slot ^= ring of protection from fire:F item_slot ^= ring of protection from magic:Mm item_slot ^= ring of resist corrosion:C item_slot ^= ring of see invisible:S item_slot ^= ring of wizardry:W item_slot ^= scrolls? of blinking:B item_slot ^= scrolls? of fear:e item_slot ^= scrolls? of fog:f item_slot ^= scrolls? of identify:r item_slot ^= scrolls? of recharging:i item_slot ^= scrolls? of teleportation:t item_slot ^= stones?:Q item_slot ^= the ring.*rC\+:I item_slot ^= the ring.*rF\+:F item_slot ^= wand of digging:D item_slot ^= wand of disintegration:d ###################################################################### # Auto Exclude # ###################################################################### ## dangerous monsters ## auto_exclude += ancient lich, death drake, hydra, ice statue, orb of fire ## paralysing monsters and uniques ## auto_exclude += [^c] wizard, ancient lich, Ereshkigal, Erolcha, eyeball, Grinder, Jory, lich auto_exclude += Norris, ogre-mage, orb of eyes, orc sorcerer, Rupert, sphinx, vampire knight ## other uniques and unique followers ## auto_exclude += Agnes, Aizul, Arachne, Asterion, Blork, Boris, Crazy Yiuf, Donald, Dowan auto_exclude += Duvessa, Edmund, Erica, Eustachio, Fannar, Frances, Frederick, Gastronok auto_exclude += Grum, Harold, Ijyb, Jessica, Jorgrun, Joseph, Kirke, Louise, Mara, Maud auto_exclude += Maurice, Menkaure, Mennas, Natasha, Nergalle, Nessos, Nikola, Pikel auto_exclude += Polyphemus, Prince Ribbit, Psyche, Roxanne, Saint Roka, Sigmund, Snorg auto_exclude += Sojobo, Sonja, Terence, Urug, Wiglaf, Xtahua, slave ###################################################################### # Auto Pickup # ###################################################################### autopickup_exceptions += useless_item autopickup_exceptions += dangerous_item autopickup_exceptions += evil_item autopickup_exceptions += amulet of (inaccuracy|the gourmand) autopickup_exceptions += amulet of (clarity|rage||guardian spirit|faith) autopickup_exceptions += ring of (see invisible|flight|poison resistance) autopickup_exceptions += ring of (invisibility|teleportation|fire|ice) autopickup_exceptions += ring of (sustain abilities|wizardry|life protection) autopickup_exceptions += potion of lignification : if you.race() ~= "Vampire" then autopickup_exceptions += potion of blood : end autopickup_exceptions += wand of random effects autopickup_exceptions += staff of .* autopickup_exceptions += \{13}> #move and pick up next item and try to wear it #macros += M 0 XI\{13},W #macros += M < ===safe_upstairs # -------------------------- FLASH_SCREEN_MESSAGE------------------------------ # flash screen in yellow when something with distortion appears flash_screen_message+=distortion # -------------------------- FORCE_MORE_MESSAGE ------------------------------ # avoid force_more prompt by too many unimportant information show_more = false # force "more" when these happen # alias first more := force_more_message # only for manual exploring, otherwise it's too annoying #more += comes? into view # dangerous monsters in sight # corrupters, temporary or permanent more += (giant eyeball|shining eye|cacodemon|neqoxec|corrupter|wretched star).*into view # tormentors more += (curse toe|curse skull|fiend|tzitzimitl|tormentor|mummy priest|greater mummy).*into view # damnators more += (deep elf high priest|deep elf sorcerer|draconian scorcher|draconian zealot|hell sentinel|hellion).*into view # summoners and displacers more += (deep elf demonologist|doom hound|draconian shifter|guardian serpent|ironbrand convoker|shadow demon).*into view # just plain strong more += (ancient lich|caustic shrike|iron giant|juggernaut|orb of fire).*into view # nasty statuses more += (ancient zyme|death cob|death drake|entropy weaver|flayed ghost|ghost moth|moth of wrath|floating eye|starcursed mass|vault warden|warmonger).*into view # uniques or pan lords, also Killer Klown, Orb Guardian and some others more += (?-i:[A-Z]).* comes? into view # dispel undead : if (you.race() == "Mummy" or you.race() == "Ghoul" or you.race() == "Vampire") then more += (anubis guard|revenant).*into view : end # distortion weapons more += Space warps horribly around you more += Space bends around you more += hits you.*distortion more += warns you.*of distortion more += is wielding.*of distortion # holy wrath weapons : if (you.race() == "Mummy" or you.race() == "Ghoul" or you.race() == "Vampire") then more += hits you.*holy wrath more += warns you.*of holy wrath more += is wielding.*of holy wrath : end # invisible ghost moth more += watched by something # hit by Airstrike while flying more += The air twists around and violently strikes you in flight # ironbrand convoker's delayed summon more += begins to recite a word of recall # teleported onto exact same tile more += Your surroundings flicker # manual gone more += You have finished your manual # miscast more += You miscast # transmutation spell starts to run out more += Your transformation is almost over # bad mutations! (some will have the same text for multiple levels) # berserk more += You feel a little pissed off more += You feel angry more += You feel extremely angry at everything! # blurry vision more += Your vision blurs # teleportitis more += You feel weirdly uncertain more += You feel even more weirdly uncertain # deformed body more += Your body twists and deforms # frail more += You feel frail # --spell power +wiz more += Your connection to magic feels subdued more += Your connection to magic feels more subdued more += Your connection to magic feels nearly dormant # -wiz ++spell power more += You feel less in control of your magic more += You feel your magical power running wild # no device heal (only lvl 2-3) more += Your system mostly rejects artificial healing more += Your system completely rejects artificial healing # low regen (only lvl 3) - text changed in trunk on 19th Sep '16 more += Your regeneration stops completely # hit by a catopblepas' petrifying cloud more += The blast of calcifying dust hits you # petrification setting in more += You are slowing down # Fainting level of hunger, this is for hungry ghosts more += You are fainting from starvation # entering a rune level in Pandemonium more += The mighty Pandemonium lord .* resides here # entering holy Pan more += The tension of great conflict fills the air! # volcano about to erupt more += The air gets thick with the scent of sulphur ########### ### Lua ### ########### ------------------------------------------------------------------- - For players who are prone to leave labyrinths without picking up the -loot, here is a way to avoid that: put the following snippet in your -options file (init.txt or .crawlrc) and then macro the '<' key to - ===safe_upstairs (do it in-game by pressing '~' or Ctrl-D). { function safe_upstairs() if you.branch() == "Lab" then crawl.formatted_mpr("Really leave this labyrinth?", "prompt") local res = crawl.getch() if string.lower(string.char(res)) == "y" then crawl.sendkeys("<") end else crawl.sendkeys("<") end end ---------------------------------------------------------------- -- Equipment autopickup (by Medar and various others) local function pickup_equipment(it, name) if it.is_useless then return end local class = it.class(true) if class == "armour" then local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} st, _ = it.subtype() -- Autopickup found aux armour if 1) we don't have any or 2) it's artefact, -- or 3) if we don't have artefact or ego armour, and the found armour is -- ego. if good_slots[st] ~= nil then if good_slots[st] == "Gloves" and you.has_claws() > 0 then return end if it.artefact then return true end local cur = items.equipped_at(good_slots[st]) if cur == nil then return true end if cur.branded or cur.artefact then return end if it.branded then return true end -- Autopickup found body armour of the same kind we're wearing, according -- to conditions (2) and (3) above used for aux slots. elseif st == "body" then local cur = items.equipped_at("armour") if cur == nil then return end if cur.name("qual") ~= it.name("qual") then return end if it.artefact then return true end if cur.branded or cur.artefact then return end if it.branded then return true end end end return end add_autopickup_func(pickup_equipment) -- Spellcasting spam reduction by monqy local function generic_cast_spell(cmd) crawl.mpr('Cast which spell?') crawl.flush_prev_message() crawl.process_keys(cmd) end function cast_spell() generic_cast_spell('z') end function force_cast_spell() generic_cast_spell('Z') end --------------------------------------- ---- Begin conditional force_mores ---- --------------------------------------- last_turn = you.turns() -- Conditions are in the fm_patterns array. For now only one condition -- per monster is allowed until (if) I get better at lua to modify -- the script further. Each array entry works as follows: -- pattern = monster name -- cond = attribute to check; behaviour is defined later on -- cutoff = if attribute's value is equal or higher, don't force more for these -- name = an identifier for the entry in the array fm_patterns = { -- early threats {pattern = "adder|gnoll", cond = "xl", cutoff = 5, name = "XL5"}, -- early poisonous threats -- {pattern = "worker ant|scorpion", cond = "xl", cutoff = 7, name = "XL7"), -- the frog of doom and a merry lizard {pattern = "spiny frog|komodo dragon", cond = "xl", cutoff = 12, name = "XL12"}, -- biggest lair threats {pattern = "death yak|dire elephant|black mamba|wolf spider|hydra", cond = "xl", cutoff = 15, name = "XL15"}, -- biggest orc threat {pattern = "orc warlord", cond = "xl", cutoff = 17, name = "XL17"}, -- no rF {pattern = "fire giant|balrug", cond = "rf", cutoff = 1, name = "rF1"}, -- no rC {pattern = "ice giant|white draconian|blizzard demon|azure jelly", cond = "rc", cutoff = 1, name = "rC1"}, -- no rElec {pattern = "spark wasp|titan", cond = "relec", cutoff = 1, name = "rE1"}, -- no rPois {pattern = "swamp drake|swamp dragon|green draconian|golden dragon", cond = "rpois", cutoff = 1, name = "rP1"}, -- no rCorr (boolean) {pattern = "rust devil|acid blob", cond = "rcorr", cutoff = 999, name = "rA1"}, -- low MR (MR not directly exposed to clua yet) -- {pattern = "basilisk|deep elf archer|bog body|faun|ogre mag", cond = "mr", cutoff = 40, name = "MR1"}, -- {pattern = "orc sorcerer|siren|satyr|great orb of eyes", cond = "mr", cutoff = 80, name = "MR2"}, -- {pattern = "merfolk avatar|vault sentinel|vampire knight|golden eye|wizard|sphinx", cond = "mr", cutoff = 120, name = "MR3"}, -- no rN {pattern = "deep elf death mag|eidolon", cond = "rn", cutoff = 1, name = "rN1"}, -- airstrike (boolean) {pattern = "wind drake|spriggan air mag", cond = "fly", cutoff = 999, name = "fly"}, -- HP {pattern = "annihilator", cond = "mhp", cutoff = 120, name = "HP3"} } -- end fm_patterns active_fm = {} -- Set to true to get a message when the fm change notify_fm = false function init_force_mores() for i,v in ipairs(fm_patterns) do active_fm[#active_fm + 1] = false end end function update_force_mores() local activated = {} local deactivated = {} local hp, maxhp = you.hp() for i,v in ipairs(fm_patterns) do local msg = "(" .. v.pattern .. ").*into view" local action = nil local fm_name = v.pattern if v.name then fm_name = v.name end if not v.cond and not active_fm[i] then action = "+" elseif v.cond == "xl" then if active_fm[i] and you.xl() >= v.cutoff then action = "-" elseif not active_fm[i] and you.xl() < v.cutoff then action = "+" end elseif v.cond == "rf" then if active_fm[i] and you.res_fire() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_fire() < v.cutoff then action = "+" end elseif v.cond == "rc" then if active_fm[i] and you.res_cold() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_cold() < v.cutoff then action = "+" end elseif v.cond == "relec" then if active_fm[i] and you.res_shock() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_shock() < v.cutoff then action = "+" end elseif v.cond == "rpois" then if active_fm[i] and you.res_poison() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_poison() < v.cutoff then action = "+" end elseif v.cond == "rcorr" then if active_fm[i] and you.res_corr() then action = "-" elseif not active_fm[i] and not you.res_corr() then action = "+" end elseif v.cond == "rn" then if active_fm[i] and you.res_draining() >= v.cutoff then action = "-" elseif not active_fm[i] and you.res_draining() < v.cutoff then action = "+" end elseif v.cond == "fly" then if active_fm[i] and not you.flying() then action = "-" elseif not active_fm[i] and you.flying() then action = "+" end elseif v.cond == "mhp" then if active_fm[i] and maxhp >= v.cutoff then action = "-" elseif not active_fm[i] and maxhp < v.cutoff then action = "+" end end if action == "+" then activated[#activated + 1] = fm_name elseif action == "-" then deactivated[#deactivated + 1] = fm_name end if action ~= nil then local opt = "force_more_message " .. action .. "= " .. msg crawl.setopt(opt) active_fm[i] = not active_fm[i] end end if #activated > 0 and notify_fm then mpr("Activating force_mores: " .. table.concat(activated, ", ")) end if #deactivated > 0 and notify_fm then mpr("Deactivating force_mores: " .. table.concat(deactivated, ", ")) end end local last_turn = nil function force_mores() if last_turn ~= you.turns() then update_force_mores() last_turn = you.turns() end end init_force_mores() ------------------------- ---- End force_mores ---- ------------------------- -- Global variables for storing channeling information. channel_switched_weapon = false pre_channel_slot = nil -- Custom function for equipping a staff of energy and channeling until -- full MP is full (if no enemies are visible). -- Bind via macro definition: -- M:6 -- A:===custom_channel function custom_channel() channel_switched_weapon = false local have_staff = false local weapon = items.equipped_at("Weapon") if mp_percent() == 100 then crawl.mpr("You already have full MP!") return end if weapon and (weapon.name():find("staff of energy") or weapon.name():find("staff of Wucad")) then have_staff = true else for it in iter.invent_iterator:new(items.inventory()) do if it and (it.name():find("staff of energy") or it.name():find("staff of Wucad")) then have_staff = true channel_switched_weapon = true pre_channel_slot = items.index_to_letter(weapon.slot) local slot = items.index_to_letter(it.slot) crawl.sendkeys('w' .. slot) break end end end if is_enemy_in_los() then crawl.mpr("Don't channel like a madman with enemies in LOS ;)") elseif not have_staff then crawl.mpr("No staff of energy for channeling!") else crawl.sendkeys('0' .. '1' .. '0' .. '0' .. 'v') end end local need_skills_opened = true function ready() -- Dynamic force-mores. force_mores() -- Dmg Messages -- AnnounceDamage() --Y/N *before* entering a command, whenever you are petrifying. if you.petrifying() then if not crawl.yesno("You are petrifying!!! Press Y to continue entering your action.") then crawl.sendkeys("h") end end -- To automatically open the skill menu when starting a new game. if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end -- Change back to the original weapon if it was changed by channeling -- and no enemies are in LOS. if channel_switched_weapon then if not is_enemy_in_los() then crawl.sendkeys('w' .. pre_channel_slot) end pre_channel_slot = nil channel_switched_weapon = false end end } ------------------------------------------------------------- # Keybindings to override the vi movement keys. # CMD_NO_CMD_DEFAULT results in "Unknown command." # See docs/keybind.txt for other commands. bindkey = [h] CMD_NO_CMD_DEFAULT bindkey = [j] CMD_NO_CMD_DEFAULT bindkey = [k] CMD_NO_CMD_DEFAULT bindkey = [l] CMD_NO_CMD_DEFAULT bindkey = [H] CMD_NO_CMD_DEFAULT bindkey = [J] CMD_NO_CMD_DEFAULT bindkey = [K] CMD_NO_CMD_DEFAULT bindkey = [L] CMD_NO_CMD_DEFAULT bindkey = [^H] CMD_NO_CMD_DEFAULT bindkey = [^J] CMD_NO_CMD_DEFAULT bindkey = [^K] CMD_NO_CMD_DEFAULT bindkey = [^L] CMD_NO_CMD_DEFAULT bindkey = [y] CMD_NO_CMD_DEFAULT bindkey = [u] CMD_NO_CMD_DEFAULT bindkey = [b] CMD_NO_CMD_DEFAULT bindkey = [n] CMD_NO_CMD_DEFAULT bindkey = [Y] CMD_NO_CMD_DEFAULT bindkey = [U] CMD_NO_CMD_DEFAULT bindkey = [B] CMD_NO_CMD_DEFAULT bindkey = [N] CMD_NO_CMD_DEFAULT bindkey = [^Y] CMD_NO_CMD_DEFAULT bindkey = [^U] CMD_NO_CMD_DEFAULT bindkey = [^B] CMD_NO_CMD_DEFAULT bindkey = [^N] CMD_NO_CMD_DEFAULT # Rebind shift-move to safe moving. bindkey = [H] CMD_SAFE_MOVE_LEFT bindkey = [J] CMD_SAFE_MOVE_DOWN bindkey = [K] CMD_SAFE_MOVE_UP bindkey = [L] CMD_SAFE_MOVE_RIGHT bindkey = [Y] CMD_SAFE_MOVE_UP_LEFT bindkey = [U] CMD_SAFE_MOVE_UP_RIGHT bindkey = [B] CMD_SAFE_MOVE_DOWN_LEFT bindkey = [N] CMD_SAFE_MOVE_DOWN_RIGHT