############ GENERAL SETTINGS ############ default_manual_training = true autofight_stop = 55 hp_warning = 20 note_hp_percent = 20 show_more = false show_travel_trail = true travel_delay = -1 explore_delay = -1 rest_delay = -1 tile_map_scale = 0.8 prompt_menu = false action_panel_orientation = vertical action_panel_scale = 50 monster_list_colour += good_neutral:blue drop_disables_autopickup = true # Critical for necromancers! explore_auto_rest = false force_spell_targeter += Permafrost Eruption force_ability_targeter += Bend Time ############ AUTO INSCRIBES ############ # This list used to be a lot longer, but there are now natural prompts for most dangerous scrolls and potions, which are clever about when to prompt. This system is better than using autoinscriptions. ai := autoinscribe ai += throwing net:!f ai += scroll of (butterflies|summoning):!r ############ FORCE MORES ############ ## General ## more := force_more_message more += LOW HITPOINT more += Ouch! That really hurt! more += wielding .*(distort|chaos) more += wracked with pain more += you convulse more += watched by something more += mighty Pandemonium lord more += finished your manual of more += s you\!\!\! more += feel a terrible chill more += burns you terribly more += strangely unstable more += power of Zot more += expect to remain undetected more += your icy armour evaporates more += training target.*reached more += you miscast more += no longer charmed : if you.race() ~= "Formicid" then more += enters a dispersal trap : end more += carrying a wand more += mark forms upon you more += surroundings.*seem.*different more += Vehumet offers you knowledge more += a new sacrifice more += Ashenzari invites you to partake more += time is quickly running out more += life is in your own more += Your body becomes as fragile as glass more += suddenly lose the ability to move more += slowing down more += Your blazeheart golem falls apart # Let's not force a more message for every skill increase for Djinn and Gnolls # TODO Figure out whether we can make this work better for Gnolls or Djinn with # manuals... : if you.race() == "Djinni" then more += (Fighting|Maces|Axes|Blades|Polearms|Combat|Weapons|Staves|Armour|Dodging|Shields|Stealth|Invo|Evo|Shape|Alchemy).*skill increases more += you have mastered .* (Fighting|Maces|Axes|Blades|Polearms|Combat|Weapons|Staves|Armour|Dodging|Shields|Stealth|Invo|Evo|Shape|Alchemy) : elseif you.race() ~= "Gnoll" then more += skill increases more += levels and is now at more += you have mastered : else more += (Invocations|Evocations|Alchemy|Shapeshifting) skill increases more += you have mastered (Invocations|Spellcasting|Alchemy|Shapeshifting) : end more += cannot teleport more += cannot blink flash_screen_message += cannot teleport flash_screen_message += cannot blink ## Dangerous enemies entering LOS ## # Always dangerous : if you.race() == ("Demonspawn" or "Mummy" or "Vampire" or "Ghoul") then more += wielding .*holy more += (pearl dragon|ophan|seraph).*come : end more += guardian serpent.*into view more += ghost moth.*into view more += lich.*into view more += orbs? of fire.*into view more += curse toe.*into view more += fiend.*into view more += tzit.*into view more += (mummy priest|royal mumm).*into view more += hellion.*into view more += tormentor.*into view more += javelineer.*into view more += aquamancer.*into view more += warden.*into view more += ironbrand convoker.*into view more += curse skull.*into view more += quivering.*throwing net # Uniques more += Agnes.*into view more += Aizul.*into view more += Amaemon.*into view more += Asterion.*into view more += Azrael.*into view more += Bai Suzhen.*into view more += Blork.*into view more += Boris.*into view more += Yuif.*into view more += Dowan.*into view more += Duvessa.*into view more += Donald.*into view more += Edmund.*into view more += Erica.*into view more += Enchantress.*into view more += Erolcha.*into view more += Eustachio.*into view more += Fannar.*into view more += Frances.*into view more += Frederick.*into view more += Gastronok.*into view more += Grinder.*into view more += Grum.*into view more += Grunn.*into view more += Harold.*into view more += Ijyb.*into view more += Jeremiah.*into view more += Jessica.*into view more += Jorgrun.*into view more += Jory.*into view more += Joseph.*into view more += Khufu.*into view more += Kirke.*into view more += Lodul.*into view more += Louise.*come more += Mar.*come more += Maggie.*come more += Maurice.*come more += Men.*come more += Mlioglotl.*come more += Natasha.*come more += Nergalle.*come more += Nessos.*come more += Nikola.*come more += Norris.*come more += Pikel.*come more += Prince Ribbit.*come more += Psyche.*come more += Parg.*come more += Robin.*come more += Rupert.*come more += Roka.*come more += Sigmund.*come more += Sonja.*come more += Snorg.*come more += Sojobo.*come more += Terence.*come more += Urug.*come more += Xtahua.*come more += Vv.*come more += Zenata.*come more += Ilsuiw.*come more += Polyphemus.*come more += Vashnia.*come more += Arachne.*come more += Lernaean hydra.*come more += Tiamat.*come more += Dissolution.*come more += Royal Jelly.*come more += Murray.*come more += Serpent of Hell.*come more += Antaeus.*come more += Asmodeus.*come more += Dispater.*come more += Ereshkigal.*come more += Ignacio.*come more += Mnoleg.*come more += Cerebov.*come more += Lom Lobon.*come more += Gloorx Vloq.*come # Dynamic force mores (credit to UV4 and other historic and current members of the DCSS community for the boilerplate code here, which I have dramatically cleaned up!) Idea: force more for neutralisable threats only when said threat is actually dangerous. { function get_species_will() if you.race() == "Spriggan" then return 7 elseif you.race() == "Felid" or you.race() == "Purple Draconian" then return 6 elseif you.race() == "Mummy" or you.race() == "Naga" or you.race() == "Vine Stalker" then return 5 elseif you.race() == "Demigod" or you.race() == "Deep Elf" or you.race() == "Mountain Dwarf" or you.race() == "Formicid" or you.race() == "Oni" or you.race() == "Vampire" then return 4 else return 3 end end -- Calculate the player's exact willpower. None of this "++" business. -- This can sometimes lead to an underestimate when under Will/2; -- this doesn't matter. function get_will() local basewill = you.willpower() * 40 local extra = (get_species_will() * you.xl()) if you.status("weak-willed") then extra = extra / 2 end extra = extra % 40 return basewill + extra end function evil() return you.race() == "Mummy" or you.race() == "Ghoul" or you.race() == "Demonspawn" or you.race() == "Vampire" or you.transform() == "death" end fm_patterns = { -- Enemies whose difficulty generally depends on XL -- Note willpower checks will also be dealt with in willpower section {name = "XL5", cond = "xl", cutoff = 5, pattern = "(adder|gnoll).*into view"}, {name = "XL7", cond = "xl", cutoff = 7, pattern = "orc wizard.*into view"}, {name = "XL9", cond = "xl", cutoff = 9, pattern = "sleepcap.*into view"}, {name = "XL11", cond = "xl", cutoff = 11, pattern = "wielding.*(venom|elec|draining)"}, {name = "XL17", cond = "xl", cutoff = 17, pattern = "(ogre mag|occultist|arcanist|ironbrand|vault|tengu reaver|juggernaut|(fire|ice|stone) giant|ettin|vampire knight).*into view"}, -- Enemies whose difficulty generally depends on maxhp (early game only) {name = "orc priest", cond = "maxhp", cutoff = 51, pattern = "(centaur|orc priest).*come"}, {name = "ogre", cond = "maxhp", cutoff = 80, pattern = "ogre|acid dragon.*come"}, {name = "two-headed ogre", cond = "maxhp", cutoff = 110, pattern = "(two-headed ogre|troll|deep elf annihilator).*come"}, -- Paralyse - don't force more when immune (except liches) {name = "orc sorcerer", cond = "para", cutoff = 135, pattern = "orc sorcerer.*come"}, {name = "ogre (paralyse)", cond = "para", cutoff = 139, pattern = "ogre mag.*come"}, {name = "vampire knight", cond = "para", cutoff = 143, pattern = "vampire knight.*come"}, {name = "sphinx", cond = "para", cutoff = 154, pattern = "(sphinx|fenstrider witch).*come"}, -- Petrify - don't force more when immune (except liches) {name = "basilisk", cond = "petr", cutoff = 123, pattern = "basilisk.*come"}, {name = "calcifying dust", cond = "calc", pattern = "calcifying dust hits you"}, -- Golden Eyes - force more only if repeated confusion likely, i.e. < 130 will {name = "golden eye", cond = "conf", cutoff = 130, pattern = "golden eye.*come"}, -- Banish - don't force more when XL >= 23 (i.e. banish not a serious threat) {name = "banishing elves", cond = "banish", cutoff = 150, pattern = "deep elf (sorcerer|demonologist).*come"}, {name = "banishing wizard", cond = "banish", cutoff = 146, pattern = "occultist.*come"}, -- Sleep - don't force more when immune {name = "satyr", cond = "sleep", cutoff = 146, pattern = "satyr.*come"}, -- Mesm/Mark (less important, cutoff here is low% not 0%) {name = "sentinel", cond = "mark", cutoff = 130, pattern = "vault sentinel.*come"}, {name = "mesmerise", cond = "mesm", cutoff = 130, pattern = "(siren|avatar|obsidian statue|tainted leviathan).*come"}, -- Other special conditions (hornet para, holy wrath, spark wasps, shrikes) {name = "poison_paralyse", cond = "rpois", cutoff = 3, pattern = "(hornet|jorogumo|formless jellyf).*come"}, -- rpois 3 means total immunity {name = "holy", cond = "holy", pattern = "(pearl dragon|ophan|seraph).*come)|wielding.*holy"}, {name = "spark wasp", cond = "relec", cutoff = 1, pattern = "(spark wasp|titan).*come"}, {name = "shrike", cond = "rcorr", cutoff = 1, pattern = "caustic shrike.*come"}, } -- end fm_patterns active_fm = {} notify_fm = true 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 .. ")" local action = nil local fm_name = v.pattern if v.name then fm_name = v.name end if v.cond == "xl" then if you.xl() >= v.cutoff then action = "-" else action = "+" end elseif v.cond == "relec" then if you.res_shock() >= v.cutoff then action = "-" else action = "+" end elseif v.cond == "rpois" then if you.res_poison() >= v.cutoff then action = "-" else action = "+" end elseif v.cond == "rcorr" then if you.res_corr() then action = "-" else action = "+" end elseif v.cond == "para" then if get_will() >= v.cutoff or you.immune_to_hex("Paralyse") then action = "-" else action = "+" end elseif v.cond == "conf" then if get_will() >= v.cutoff or you.immune_to_hex("Confusion Gaze") then action = "-" else action = "+" end elseif v.cond == "petr" then if get_will() >= v.cutoff or you.immune_to_hex("Petrify") then action = "-" else action = "+" end elseif v.cond == "calc" then if you.immune_to_hex("Petrify") then action = "-" else action = "+" end elseif v.cond == "banish" then if get_will() >= v.cutoff or you.xl() >= 23 then action = "-" else action = "+" end elseif v.cond == "sleep" then if get_will() >= v.cutoff or you.immune_to_hex("Sleep") then action = "-" else action = "+" end elseif v.cond == "mesm" then if get_will() >= v.cutoff or you.immune_to_hex("Mesmerise") then action = "-" else action = "+" end elseif v.cond == "mark" then if get_will() >= v.cutoff then action = "-" else action = "+" end elseif v.cond == "holy" then if evil() then action = "+" else action = "-" end elseif v.cond == "mhp" then if maxhp >= v.cutoff then action = "-" else action = "+" end end if not active_fm[i] and action == "+" then activated[#activated + 1] = fm_name elseif active_fm[i] and action == "-" then deactivated[#deactivated + 1] = fm_name else action = nil 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 crawl.mpr("Activating force_mores: " .. table.concat(activated, ", ")) end if #deactivated > 0 and notify_fm then crawl.mpr("Deactivating force_mores: " .. table.concat(deactivated, ", ")) end end } ############ ITEM AND SPELL SLOTS ############# islot := item_slot sslot := spell_slot ## Scrolls ## islot += scrolls? of identify:+r islot += scrolls? of blinking:+x islot += scrolls? of teleport:+t islot += scrolls? of (summoning|butterflies):+u islot += scrolls? of fog:+o islot += scrolls? of fear:+e ## Potions ## islot += potions? of curing:+q islot += potions? of heal:+h islot += potions? of haste:+f islot += potions? of brilliance:+i islot += potions? of might:+m islot += potions? of magic:+z islot += potions? of resistance:+s islot += potions? of cancel:+c ## Rings ## islot += ring of protection from fire:+F islot += ring of protection from cold:+C islot += ring of positive energy:+Y islot += ring of poison resistance:+P islot += ring of resist corrosion:+R islot += ring of willpower:+W islot += ring of see invis:+Z islot += ring of evasion:+EV islot += ring of protection:+AT islot += ring of slaying:+S ## Spells ## sslot += Orb of Des:+z sslot += Blink:+X ## Abilities ## ability_slot += Potion Pet:+P ability_slot += Call Merchant:+M ############ ITEM COLOURS ############ menu := menu_colour menu = # Colours are approximately as follows # black - unused (this doesn't work very well!) # darkgrey - useless/melded # red - forbidden # lightred - cursed items/scrolls of noise # white - artefacts (as in default crawl), wands of digging # lightcyan - unrands (as in default crawl), also acq/experience # yellow - unidentified items and equipped items (note: no overlap) # lightgrey - default/unexciting items, e.g. +stats, rN+ # lightblue - meaningful resistances/"use early" items # blue - scrolls of enchantment, decent egos # green - good items, escape items # lightgreen - the best emergency items only (?blink, !healing, zigfig) # brown - mixed bag, useful items/egos # lightmagenta - risky but usually good items # magenta - risky, usually bad items # cyan - magical items, powerful non-emergency scrolls ## General ## menu += darkgrey:(melded) menu += red:.*forbidden.* menu += lightred:cursed menu += lightred:noise ## darkgrey for useless _except_ on r/q screen (as that works weirdly) ## menu += inventory:darkgrey:.*useless_item.* menu += pickup:darkgrey:.*useless_item.* menu += shop:darkgrey:.*useless_item.* menu += equip:darkgrey:.*useless_item.* menu += unequip:darkgrey:.*useless_item.* menu += stash:darkgrey:.*useless_item.* ## Armour/Weapons on stats screen whyyyyyy ## menu += stats:brown:(protection|spectral|pain|holy wrath) menu += stats:lightblue:(flaming|freezing|heavy) menu += stats:blue:(venom|draining) menu += stats:cyan:(electrocution|speed) menu += stats:lightmagenta:(distortion|antimagic) menu += stats:green:vampiric menu += stats:magenta:chaos menu += stats:lightgrey:weapon ## More general menu += inventory:yellow:equipped menu += use_item:yellow:equipped menu += inventory:yellow:installed menu += lightcyan:.*unrand.* menu += white:.*artefact.* menu += yellow:^unidentified .*(jewellery|potion|scroll|wand).* menu += yellow:^unidentified .*armour.*(embroidered|dyed|glowing|shiny|runed) menu += yellow:^unidentified .*weapon.*(glowing|runed) ## Consumables ## menu += green:scrolls? of (fear|fog|teleportation|butterflies) menu += lightgreen:scrolls? of blinking menu += cyan:scrolls? of summoning menu += blue:scrolls? of (brand|enchant) (weapon|armour) menu += lightblue:scrolls? of (identify|amnesia) menu += brown:scrolls? of revelation menu += lightmagenta:scrolls? of (immolation|vulnerability|silence) # torment and poison have special logic menu += lightgreen:potions? of heal wounds menu += green:potions? of (haste|invisibility|cancellation) menu += lightblue:potions? of (might|brilliance|resistance|berserk rage|enlightenment) menu += lightmagenta:potions? of ambrosia menu += magenta:potions? of (mutation|attraction|lignification) menu += lightcyan:(potions? of experience|scrolls? of acquirement) # potions of curing/magic have special logic ## Equippables ## menu += blue:amulet of reflection menu += brown:amulet of guardian spirit menu += lightblue:amulet of the acrobat menu += lightmagenta:amulet of faith menu += green:amulet of regeneration menu += cyan:amulet of magic regeneration menu += lightmagenta:ring of (fire|ice) menu += brown:ring of (dex|int|str) menu += lightblue:ring of (poison|protection from fire|protection from cold|willpower|resist corrosion) menu += lightgray:ring of (flight|positive energy|see invisible) menu += green:ring of (.*evasion|.*protection|.*slaying) menu += cyan:ring of (magical power|wizardry) # stats rings are lightgrey ## Armour/Weapons ## menu += brown:(protection|str|int|dex) # special egos menu += blue:(invisibility|repulsion|reflection|hurling) menu += green:(of resistance|gold dragon scales) menu += lightblue:(resistance|willpower|preservation) menu += green:troll leather armour menu += lightgray:(shadow|pearl|steam) dragon scales menu += lightblue: dragon scales menu += magenta:of (harm|guile|mayhem|wrath|ponderousness) menu += lightmagenta:of (shadows|energy|rampaging) menu += cyan:(Archmagi|infusion) # All other egos get lightgrey. Work in progress to fix this: ideally # egos should be coloured and non-egos lightgrey. ## Weapon brands ## # idea - all brands have a colour, non-brands don't menu += brown:(protection|pain|holy wrath) menu += lightblue:(flaming|freezing|heavy) menu += blue:(venom|draining) menu += cyan:(electrocution|speed|spectral) menu += lightmagenta:(distortion|antimagic) menu += green:vampiric menu += magenta:chaos ## Evocables ## menu += brown:wand of (charming|paralysis|polymorph|mindburst) menu += white:wand of digging menu += cyan:wand of (acid|light|quicksilver) menu += lightblue:wand of (roots|iceblast|warping) menu += lightgray:wand of flame menu += darkgray:inert menu += lightblue:phial of floods menu += green:Gell's gravitambourine menu += lightblue:lightning rod menu += blue:box of beasts menu += blue:sack of spiders menu += blue:phantom mirror menu += cyan:.*tremor.* menu += cyan:condenser vane menu += lightmagenta:horn of Geryon menu += lightgreen:figurine of a ziggurat ## Throwing ## menu += green:(throwing net|curare|dispersal) menu += magenta:datura menu += cyan:silver menu += lightblue:(boomerang|javelin|dart|large rock) menu += lightgray:stone ## Runes/Orb ## menu += lightgreen:rune of Zot menu += white:orb of Zot menu += lightcyan:gem menu += cyan:manual # Dynamic scrolls of poison/torment / potions of magic colouring { local torment = -1 local poison = -1 local spirit = -1 local curing = -1 local pain = -1 function update_menu_colours() if (you.race() == "Mummy" or you.race() == "Ghoul" or (you.race() == "Vampire" and you.status("bloodless")) or you.transform() == "death") then if torment ~= true then crawl.setopt("menu_colour += cyan:scrolls? of torment") torment = true end else if torment ~= false then crawl.setopt("menu_colour += magenta:scrolls? of torment") torment = false end end if you.res_poison() >= 1 then if poison ~= true then crawl.setopt("menu_colour += cyan:scrolls? of poison") poison = true end else if poison ~= false then crawl.setopt("menu_colour += magenta:scrolls? of poison") poison = false end end if you.spirit_shield() == 1 then if spirit ~= 2 then crawl.setopt("menu_colour += lightgreen:potions? of magic") spirit = 2 end elseif you.god() == "Trog" then if spirit ~= 1 then crawl.setopt("menu_colour += darkgrey:potions? of magic") spirit = 1 end else if spirit ~= 0 then crawl.setopt("menu_colour += cyan:potions? of magic") spirit = 0 end end if you.get_base_mutation_level("no potion heal") == 2 then if curing ~= false then crawl.setopt("menu_colour += green:potions? of curing") curing = false end else if curing ~= true then crawl.setopt("menu_colour += lightgreen:potions? of curing") curing = true end end if you.skill("Necromancy") >= 3 then if pain ~= true then crawl.setopt("menu_colour += cyan:of pain") pain = true end else if pain ~= false then crawl.setopt("menu_colour += lightgrey:of pain") pain = false end end end ---------- GENERAL FUNCTIONS --------- local last_turn = nil function force_mores() if last_turn ~= you.turns() then update_force_mores() update_menu_colours() last_turn = you.turns() end end init_force_mores() function ready() force_mores() end }