always_show_zot = true ######################### # Good Beginner Options # ######################### default_manual_training = true autofight_stop = 50 auto_butcher = true auto_eat_chunks = true show_more = false ############ # Includes # ############ # include += HDAColors.rc # doesnt work without this rc being present # NOTE: the contents of HDAColors is copied below. You can delete it if you don't want to mess with Crawl's default colours ################# # Lua Functions # ################# ----------------------------------------------------------------------------------- -- Armour/Weapon autopickup by rwbarton, enhanced by HDA with fixes from Bloaxor -- ----------------------------------------------------------------------------------- { add_autopickup_func(function(it, name) if name:find("throwing net") then return true end local class = it.class(true) local armour_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots", body="Armour", shield="Shield"} if (class == "armour") then if it.is_useless then return false end sub_type = it.subtype() equipped_item = items.equipped_at(armour_slots[sub_type]) if (sub_type == "cloak") or (sub_type == "helmet") or (sub_type == "gloves") or (sub_type == "boots") then if not equipped_item then return true else return it.artefact or it.branded or it.ego end end if (sub_type == "body") then if equipped_item then local armourname = equipped_item.name() if equipped_item.artefact or equipped_item.branded or equipped_item.ego or (equipped_item.plus > 2) or armourname:find("dragon") or armourname:find("troll") then return it.artefact else return it.artefact or it.branded or it.ego end end return true end if (sub_type == "shield") then if equipped_item then return it.artefact or it.branded or it.ego end end end end) } ------------------------- -- Dynamic Force Mores -- ------------------------- { last_turn = you.turns() fm_patterns = { {name = "XL5", cond = "xl", cutoff = 5, pattern = "adder|gnoll"}, -- {name = "XL8", cond = "xl", cutoff = 8, pattern = "ogre|centaur|orc wizard|scorpion|worker ant"}, -- {name = "XL15", cond = "xl", cutoff = 15, pattern = "two-headed ogre|centaur warrior|orc (warlord|knight)"}, -- {name = "50mhp", cond = "maxhp", cutoff = 50, pattern = "orc priest|electric eel"}, -- {name = "60mhp", cond = "maxhp", cutoff = 60, pattern = "acid dragon|steam dragon|manticore"}, -- {name = "70mhp", cond = "maxhp", cutoff = 70, pattern = "meliai"} } -- 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() } ################## # Ready Function # ################## { local need_skills_opened = true function ready() force_mores() -- Skill menu at game start by rwbarton if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end } ############# # Interface # ############# autofight_throw = false autofight_throw_nomove = false show_travel_trail = true travel_delay = 1 rest_delay = -1 auto_sacrifice = true sacrifice_before_explore = true show_game_time = true warn_hatches = true jewellery_prompt = false equip_unequip = true allow_self_target = never confirm_butcher = never easy_eat_gourmand = true sort_menus = true : equipped, identified, basename, qualname, charged hp_warning = 50 auto_hide_spells = true wall_jump_move = false ############## # Autopickup # ############## # autopickup = $?!:"/%}|\ ae := autopickup_exceptions # autopickup artifacts ae += scroll of amnesia ae += >scroll of holy word ae ^= wand of random effects # ae += >wand of paralysis # ae += >wand of lightning # ae += >wand of confusion # ae += >wand of digging # ae += >wand of disintegration # ae += >wand of polymorph # ae += >wand of flame # ae += >wand of enslavement ae += ring of stealth ae += >ring of positive energy ae += >ring of fire ae += >ring of ice ae += >ring of magical power ae += >ring of strength ae += >ring of intelligence ae += >ring of dexterity ae += >ring of wizardry ######### # Notes # ######### dump_item_origins = all dump_message_count = 50 dump_book_spells = false ########## # Travel # ########## explore_stop = items,greedy_items,greedy_pickup,greedy_pickup_gold explore_stop += greedy_visited_item_stack,stairs,shops,altars,gates explore_stop += greedy_sacrificeable auto_exclude += oklob,statue,roxanne,hyperactive stop := runrest_stop_message ignore := runrest_ignore_message # Annoyances : if you.god() == "Jiyva" then ignore += Jiyva gurgles merrily ignore += Jiyva appreciates your sacrifice ignore += Jiyva says: Divide and consume ignore += You hear.*splatter : end ignore ^= You feel.*sick ignore += disappears in a puff of smoke ignore += engulfed in a cloud of smoke ignore += standing in the rain ignore += engulfed in white fluffiness ignore += safely over a trap ignore += A.*toadstool withers and dies ignore += toadstools? grow ignore += You walk carefully through the ignore += chunks of flesh in your inventory.*rotted away runrest_ignore_poison = 5:10 runrest_ignore_monster += ^butterfly:1 # Bad things stop += You fall through a shaft stop += An alarm trap emits a blaring wail stop += (blundered into a|invokes the power of) Zot stop += A huge blade swings out and slices into you! stop += flesh start stop += (starving|feel devoid of blood) stop += wrath finds you stop += lose consciousness stop += watched by something stop += appears from out of your range of vision # Expiring effects stop += You feel yourself slow down stop += less insulated stop += You are starting to lose your buoyancy stop += You lose control over your flight stop += Your hearing returns stop += Your transformation is almost over stop += back to life stop += uncertain stop += time is quickly running out stop += life is in your own hands stop += is no longer charmed stop += You start to feel a little slower stop += You are no longer : if you.race() == "Ghoul" then stop += smell.*(rott(ing|en)|decay) stop += something tasty in your inventory : end : if you.god() == "Xom" then stop += god: :else ignore += god: :end ignore += pray: ignore += talk: ignore += talk_visual: ignore += friend_spell: ignore += friend_enchant: ignore += friend_action: ignore += sound: ########### # prompts # ########### flash_screen_message += You feel strangely unstable flash_screen_message += Strange energies course through your body more := force_more_message # distortion more += Space warps horribly around you more += hits you.*distortion more += Space bends around you\. more += Your surroundings suddenly seem different. more += Its appearance distorts for a moment. # ghost moths/antimagic more += watched by something more += You feel your power leaking # torment/holy wrath more += You convulse # dispel breath more += dispelling energy hits you # early unseen horrors more += It hits you! more += Something hits you more += Something. *misses you. # more += You have reached level more += You fall through a shaft more += Training target.*for.*reached! more += You now have enough gold to buy # abyss convenience prompts more += Found an abyssal rune more += Found a gateway leading out of the Abyss more += Found a gateway leading deeper into the Abyss # necromutation more += Your transformation is almost over. more += You feel yourself coming back to life # summon greater demon more += is no longer charmed # Announcements of timed portal vaults: more += interdimensional caravan more += distant snort more += roar of battle more += wave of frost more += hiss of flowing sand more += sound of rushing water more += oppressive heat about you more += crackle of arcane power more += Found a gateway leading out of the Abyss more += Found .* abyssal rune of Zot more += You feel a terrible weight on your shoulders more += .* resides here # Interrupts more += You don't.* that spell more += You miscast (Controlled Blink|Blink|Death's|Borg|Necromutation) more += You can't (read|drink|do) that more += That item cannot be evoked more += This wand has no charges more += You are held in a net more += You have disarmed more += You don't have any such object more += do not work when you're silenced more += You can't unwield more += enough magic points more += You feel your control is inadequate more += Something interferes with your magic more += You enter a teleport trap # Bad things more += Your surroundings flicker more += You cannot teleport right now more += The writing blurs in front of your eyes more += You fall through a shaft more += A huge blade swings out and slices into you! more += (blundered into a|invokes the power of) Zot more += Ouch! That really hurt! more += dispelling energy hits you more += You convulse more += You are (blasted|electrocuted) more += You are.*confused more += flesh start more += (starving|devoid of blood) more += god:(sends|finds|silent|anger) more += You feel a surge of divine spite more += lose consciousness more += You are too injured to fight blindly more += calcifying dust hits more += Space warps horribly around you more += hits you.*distortion more += Space bends around you\. more += watched by something more += A sentinel's mark forms upon you more += Your limbs have turned to stone more += You are slowing down more += .*LOW HITPOINT WARNING.* more += warns you.*of distortion more += lethally poison more += space bends around your more += wielding.*of (distortion|chaos) # Gods more += you are ready to make a new sacrifice more += mollified more += wrath finds you more += sends forces more += sends monsters more += Vehumet offers # Hell effects # Re-enabled more += "You will not leave this place." more += "Die, mortal!" more += "We do not forgive those who trespass against us!" more += "Trespassers are not welcome here!" more += "You do not belong in this place!" more += "Leave now, before it is too late!" more += "We have you now!" more += You smell brimstone. more += Brimstone rains from above. more += You feel lost and a long, long way from home... more += You shiver with fear. more += You feel a terrible foreboding... more += Something frightening happens. more += You sense an ancient evil watching you... more += You suddenly feel all small and vulnerable. more += You sense a hostile presence. more += A gut-wrenching scream fills the air! more += You hear words spoken in a strange and terrible language... more += You hear diabolical laughter! # Expiring effects more += You feel yourself slow down more += less insulated more += You are starting to lose your buoyancy more += You lose control over your flight more += Your hearing returns more += Your transformation is almost over more += You have a feeling this form more += You feel yourself come back to life more += uncertain more += time is quickly running out more += life is in your own hands more += is no longer charmed more += shroud falls apart more += You start to feel a little slower more += You flicker more += You feel less protected from missiles # Skill breakpoints more += skill increases # Others # more += You have reached level more += You have finished your manual of more += Your scales start more += You feel monstrous more += zaps a wand more += carrying a wand more += is unaffected more += Jiyva alters your body # Any uniques and any pan lords - doesn't seem to work more += (?-i:[A-Z]).* comes? into view more += Agnes.*comes? into view. more += Aizul.*comes? into view. more += Antaeus.*comes? into view. more += Arachne.*comes? into view. more += Asmodeus.*comes? into view. more += Asterion.*comes? into view. more += Azrael.*comes? into view. more += Blork the orc.*comes? into view. more += Boris.*comes? into view. more += Cerebov.*comes? into view. more += Crazy Yiuf.*comes? into view. more += Dispater.*comes? into view. more += Dissolution.*comes? into view. more += Donald.*comes? into view. more += Dowan.*comes? into view. more += Duvessa.*comes? into view. more += Edmund.*comes? into view. more += Enchantress.*comes? into view. more += Ereshkigal.*comes? into view. more += Erica.*comes? into view. more += Erolcha.*comes? into view. more += Eustachio.*comes? into view. more += Fannar.*comes? into view. more += Frances.*comes? into view. more += Francis.*comes? into view. more += Frederick.*comes? into view. more += Gastronok.*comes? into view. more += Geryon.*comes? into view. more += Gloorx Vloq.*comes? into view. more += Grinder.*comes? into view. more += Grum.*comes? into view. more += Harold.*comes? into view. more += Ignacio.*comes? into view. more += Ijyb.*comes? into view. more += Ilsuiw.*comes? into view. more += Jorgrun.*comes? into view. more += Jory.*comes? into view. more += Jessica.*comes? into view. more += Joseph.*comes? into view. more += Josephine.*comes? into view. more += Jozef.*comes? into view. more += Khufu.*comes? into view. more += Kirke.*comes? into view. more += Lamia.*comes? into view. more += Lom Lobon.*comes? into view. more += Louise.*comes? into view. more += Mara.*comes? into view. more += Margery.*comes? into view. more += Maud.*comes? into view. more += Maurice.*comes? into view. more += Menkaure.*comes? into view. more += Mennas.*comes? into view. more += Mnoleg.*comes? into view. more += Murray.*comes? into view. more += Natasha.*comes? into view. more += Nergalle.*comes? into view. more += Nessos.*comes? into view. more += Nikola.*comes? into view. more += Norris.*comes? into view. more += Pikel.*comes? into view. more += Polyphemus.*comes? into view. more += Prince Ribbit.*comes? into view. more += Psyche.*comes? into view. more += Purgy.*comes? into view. more += Robin.*comes? into view. more += Roxanne.*comes? into view. more += Rupert.*comes? into view. more += Saint Roka.*comes? into view. more += Sigmund.*comes? into view. more += Snorg.*comes? into view. more += Sojobo.*comes? into view. more += Sonja.*comes? into view. more += Terence.*comes? into view. more += The Lernaean hydra.*comes? into view. more += The royal jelly.*comes? into view. more += The Serpent of Hell.*comes? into view. more += Tiamat.*comes? into view. more += Urug.*comes? into view. more += Vashnia.*comes? into view. more += Wiglaf.*comes? into view. more += Xtahua.*comes? into view. more += 27-headed.*comes? into view. more += .*player ghost.* comes? into view more += .*Ancient Lich.*comes? into view. more += .*Orbs? of Fire.*comes? into view. more += .*Fiend.*comes? into view. more += .*Hellion.*comes? into view. more += .*Tormentor.*comes? into view. more += .*Hell Sentinel.*comes? into view. more += .*Executioner.*comes? into view. more += .*Neqoxec.*comes? into view. more += .*Cacodemon.*comes? into view. more += .*Shining Eye.*comes? into view. more += .*Greater Mummy.*comes? into view. more += .*Mummy Priest.*comes? into view. more += .*Curse Toe.*comes? into view. more += .*Curse Skull.*comes? into view. more += .*('s|s') ghost.*comes? into view. more += .*shrike.*comes? into view. more += .*wretched star.*comes? into view more += .*lurking horror.*comes? into view more += .*Juggernaut.*comes? into view. more += .*Iron Giant.*comes? into view. more += .*Tzitzimimeh.*comes? into view. more += .*Tzitzimitl.*comes? into view. # Paralysis enemies more += .*Floating Eye.*comes? into view. more += .*Lich.*comes? into view. more += .*Ogre Mage.*comes? into view. more += .*a Wizard.*comes? into view. more += .*orc sorcerer.*comes? into view. more += .*sphinx.*comes? into view. more += .*Great orb of eyes.*comes? into view. more += .*Vampire knight.*comes? into view. # Other dangerous enemies more += minotaur.*into view more += *guardian serpent.*comes? into view. more += .*vault sentinel.*comes? into view. more += .*vault warden.*comes? into view. more += .*ironbrand convoker.*comes? into view. # Dancing weapon more += Your.*falls from the air. # Xom is scary : if you.god() == "Xom" then more += god: : end #################### # Autoinscriptions # #################### ai := autoinscribe ai += (vampiric):!w ai += (bad|dangerous)_item.*potion:!q ai += (bad|dangerous)_item.*scroll:!r ai += of faith:!P ai += rod of:!a ai += lightning rod:!a ai += [^r]staff of (conj|energy|power|wizardry):!a ai += manual of:!d ai += dispersal:!f ai += tome of Destruction:!d ai += throwing net:!f ai += curare:!f ai += needle of (frenzy|paralysis|sleeping|confusion):!f ai += ( ration):!d ai += figurine:!* : if you.god() ~= "Lugonu" then ai += (distortion):!w :end ai += of identify:@r1 ai += remove curse:@r2 ai += curing:@q1 ai += potions? of heal wounds:@q2 ai += wand of heal wounds:@v2 ai += wand of hasting:@v3 ai += potions? of haste:@q3 ai += scrolls? of teleportation:@r4 ai += wand of teleportation:@v4 ai += potions? of blood:@q0 #################### # Mute some messages # #################### msc := message_colour # Muted - unnecessary msc += mute:The (bush|fungus|plant) is engulfed msc += mute:The (bush|fungus|plant) is struck by lightning msc += mute:Cast which spell msc += mute:Use which ability msc += mute:Evoke which item msc += mute:Confirm with # msc += mute:(Casting|Aiming|Aim|Zapping)\: msc += mute:Throwing.*\: msc += mute:You can\'t see any susceptible monsters within range msc += mute:Press\: \? \- help, Shift\-Dir \- straight line, f \- you msc += mute:for a list of commands and other information msc += mute:Firing \(i msc += mute:Fire\/throw which item\? msc += mute:You swap places msc ^= mute:is lightly (damaged|wounded) msc ^= mute:is moderately (damaged|wounded) msc ^= mute:is heavily (damaged|wounded) msc ^= mute:is severely (damaged|wounded) msc ^= mute:is almost (dead|destroyed) msc += mute:Was it this warm in here before msc += mute:The flames dance msc += mute:Your shadow attacks msc += mute:Marking area around msc += mute:Placed new exclusion msc += mute:Reduced exclusion size to a single square msc += mute:Removed exclusion msc += mute:You can access your shopping list by pressing msc += mute:for starvation awaits msc += mute:As you enter the labyrinth msc += mute:previously moving walls settle noisily into place msc += mute:You offer a prayer to Elyvilon msc += mute:You offer a prayer to Nemelex Xobeh msc += mute:You offer a prayer to Okawaru msc += mute:You offer a prayer to Makhleb msc += mute:You offer a prayer to Lugonu msc += mute:Lugonu accepts your kill msc += mute:Okawaru is noncommittal msc += mute:Nemelex Xobeh is (noncommittal|pleased) msc += mute:The plant looks sick msc += mute:You start butchering msc += mute:You continue butchering msc += mute:This raw flesh tastes terrible : if string.find(you.god(), "Jiyva") then msc += mute:You hear a.*slurping noise msc += mute:You hear a.*squelching noise msc += mute:You feel a little less hungry : end ############### # Spell slots # ############### spell_slot += Animate Skeleton:u spell_slot += Animate Dead:u spell_slot += Apportation:c spell_slot += Beastly Appendage:a spell_slot += Blink:b spell_slot += Bolt of Cold:c spell_slot += Bolt of Fire:c spell_slot += Borgnjor's Vile Clutch:f spell_slot += Call Canine Familiar:c spell_slot += Call Imp:x spell_slot += Cause Fear:f spell_slot += Confuse:c spell_slot += Confusing Touch:a spell_slot += Conjure Flame:d spell_slot += Corona:a spell_slot += Corpse Rot:d spell_slot += Dazzling Spray:s spell_slot += Deflect Missiles:r spell_slot += Dispel Undead:d spell_slot += Ensorcelled Hibernation:x spell_slot += Fireball:x spell_slot += Flame Tongue:a spell_slot += Freeze:a spell_slot += Freezing Cloud:d spell_slot += Fulminant Prism:z # spell_slot += Haste:s spell_slot += Ice Form:c spell_slot += Infusion:a spell_slot += Iskenderun's Battlesphere:i spell_slot += Iskenderun's Mystic Blast:x spell_slot += Magic Dart:a spell_slot += Mephitic Cloud:f spell_slot += Olgreb's Toxic Radiance:y spell_slot += Orb of Destruction:zZ spell_slot += Pain:a spell_slot += Passage of Golubria:v spell_slot += Passwall:qQ # spell_slot += Phase Shift:aA spell_slot += Poisonous Vapours:x spell_slot += Portal Projectile:d spell_slot += Regeneration:e # spell_slot += Repel Missiles:r spell_slot += Sandblast:a spell_slot += Searing Ray:s spell_slot += Shock:a spell_slot += Shroud of Golubria:q spell_slot += Silence:g spell_slot += Slow:s spell_slot += Song of Slaying:w spell_slot += Spectral Weapon:t spell_slot += Spider Form:x spell_slot += Static Discharge:d spell_slot += Sticks to Snakes:s spell_slot += Sticky Flame:q spell_slot += Sting:a spell_slot += Stone Arrow:x spell_slot += Sublimation of Blood:Z spell_slot += Summon Butterflies:n spell_slot += Summon Ice Beast:d spell_slot += Summon Lightning Spire:z spell_slot += Summon Mana Viper:w spell_slot += Summon Small Mammal:a spell_slot += Swiftness:s spell_slot += Throw Flame:x spell_slot += Throw Frost:x spell_slot += Throw Icicle:c spell_slot += Tukima's Dance:d spell_slot += Vampiric Draining:q ############### # Item slots # ############### # item_slot += wand of teleportation:g # item_slot += wand of hasting:s # item_slot += wand of heal wounds:e item_slot += wand of digging:v item_slot += wand of disintegration:c # item_slot += wand of confusion:y item_slot += wand of paralysis:u item_slot += wand of iceblast:d item_slot += wand of acid:x # item_slot += wand of lightning:f item_slot += wand of flame:t item_slot += ring of see invisible:z item_slot += ring of protection from magic:l item_slot += ring of protection from fire:i item_slot += ring of protection from cold:o item_slot += ration:e item_slot += potion of blood:q item_slot += poison needle: Q ################# # Ability slots # ################# ability_slot += corrupt:Y ## ## magus.rc ################################################################################################ ## ## BEGIN ################################################################################################ : rc_msg("Initializing magus.rc ...") : crawl.enable_more(false) ## ## Globals.rc ################################################################################################ # PAUSE variable for ForceMorePrompts.rc $PAUSE_MORE := PAUSE { -- Pause for AnnounceDamage.lua PAUSE_MORE = "PAUSE" -- Standard Colors (ignoring black, not visible) COLORS = { ["darkgrey"] = "darkgrey", ["lightgrey"] = "lightgrey", ["white"] = "white", ["blue"] = "blue", ["lightblue"] = "lightblue", ["green"] = "green", ["lightgreen"] = "lightgreen", ["cyan"] = "cyan", ["lightcyan"] = "lightcyan", ["red"] = "red", ["lightred"] = "lightred", ["magenta"] = "magenta", ["lightmagenta"] = "lightmagenta", ["yellow"] = "yellow", ["brown"] = "brown"} } ## ## Utils.lua ################################################################################################ { function withColor(color, str) return string.format("<%s>%s", color, str, color) end function rc_out(symbol, color, msg) crawl.mpr(string.format("%s <%s>%s", symbol, color, msg, color)) end function rc_msg(msg) rc_out("🤖", "blue", msg) end function rc_scs(msg) rc_out("✅", "green", msg) end function rc_err(msg) rc_out("❌", "lightred", msg) end function table_has(table, match) for index, value in ipairs(table) do if value == match then return true end end return false end } ## ## Lua Setup ################################################################################################ ## ## AnnounceDamage.lua ################################################################################################ { local Messages = { ["HPSimple"] = function(delta) return withColor(COLORS.white, string.format("HP[%s]", delta_color(0 - delta)) ) end, ["HPMax"] = function (color, hp, hpm, delta) crawl.mpr( withColor(COLORS.lightgreen, string.format("You now have %s max hp (%s).", hpm, delta_color(delta)) ) ) end, ["HPLoss"] = function (color, hp, hpm, loss) crawl.mpr( string.format("%s%s", withColor(COLORS.red, string.format("You take %s damage,", loss)), withColor(color, string.format(" and now have %s/%s hp.", hp, hpm)) ) ) end, ["HPGain"] = function (color, hp, hpm, gain) crawl.mpr( string.format("%s%s", withColor(COLORS.lightgreen, string.format("You regained %s hp,", gain)), withColor(color, string.format(" and now have %s/%s hp.", hp, hpm)) ) ) end, ["HPFull"] = function (color, hp) crawl.mpr( withColor(COLORS.lightgreen, string.format("Your hp is fully restored (%s).", hp) ) ) end, ["HPMassivePause"] = function () crawl.mpr( withColor(COLORS.lightred, string.format("MASSIVE DAMAGE!! (%s)", PAUSE_MORE) ) ) end, ["MPSimple"] = function(delta) return withColor(COLORS.white, string.format("MP[%s]", delta_color(0 - delta)) ) end, ["MPLoss"] = function (color, mp, mpm, loss) crawl.mpr( string.format("%s%s", withColor(COLORS.cyan, string.format("You lost %s mp,", loss)), withColor(color, string.format(" and now have %s/%s mp.", mp, mpm)) ) ) end, ["MPGain"] = function (color, mp, mpm, gain) crawl.mpr( string.format("%s%s", withColor(COLORS.cyan, string.format("You regained %s mp,", gain)), withColor(color, string.format(" and now have %s/%s mp.", mp, mpm)) ) ) end, ["MPFull"] = function (color, mp) crawl.mpr( withColor(COLORS.cyan, string.format("Your mp is fully restored (%s).", mp)) ) end, [""]=""} local prev_hp = 0 local prev_hp_max = 0 local prev_mp = 0 local prev_mp_max = 0 function delta_color(delta) local color = delta < 0 and COLORS.red or COLORS.green local signDelta = delta < 0 and delta or "+"..delta return string.format("<%s>%s", color, signDelta, color) end -- Simplified condensed HP and MP output -- Print a single condensed line showing HP & MP change -- e.g.😨 HP[-2] MP[-1] function simple_announce_damage(curr_hp, max_hp, hp_diff, mp_diff) local emoji = "" local message = nil -- MP[-1] if hp_diff == 0 and mp_diff ~= 0 then message = Messages.MPSimple(mp_diff) -- HP[-2] elseif hp_diff ~= 0 and mp_diff == 0 then message = Messages.HPSimple(hp_diff) -- HP[-2] MP[-1] elseif hp_diff ~= 0 and mp_diff ~= 0 then message = string.format("%s %s", Messages.HPSimple(hp_diff), Messages.MPSimple(mp_diff)) else -- No changes end if message ~= nil then if curr_hp <= (max_hp * 0.25) then emoji = "😱" elseif curr_hp <= (max_hp * 0.50) then emoji = "😨" elseif curr_hp <= (max_hp * 0.75) then emoji = "😮" elseif curr_hp < max_hp then emoji = "😕" else emoji = "😎" end crawl.mpr(string.format("\n%s %s", emoji, message)) end end -- Try to sync with colors defined in Interface.rc function color_by_max(message_func, curr, max, diff) if curr <= (max * 0.25) then message_func(COLORS.red, curr, max, diff) elseif curr <= (max * 0.50) then message_func(COLORS.lightred, curr, max, diff) elseif curr <= (max * 0.75) then message_func(COLORS.yellow, curr, max, diff) else message_func(COLORS.lightgrey, curr, max, diff) end end function announce_damage() -- TODO Define Colors.Red, Colors.Green, etc. -- TODO Move current/previous into array pair -- Save previous as last_hp -- Shift current into previous -- Early return if last_hp was == 0 local curr_hp, max_hp = you.hp() local curr_mp, max_mp = you.mp() --Skips message on initializing game if prev_hp > 0 then local hp_diff = prev_hp - curr_hp local max_hp_diff = max_hp - prev_hp_max local mp_diff = prev_mp - curr_mp local max_mp_diff = max_mp - prev_mp_max -- Simplified condensed HP and MP output simple_announce_damage(curr_hp, max_hp, hp_diff, mp_diff) -- HP Max if max_hp_diff > 0 then Messages.HPMax(COLORS.green, curr_hp, max_hp, max_hp_diff) elseif max_hp_diff < 0 then Messages.HPMax(COLORS.yellow, curr_hp, max_hp, max_hp_diff) end -- HP Loss -- Ensure we lost MORE than the change in max hp -- i.e. a change in max hp should not be considered damage if (hp_diff > 0 and hp_diff > math.abs(max_hp_diff)) then color_by_max(Messages.HPLoss, curr_hp, max_hp, hp_diff) if hp_diff > (max_hp * 0.20) then Messages.HPMassivePause() end end -- HP Gain -- More than 1 HP gained if (hp_diff < 0) then -- Remove the negative sign by taking absolute value local hp_gain = math.abs(hp_diff) if (hp_gain > 1) and not (curr_hp == max_hp) then color_by_max(Messages.HPGain, curr_hp, max_hp, hp_gain) end if (curr_hp == max_hp) then Messages.HPFull(nil, curr_hp) end end -- MP Gain -- More than 1 MP gained if (mp_diff < 0) then -- Remove the negative sign by taking absolute value local mp_gain = math.abs(mp_diff) if (mp_gain > 1) and not (curr_mp == max_mp) then color_by_max(Messages.MPGain, curr_mp, max_mp, mp_gain) end if (curr_mp == max_mp) then Messages.MPFull(nil, curr_mp) end end -- MP Loss -- Ensure we lost MORE than the change in max mp -- i.e. a change in max mp should not be considered loss if (mp_diff > 0 and mp_diff > math.abs(max_mp_diff)) then color_by_max(Messages.MPLoss, curr_mp, max_mp, mp_diff) end end --Set previous hp/mp and form at end of turn prev_hp = curr_hp prev_hp_max = max_hp prev_mp = curr_mp prev_mp_max = max_mp end } ## ## OpenSkills.lua ################################################################################################ { -- Open skills menu at start of runs local need_skills_opened = true local function start_open_skills() if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end -- Runs once when parsed during rc init start_open_skills() } hp_colour = 100:lightgreen, 99:lightgray, 75:yellow, 50:lightred, 25:red mp_colour = 100:cyan, 99:lightgray, 75:yellow, 50:lightred, 25:red hp_warning = 50 ## ItemColors.rc ################################################################################################ ## Menu & Item colors should match exactly when possible. ## For menu_colour, the first match ignores subsequent matches. ## For item_glyph, subsequent matches override previous ones. ## Many of the entries below come from dat/defaults/menu_colours.txt, ## which we have to duplicate here since we want only some of the ## entries from that file. # Enable use of darkgrey bold_brightens_foreground=true # Set alias item := item_glyph menu := menu_colour # Clear default menu = menu += notes:white:Reached XP level ### General Inventory ### ## Reasonable defaults item += potion:lightgrey item += scroll:lightgrey item += wand:lightgrey item += dangerous_item:blue item += useless_item:darkgrey # Items currently not affecting you. menu += darkgrey:(melded) # Items disliked by your god. menu += red:forbidden # Useless items, comes here to override artefacts etc. menu += darkgrey:.*useless.* # Handle cursed and equipped items early to override other colour settings. menu += lightred:.*equipped.* cursed menu += red: (a|the) cursed menu += inventory:lightgreen:.*equipped.* # Colouring of autoinscribed god gifts menu += pickup:cyan:god gift # Highlight (partly) selected items menu += inventory:white:\w \+\s menu += inventory:white:\w \#\s ### Food ### ## Color chunks, put ordinary ones on lightgrey. menu += red:evil_eating.*chunk item += evil_eating.*chunk:red menu += blue:mutagenic.*chunk item += mutagenic.*chunk:blue menu += lightgrey:chunks?.*flesh item += chunks?.*flesh:lightgrey menu += green:( ration) item += ( ration):green ### Potions ### menu += lightgrey:potions? of.*(flight|stabbing) item += potions? of.*(flight|stabbing):lightgrey menu += brown:potions? of.*berserk item += potions? of.*berserk:brown menu += yellow:potions? of.*might item += potions? of.*might:yellow menu += cyan:potions? of.*cancellation item += potions? of.*cancellation:cyan menu += blue:potions? of.*(lignification|ambrosia) item += potions? of.*(lignification|ambrosia):blue menu += lightred:potions? of.*experience item += potions? of.*experience:lightred menu += white:potions? of.*(heal wounds|curing) item += potions? of.*(heal wounds|curing):white menu += green:potions? of.*resistance item += potions? of.*resistance:green menu += lightgreen:potions? of.*(haste|invisibility) item += potions? of.*(haste|invisibility):lightgreen menu += lightcyan:potions? of.*mutation item += potions? of.*mutation:lightcyan menu += magenta:potions? of.*brilliance item += potions? of.*brilliance:magenta menu += lightmagenta:potions? of.*magic item += potions? of.*magic:lightmagenta ### Scrolls ### : if table_has({"Vampire", "Mummy", "Ghoul"}, you.race()) then menu += darkgrey:scroll.*holy word item += scroll.*holy word:darkgrey menu += brown:scroll.*torment item += scroll.*torment:brown : else menu += brown:scroll.*holy word item += scroll.*holy word:brown menu += darkgrey:scroll.*torment item += scroll.*torment:darkgrey : end menu += white:scroll.*acquirement item += scroll.*acquirement:white menu += yellow:scroll.*(summoning) item += scroll.*(summoning):yellow menu += cyan:scroll.*identify item += scroll.*identify:cyan menu += lightcyan:scroll.*magic mapping item += scroll.*magic mapping:lightcyan menu += blue:scroll.*(noise|silence|vulnerability|immolation) item += scroll.*(noise|silence|vulnerability|immolation):blue menu += lightgrey:scroll.*remove curse item += scroll.*remove curse:lightgrey menu += green:scroll.*(fog|teleport) item += scroll.*(fog|teleport):green menu += lightgreen:scroll.*(fear|blink) item += scroll.*(fear|blink):lightgreen menu += lightmagenta:scroll.*(enchant|brand weapon) item += scroll.*(enchant|brand weapon):lightmagenta ### Wands ### # Sometimes can be dangerous or harmful menu += blue:wand of.*random effects item += wand of.*random effects:blue # Single target piercing menu += brown:wand of.*lightning item += wand of.*lightning:brown menu += yellow:wand of.*acid item += wand of.*acid:yellow menu += lightgrey:wand of.*flame item += wand of.*flame:lightgrey menu += white:wand of.*clouds item += wand of.*clouds:white menu += green:wand of.*digging item += wand of.*digging:green # Single-turn AOE menu += cyan:wand of.*iceblast item += wand of.*iceblast:cyan menu += lightcyan:wand of.*scattershot item += wand of.*scattershot:lightcyan # MR-checking menu += magenta:wand of.*(disintegration|confusion|polymorph) item += wand of.*(disintegration|confusion|polymorph):magenta menu += lightmagenta:wand of.*(paralysis|enslavement) item += wand of.*(paralysis|enslavement):lightmagenta ### General identification ### menu += cyan:manual of item += manual of:cyan menu += lightcyan:manual item += manual:lightcyan menu += lightblue:unidentified .*(potion|scroll|wand|jewellery|book|rod|magical staff) item += unidentified.*(potion|scroll|wand|jewellery|book|rod|magical staff).*:lightblue ### Gear ### menu += magenta:.*known .*(ring of (dexterity|strength|intelligence|slaying|evasion|protection(?! from))|amulet of reflection) item += known.*(ring of (dexterity|strength|intelligence|slaying|evasion|protection(?! from))|amulet of reflection):magenta menu += inventory:lightgray:.*(book|jewellery|magical staff) item += (identified|known).*(book|jewellery|magical staff):lightgray menu += lightmagenta:unidentified.*artefact.* item += unidentified.*artefact.*(jewellery).*:lightmagenta menu += white:.*artefact.* item += identified.*artefact.*(jewellery):white # Ego items menu += lightblue:unidentified.*weapon.*(runed|glowing|enchanted) menu += lightblue:unidentified.*armour.*(runed|glowing|embroidered|shiny|dyed) # Want this to override anything above item += (a )?stones?$:lightgray item += useless:darkgrey # Only mark these types when forbidden; for other types it looks odd. item += forbidden.*(potion|scroll|food):red ## ## ForceMorePrompts.rc ################################################################################################ show_more = false # 1. Dungeon Features # 2. Failure # 3. Bad Things # 4. Translocations # 5. Expiring Effects # 6. Religion # 7. Hell Effects # 8. Monsters # Set alias more := force_more_message stop := runrest_stop_message #################### # Dungeon Features # #################### # Abyssal Rune more += Found .* abyssal rune of Zot # Entrances, Exits, and Arrivals more += Found a frozen archway more += Found a gateway leading out of the Abyss more += Found a labyrinth entrance more += Found a staircase to the Ecumenical Temple more += The mighty Pandemonium lord.*resides here # Portal Timers more += distant snort more += interdimensional caravan more += invites you to visit more += oppressive heat more += roar of battle more += sound of rushing water more += The drain falls to bits more += There is an entrance to a bailey on this level more += tolling of a bell more += wave of frost more += You hear the drain falling apart more += You hear.*crackle.*magical portal more += You hear.*crackling.*archway more += You hear.*creaking.*(oriflamme|portcullis) more += You hear.*hiss.*sand more += You hear.*rumble.*avalanche more += You hear.*rusting.*drain more += You hear.*ticking.*clock # Traps more += (blundered into a|invokes the power of) Zot more += A huge blade swings out and slices into you stop += An alarm trap emits a blaring wail stop += found a zot trap stop += hear a soft click more += The power of Zot is invoked against you more += You (become entangled|are caught) in (a|the) (web|net) more += You fall through a shaft more += You stumble into the trap # Other more += Another plant grows acid sacs more += One of the plants suddenly grows acid sacs more += The walls and floor vibrate strangely for a moment more += You are suddenly pulled into a different region more += You have a vision of.*gates? ########### # Failure # ########### more += do not work when you're silenced more += sense of stasis more += Something interferes with your magic more += The rod doesn't have enough magic points more += The spell fizzles more += The writing blurs in front of your eyes more += The.*is unaffected more += This potion can/'t work under stasis more += This wand has no charges more += too hungry more += You are held in a net more += You are too injured to fight blindly more += You can't gag anything down more += You can't unwield more += You cannot cast spells when silenced more += You cannot cast spells while unable to breathe more += You cannot teleport right now more += You don't have any such object more += You don't have enough magic more += You don't.* that spell more += You fail to use your ability more += You have no appropriate body parts free more += You have no means to grasp a wand firmly enough more += You haven't enough magic at the moment more += You miscast more += Your amulet of stasis more += Your attempt to break free more += Your body armour is too heavy ############################# # Bad and Unexpected Things # ############################# # announce_damage more += $PAUSE_MORE # Bad things happening to you more += corrodes your equipment more += Your corrosive artefact corrodes you more += are blown away by the wind more += dispelling energy hits you more += infuriates you more += lose consciousness more += mark forms upon you more += Ouch! That really hurt! more += silver sears you more += Space bends around you more += Space warps horribly around you more += surroundings become eerily quiet more += Terrible wounds (open|spread) all over you more += The acid corrodes your more += The air around.*erupts in flames more += The air twists around and violently strikes you in flight more += You shudder from the earth-shattering force more += The arrow of dispersal hits you[^r] more += The barbed spikes become lodged in your body more += The barbed spikes dig painfully into your body as you move more += The blast of calcifying dust hits you[^r] more += The poison in your body grows stronger more += The pull of.*song draws you forwards more += The.*engulfs you in water more += The.*grabs you[^r] more += You (are|feel) drained more += You are (blasted|electrocuted) more += You are blown backwards more += You are burned terribly more += You are encased in ice more += You are engulfed in calcifying dust more += You are engulfed in dark miasma more += You are engulfed in mutagenic fog more += You are knocked back more += You are mesmerised more += You are slowing down more += You are trampled more += You convulse more += You feel a (horrible|terrible) chill more += You feel haunted more += You feel less vulnerable to poison more += You feel your attacks grow feeble more += You feel your flesh.*rot more += You feel your power drain away more += You feel your power leaking away more += You feel yourself grow more vulnerable to poison more += You stumble backwards more += You.*re (confused|more confused|too confused) more += You.*re (poisoned|more poisoned|lethally poisoned) more += Your body is wracked with pain more += Your damage is reflected back at you more += Your limbs are stiffening more += Your magical defenses are stripped away more += Your?.*suddenly stops? moving # Monsters doing bad things more += A tree reaches out and hits you! more += Agitated ravens fly out from beneath the more += begins to recite a word of recall more += Being near the torpor snail leaves you feeling lethargic more += blows on a signal horn more += cast banishment more += cast paralyse more += cast Torment more += goes berserk more += The moth of wrath goads something on more += is duplicated more += is no longer invulnerable more += Its appearance distorts for a moment more += Mara seems to draw the.*out of itself more += Mara shimmers more += Miasma billows from the more += shoots a curare more += stands defiantly in death's doorway more += steals.*your more += swoops through the air toward you more += The forest starts to sway and rumble more += The jumping spider pounces on you [^but] more += The octopode crusher throws you more += The shadow imp is revulsed by your support of nature more += The water nymph flows with the water more += The.*offers itself to Yredelemnul more += The.*seems to speed up more += The.*shudders more += There is a horrible\, sudden wrenching feeling in your soul more += Vines fly forth from the trees! more += You are hit by a branch more += You feel you are being watched by something more += Your magical defenses are stripped away more += \'s.*reflects # Unexpected situations more += A magical barricade bars your way more += Done waiting more += doors? slams? shut more += It doesn't seem very happy more += Mutagenic energies flood into your body more += Some monsters swap places more += (are starving|devoid of blood) more += (The|Your).*falls away! more += The divine light dispels your darkness! more += The walls disappear more += There is a sealed passage more += You are wearing\: more += You cannot afford.*fee # more += You feel (dopey|clumsy|weak) more += You feel a genetic drift more += You feel monstrous more += You feel your rage building more += You have disarmed more += You have finished your manual more += You need to eat something NOW more += You smell decay. (^Yuck!) more += You stop (a|de)scending the stairs more += You turn into a fleshy mushroom more += Your body shudders with the violent release of wild energies more += Your guardian golem overheats more += your magic stops regenerating more += Your scales start more += your.*devoured more += Green shoots are pushing up through the earth # Things getting better stop += contamination has completely more += You can move again more += You slip out of the net more += You.*and break free more += Your fit of retching subsides more += seems mollified # Ghouls : if you.race() == "Ghoul" then stop += smell.*(rott(ing|en)|decay) stop += something tasty in your inventory : end ################## # Translocations # ################## # Teleporting more += You blink more += You.*teleport [^f] more += You feel strangely (unstable|stable) more += You feel your translocation being delayed more += Your surroundings flicker more += Your surroundings seem slightly different more += Your surroundings suddenly seem different # -Tele more += You cannot blink right now more += You cannot teleport right now more += You feel.*firmly anchored in space more += You are no longer firmly anchored in space # -cTele more += You feel your control is inadequate #################### # Expiring Effects # #################### # God Abilities # Divine Shield (The Shining One) more += Your divine shield starts to fade. more += Your divine shield fades away. # Jelly Prayer (Jiyva) more += Your prayer is over. # Mirror Damage (Yredelemnul) more += dark mirror aura disappears # Player Spells # Aura of Abjuration stop += Your aura of abjuration expires # Control Teleport stop += you feel uncertain # Death's Door more += time is quickly running out more += life is in your own # Enslavement more += is no longer charmed # Flight more += You are starting to lose your buoyancy stop += You lose control over your flight # Haste more += Your extra speed is starting to run out more += You feel yourself slow down # Invisibility more += You feel more conspicuous more += You flicker for a moment more += You flicker back # Ozocubu's Armour and Condensation Shield more += Your icy (shield|armour) evaporates more += Your.*(shield|armour) melts away # Phase Shift more += You feel closer to the material plane more += You are firmly grounded in the material plane once more # Repel/Deflect stop += missiles spell is about to expire more += You feel less protected from missiles # Shroud of Golubria stop += shroud begins to fray stop += shroud unravels more += Your shroud falls apart # Silence more += Your hearing returns # Swiftness stop += start to feel a little slower more += You feel sluggish # Transmutations more += Your transformation is almost over more += You have a feeling this form more += Your skin feels tender more += You feel yourself come back to life # Other # Potion of Resistance more += You start to feel less resistant. more += Your resistance to elements expires ############ # Religion # ############ # Gifts or abilities are ready # Dithmenos more += You are shrouded in an aura of darkness more += You now sometimes bleed smoke more += You.*no longer.*bleed smoke more += Your shadow no longer tangibly mimics your actions more += Your shadow now sometimes tangibly mimics your actions # Gozag more += will now duplicate a non-artefact item # Jiyva more += will now unseal the treasures of the Slime Pits # Kikubaaqudgha more += Kikubaaqudgha will now enhance your necromancy # Lugonu more += Lugonu will now corrupt your weapon # Qazlal more += resistances upon receiving elemental damage more += You are surrounded by a storm which can block enemy attacks # Ru more += you are ready to make a new sacrifice # Sif Muna more += Sif Muna is protecting you from the effects of miscast magic # The Shining One more += The Shining One will now bless # Zin more += will now cure all your mutations # You Screwed Up more += is no longer ready # Poor Decisions more += You really shouldn't be using # Gaining new abilities : if you.god() ~= "Uskayaw" then more += You can now more += Your?.*can no longer : end # Wrath more += Nemelex gives you another card to finish dealing more += Fedhas invokes the elements against you more += Lugonu sends minions to punish you more += Okawaru sends forces against you more += wrath finds you # Xom Effects more += staircase.*moves more += is too large for the net to hold # Other more += Jiyva alters your body : if you.god() == "Xom" then more += god: : end : if not string.find(you.god(), "Jiyva") then more += splits in two :end ################ # Hell Effects # ################ more += A gut-wrenching scream fills the air more += Brimstone rains from above more += Die\, mortal more += Leave now\, before it is too late more += Something frightening happens more += Trespassers are not welcome here more += We do not forgive those who trespass against us more += We have you now more += You do not belong in this place more += You feel a terrible foreboding more += You feel lost and a long\, long way from home more += You hear diabolical laughter more += You hear words spoken in a strange and terrible language more += You sense a hostile presence more += You sense an ancient evil watching you more += You shiver with fear more += You smell brimstone more += You suddenly feel all small and vulnerable more += You will not leave this place more += You have reached level more += You rejoin the land of the living ############ # Monsters # ############ # Arriving Unexpectedly more += appears in a shower of sparks more += appears out of thin air more += comes (up|down) the stairs more += Something appears in a flash of light more += The.*is a mimic more += You sense the presence of something unfriendly more += The.*answers the.*call more += Wisps of shadow swirl around more += Shadows whirl around # Item Use more += drinks a potion more += evokes.*(amulet|ring) more += reads a scroll more += zaps a (wand|rod) # Dangerous monsters we force_more when first seen. # Things with ranged (or extremely fast), irresistable effects. more += ((floating|shining) eye|dream sheep|death drake).*into view more += (wretched star|apocalypse crab|death drake).*into view more += (entropy weaver|torpor snail|spriggan druid).*into view more += (vault (warden|sentinel)|merfolk (avatar|siren)).*into view more += (guardian serpent|draconian shifter|convoker|death cob).*into view more += (phantasmal warrior|air elemental).*into view # Distortion more += distortion # Malmutate more += (cacodemon|neqoxec).*into view # Paralysis/Petrify/Banish more += (orc sorcerer|(?> note_items += artefact note_items += experience,of Zot,acquirement,Archmagi note_items += crystal plate,pearl dragon scales,gold dragon scales # note some auto inscribes # do not match curare note_messages += (?> 🤖 colortest <%s>%s", color, color, color)) -- end -- end -- colortest() -- rc_out("COLORS", COLORS.brown, COLORS.brown) } ## ## END ################################################################################################ : rc_scs("Successfully initialized magus.rc [v1.9.6]") : crawl.enable_more(true)