< function ready() AnnounceDamage() SpoilerAlert() OpenSkills() end > #################### # Opens skill menu # #################### < local need_skills_opened = true function OpenSkills() if you.turns() == 0 and need_skills_opened then need_skills_opened = false sendkeys("m") end end > auto_butcher = very hungry ############# # Autofight # ############# # Do/don't throw stuff when autofighting autofight_throw = true autofight_throw_nomove = true # If true. items are autofired stopping at the monsters feet (same as firing using .) autofight_fire_stop = false fire_order = launcher, return fire_order += rock, javelin, tomahawk, stone # Prevent me from tab-fighting to death by keeping this high autofight_stop = 40 # Enables automagic attacks automagic_enable = false automagic_slot = a # Percentage of MP to stop automagic at automagic_stop = 50 # If set to true, resort to melee when automagic_stop is active automagic_fight = true ############## # Autopickup # ############## equip_bar = true # Used # $ = gold # ? = scroll # ! = potion # : = book # " = jewellery # / = wand # % = food # } = miscellaneous # \ = rods # | = staves autopickup = $?!/% ae := autopickup_exceptions ae += (useless|evil)_item ae += dangerous_item.*scrolls? of (holy word|noise|torment) ae += potions? of (lignification|ambrosia) ae += potions? of (flight) ae += scrolls? of (immolation|vulnerability|silence) ae += wand of (confusion|flame|lightning) ae += wand of (random effects|slowing) ae += 2 local ego = equipped_item.branded local armour_name = equipped_item.name() local dragon = armour_name:find("dragon") local troll = armour_name:find("troll") local artefact = equipped_item.artefact if artefact then return false end if not (enchanted or ego or dragon or troll) then return it.branded or it.ego end else return true 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 it.is_useless then return false end if it.artefact then return true end if (you.xl() < 12) or (you.god():find("Beogh")) and not ((you.race() == "troll") or (you.skill("Unarmed Combat") > 9)) then return it.branded and not (name == "club") end end end) } ############### # Spell slots # ############### # Utility spells spell_slot += Dispel Undead:q spell_slot += Alistair's Intoxication:Q spell_slot += Abjuration:w spell_slot += Aura of Abjuration:W spell_slot += Apportation:e spell_slot += Recall:r spell_slot += Summon Butterflies:R spell_slot += Control Teleport:t spell_slot += Ozocubu's Armour:aA spell_slot += Stoneskin:aA spell_slot += Phase Shift:aA spell_slot += Shroud of Golubria:aA spell_slot += Swiftness:s spell_slot += Repel Missiles:d spell_slot += Deflect Missiles:d spell_slot += Darkness:D spell_slot += Flight:f spell_slot += Ring of Flames:F spell_slot += Regeneration:g spell_slot += Silence:G spell_slot += Haste:h spell_slot += Disjunction:H spell_slot += Invisibility:j spell_slot += Death's Door:J spell_slot += Borgnjor's Revivification:L spell_slot += Blink:b spell_slot += Controlled Blink:B spell_slot += Sublimation of Blood:n spell_slot += Passwall:N spell_slot += Necromutation:M spell_slot += Cure Poison:Z # Transformations spell_slot += Beastly Appendage:zxcv spell_slot += Spider Form:zxcv spell_slot += Ice Form:zxcv spell_slot += Blade Hands:zxcv spell_slot += Statue Form:XC spell_slot += Dragon Form:XC # Low-level spells spell_slot += Freeze:z spell_slot += Magic Dart:z spell_slot += Flame Tongue:z spell_slot += Pain:z spell_slot += Shock:z spell_slot += Sandblast:z spell_slot += Sting:z spell_slot += Ensorcelled Hibernation:z spell_slot += Infusion:z spell_slot += Summon Small Mammal:zxc spell_slot += Throw Frost:zxc spell_slot += Throw Flame:zxc spell_slot += Searing Ray:zxc spell_slot += Call Imp:zxc spell_slot += Slow:zxc spell_slot += Corona:z spell_slot += cause fear:f spell_slot += Animate Skeleton:Z spell_slot += Confusing Touch:ZX spell_slot += Sticks to Snakes:ZX spell_slot += Sure Blade:ZX # Mid-level spells spell_slot += Stone Arrow:zxcv spell_slot += Dazzling Spray:zxcv spell_slot += Iskenderun's Mystic Blast:zxcv spell_slot += Force Lance:zxcv spell_slot += Sticky Flame:zxcv spell_slot += Throw Icicle:zxcv spell_slot += Venom Bolt:zxcv spell_slot += Call Canine Familiar:zxcv spell_slot += Summon Ice Beast:zxcv spell_slot += Summon Demon:zxcv spell_slot += Airstrike:zxcv spell_slot += Agony:zxcv spell_slot += Petrify:zxcv spell_slot += Vampiric Draining:zxcv spell_slot += Song of Slaying:zxcv spell_slot += Spectral Weapon:zxcv spell_slot += Confuse:zxcv spell_slot += Mephitic Cloud:cC spell_slot += Static Discharge:ZX spell_slot += Summon Guardian Golem:ZX spell_slot += Summon Lightning Spire:ZX spell_slot += Control Undead:ZX spell_slot += Fulminant Prism:ZX spell_slot += Battlesphere:XC spell_slot += Lee's Rapid Deconstruction:XC spell_slot += Poisonous Cloud:XC spell_slot += Freezing Cloud:XC spell_slot += Ozocubu's Refrigeration:XC spell_slot += Animate Dead:XC spell_slot += Olgreb's Toxic Radiance:XC # High-level spells spell_slot += Lightning Bolt:xcv spell_slot += Fireball:xcv spell_slot += Bolt of:xcv spell_slot += Iron Shot:xcv spell_slot += Poison Arrow:xcv spell_slot += Orb of Destruction:xcv spell_slot += Lehudib's Crystal Spear:xcv spell_slot += Chain Lightning:XCV spell_slot += Fire Storm:V spell_slot += Glaciate:V spell_slot += Shatter:V spell_slot += Tornado:V # Default letters spell_slot += .*:yuiopYUIOP ############### # Auto Travel # ############### # Set travel delay to -1 for instant-travel, set to 1 to see travel paths travel_delay = -1 autofight_wait = true #disable animation view_delay = 0 auto_switch = true bindkey += [-] CMD_WEAPON_SWAP bindkey = [^I] CMD_TARGET_CYCLE_FORWARD explore_stop = glowing_items,artefacts,greedy_pickup_smart explore_stop += greedy_visited_item_stack,stairs,shops explore_stop += altars,portals,branches,runed_doors,greedy_sacrificeable # Adjusts how much autoexplore favours attempting to discover room perimeters and corners. # At values higher than 0, autoexplore will more heavily favour visiting squares that are next to walls # reasonable values range from 0 to 10 maybe? explore_wall_bias = 3 # Disables key press from stopping autoexplore travel_key_stop = false runrest_ignore_poison = 3:30 runrest_ignore_monster += butterfly:1 trapwalk_safe_hp = dart:15,needle:25,arrow:25,bolt:30,spear:20,axe:40,blade:50 # Only stop resting when both HP/MP are full rest_wait_both = true # Set Alias' stop := runrest_stop_message ignore := runrest_ignore_message ignore += You regained.*mp # Annoyances -- Don't stop autotravel for these events 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 # Jiyva Messages ignore += Jiyva appreciates your sacrifice ignore += Jiyva gurgles merrily ignore += Jiyva says: Divide and consume ignore += You hear.*splatter # Qazlal ignore += The plant is engulfed ignore += You destroy the (bush|fungus|plant) ignore += You displace your # Bad things -- Stop autotravel for these events (duplicates some of HDAForceMore) stop += (blundered into a|invokes the power of) Zot stop += (devoid of blood|starving) stop += A huge blade swings out and slices into you[^r] stop += An alarm trap emits a blaring wail stop += flesh start stop += found a zot trap stop += hear a soft click stop += lose consciousness stop += sense of stasis stop += Wait a moment stop += wrath finds you stop += You fall through a shaft # Expiring spells effects -- Stop to allow recasts (duplicates some of HDAForceMore) # 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 += You feel yourself slow down # Phase Shift more += You feel closer to the material plane # Repel/Deflect stop += missiles spell is about to expire # Shroud of Golubria stop += shroud begins to fray stop += shroud unravels more += Your shroud falls apart # Swiftness stop += start to feel a little slower # Transmutations more += Your transformation is almost over more += You have a feeling this form more += You feel yourself come back to life # Ghouls (Not part of HDAForceMore) : if you.race() == "Ghoul" then stop += smell.*(rott(ing|en)|decay) stop += something tasty in your inventory : end # Good things - Bad things wearing off (Duplicates some of HDAForceMore) stop += contamination has completely stop += You are no longer firmly anchored in space #Ally actions? #ignore += pray: #ignore += friend_spell: #ignore += friend_enchant: #ignore += friend_action: #ignore += sound: ############# # Interface # ############# allow_self_target = prompt sort_menus = true : equipped, qualname, curse, qty #WARNING TO KEYPAD USERS: The number 7 is mapped to the letter 'y' easy_confirm = all confirm_butcher = never easy_eat_chunks = true auto_eat_chunks = true auto_drop_chunks = yes easy_eat_contaminated = true equip_unequip = true #hp_warning = 25 -- Damage Calc overrides these #mp_warning = 25 -- Damage Calc overrides these hp_colour = 100:green, 99:lightgrey, 75:yellow, 50:lightred, 25:red mp_colour = 100:green, 99:lightgrey, 75:yellow, 50:lightred, 25:red stat_colour = 3:red, 7:lightred # Removes the more prompts when outputting more than one screen of messages show_more = false small_more = true # Setting this to false changes the turn display to show player turns (used for scoring) show_game_turns = true msg_min_height=7 msg_max_height=10 default_manual_training = true #################### # Autoinscriptions # #################### # Set Alias ai := autoinscribe # Overwrite annoying inscriptions with your own # Inscribe vampiric weapons if you are not a vampire : if you.race() ~= "Vampire" then ai += vampiric:!w # Inscribe potions of blood if you are a vampire : else ai += potion.*blood:@q1 : end # Inscribe distortion weapons if you are not worshipping Lugonu : if you.god() ~= "Lugonu" then ai += distortion:!w ai += (Sonja|Psyche):!w : end # Misc ai += rod of [^s][^t]:!a ai += [Mm]anual of:!d ai += dispersal:=f ai += large rock:!d =f ai += throwing net:=f, !d ai += fog:!r # Consumables ai += (bad|dangerous)_item.*potion:!q ai += potions? of berserk rage:!q ai += potions? of cure mutation:!q ai += (bad|dangerous)_item.*scroll:!r ai += scrolls? of blinking:!r ai += scrolls? of holy word:!r ai += scrolls? of magic mapping:!r ai += scrolls? of vulnerability:!r # Body Armour ai += fire dragon (armour|hide):rF++, rC- ai += gold dragon (armour|hide):rC+, rF+, rPois ai += ice dragon (armour|hide):rC++, rF- ai += mottled dragon (armour|hide):rSticky ai += pearl dragon (armour|hide):rN+ ai += quicksilver dragon armour:MR+ ai += shadow dragon (armour|hide):Stlth++++ ai += steam dragon (armour|hide):rSteam ai += storm dragon (armour|hide):rElec ai += swamp dragon (armour|hide):rPois ai += troll (hide|leather armour):regen # Body Armour Egos #ai += ([^l] leather armour|mail|plate armour|robe|skin) of cold resistance:rC+ #ai += ([^l] leather armour|mail|plate armour|robe|skin) of fire resistance:rF+ #ai += (leather armour|mail|plate armour|robe) of magic resistance:MR+ #ai += (leather armour|mail|plate armour|robe) of positive energy:rN+ #ai += (leather armour|mail|plate armour) of poison resistance:rPois #ai += plate armour of ponderousness:Speed- #ai += robe of resistance:rC+, rF+ #ai += robe of the archmagi:Spellpower+ #ai += troll leather armour of cold resistance:, rC+ #ai += troll leather armour of fire resistance:, rF+ # Accessory Egos #ai += (barding|boots|buckler|cloak|gloves|hat|helmet|shield) of cold resistance:rC+ #ai += (barding|boots|buckler|cloak|gloves|hat|helmet|shield) of fire resistance:rF+ #ai += (barding|boots) of flight:+Fly #ai += (barding|boots) of stealth:Stlth+ #ai += (barding|boots) of running:Speed+ #ai += (barding|boots) of jumping:+Jump #ai += (buckler|cloak|shield) of poison resistance:rPois #ai += (buckler|shield) of positive energy:rN+ #ai += (buckler|shield) of protection:AC+3 #ai += (buckler|shield) of reflection:Reflect #ai += (buckler|shield) of resistance:rC+, rF+ #ai += (cloak|hat|helmet) of magic resistance:MR+ #ai += (hat|helmet) of intelligence:Int+3 #ai += (hat|helmet) of see invisible:sInv #ai += cloak of darkness:+Inv #ai += gloves of strength:Str+3 #ai += gloves of dexterity:Dex+3 #ai += gloves of archery:Ranged Slay+4 #ai += hat of spirit shield:Spirit # Amulets ai += amulet of clarity:Clar, ai += amulet of faith:Faith, !P ai += amulet of guardian spirit:Spirit ai += amulet of rage:+Rage, ai += amulet of regeneration:+regen, ai += amulet of resist corrosion:rCorr, ai += amulet of resist mutation:rMut, ai += amulet of stasis:Stasis, ai += amulet of the gourmand:Gourm, ai += amulet of warding:Ward, rN+, # Rings ai += ring of fire:rF+, rC- ai += ring of flight:+Fly, ai += ring of ice:rC+, rF- ai += ring of invisibility:+Inv, ai += ring of loudness:Stlth- ai += ring of magical power:MP+9 ai += ring of poison resistance:rPois, ai += ring of positive energy:rN+ ai += ring of protection from cold:rC+, ai += ring of protection from fire:rF+, ai += ring of protection from magic:MR+, ai += ring of see invisible:sInv, ai += ring of stealth:Stlth+ ai += ring of sustain abilities:SustAb ai += ring of teleport control:cTele, ai += ring of teleportation:+/*tele, ai += ring of wizardry:Wiz+, # Obsolete in 0.16 ai += ring of regeneration:regen, # Staves ai += staff of air:rElec ai += staff of cold:rC+ ai += staff of conjuration:!a ai += staff of death:rN+ ai += staff of energy:+MP, hungerless spells, !a ai += staff of fire:rF+ ai += staff of poison:rPois ai += staff of power:MP+17, !a ai += staff of summoning:!a ai += staff of wizardry:wiz+, !a # Save fruit for abilities under Fedhas : if you.god() == "Fedhas" then ai += fruit:!e : end autoinscribe_cursed = false show_god_gift = unident ################## # Character Dump # ################## dump_item_origins = all dump_item_origin_price = 100 dump_message_count = 100 #dump_order = header,hiscore,stats,misc,mutations,skills,spells,overview,inventory #dump_order += screenshot,monlist,messages,action_counts,vaults,notes,kills dump_order += vaults, turns_by_place, kills_by_place dump_book_spells = false ood_interesting = 6 note_hp_percent = 25 note_all_skill_levels = true note_xom_effects = true note_items += of Zot,rod,acquirement note_messages += Your scales start note_messages += protects you from harm note_messages += You fall through a shaft note_messages += [bB]anish.*Abyss note_monsters += orb of fire,silver star,pearl dragon,ancient lich ############### # Items slots # ############### #Scrolls item_slot += Scroll? of blinking:B item_slot += Scroll? of identify:i item_slot += Scroll? of fog:f item_slot += Scroll? of fear:F item_slot += Scroll? of remove:R item_slot += Scroll? of recharging:G item_slot += Scroll? of summoning:s item_slot += Scroll? of teleportation:t item_slot += Scroll? of magic mapping:M #Potions item_slot += .*potion? of haste:H item_slot += .*potion? of curing:C item_slot += .*potion? of heal:h item_slot += .*potion? of might:m item_slot += .*potion? of agility:A item_slot += .*potion? of resistance:r item_slot += .*potion? of cancellation:Q #Wands item_slot += wand of heal:N item_slot += wand of hasting:J item_slot += wand of teleportation:T item_slot += wand of digging:D #misc item_slot += lamp of fire:L item_slot += phial of floods:P item_slot += fan of gales:g item_slot += phantom mirror:M item_slot += blowgun:b ##################### # Table of Contents # ##################### # 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 #################### # 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.* 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 # ############################# # Bad things happening to you more += corrodes your equipment more += are blown away by the wind more += dispelling energy hits you more += infuriates you more += lose consciousness more += mark forms upon you more += MASSIVE DAMAGE 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 += (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 can now more += You cannot afford.*fee 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 have reached level 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 += Your?.*can no longer 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) Your divine shield starts to fade. Your divine shield fades away. # Jelly Prayer (Jiyva) 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 += 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 # 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 ############ # 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) # Terrible Monsters more += 's ghost.*(comes? into view|opens the) more += A player ghost.*(comes? into view|opens the) more += boggarts?.*(comes? into view|opens the) more += curse skull.*comes? into view more += fiend.*(comes? into view|opens the) more += flayed ghost.*(comes? into view|opens the) more += giant eyeball.*comes? into view more += giant orange brains?.*(comes? into view|opens the) more += giant spore.*comes? into view more += hellion.*(comes? into view|opens the) more += ironbrand convoker.*(comes? into view|opens the) more += Lich.*(comes? into view|opens the) more += orange crystal statue.*comes? into view more += shadow demons?.*(comes? into view|opens the) more += silver statue.*comes? into view more += tormentor.*(comes? into view|opens the) # Uniques more += 27-headed.*(comes? into view|opens the) more += Agnes.*(comes? into view|opens the) more += Aizul.*(comes? into view|opens the) more += Antaeus.*(comes? into view|opens the) more += Arachne.*(comes? into view|opens the) more += Asmodeus.*(comes? into view|opens the) more += Asterion.*(comes? into view|opens the) more += Azrael.*(comes? into view|opens the) more += Blork the orc.*(comes? into view|opens the) more += Boris.*(comes? into view|opens the) more += Cerebov.*(comes? into view|opens the) more += Crazy Yiuf.*(comes? into view|opens the) more += Dispater.*(comes? into view|opens the) more += Dissolution.*(comes? into view|opens the) more += Donald.*(comes? into view|opens the) more += Dowan.*(comes? into view|opens the) more += Duvessa.*(comes? into view|opens the) more += Edmund.*(comes? into view|opens the) more += Ereshkigal.*(comes? into view|opens the) more += Erica.*(comes? into view|opens the) more += Erolcha.*(comes? into view|opens the) more += Eustachio.*(comes? into view|opens the) more += Fannar.*(comes? into view|opens the) more += Frances.*(comes? into view|opens the) more += Francis.*(comes? into view|opens the) more += Frederick.*(comes? into view|opens the) more += Gastronok.*(comes? into view|opens the) more += Geryon.*(comes? into view|opens the) more += Gloorx Vloq.*(comes? into view|opens the) more += Grinder.*(comes? into view|opens the) more += Grum.*(comes? into view|opens the) more += Harold.*(comes? into view|opens the) more += Ignacio.*(comes? into view|opens the) more += Ijyb.*(comes? into view|opens the) more += Ilsuiw.*(comes? into view|opens the) more += Jessica.*(comes? into view|opens the) more += Jorgrun.*(comes? into view|opens the) more += Jory.*(comes? into view|opens the) more += Joseph.*(comes? into view|opens the) more += Josephine.*(comes? into view|opens the) more += Jozef.*(comes? into view|opens the) more += Khufu.*(comes? into view|opens the) more += Kirke.*(comes? into view|opens the) more += Lamia.*(comes? into view|opens the) more += Lom Lobon.*(comes? into view|opens the) more += Louise.*(comes? into view|opens the) more += Mara.*(comes? into view|opens the) more += Margery.*(comes? into view|opens the) more += Maud.*(comes? into view|opens the) more += Maurice.*(comes? into view|opens the) more += Menkaure.*(comes? into view|opens the) more += Mennas.*(comes? into view|opens the) more += Mnoleg.*(comes? into view|opens the) more += Murray.*(comes? into view|opens the) more += Natasha.*(comes? into view|opens the) more += Nergalle.*(comes? into view|opens the) more += Nessos.*(comes? into view|opens the) more += Nikola.*(comes? into view|opens the) more += Norris.*(comes? into view|opens the) more += Pikel.*(comes? into view|opens the) more += Polyphemus.*(comes? into view|opens the) more += Prince Ribbit.*(comes? into view|opens the) more += Psyche.*(comes? into view|opens the) more += Purgy.*(comes? into view|opens the) more += Roxanne.*(comes? into view|opens the) more += Rupert.*(comes? into view|opens the) more += Saint Roka.*(comes? into view|opens the) more += Sigmund.*(comes? into view|opens the) more += Snorg.*(comes? into view|opens the) more += Sojobo.*(comes? into view|opens the) more += Sonja.*(comes? into view|opens the) more += Terence.*(comes? into view|opens the) more += The Lernaean hydra.*(comes? into view|opens the) more += The royal jelly.*(comes? into view|opens the) more += The Serpent of Hell.*(comes? into view|opens the) more += Tiamat.*(comes? into view|opens the) more += Urug.*(comes? into view|opens the) more += Vashnia.*(comes? into view|opens the) more += Wiglaf.*(comes? into view|opens the) more += Xtahua.*(comes? into view|opens the) ################## # HDAtravel # ################## confirm_butcher = never easy_eat_chunks = true auto_eat_chunks = true auto_drop_chunks = yes easy_eat_contaminated = true autoinscribe += bread ration:@e1 autoinscribe += meat ration:@e2 autoinscribe += chunk:@w0 autoinscribe += staff of energy:@w1 -- Rests up to at least 75% hp (or missing at least 30hp) and 50% mp (or missing at least 20mp) -- Eats chunks automatically, handled by auto_eat_chunks interface option -- Travels to the nearest corpse if we have no chunks and are at Very Hungry or Hungry or using Gourmand and at Full -- Automatically chops valid corpses if we are standing on them and we have no chunks -- Will stop autotravel at Near Starving -- Channels MP if you have staff of energy or worship Sif when you have extra chunks -- Casts regen out of combat if you have spare chunks and are missing hp -- TODO: better detection of non-edible corpses before standing on them -- TODO: Fix up for Vampire, Ghoul, and possibly Spriggan/Mummy -- NOTE: If you don't have rP you will still chop poisonous corpses, but not pick up their chunks : function HDAtravel() : local mp, max_mp = you.mp() : local hp, max_hp = you.hp() : local first_monster = next(getMonsterList()) : local already_checked = (no_results() or dont_know_how_to_get_there()) : local you_are_barbed = (have_barbs() and not removed_barbs()) : local is_safe = (first_monster == nil) : local missing_mp = (mp < max_mp) : local missing_hp = (hp < max_hp) : local need_to_recover = should_rest(hp, mp, max_hp, max_mp) : local have_no_chunks = have_no_chunks() : local you_are_yred = string.find(you.god(), "Yred") : local you_are_zin = string.find(you.god(), "Zin") : local you_are_good = string.find(you.god(), "Shining") or string.find(you.god(), "Elyvilon") or you_are_zin : local sacrifice_god = you_worship_sacrifice_god() : local you_are_mummy = string.find(you.race(), "Mummy") : local you_are_vampire = string.find(you.race(), "Vampire") : local you_are_bloodless = you.hunger_name() == "bloodless" : local you_are_ghoul = string.find(you.race(), "Ghoul") : local you_are_bloodless = you.hunger_name() == "bloodless" : local you_do_not_eat = string.find(you.race(), "Spriggan") or you_are_mummy : local lichform = string.find(you.transform(), "lich") : local bladehands = string.find(you.transform(), "blade") : local dragonform = string.find(you.transform(), "dragon") : local melded_weapon = (bladehands or dragonform) : local you_are_regen = you.regenerating() : local you_know_sublimation = known_spells["Sublimation of Blood"] and (spells.fail("Sublimation of Blood") < 20) and (mp>3) : local you_know_animate_skeleton = known_spells["Animate Skeleton"] and (spells.fail("Animate Skeleton") < 20) and (mp>1) : local you_know_animate_dead = known_spells["Animate Dead"] and (spells.fail("Animate Dead") < 20) and (mp>4) : local chunks_are_equipped = is_weapon("chunk") : local distort_weapon = is_weapon("distort") : local vamp_weapon = is_weapon("vamp") and not chunks_are_equipped : local have_a_weapon = weapon_in_inventory() : local gourmand_and_hungry = you_are_gourmand() and not (you_are_very_full() or you_are_engorged() or you_are_ghoul) : local ghoul_missing_hp = you_are_ghoul and ((hp < (max_hp - 5)) or you.rot() > 0) : local want_to_eat = (you_are_hungry() or gourmand_and_hungry or ghoul_missing_hp) and not you_do_not_eat : local have_spare_chunks = not have_no_chunks and not you_are_hungry() : local you_have_staff_of_energy = is_in_inventory("staff of energy") : local have_potion_of_blood = is_in_inventory("potion of blood") or is_in_inventory("potions of blood") : local staff_of_energy_is_equipped = is_weapon("staff of energy") : local staff_of_power_is_equipped = is_weapon("staff of power") : local staff_of_energy_letter = find_item_letter("staff of energy") : local chunks_letter = find_item_letter("chunk") : local you_are_hungerless = you_are_mummy or lichform : local no_food_issues = (you_are_hungerless or have_spare_chunks) : local should_channel_mp = ((max_mp - mp) > 5) and no_food_issues : local can_cast_regen = known_spells["Regeneration"] and (mp>3) and (spells.fail("Regeneration") < 20) : local you_have_regen_ring = is_in_inventory("regeneration") : local regen_ring_letter = find_item_letter("regeneration") : local regen_ring_is_equipped = is_ring("regeneration") : local should_regen_hp = (not (you_are_good or you_are_regen or lichform)) and ((hp/max_hp) < 0.80) and (you_have_regen_ring or can_cast_regen) and not you_are_bloodless : local should_sublimate = (not (you_are_good or lichform)) and ((mp/max_mp) < 0.60) and you_know_sublimation and mp>2 and ((hp/max_hp) > 0.95) : local should_animate_skeleton = (not you_are_good) and you_know_animate_skeleton and mp>1 and (not can_not_animate()) : local should_animate_dead = (not you_are_good) and you_know_animate_dead and mp>4 and (not can_not_animate()) : local you_want_spare_chunks = (not (have_spare_chunks or you_do_not_eat)) and (can_cast_regen or you_have_staff_of_energy) : local you_want_chunks = (not you_are_hungerless and (number_of_chunks() == 0) and (want_to_eat or you_want_spare_chunks)) or you_are_vampire or (you_are_ghoul and number_of_chunks() < 4) : --crawl.mpr(string.format("you.piety_rank() is: %s", you.piety_rank())) : --crawl.mpr(string.format("you_want_chunks is: %s", you_want_chunks and "True" or "False")) : --crawl.mpr(string.format("want_to_eat is: %s", want_to_eat and "True" or "False")) : --crawl.mpr(string.format("number_of_chunks is: %s", number_of_chunks())) : --crawl.mpr(string.format("ghoul_missing_hp is: %s", ghoul_missing_hp and "True" or "False")) : --crawl.mpr(string.format("you.hunger_name() is: %s", you.hunger_name())) : --crawl.mpr(string.format("have_spare_chunks is: %s", have_spare_chunks and "True" or "False")) : --crawl.mpr(string.format("can_cast_regen is: %s", can_cast_regen and "True" or "False")) : --crawl.mpr(string.format("you_are_not_ghoul is: %s", you_are_not_ghoul and "True" or "False")) : --crawl.mpr(string.format("you_want_spare_chunks is: %s", you_want_spare_chunks and "True" or "False")) : --crawl.mpr(string.format("you_are_hungerless is: %s", you_are_hungerless and "True" or "False")) : --crawl.mpr(string.format("have_no_chunks is: %s", have_no_chunks and "True" or "False")) : if (is_safe) then : if you_are_barbed then : rest() : elseif should_sublimate and not (you_are_vampire or lichform) then : crawl.mpr("Autocasting Sublimation of Blood.") : sendkeys('zn') : elseif should_regen_hp and can_cast_regen then : crawl.mpr("Autocasting Regen.") : --This assumes casting regen is bound to zg : sendkeys('zg') : elseif (not melded_weapon) and (should_channel_mp and you_have_staff_of_energy and no_food_issues) and (not (distort_weapon or vamp_weapon)) and you_are_not_felid() then : if not staff_of_energy_is_equipped then : crawl.mpr("Switching to staff of energy.") : sendkeys('w1') : end : crawl.mpr("Autochanneling using staff of energy.") : sendkeys('v') : elseif (weapon_in_slot_a() or uses_unarmed()) and (no_weapon() and have_a_weapon) or (staff_of_energy_is_equipped and (not (staff_of_energy_letter == 'a')) or (chunks_are_equipped and (not (chunks_letter == 'a')))) then : if uses_unarmed() then : crawl.mpr("Switching to unarmed.") : sendkeys('w-') : else : crawl.mpr("Switching to main weapon.") : sendkeys('wa') : end : elseif want_to_eat and number_of_chunks() > 0 then : crawl.mpr("Autoeating chunks.") : sendkeys('e') : elseif you_want_chunks and on_corpses() and not on_chunks() and (not can_not_butcher()) then : if should_animate_skeleton then : crawl.mpr("Autocasting Animate Skeleton for chunks.") : sendkeys('zZ') : else : crawl.mpr("Autochopping corpse.") : sendkeys('c') : end : elseif you_want_chunks and (not (you_are_zin or need_to_recover or on_chunks() or on_corpses() or already_checked)) then : crawl.mpr("You may need something to eat soon, looking for food.") : find_corpses() : elseif you_are_starving_or_near() and (number_of_chunks == 0) and (not (on_chunks() or on_corpses())) then : local have_bread = is_in_inventory("bread ration") : local have_meat = is_in_inventory("meat ration") : if have_bread or have_meat then : local result = crawl.yesnoquit("Eat a ration?", true, 'e') : if result == 1 and have_bread then : sendkeys('e1') : elseif result == 1 then : sendkeys('e2') : elseif result == 0 then : autoexplore() : end : if not (is_in_inventory("bread ration") or is_in_inventory("meat ration")) then : crawl.mpr("That was your last ration! You should go get more.") : end : else : crawl.mpr("No rations left! You should look for food.") : end : elseif need_to_recover and not you_are_starving() then : if you_are_bloodless and have_potion_of_blood then : crawl.mpr("Autoquaffing potion of blood.") : sendkeys('q1') : else : rest() : end : elseif you_are_yred and (you.piety_rank() >= 3) and (item_in_view("corpse") or item_in_view("skeleton") or on_corpses()) and not recently_mass_animated() then : crawl.mpr("Autocasting Mass Animate Remains.") : sendkeys('aa') : elseif (not sacrifice_god) and (item_in_view("corpse") or item_in_view("skeleton") or on_corpses()) and should_animate_dead and not already_animated() then : crawl.mpr("Autocasting Animate Dead.") : sendkeys('zX') : elseif (not sacrifice_god) and on_corpses() and should_animate_skeleton then : crawl.mpr("Autocasting Animate Skeleton.") : sendkeys('zZ') : elseif you_are_yred and (you.piety_rank() >= 1) and on_corpses() then : crawl.mpr("Autocasting Animate Remains.") : sendkeys('aa') : else : --This does the general travelling : autoexplore() : end : else : --This will provide the "foo is nearby" message : autoexplore() : end : end < function sendkeys(command) crawl.flush_input() crawl.sendkeys(command) coroutine.yield(true) crawl.flush_input() end function should_rest(hp, mp, max_hp, max_mp) local you_are_mummy = string.find(you.race(), "Mummy") local you_are_deep_dwarf = string.find(you.race(), "Deep Dwarf") return (mp < (max_mp*0.50) or ((max_mp-mp) > 20) or ((hp < (max_hp*0.80)) or ((max_hp-hp) > 30) and not you_are_deep_dwarf) or you.slowed() or you.poisoned() or you.confused() or you.exhausted() or (((hp < max_hp) or (mp < max_mp)) and you_are_mummy)) end -- Hungry, Very Hungry, Near Starving, Starving function you_are_hungry() return not you_are_not_hungry() and ((string.find(you.hunger_name(), "hungry")) or you_are_starving_or_near()) end -- Normal Satiation function you_are_not_hungry() return (string.find(you.hunger_name(), "not hungry")) end -- Engorged function you_are_engorged() return (string.find(you.hunger_name(), "completely stuffed")) end -- Very full function you_are_very_full() return (string.find(you.hunger_name(), "very full")) end -- Near Starving function you_are_near_starving() return (string.find(you.hunger_name(), "near starving")) end -- Near Starving, Starving function you_are_starving_or_near() return (string.find(you.hunger_name(), "starving")) end -- Starving function you_are_starving() return you_are_starving_or_near() and not you_are_near_starving() end function autoexplore() sendkeys('o') end function have_barbs() return string.find(crawl.messages(10), escape("The barbed spikes become lodged in your body")) or string.find(crawl.messages(10), escape("The barbed spikes dig painfully into your body as you move")) end function already_animated() return string.find(crawl.messages(20), escape("Autocasting Animate Dead")) end function removed_barbs() return string.find(crawl.messages(10), escape("You carefully extract the manticore spikes from your body")) or string.find(crawl.messages(10), escape("The manticore spikes snap loose")) end function no_results() return string.find(crawl.messages(10), escape("Can't find anything matching that")) or string.find(crawl.messages(10), escape("You may need something to eat soon")) end function dont_know_how_to_get_there() return string.find(crawl.messages(10), escape("know how to get there")) or string.find(crawl.messages(10), escape("Have to go through")) end function can_not_animate() return string.find(crawl.messages(10), escape("There is nothing here that can be animated")) end function can_not_bottle() return string.find(crawl.messages(10), escape("There isn't anything to bottle here")) end function recently_mass_animated() return string.find(crawl.messages(10), escape("Autocasting Mass Animate Remains")) end function can_not_butcher() return string.find(crawl.messages(10), escape("anything suitable to butcher here")) end function can_not_eat_that() return string.find(crawl.messages(10), escape("You can't eat that")) --These strings don't seem to show up in messages --or string.find(crawl.messages(10), escape("Not only inedible but also greatly harmful")) --or string.find(crawl.messages(10), escape("It is caustic")) end function rest() sendkeys('5') end function you_are_gourmand() return you.gourmand() or (not you_are_not_ghoul()) or (not you_are_not_felid()) or (not you_are_not_troll()) or (string.find(you.race(), "Kobold")) end function have_no_chunks() for it in inventory() do if string.find(it.name(), "chunk") then return false end end return true end function have_rotten_chunks() for it in inventory() do if string.find(it.name(), "chunk") and string.find(it.name(), "rott") then return false end end return true end function number_of_chunks() for it in inventory() do --if string.find(it.name(), "chunk") then --crawl.mpr(it.name() .." is edible: " .. (food.can_eat(it) and "True" or "False") .. " and dangerous: " .. (food.dangerous(it) and "True" or "False")) --end if string.find(it.name(), "chunk") and (not string.find(it.name(), "book")) and food.can_eat(it) and not food.dangerous(it) then return it.quantity end end return 0 end function is_in_inventory(str) for it in inventory() do if string.find(it.name(), str) then return true end end return false end function weapon_in_inventory() for it in inventory() do if string.find(it.class(true), "weapon") then return true end end return false end function weapon_in_slot_a() local it = items.inslot(0) if it then return string.find(it.class(true), "weapon") else return false end end function find_item_letter(str) for i = 0,51 do it = items.inslot(i) if it then if string.find(it.name(), str) then return items.index_to_letter(i) end end end return false end function you_worship_sacrifice_god() return string.find(you.god(), "Trog") --or string.find(you.god(), "Oka") --or string.find(you.god(), "Makhleb") or string.find(you.god(), "Beogh") or string.find(you.god(), "Lugonu") --or string.find(you.god(), "Nemelex") end function on_corpses() local fl = you.floor_items() for it in iter.invent_iterator:new(fl) do if string.find(it.name(), "corpse") and not string.find(it.name(), "rotting") and not string.find(it.name(), "plague") then return true end end return false end function on_chunks() for it in floor_items() do if string.find(it.name(), "chunk") then return true else return false end end end function you_are_carnivore() return you.saprovorous() end function you_are_not_ghoul() return not (string.find(you.race(), "Ghoul")) end function you_are_not_troll() return not (string.find(you.race(), "Troll")) end function you_are_not_felid() return not (string.find(you.race(), "Felid")) end function you_are_not_octopode() return not (string.find(you.race(), "Octopode")) end function find_corpses() local race = you.race() local god = you.god() local exclude_this = "" if string.find(god, "Shining") then exlude_this = race end sendkeys(string.char(6) .. "@corpse&&!!rott&&!!skel&&!!sky&&!!necrop&&!!ugly&&!!vampire&&!!corpse rot&&!!&&!!botono" .. exclude_this .. "\ra\r") end function inventory() return iter.invent_iterator:new(items.inventory()) end function floor_items() return iter.invent_iterator:new(you.floor_items()) end function no_weapon() return (items.equipped_at("Weapon") == nil) and not uses_unarmed() end function uses_unarmed() return not you_are_not_ghoul() or not you_are_not_troll() or not you_are_not_felid() or (you.skill("Unarmed Combat") >= 3) end function is_weapon(str) local weapon = items.equipped_at("Weapon") if weapon then return string.find(weapon.name(), str) else return false end end function is_ring(str) local ring1 = items.equipped_at("Left Ring") local ring2 = items.equipped_at("Right Ring") if ring1 and ring2 then return string.find(ring1.name(), str) or string.find(ring2.name(), str) elseif ring1 then return string.find(ring1.name(), str) elseif ring2 then return string.find(ring2.name(), str) else return false end end function item_in_view(str) local x,y for x = -8,8 do for y = -8,8 do if not (x == 0 and y == 0) then local pile = items.get_items_at(x,y) if pile ~= nil then for it in iter.invent_iterator:new(pile) do if string.find(it.name(), str) and you.see_cell_no_trans(x,y) then return true end end end end end end return false end -- Returns a table where the key is the monster description and value is the total number of that mob in your vision function getMonsterList() local monsters = {} for x = -7,7 do for y = -7,7 do m = monster.get_monster_at(x, y) local attitude_hostile = 0 if m and (m:attitude() == attitude_hostile) and not (m:is_firewood()) then desc = m:desc() if (monsters[desc] == nil) then monsters[desc] = 1 else monsters[desc] = monsters[desc] + 1 end end end end return monsters end --Escapes the special characters in a string for pattern matching function escape(str) --Escapes parens and dash "()-" local escaped = str:gsub('[%(%)%-]','%\%1') --Removes any coloration parts of the string return (escaped:gsub('<[^<]*>','')) end local function init_spells() local spell_list = {} for _, spell_name in ipairs(you.spells()) do spell_list[spell_name] = true end return spell_list end known_spells = init_spells() > ############### # 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 > ################ # Mob Warnings # ################ < --Returns a table where the key is the monster description and value is the total number of that mob in your vision function getMonsterList() local monsters = {} for x = -7,7 do for y = -7,7 do m = monster.get_monster_at(x, y) local attitude_hostile = 0 if m and (m:attitude() == attitude_hostile) and not (m:is_firewood()) then desc = m:desc() if (monsters[desc] == nil) then monsters[desc] = 1 else monsters[desc] = monsters[desc] + 1 end end end end return monsters end --Escapes the special characters in a string for pattern matching function escape(str) --Escapes parens and dash "()-" local escaped = str:gsub('[%(%)%-]','\\%1') --Removes any coloration parts of the string return (escaped:gsub('<[^<]*>','')) end -- Uses the getMonsterList and escape functions above function SpoilerAlert() local mobwarnings = {} --Add dangerous monsters to this table by using their name as the key, (as a lua pattern) --Set the value to the warning string you want to display, where it will formatted like: --"[The] Monster_Name Warning_Message" --If the Monster_Name includes a capital letter, the message will be prepended with [The] local xl = you.xl() local no_rP = you.res_poison() == 0 local no_rF = you.res_fire() == 0 local no_rC = you.res_cold() == 0 local no_rN = you.res_draining() == 0 local no_rE = you.res_shock() == 0 local no_rMut = you.res_mutation() == 0 local you_are_flying = you.flying() local no_see_invis = not you.see_invisible() local no_rCorr = not you.res_corr() local race = you.race() local form = you.transform() local you_are_undead = (race:find("ghoul") or race:find("vampire") or race:find("mummy") or form:find("lich")) --Only hide Torment for races with full, permanent immunity local you_perm_rTorment = (race:find("ghoul") or race:find("mummy")) --crawl.mpr(string.format("you.res_mutation() is: %s", you.res_mutation())) --crawl.mpr(string.format("no_rMut is: %s", no_rMut and "True" or "False")) if xl < 3 then if no_rP then mobwarnings["giant mite"] = "can poison!" end mobwarnings["ball python"] = "can constrict!" mobwarnings["giant cockroach"] = "is fast!" mobwarnings["giant gecko"] = "is fast!" mobwarnings["jackal"] = "is fast!" end if xl < 5 then if no_rP then mobwarnings["adder"] = "is fast and can poison!" mobwarnings["scorpion"] = "can poison!" end mobwarnings["worm"] = "can hit for moderate damage in melee!" end if xl < 9 then if no_rP then mobwarnings["worker ant"] = "is fast and can poison!" end if no_see_invis then if no_rP then mobwarnings["Natasha"] = "can cast Slow, Mephitic Cloud, Call Imp, and go Invisible!" else mobwarnings["Natasha"] = "can cast Slow, Call Imp, and go Invisible!" end if no_rF and no_rC then mobwarnings["Blork"] = "can cast Haste, Throw Frost, Throw Flame, and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, Throw Frost, or go Invisible!" mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and go Invisible!" elseif no_rF then mobwarnings["Blork"] = "can cast Haste, Throw Flame, and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, or go Invisible!" mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and go Invisible!" elseif no_rC then mobwarnings["Blork"] = "can cast Haste, Throw Frost, and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Frost, or go Invisible!" mobwarnings["Sigmund"] = "can cast Slow, Confuse, and go Invisible!" else mobwarnings["Blork"] = "can cast Haste and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, or go Invisible!" mobwarnings["Sigmund"] = "can cast Slow, Confuse, and go Invisible" end else if no_rP then mobwarnings["Natasha"] = "can cast Slow, Mephitic Cloud, and Call Imp!" else mobwarnings["Natasha"] = "can cast Slow and Call Imp!" end if no_rF and no_rC then mobwarnings["Blork"] = "can cast Haste, Throw Frost, and Throw Flame!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, or Throw Frost!" mobwarnings["Sigmund"] = "can cast Slow, Confuse, and Throw Flame!" elseif no_rF then mobwarnings["Blork"] = "can cast Haste, and Throw Flame!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, or Throw Flame!" mobwarnings["Sigmund"] = "can cast Slow, Confuse, and Throw Flame!" elseif no_rC then mobwarnings["Blork"] = "can cast Haste and Throw Frost!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, or Throw Frost!" mobwarnings["Sigmund"] = "can cast Slow and Confuse!" else mobwarnings["Blork"] = "can cast Haste!" mobwarnings["orc wizard"] = "might cast Slow or Confuse!" mobwarnings["Sigmund"] = "can cast Slow and Confuse!" end end mobwarnings["big kobold"] = "will probably throw things at you!" mobwarnings["Crazy Yiuf"] = "can hit for high damage in melee!" mobwarnings["Dowan"] = "can Haste Duvessa, and will become Hasted and cast Throw Icicle when Duvessa dies!" mobwarnings["Duvessa"] = "can hit for moderate damage in melee, and goes Berserk when Dowan dies!" mobwarnings["Eustachio"] = "can summon minor creatures and blink!" mobwarnings["gnoll"] = "can hit for moderate damage in melee, and throws nets!" mobwarnings["Ijyb"] = "will often zap you with wands!" mobwarnings["mummy"] = "can hit for moderate damage in melee!" mobwarnings["ogre"] = "can hit for high damage in melee!" mobwarnings["phantom"] = "can hit for moderate damage in melee and blinks!" end if xl < 14 then if no_rN then mobwarnings["Grinder"] = "can cast Paralyse and Pain!" mobwarnings["shadow imp"] = "can cast Pain and Animate Dead!" mobwarnings["wight"] = "can drain you in melee!" else mobwarnings["Grinder"] = "can cast Paralyse!" mobwarnings["shadow imp"] = "can Animate Dead!" mobwarnings["wight"] = "can hit for moderate damage in melee!" end if no_rC then mobwarnings["ice beast"] = "can hit for moderate damage in melee!" mobwarnings["simulacr"] = "can hit for high damage in melee!" mobwarnings["white imp"] = "can cast Throw Frost!" mobwarnings["white ugly thing"] = "is fast and can hit for high cold damage in melee!" else mobwarnings["simulacr"] = "can hit for moderate damage in melee!" mobwarnings["white ugly thing"] = "is fast and can hit for moderate damage in melee!" end if no_rF then mobwarnings["fire drake"] = "can breathe blasts of flame!" mobwarnings["red ugly thing"] = "is fast and can hit for high fire damage in melee!" mobwarnings["steam dragon"] = "breathes balls of steam!" if no_see_invis and no_rP then mobwarnings["Erica"] = "can hit for moderate fire damage in melee, can cast Venom Bolt, IMB, Confuse, Slow, go Invisible, and teleport away!" elseif no_rP then mobwarnings["Erica"] = "can hit for moderate fire damage in melee, can cast Venom Bolt, IMB, Confuse, Slow, and teleport away!" elseif no_see_invis then mobwarnings["Erica"] = "can hit for moderate fire damage in melee, can cast IMB, Confuse, Slow, go Invisible, and teleport away!" else mobwarnings["Erica"] = "can hit for moderate fire damage in melee, can cast IMB, Confuse, Slow, and teleport away!" end else mobwarnings["red ugly thing"] = "is fast and can hit for moderate damage in melee!" if no_see_invis and no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, Confuse, Slow, go Invisible, and teleport away!" elseif no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, Confuse, Slow, and teleport away!" elseif no_see_invis then mobwarnings["Erica"] = "can cast IMB, Confuse, Slow, go Invisible, and teleport away!" else mobwarnings["Erica"] = "can cast IMB, Confuse, Slow, and teleport away!" end end if no_rC or no_rF or no_rP then mobwarnings["Joseph"] = "shoots branded sling bullets!" end if no_rP then mobwarnings["black mamba"] = "is very fast, can hit for high damage in melee, and can poison!" mobwarnings["green ugly thing"] = "is fast and can hit for high poison damage in melee!" mobwarnings["killer bee"] = "is very fast and can poison!" mobwarnings["naga"] = "can constrict and spit poison!" mobwarnings["queen ant"] = "can berserk other ants, and can poison!" mobwarnings["redback"] = "is fast and can poison!" mobwarnings["soldier ant"] = "is fast and can poison!" mobwarnings["spiny frog"] = "is fast, can hit for high damage in melee, and can poison!" mobwarnings["swamp drake"] = "breathes Mephitic clouds!" mobwarnings["water moccasin"] = "is fast and can poison!" else mobwarnings["black mamba"] = "is very fast and can hit for high damage in melee!" mobwarnings["green ugly thing"] = "is fast and can hit for moderate damage in melee!" mobwarnings["killer bee"] = "is very fast!" mobwarnings["naga"] = "can constrict!" mobwarnings["queen ant"] = "can berserk other ants!" mobwarnings["redback"] = "is fast!" mobwarnings["soldier ant"] = "is fast!" mobwarnings["spiny frog"] = "is fast and can hit for high damage in melee!" mobwarnings["water moccasin"] = "is fast!" end if no_rE then mobwarnings["cyan ugly thing"] = "can hit for high electric damage in melee!" mobwarnings["electric eel"] = "can hit for high damage at range!" else mobwarnings["cyan ugly thing"] = "is fast and can hit for moderate damage in melee!" end if no_rCorr then mobwarnings["jelly"] = "can corrode equipment in melee!" end mobwarnings["blink frog"] = "is fast, can hit for moderate damage in melee, and blinks!" mobwarnings["centaur"] = "is fast and can hit for moderate damage at range!" mobwarnings["draconian"] = "can hit for high damage in melee!" mobwarnings["elephant"] = "can hit for high damage in melee, and can trample!" mobwarnings["gargoyle"] = "can cast Stone Arrow!" mobwarnings["gnoll shaman"] = "can heal itself and can heal or Haste other gnolls!" mobwarnings["goliath beetle"] = "can hit for high damage in melee!" mobwarnings["hill giant"] = "can hit for high damage in melee!" mobwarnings["hippogriff"] = "can hit for high damage in melee!" mobwarnings["Maud"] = "can hit for high damage in melee!" mobwarnings["orc warrior"] = "can hit for high damage!" mobwarnings["Pikel"] = "can hit for high damage in melee!" mobwarnings["Prince Ribbit"] = "is fast and can hit for high damage in melee!" mobwarnings["Psyche"] = "might banish you in melee!" mobwarnings["raven"] = "is very fast and can hit for moderate damage in melee!" mobwarnings["slave"] = "means Pikel is nearby!" mobwarnings["slime creature"] = "can hit for high damage in melee!" mobwarnings["small abomination"] = "might be fast and can hit for high damage in melee!" mobwarnings["troll"] = "can hit for high damage in melee, and regenerates quickly!" mobwarnings["two-headed ogre"] = "can hit for high damage in melee!" mobwarnings["warg"] = "is fast and can hit for moderate damage in melee!" mobwarnings["wolf"] = "is very fast and can hit for moderate damage in melee!" mobwarnings["wraith"] = "can slow you in melee!" mobwarnings["wyvern"] = "is fast and can hit for high damage in melee!" mobwarnings["yak"] = "can hit for moderate damage in melee!" end if you.xl() < 21 then local orcsorcwarn = "" local tenguconjwarn = "" if no_rF then if no_see_invis and no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, go Invisible, and teleport away!" elseif no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, and teleport away!" elseif no_see_invis then mobwarnings["Erica"] = "can cast IMB, go Invisible, and teleport away!" else mobwarnings["Erica"] = "can cast IMB and teleport away!" end mobwarnings["deep elf mage"] = "can cast Fireball and Slow!" mobwarnings["efreet"] = "can cast Bolt of Fire and Fireball!" mobwarnings["Harold"] = "can throw nets and cast Bolt of Fire!" mobwarnings["lindwurm"] = "has a nasty fire breath attack!" mobwarnings["red very ugly thing"] = "can hit for high fire damage in melee!" mobwarnings["salamander"] = "uses fire branded attacks!" orcsorcwarn = orcsorcwarn .. ", Bolt of Fire" tenguconjwarn = tenguconjwarn .. ", Bolt of Magma" else if no_see_invis and no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, go Invisible, and teleport away!" elseif no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, and teleport away!" elseif no_see_invis then mobwarnings["Erica"] = "can cast IMB, go Invisible, and teleport away!" else mobwarnings["Erica"] = "can cast IMB, and teleport away!" end mobwarnings["deep elf mage"] = "can cast slow!" mobwarnings["Harold"] = "can throw nets!" mobwarnings["lindwurm"] = "can hit for high damage in melee!" mobwarnings["red very ugly thing"] = "can hit for high damage in melee!" end if no_rP then mobwarnings["green very ugly thing"] = "is fast and can hit for high poison damage in melee!" mobwarnings["naga mage"] = "can cast IMB and Poison Arrow, and spits poison!" mobwarnings["naga ritualist"] = "can give poison vulnerability, and do poison damage over time with toxic radiance!" mobwarnings["naga warrior"] = "can constrict you and hit for high damage in melee, and spits poison!" mobwarnings["redback"] = "is fast and can poison!" mobwarnings["Sonja"] = "shoots Curare needles and will probably banish you in melee!" mobwarnings["wolf spider"] = "is fast and can hit for high damage in melee, and can poison!" tenguconjwarn = tenguconjwarn .. ", Venom Bolt" else mobwarnings["green very ugly thing"] = "is fast and can hit for high damage in melee!" mobwarnings["naga mage"] = "can cast IMB and Poison Arrow!" mobwarnings["naga ritualist"] = "can remove poison resistance, and do damage over time with toxic radiance!" mobwarnings["naga warrior"] = "can constrict you and hit for high damage in melee!" mobwarnings["Sonja"] = "will probably banish you in melee!" mobwarnings["wolf spider"] = "is fast and can hit for high damage in melee!" end if no_rE then mobwarnings["cyan very ugly thing"] = "is fast and can hit for high electric damage in melee!" mobwarnings["raiju"] = "is fast and can Lightning Bolt itself at you!" tenguconjwarn = tenguconjwarn .. ", Lightning Bolt" else mobwarnings["cyan very ugly thing"] = "is fast and can hit for high damage in melee!" mobwarnings["raiju"] = "is fast and blinks around!" end if no_rC then mobwarnings["bog body"] = "can cast Slow and Bolt of Cold!" mobwarnings["Fannar"] = "can cast Bolt of Cold, Ozo's Refrigeration, Summon Ice Beast, and Blink!" mobwarnings["freezing wraith"] = "can hit for high cold damage and slow you in melee!" mobwarnings["simulacr"] = "can hit for high damage in melee!" mobwarnings["white very ugly thing"] = "is fast and can hit for high cold damage in melee!" else mobwarnings["bog body"] = "can cast Slow!" mobwarnings["Fannar"] = "can Blink and Summon Ice Beasts!" mobwarnings["freezing wraith"] = "can slow you in melee!" mobwarnings["white very ugly thing"] = "is fast and can hit for high damage in melee!" end if no_rN then orcsorcwarn = orcsorcwarn .. ", Bolt of Draining" mobwarnings["Nergalle"] = "can cast Bolt of Draining, Summon Spectral Orcs, Haste Other, and Death's Door!" if you_are_undead then mobwarnings["Josephine"] = "can cast Ghostly Fireball, Vampiric Draining, Animate Dead, and Dispel Undead!" else mobwarnings["Josephine"] = "can cast Ghostly Fireball, Vampiric Draining, and Animate Dead!" end else mobwarnings["Nergalle"] = "can Summon Spectral Orcs, cast Haste Other, and Death's Door!" if you_are_undead then mobwarnings["Josephine"] = "can cast Animate Dead, and Dispel Undead!" else mobwarnings["Josephine"] = "can cast Animate Dead!" end end if no_rCorr then mobwarnings["brown ugly thing"] = "is fas and can hit for high damage in melee, corroding equipment!" mobwarnings["brown very ugly thing"] = "is fast and can hit for high damage in melee, corroding equipment!" mobwarnings["oklob"] = "can corrode equipment at range!" else mobwarnings["brown ugly thing"] = "is fast and can hit for moderate damage in melee!" mobwarnings["brown very ugly thing"] = "is fast and can hit for high damage in melee!" end if no_see_invis then mobwarnings["Kirke"] = "can summon Monstrous Menageries, go invisible, turn you into a pig, and deflects missiles!" mobwarnings["Maurice"] = "can steal items, go invisible, and teleport away!" else mobwarnings["Kirke"] = "can summon Monstrous Menageries, turn you into a pig, and deflects missiles!" mobwarnings["Maurice"] = "can steal items, and teleport away!" end mobwarnings["anaconda"] = "is very fast and can constrict you!" mobwarnings["centaur warrior"] = "can hit for high damage at range!" mobwarnings["cyclops"] = "can throw large rocks!" mobwarnings["death yak"] = "can hit for high damage in melee!" mobwarnings["dire elephant"] = "can hit for high damage in melee, and can trample!" mobwarnings["enormous slime creature"] = "can hit for high damage in melee!" mobwarnings["Erolcha"] = "might cast banishment, paralyse, or LCS!" mobwarnings["firefly"] = "is very fast, can hit for moderate damage, and flashes a warning beacon!" mobwarnings["harpy"] = "is very fast and can hit for high damage in melee!" mobwarnings["hydra"] = "can hit for high damage in melee!" mobwarnings["kobold demonologist"] = "can summon minor demons!" mobwarnings["komodo dragon"] = "can hit for high damage in melee!" mobwarnings["large abomination"] = "might be fast and can hit for high damage in melee!" mobwarnings["large slime creature"] = "can hit for high damage in melee!" mobwarnings["manticore"] = "can hit for high damage at range, and Barbs causes damage when you move!" mobwarnings["naga sharpshooter"] = "can shoot you with portal projectiles!" mobwarnings["orc knight"] = "can hit for high damage!" mobwarnings["orc sorcerer"] = "can cast Paralyse, Summon Demon, Animate Dead"..orcsorcwarn.."!" mobwarnings["purple ugly thing"] = "can hit for high damage in melee!" mobwarnings["skeletal warrior "] = "can hit for high damage in melee!" mobwarnings["Snorg"] = "can berserk and hit for high damage!" mobwarnings["spriggan"] = "is very fast and can hit for moderate damage!" mobwarnings["tarantella"] = "is fast and can cause confusion in melee!" mobwarnings["tengu conjurer"] = "is fast and can cast Force Lance, IMB"..tenguconjwarn.."!" mobwarnings["tengu warrior"] = "is fast and can hit for high damage in melee!" mobwarnings["thorn lotus"] = "can hit for high damage at range!" end if you.xl() < 27 then local tengureaverwarn = "" if no_rF then mobwarnings["fire dragon"] = "has a nasty fire breath attack!" mobwarnings["fire giant"] = "can cast Fireball and Bolt of Fire!" mobwarnings["flaming corpse"] = "is fast, can cause sticky flames in melee!" mobwarnings["mottled draconian"] = "can spit sticky flames at range!" mobwarnings["red very ugly thing"] = "is fast, can cause sticky flames in melee!" mobwarnings["salamander firebrand"] = "is fast and melee attacks will surround you with flame clouds!" mobwarnings["salamander mystic"] = "can haste allies, and casts Bolt of Magma and IMB!" tengureaverwarn = tengureaverwarn .. ", can cast Bolt of Magma, Fireball" else mobwarnings["fire dragon"] = "can hit for high damage in melee!" mobwarnings["fire giant"] = "can hit for high damage in melee!" mobwarnings["flaming corpse"] = "is fast!" mobwarnings["red very ugly thing"] = "is fast!" mobwarnings["salamander firebrand"] = "is fast and melee attacks will surround you with flame clouds!" mobwarnings["salamander mystic"] = "can haste allies and casts IMB!" end if no_rC then mobwarnings["frost giant"] = "can cast Bolt of Cold!" mobwarnings["ice dragon"] = "has a nasty cold breath attack!" tengureaverwarn = tengureaverwarn .. ", can cast Freezing Cloud" else mobwarnings["frost giant"] = "can hit for high damage in melee!" mobwarnings["ice dragon"] = "can hit for high damage in melee!" end if no_rN then mobwarnings["eidolon"] = "can cast Bolt of Draining and Fear!" else mobwarnings["eidolon"] = "can cast Fear!" end if no_rE then tengureaverwarn = tengureaverwarn .. ", can cast Lightning Bolt" end if no_rP then mobwarnings["Aizul"] = "is very fast and casts Sleep, Poison Arrow, and Venom Bolt!" mobwarnings["greater naga"] = "is strong in melee, and casts Venom Bolt, Poison Arrow, IMB, and spits poison!" else mobwarnings["Aizul"] = "is very fast and casts Sleep and Poison Arrow!" mobwarnings["greater naga"] = "is strong in melee, and can cast Poison Arrow and IMB!" end if no_see_invis then mobwarnings["wizard"] = "might cast banishment, paralyse, LCS, or go Invisible!" if no_rN then if no_rC and no_rF then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, Bolt of Cold, or go Invisible!" elseif no_rF then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, or go Invisible!" elseif no_rC then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Cold, or go Invisible!" else mobwarnings["necromancer"] = "can cast Agony, Animate Dead, or go Invisible!" end end else mobwarnings["wizard"] = "might cast banishment, paralyse, or LCS!" if no_rN then if no_rC and no_rF then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, or Bolt of Cold!" elseif no_rF then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, or Bolt of Fire!" elseif no_rC then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, or Bolt of Cold!" else mobwarnings["necromancer"] = "can cast Agony and Animate Dead!" end end end mobwarnings["deep troll earth mage"] = "can cast LRD and dig!" mobwarnings["ettin"] = "can hit for very high damage in melee!" mobwarnings["great orb of eyes"] = "can cast paralyse, disintegrate, slow, confuse, and teleport you!" mobwarnings["ironheart preserver"] = "can absorb the damage of its allies and heal itself!" mobwarnings["Lernaean hydra"] = "don't fight it in melee! Just don't!" mobwarnings["Louise"] = "can cast banishment!" mobwarnings["minotaur"] = "can hit for very high damage!" mobwarnings["ogre mage"] = "might cast banishment, paralyse, or LCS!" mobwarnings["orc warlord"] = "can hit for high damage!" mobwarnings["purple draconian"] = "can dispel your buffs!" mobwarnings["purple very ugly thing"] = "is fast and can cause rotting in melee!" mobwarnings["Rupert"] = "can paralyse you in fear!" mobwarnings["stone giant"] = "throws large rocks and can hit for very high damage!" mobwarnings["tengu reaver"] = "is fast"..tengureaverwarn.."!" mobwarnings["titanic slime creature"] = "can hit for high damage in melee!" mobwarnings["vampire knight"] = "can cast paralyse!" mobwarnings["vampire mage"] = "can Summon Undead and Animate Dead!" mobwarnings["Vashnia"] = "can blink herself and allies away!" mobwarnings["vault sentinel"] = "can mark you and blow a signal horn!" mobwarnings["vault warden"] = "can lock down doors and staircases!" mobwarnings["water nymph"] = "can create water, teleport to other water, and Waterstrike you!" mobwarnings["Wiglaf"] = "can cast might and haste on himself!" mobwarnings["yaktaur"] = "can hit for high damage at range!" end if no_rP then mobwarnings["red wasp"] = "is very fast and can Paralyse and poison in melee!" mobwarnings["yellow wasp"] = "is very fast and can Slow and poison in melee!" else mobwarnings["red wasp"] = "is very fast and can Slow in melee!" end if no_rF then mobwarnings["deep elf mage"] = "can cast fireball and slow!" mobwarnings["fire dragon"] = "has a nasty fire breath attack!" mobwarnings["fire giant"] = "can cast fireball and bolt of fire!" mobwarnings["merfolk aquamancer"] = "can cast Primal Wave, Steam Ball, Throw Icicle, and Blink!" else mobwarnings["merfolk aquamancer"] = "can cast Primal Wave, Throw Icicle, and Blink!" end if no_rN then mobwarnings["shadow dragon"] = "has a nasty draining breath attack!" end mobwarnings["electric golem"] = "is fast, has electric attacks, and blinks!" mobwarnings["Nikola"] = "casts Lightning Bolt, Chain Lightning and blinks!" mobwarnings["shock serpent"] = "is fast, casts Bolt of Lightning, does electric damage, and causes electric damage when injured!" mobwarnings["Sojobo"] = "is fast and can cast Airstrike and Lightning Bolt!" mobwarnings["storm dragon"] = "can hit for high damage in melee and has a nasty electric breath attack!" mobwarnings["titan"] = "can cast Lightning Bolt and Airstrike!" local electricwarning = "" if no_rE then electricwarning = " You are not wearing rElec!" mobwarnings["electric golem"] = mobwarnings["electric golem"] .. electricwarning mobwarnings["Nikola"] = mobwarnings["Nikola"] .. electricwarning mobwarnings["shock serpent"] = mobwarnings["shock serpent"] .. electricwarning mobwarnings["Sojobo"] = mobwarnings["Sojobo"] .. electricwarning mobwarnings["storm dragon"] = mobwarnings["storm dragon"] .. electricwarning mobwarnings["titan"] = mobwarnings["titan"] .. electricwarning end mobwarnings["giant orange brain"] = "can cast Shadow Creatures, and drain your Int!" mobwarnings["neqoxec"] = "can mutate you, and drain your Int!" mobwarnings["Norris"] = "can cast Paralyse, Smite you, and drain your Int!" mobwarnings["orange crystal statue"] = "can cast Confuse, Drain MP, and drain your Int!" if no_Sustab then local statdrainwarning = " You are not wearing SustAb!" mobwarnings["brain worm"] = "can drain your Int!" .. statdrainwarning mobwarnings["giant orange brain"] = mobwarnings["giant orange brain"] .. statdrainwarning mobwarnings["neqoxec"] = mobwarnings["neqoxec"] .. statdrainwarning mobwarnings["Norris"] = mobwarnings["Norris"] .. statdrainwarning mobwarnings["orange crystal statue"] = mobwarnings["orange crystal statue"] .. statdrainwarning end mobwarnings["cacodemon"] = "can cast Energy bolts, Dig, and mutate you!" mobwarnings["orb of fire"] = "can cast Fireball and Bolt of Fire, and mutate you!" if no_rMut then local mutationwarning = " You are not wearing rMut!" mobwarnings["cacodemon"] = mobwarnings["cacodemon"] .. mutationwarning mobwarnings["neqoxec"] = mobwarnings["neqoxec"] .. mutationwarning mobwarnings["orb of fire"] = mobwarnings["orb of fire"] ..mutationwarning mobwarnings["pulsating lump"] = "can mutate you in melee!" .. mutationwarning mobwarnings["shining eye"] = "can temporarily mutate you!" .. mutationwarning end local gdwarn = "can hit for high damage in melee" local alichwarn = "" if (no_rF or no_rP or no_rC or no_rN or no_see_invis) then if no_rF then gdwarn = gdwarn .. ", breathe Bolts of Fire" alichwarn = alichwarn .. ", cast Bolt of Fire" end if no_rC then gdwarn = gdwarn .. ", breathe freezing blasts" alichwarn = alichwarn .. ", cast Bolt of Cold" end if no_rN then alichwarn = alichwarn .. ", cast Bolt of Draining" end if no_rP then gdwarn = gdwarn .. ", breathe poison clouds" end if no_see_invis then alichwarn = alichwarn .. ", or go Invisible" end end mobwarnings["ancient lich"] = "might cast Banishment, Paralyse, SGD, IOOD, or LCS" .. alichwarn .. "!" mobwarnings["golden dragon"] = gdwarn .. "!" mobwarnings["lich"] = "might cast Banishment, Paralyse, Summon Demon, IOOD, or LCS!" if no_rF then mobwarnings["Xtahua"] = "does high damage in melee and has a nasty fire breath attack" else mobwarnings["Xtahua"] = "does high damage in melee!" end mobwarnings["air mage"] = "can cast Airstrike!" mobwarnings["blizzard demon"] = "can cast Airstrike!" mobwarnings["Gastronok"] = "can cast Airstrike!" mobwarnings["wind drake"] = "can cast Airstrike and push you away!" if you_are_flying then local flightwarning = " You are in flight!" mobwarnings["air mage"] = mobwarnings["air mage"] .. flightwarning mobwarnings["blizzard demon"] = mobwarnings["blizzard demon"]..flightwarning mobwarnings["Gastronok"] = mobwarnings["Gastronok"]..flightwarning mobwarnings["Sojobo"] = mobwarnings["Sojobo"]..flightwarning mobwarnings["titan"] = mobwarnings["titan"]..flightwarning mobwarnings["wind drake"] = mobwarnings["wind drake"]..flightwarning end if no_see_invis then mobwarnings["boggart"] = "can cast Shadow Creatures and go Invisible!" else mobwarnings["boggart"] = "can cast Shadow Creatures!" end if no_rCorr then mobwarnings["yellow draconian"] = "can corrode your equipment at range!" end if no_rP and no_rE then mobwarnings["draconian annihilator"] = "can cast LCS, Poison Arrow, Lightning Bolt, and Iron Shot!" elseif no_rP then mobwarnings["draconian annihilator"] = "can cast LCS, Poison Arrow, and Iron Shot!" elseif no_rE then mobwarnings["draconian annihilator"] = "can cast LCS, Lightning Bolt, and Iron Shot!" else mobwarnings["draconian annihilator"] = "can cast Lehudib's Crystal Spear or Iron Shot!" end if you_perm_rTorment then mobwarnings["Brimstone Fiend"] = "can cast line-of-sight Hellfire!" mobwarnings["curse skull"] = "can cast Summon Undead!" mobwarnings["curse toe"] = "can cast Summon Fungus!" mobwarnings["Ereshkigal"] = "can cast Paralyse!" mobwarnings["greater mummy"] = "can smite you!" mobwarnings["Khufu"] = "can smite you!" mobwarnings["mummy priest"] = "can smite you!" mobwarnings["Shadow Fiend"] = "can cast Dispel Undead!" else mobwarnings["Brimstone Fiend"] = "can cast Torment and line-of-sight Hellfire!" mobwarnings["curse skull"] = "can cast Torment and Summon Undead!" mobwarnings["curse toe"] = "can cast Torment and Summon Fungus!" mobwarnings["Ereshkigal"] = "can cast Torment and Paralyse!" mobwarnings["Gloorx Vloq"] = "can cast Torment!" mobwarnings["greater mummy"] = "can cast Torment and smite you!" mobwarnings["Ice Fiend"] = "can cast Torment!" mobwarnings["Khufu"] = "can cast Torment and smite you!" mobwarnings["Menkaure"] = "can cast Torment!" mobwarnings["mummy priest"] = "can cast Torment and smite you!" mobwarnings["Shadow Fiend"] = "can cast Torment and Dispel Undead!" mobwarnings["tormentor"] = "can cast Torment!" end mobwarnings["apocalypse crab"] = "is fast and has a chaos cloud breath attack!" mobwarnings["Arachne"] = "can ensnare you in her webs!" mobwarnings["Asmodeus"] = "can cast line-of-sight Hellfire and Summon Greater Demons!" mobwarnings["Azrael"] = "can cast smite-targeted Hellfire!" mobwarnings["balrug"] = "can smite you, and cast fireball!" mobwarnings["black sun"] = "can give allies a dangerous black mark which gives melee effects!" mobwarnings["blood saint"] = "can cast LCS and other Legendary Destruction!" mobwarnings["catoblepas"] = "can petrify you with its breath!" mobwarnings["Cerebov"] = "can cast Fire Storm, Iron Shot, and Summon Greater Demons!" mobwarnings["chaos champion"] = "can dispel buffs, entrap you, and other chaotic effects!" mobwarnings["corrupter"] = "can summon allies from various branches!" mobwarnings["daeva"] = "can smite you!" mobwarnings["deep elf annihilator"] = "can cast Lehudib's Crystal Spear or Iron Shot!" mobwarnings["deep elf demonologist"] = "can cast banishment or summon Greater Demons!" mobwarnings["deep elf high priest"] = "can cast smite-targeted Hellfire or smite you!" mobwarnings["deep elf priest"] = "can smite you!" mobwarnings["deep elf sorcerer"] = "can cast banishment or line-of-sight Hellfire!" mobwarnings["deep troll shaman"] = "can cast haste and might on allies!" mobwarnings["Dispater"] = "can cast line-of-sight Hellfire, Iron Shot, and summon Greater Demons!" mobwarnings["draconian caller"] = "can summon Dragons and Death Drakes!" mobwarnings["draconian scorcher"] = "can cast smite-targeted Hellfire!" mobwarnings["draconian shifter"] = "can block teleports, blink allies encircling you, or cause you to blink!" mobwarnings["draconian zealot"] = "can cast smite-targeted Hellfire or smite you!" mobwarnings["Enchantress"] = "is very fast and can cast Dimension Anchor, Slow, Haste, Mass Confusion, and Strip Resistance!" mobwarnings["eye of draining"] = "will drain your Magic!" mobwarnings["flayed ghost"] = "can Flay you to shreds!" mobwarnings["Frances"] = "can smite you!" mobwarnings["Frederick"] = "can cast Iron Shot!" mobwarnings["ghost moth"] = "will drain your Magic!" mobwarnings["giant eyeball"] = "can paralyse you!" mobwarnings["golden eyeball"] = "can confuse you!" mobwarnings["guardian serpent"] = "can blink allies encircling you!" mobwarnings["Hell Sentinel"] = "can cast line-of-sight Hellfire and Iron Shot!" mobwarnings["hellion"] = "can cast smite-targeted Hellfire!" mobwarnings["Ignacio"] = "can cast Agony!" mobwarnings["ironbrand convoker"] = "can recall allies and cast might on them!" mobwarnings["Jorgrun"] = "can cast petrify and shatter!" mobwarnings["Jory"] = "can mesmerise, cast LCS and blink close!" mobwarnings["jumping spider"] = "is fast and can ensnare you in webs!" mobwarnings["mana viper"] = "is fast and has an antimagic bite!" mobwarnings["Mennas"] = "can cast silence and confuse!" mobwarnings["Mnoleg"] = "cast Summon Eyes and smite you!" mobwarnings["moth of wrath"] = "is fast and can enrage both enemies and you!" mobwarnings["octopode crusher"] = "can cast Iron Shot and throw you in melee!" mobwarnings["orb spider"] = "is fast and can cast Orb of Destruction!" mobwarnings["orc high priest"] = "can smite you!" mobwarnings["orc priest"] = "can smite you!" mobwarnings["phantasmal warrior"] = "can bypass armour and shields, and lowers MR!" mobwarnings["quicksilver dragon"] = "can dispel your buffs!" mobwarnings["rakshasa"] = "can cast IMB, Phantom Mirror, duplicating itself and allies, and blinks!" mobwarnings["Roxanne"] = "can cast LCS and Iron Shot at you, or shift your position!" mobwarnings["shadow demon"] = "can cast Shadow Creatures!" mobwarnings["smoke demon"] = "can smite you, and cast ranged sticky flame!" mobwarnings["sphinx"] = "can cast paralyse, slow, confuse, and smite you!" mobwarnings["spriggan druid"] = "is very fast, can awaken trees, recall animals, and cast Stone Arrow!" mobwarnings["starcursed mass"] = "can smite you!" mobwarnings["tentacled monstrosity"] = "has dangerous constriction in melee!" mobwarnings["thorn hunter"] = "can throw a nasty volley of thorns, and create brambles!" mobwarnings["warmonger"] = "can sap your magic and summon a grand avatar!" mobwarnings["ynoxinul"] = "can cast Iron Shot!" -- Holds the overall alert message and count of dangers local alerts = "" local short_alert = " " local total_dangers = 0 -- For each type of monster you can see, using getMonsterList() -- This goes through each monster in the mobwarnings table above and -- Checks to see if it matches the description of each mob in sight -- Excluding forms that can't cast: zombie, skeleton, simulcrum, but not incapacitated forms for mons, count in pairs(getMonsterList()) do for mob, message in pairs(mobwarnings) do if string.find(mons, mob) and not string.find(mons, "zombie") and not string.find(mons, "skeleton") and not string.find(mons, "shaped block of ice") and not string.find(mons, "spectral") and not (string.find(mons, "simulacr") and mob ~= "simulacr") and not (string.find(mons, "orc") and mob == "wizard") and not (string.find(mons, "ancient lich") and mob == "lich") and not (string.find(mons, "death yak") and mob == "yak") and not (string.find(mons, "gnoll shaman") and mob == "gnoll") and not (string.find(mons, "gnoll captain") and mob == "gnoll") and not (string.find(mons, "mottled draconian") and mob == "mottled") and not (string.find(mons, "dire elephant") and mob == "elephant") and not (string.find(mons, "elephant slug") and mob == "elephant") and not (string.find(mons, "salamander mystic") and mob == "salamander") and not (string.find(mons, "Josephine") and mob == "Joseph") then --Used to format the string for Unique/Named mobs local is_fiend = (string.find(mons, "Fiend") ~= nil) local is_uppercase = (string.find(mons, "%u") ~= nil) local is_unique = is_uppercase and not is_fiend --Holds this mobs alert message local alert = "" local mob_name = "" --Formatting for uniques if is_unique then alert = "" .. mons .. " " .. message mob_name = mons --For more than 1 of the same monster elseif (count > 1) then alert = "The ".. mons .. " " .. message .. " x" .. count mob_name = mons .. " x" .. count --For a single non-unique monster else alert = "The " .. mons .. " " .. message mob_name = mons end --Keeps a count of all the found matches total_dangers = total_dangers + count --Adds the created alert string to the full string of alerts alerts = alerts .. " " .. alert short_alert = short_alert .. mob_name .. ", " end end end short_alert = string.sub(short_alert, 1, -3) .. "!" --If there is an alert and it was not displayed in the last six messages then display the warning if not ((alerts == "") or string.find(crawl.messages(6), escape(alerts))) then --For a single monster if total_dangers == 1 then crawl.mpr("Spoiler Alert:" .. alerts .. "") --For 2 or 3 elseif total_dangers < 4 then crawl.mpr("Warning x"..total_dangers .. ":" .. alerts .. "") --For 4 to 7 elseif total_dangers < 8 and (not string.find(crawl.messages(6), escape(short_alert))) then crawl.mpr("Danger x" ..total_dangers .. ":" .. short_alert .. "") --For 8 or more elseif not string.find(crawl.messages(6), escape(short_alert)) then crawl.mpr("PANIC x" ..total_dangers .. ":" .. short_alert .. "") end end end > message_colour += mute:You can now pass through a line of other dancers message_colour += mute:You can no longer pass through a line of other dancers