################################# Edits #################################### # Lots of stuff here is from HilariousDeathArtist - see his rcfile for more # Originally intended for 0.24, obsolete items removed ##################### ##### Interface ##### ##################### show_gold_turns = true show_game_turns = true default_manual_training = true confirm_butcher = never sort_menus = true : equipped, art, ego, identified, basename, qualname, curse, qty ## Skill Menu Auto-Open ## { local need_skills_opened = true function ready() if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end } ############################## ##### Autocombat Options ##### ############################## autofight_stop = 75 automagic_enable = false automagic_stop = 50 autofight_throw = false automagic_fight = true ############################## ##### Autopickup Options ##### ############################## ignore := runrest_ignore_message ignore += A.*toadstool withers and dies ignore += disappears in a puff of smoke ignore += engulfed in a cloud of smoke ignore += engulfed in white fluffiness ignore += grinding sound ignore += in your inventory.*rotted away ignore += safely over a trap ignore += standing in the rain ignore += toadstools? grow ignore += You feel.*sick ignore += You walk carefully through the # Don't pick up misc items when duplication doesn't help. { add_autopickup_func(function (it, name) local itname = it.name(true) -- Not the name parameter, which includes prefixes. if string.find(itname, "lamp of fire") or string.find(itname, "phial of floods") or string.find(itname, "fan of gales") or string.find(itname, "lightning rod") or string.find(itname, "crystal ball of energy") then for inv in iter.invent_iterator:new(items.inventory()) do if itname == inv.name() then return false end end end return end) } # If you've sacrificed a hand, don't pick up pointless duplicate rings { add_autopickup_func(function (it, name) local itsubtype = it.subtype() if you.mutation("missing a hand") == 1 and you.race() ~= "octopode" and it.class(true) == "jewellery" and (itsubtype == "ring of positive energy" or itsubtype == "ring of flight" or itsubtype == "ring of poison resistance" or itsubtype == "ring of wizardry" or itsubtype == "ring of stealth" or itsubtype == "ring of teleportation" or itsubtype == "ring of protection from fire" or itsubtype == "ring of protection from cold" or itsubtype == "ring of resist corrosion" or itsubtype == "ring of see invisible" or itsubtype == "ring of magical power" or itsubtype == "ring of ice" or itsubtype == "ring of fire") then for inv in iter.invent_iterator:new(items.inventory()) do if it.class(true) == inv.class(true) and itsubtype == inv.subtype() then return false end end end return end) } { add_autopickup_func(function (it, name) return it.stacks() or nil end) } # Excluding most amulets as you only need one of each. Likewise for some # rings. Some items may already be excluded as bad_item, e.g. inaccuracy. { add_autopickup_func(function (it, name) if (not it.class(true) == "jewellery") or it.artefact then return end local itsubtype = it.subtype() if itsubtype == "amulet of faith" or itsubtype == "amulet of guardian spirit" or itsubtype == "amulet of harm" or itsubtype == "amulet of inaccuracy" or itsubtype == "amulet of magic regeneration" or itsubtype == "amulet of nothing" or itsubtype == "amulet of rage" or itsubtype == "amulet of regeneration" or itsubtype == "amulet of the acrobat" or itsubtype == "amulet of the gourmand" or itsubtype == "ring of flight" or itsubtype == "ring of poison resistance" or itsubtype == "ring of resist corrosion" or itsubtype == "ring of see invisible" then for inv in iter.invent_iterator:new(items.inventory()) do if inv.class(true) == "jewellery" and inv.subtype() == itsubtype then return false end end end return end) } ## Special Autopickup Function { add_autopickup_func(function(it, name) if it.is_useless then return false end 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 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 ~= nil 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 end if (sub_type == "shield") then if equipped_item then return it.artefact or it.branded or it.ego end end end if (class == "weapon") then if (you.xl() < 12) or (you.god():find("Nemelex") or (you.god():find("Yred")) or (you.god():find("Beogh"))) then if it.branded and not (it.name() == "club") then return false end end local weapon = items.equipped_at("Weapon") if weapon then if (weapon.branded or weapon.artefact) then return false else local weapon_name = weapon.name() local sb = you.skill("Short Blades") local lb = you.skill("Long Blades") local axe = you.skill("Axes") local mf = you.skill("Maces & Flails") local pole = you.skill("Polearms") local staff = you.skill("Staves") if sb > 6 then if name:find("quick blade") then return true end end if lb > 8 then if name:find("demon blade") then return true end if name:find("bastard sword|double sword") then return true end end if lb > 14 then if name:find("claymore|triple sword") then return true end end if axe > 8 and mf <= 8 then if name:find("battleaxe") then return true end if name:find("broad axe") then return true end if name:find("war axe") then return true end if name:find("executioner") then return true end end if axe > 18 then if name:find("executioner") then return true end end if mf > 8 and staff <= 8 and axe <= 8 then if name:find("eveningstar") then return true end if name:find("demon whip") then return true end if name:find("sacred scourge") then return true end if name:find("dire flail") then return true end end if mf > 14 and staff <= 14 and axe <= 14 then if name:find("great mace") then return true end end if pole > 8 and staff <= 8 then if name:find("trident") then return true end if name:find("demon trident") then return true end if name:find("trishula") then return true end end if pole > 14 and staff <= 14 then if name:find("glaive") then return true end if name:find("bardiche") then return true end end if staff > 8 then if name:find("lajatang") then return true end end end elseif (you.skill("Unarmed Combat") < 2) then return true end end end) } ############################## ##### Autotravel Options ##### ############################## travel_delay = 1 explore_delay = 20 rest_delay = -1 travel_key_stop = true travel_avoid_terrain = deep water explore_greedy = true explore_auto_rest = false auto_butcher = true confirm_butcher = never easy_eat_chunks = true auto_eat_chunks = true auto_drop_chunks = yes wall_jump_move = true wall_jump_prompt = true stop := runrest_stop_message stop += Your battlesphere wavers and loses cohesion stop += You feel your bond with your battlesphere wane stop += Your transformation is almost over stop += You are starting to lose your buoyancy stop += You lose control over your flight stop += You feel yourself slow down more := force_more_message more += Your extra speed is starting to run out more += You have finished your manual more += You are starting to lose your buoyancy more += You start to feel a little slower more += Your transformation is almost over more += You fall through a shaft more += The alarm trap emits a blaring wail more += You lose control over your flight more += You start to feel a little uncertain more += time is quickly running out more += life is in your own hands more += is no longer charmed more += You have a feeling this form more += Your skin feels tender more += You feel yourself come back to life ########################## ##### HP and MP Info ##### ########################## ## Damage Indicator ## HDamage ## # Ask HilariousDeathArtist to fix things # To use this you must add have a call to AnnounceDamage() in the ready() function like below: # This is important if you override this ready() function < function ready() AnnounceDamage() end > ############### # Damage Calc # ############### < local previous_hp = 0 local previous_mp = 0 local previous_form = "" local was_berserk_last_turn = false function AnnounceDamage() local current_hp, max_hp = you.hp() local current_mp, max_mp = you.mp() --Things that increase hp/mp temporarily really mess with this local current_form = you.transform() local you_are_berserk = you.berserk() local max_hp_increased = false local max_hp_decreased = false if (current_form ~= previous_form) then if (previous_form:find("dragon") or previous_form:find("statue") or previous_form:find("tree") or previous_form:find("ice")) then max_hp_decreased = true elseif (current_form:find("dragon") or current_form:find("statue") or current_form:find("tree") or current_form:find("ice")) then max_hp_increased = true end end if (was_berserk_last_turn and not you_are_berserk) then max_hp_decreased = true elseif (you_are_berserk and not was_berserk_last_turn) then max_hp_increased = true end --crawl.mpr(string.format("previous_form is: %s", previous_form)) --crawl.mpr(string.format("current_form is: %s", current_form)) --crawl.mpr(string.format("max_hp_increased is: %s", max_hp_increased and "True" or "False")) --crawl.mpr(string.format("max_hp_decreased is: %s", max_hp_decreased and "True" or "False")) --crawl.mpr(string:format("you_are_berserk is: %s", you_are_berserk and "True" or "False")) --crawl.mpr(string:format("was_berserk_last_turn is: %s", was_berserk_last_turn and "True" or "False")) --Skips message on initializing game if previous_hp > 0 then local hp_difference = previous_hp - current_hp local mp_difference = previous_mp - current_mp if max_hp_increased or max_hp_decreased then if max_hp_increased then crawl.mpr("You now have " .. current_hp .. "/" .. max_hp .. " hp.") else crawl.mpr("You now have " .. current_hp .. "/" .. max_hp .. " hp.") end else --On losing health if (current_hp < previous_hp) then if current_hp <= (max_hp * 0.30) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") else crawl.mpr("You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.") end if hp_difference > (max_hp * 0.20) then crawl.mpr("MASSIVE DAMAGE!!") end end --On gaining more than 1 health if (current_hp > previous_hp) then --Removes the negative sign local health_inturn = (0 - hp_difference) if (health_inturn > 1) and not (current_hp == max_hp) then if current_hp <= (max_hp * 0.30) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") else crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") end end if (current_hp == max_hp) then crawl.mpr("Health restored: " .. current_hp .. "") end end --On gaining more than 1 magic if (current_mp > previous_mp) then --Removes the negative sign local mp_inturn = (0 - mp_difference) if (mp_inturn > 1) and not (current_mp == max_mp) then if current_mp < (max_mp * 0.25) then crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.") elseif current_mp < (max_mp * 0.50) then crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.") else crawl.mpr("You regained " .. mp_inturn .. " mp, and now have " .. current_mp .. "/" .. max_mp .. " mp.") end end if (current_mp == max_mp) then crawl.mpr("MP restored: " .. current_mp .. "") end end --On losing magic if current_mp < previous_mp then if current_mp <= (max_mp / 5) then crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") elseif current_mp <= (max_mp / 2) then crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") else crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") end end end end --Set previous hp/mp and form at end of turn previous_hp = current_hp previous_mp = current_mp previous_form = current_form was_berserk_last_turn = you_are_berserk end > ########################### ##### Message Colours ##### ########################### message_colour += cyan:Your battlesphere wavers and loses cohesion. message_colour += cyan:You feel your bond with your battlesphere wane. message_colour += cyan:Your transformation is almost over. message_colour += cyan:You are starting to lose your buoyancy. message_colour += cyan:Your battlesphere expends the last of its energy and dissipates. message_colour += red:You feel a bit more experienced. message_colour += purple:You feel a genetic drift. message_colour += green:HP restored. message_colour += cyan:Magic restored. message_colour += cyan:Your magical contamination has completely faded away. message_colour += cyan:You are very lightly contaminated with residual magic. message_colour += cyan:You are lightly contaminated with residual magic. message_colour += cyan:You are contaminated with residual magic. message_colour += lightred:As you open the door, it creaks loudly! message_colour += cyan:You feel protected from missiles message_colour += darkblue: You feel less protected from missiles. message_colour += red:You have turned to stone. message_colour += lightred:Your limbs are stiffening. ######################## ##### Inscriptions ##### ######################## ai := autoinscribe # Inscribe distortion weapons if you are not worshipping Lugonu : if you.god() ~= "Lugonu" then ai += distortion:!w : end #potions ai += (bad|dangerous)_item.*potion:!q ai += potion.*agility:Dex+5 EV+5 Stlth+ ai += potion.*brilliance:Int+5 wiz+ spellpwr+ ai += potion.*might:Str+5 melee+1d10 ai += potion.*berserk rage:+Might +Haste +MaxHP,!q ai += potion.*ambrosia:*Confuse HP/MPRegen+,!q ai += potion.*lignif:!q ai += potion.*curing:+5-13 HP, @q1 ai += potion.*heal:+10-37 HP, @q2 ai += potion.*magic:+10-37 MP, @q3 ai += potion.*resistance:rF+ rC+ rElec rCorr rPois ai += potion.*mutation:=g #scrolls ai += (bad|dangerous)_item.*scroll:!r ai += scroll.*vulnerability:!r ai += scroll.*blinking:!r ai += scroll.*torment:!r ai += scroll.*silence:!r ai += scroll.*identify:@r1 ai += scroll.*remove curse:@r2 ai += scroll.*teleportation:@r3 #ammo ai += dispersal:=f ai += large rock:=f ai += throwing net:=f,=g,!d #may not be necessary? Test ai += steam dragon (armour|hide|scales):rSteam++ ai += mottled dragon (armour|hide|scales):rSticky ai += acid dragon (armour|hide|scales):rCorr ai += swamp dragon (armour|hide|scales):rP+ ai += quicksilver dragon (armour|hide|scales):MR+ ai += fire dragon (armour|hide|scales):rF++ rC- ai += ice dragon (armour|hide|scales):rC++ rF- ai += storm dragon (armour|hide|scales):rElec ai += shadow dragon (armour|hide|scales):Stealth++++ ai += pearl dragon (armour|hide|scales):rN+ ai += gold dragon (armour|hide|scales):rF+ rC+ rPois #amulets ai += amulet of faith:faith, !P!R ai += amulet of guardian spirit:Spirit ai += amulet of reflection:reflect ai += amulet of magic regeneration:MPRegen +0.2 ai += amulet of regeneration:HPRegen +0.8 ai += amulet of the acrobat:*15 EV #rings ai += ring of fire:rF+, rC- ai += ring of flight:+Fly ai += ring of ice:rC+, rF- ai += ring of magical power:MP+9 ai += ring of positive energy:rN+ ai += ring of poison resistance:rP+ ai += ring of protection from cold:rC+ ai += ring of protection from fire:rF+ ai += ring of willpower:Will+ ai += ring of see invisible:sInv ai += ring of wizardry:wiz+ #staves ai += staff of air:rElec ai += staff of cold:rC+ ai += staff of death:rN+ ai += staff of fire:rF+ ai += staff of poison:rPois,!a ai += staff of energy:+MP, hungerless spells, !d!a, @V1 ai += staff of wizardry:wiz+, !a ai += staff of power:MP+15, !a ai += staff of conjuration:!a ai += staff of summoning:!a #scarves ai += scarf of cloud immunity:rCloud ai += scarf of repulsion:RMsl ai += scarf of resistance:rF+,rC+ ai += scarf of spirit:Spirit #other ai += crystal ball of energy:@V5 ai += gloves of strength:Str+3 ai += gloves of dexterity:Dex+3 ai += helmet of intelligence:Int+3 ####################### ##### Spell Slots ##### ####################### ss := spell_slot ##### Utility Spells ##### ss += apportation:A ss += necromutation:N ss += sublimation of blood:E ##### Defensive Spells ##### ss += blink:B ss += passwall:P ss += conjure flame:g ss += death's door:Q ss += ozocubu's armour:o ss += cause fear:F ##### Offensive Spells ##### ss += fireball:c ss += freezing cloud:c ss += starburst:e ss += hailstorm:e ss += lee's rapid deconstruction:e ss += iskenderun's mystic blast:e ss += lightning bolt:v ss += iron shot:v ss += lehudib's crystal spear:v ss += mephitic cloud:m ss += sticky flame:f ss += searing ray:f ss += freeze:f ss += static discharge:f ss += conjure ball lightning:o ss += orb of destruction:o ss += airstrike:x ss += irradiate:i ## Offensive Buffs ## ss += ring of flames:O ss += blade hands:S ss += spider form:s ss += wereblood:w ## Big Spells:X ## ss += fire storm:X ss += polar vortex:X ss += shatter:X ss += chain lightning:X ############################# ##### Save Dump Options ##### ############################# dump_kill_places = all note_hp_percent = 20 note_all_skill_levels = true note_chat_messages = true