# Ask HilariousDeathArtist to fix things ################ # Mob Warnings # ################ < function ready() SpoilerAlert() end 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_Cons = not you.conservation() local no_Sustab = you.res_statdrain() == 0 local no_rMut = not you.res_mutation() 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")) crawl.mpr(string.format("you.flying() is: %s", you.flying() and "True" or "False")) crawl.mpr(string.format("you_are_flying is: %s", you_are_flying 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_Cons then if no_rF and no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, go Invisible, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Frost, Throw Flame, go Invisible, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, Throw Frost, go Invisible, or destroy your potions or scrolls!" elseif no_rF then mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, go Invisible, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Flame, go Invisible, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, go Invisible, or destroy your potions or scrolls!" elseif no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, go Invisible, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Frost, go Invisible, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Frost, go Invisible, or destroy your potions or scrolls!" else mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, go Invisible, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Flame, go Invisible, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, go Invisible, or destroy your potions or scrolls!" end else if no_rF and no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and go Invisible!" 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!" elseif no_rF then mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and go Invisible!" mobwarnings["Blork"] = "can cast Haste, Throw Flame, and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, or go Invisible!" elseif no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, and go Invisible!" mobwarnings["Blork"] = "can cast Haste, Throw Frost, and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Frost, or go Invisible!" else mobwarnings["Sigmund"] = "can cast Slow, Confuse, and go Invisible!" mobwarnings["Blork"] = "can cast Haste and go Invisible!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, or go Invisible!" end 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_Cons then if no_rF and no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Frost, Throw Flame, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, Throw Frost, or destroy your potions or scrolls!" elseif no_rF then mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Flame, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, or destroy your potions or scrolls!" elseif no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Frost, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Frost, or destroy your potions or scrolls!" else mobwarnings["Sigmund"] = "can cast Slow, Confuse, Throw Flame, and burn your scrolls!" mobwarnings["Blork"] = "can cast Haste, Throw Flame, break your potions, and burn your scrolls!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, or destroy your potions or scrolls!" end else if no_rF and no_rC then mobwarnings["Sigmund"] = "can cast Slow, Confuse, and Throw Flame!" mobwarnings["Blork"] = "can cast Haste, Throw Frost, and Throw Flame!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, Throw Flame, or Throw Frost!" elseif no_rF then mobwarnings["Sigmund"] = "can cast Slow, Confuse, and Throw Flame!" mobwarnings["Blork"] = "can cast Haste, and Throw Flame!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, or Throw Flame!" elseif no_rC then mobwarnings["Sigmund"] = "can cast Slow and Confuse!" mobwarnings["Blork"] = "can cast Haste and Throw Frost!" mobwarnings["orc wizard"] = "might cast Slow, Confuse, or Throw Frost!" else mobwarnings["Sigmund"] = "can cast Slow and Confuse!" mobwarnings["Blork"] = "can cast Haste!" mobwarnings["orc wizard"] = "might cast Slow or Confuse!" end end end mobwarnings["phantom"] = "can hit for moderate damage in melee and blinks!" mobwarnings["mummy"] = "can hit for moderate damage in melee!" mobwarnings["ogre"] = "can hit for high damage in melee!" mobwarnings["gnoll"] = "can hit for moderate damage in melee, and throws nets!" mobwarnings["Eustachio"] = "can summon minor creatures and blink!" mobwarnings["Crazy Yiuf"] = "can hit for high damage!" mobwarnings["Duvessa"] = "can hit for moderate damage in melee, and goes Berserk when Dowan dies!" mobwarnings["Dowan"] = "can Haste Duvessa, and will become Hasted and cast Throw Icicle when Duvessa dies!" mobwarnings["Ijyb"] = "will often zap you with wands!" mobwarnings["big kobold"] = "will probably throw things at you!" end if xl < 14 then if no_rN then mobwarnings["wight"] = "can drain you in melee!" mobwarnings["shadow imp"] = "can cast Pain and Animate Dead!" mobwarnings["Grinder"] = "can cast Paralyse and Pain!" else mobwarnings["wight"] = "can hit for moderate damage!" mobwarnings["shadow imp"] = "can Animate Dead!" mobwarnings["Grinder"] = "can cast Paralyse!" end if no_rC then if no_Cons then mobwarnings["white imp"] = "can cast Throw Frost and break your potions!" mobwarnings["ice beast"] = "can hit for moderate damage in melee, and break your potions!" mobwarnings["simulacr"] = "can do high damage in melee and break your potions!" mobwarnings["white ugly thing"] = "is fast and can break your potions!" else mobwarnings["white imp"] = "can cast Throw Frost!" mobwarnings["ice beast"] = "can hit for moderate damage in melee!" mobwarnings["simulacr"] = "can do high damage in melee!" mobwarnings["white ugly thing"] = "is fast and does cold damage!" end else if no_Cons then mobwarnings["white imp"] = "can break your potions!" mobwarnings["ice beast"] = "can break your potions!" mobwarnings["simulacr"] = "can break your potions!" mobwarnings["white ugly thing"] = "is fast and can break your potions!" else mobwarnings["simulacr"] = "can do moderate damage in melee!" end end if no_rF then if no_Cons then mobwarnings["fire drake"] = "can breathe blasts of flame and burn your scrolls!" mobwarnings["red ugly thing"] = "is fast and can burn your scrolls!" mobwarnings["steam dragon"] = "breathes balls of steam!" if no_see_invis and no_rP then mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast Venom Bolt, IMB, Confuse, Slow, go Invisible, teleport away, and burn your scrolls in melee!" elseif no_rP then mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast Venom Bolt, IMB, Confuse, Slow, teleport away, and burn your scrolls in melee!" elseif no_see_invis then mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast IMB, Confuse, Slow, go Invisible, teleport away, and burn your scrolls in melee!" else mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast IMB, Confuse, Slow, teleport away, and burn your scrolls in melee!" end else mobwarnings["fire drake"] = "can breathe blasts of flame!" mobwarnings["steam dragon"] = "breathes balls of steam!" mobwarnings["red ugly thing"] = "is fast does fire damage!" if no_see_invis and no_rP then mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast Venom Bolt, IMB, Confuse, Slow, go Invisible, and teleport away!" elseif no_rP then mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast Venom Bolt, IMB, Confuse, Slow, and teleport away!" elseif no_see_invis then mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast IMB, Confuse, Slow, go Invisible, and teleport away!" else mobwarnings["Erica"] = "can do moderate fire damage in melee, can cast IMB, Confuse, Slow, and teleport away!" end end else if no_Cons then mobwarnings["fire drake"] = "can burn your scrolls!" mobwarnings["red ugly thing"] = "is fast and can burn your scrolls!" if no_see_invis and no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, Confuse, Slow, go Invisible, teleport away, and burn your scrolls in melee!" elseif no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, Confuse, Slow, teleport away, and burn your scrolls in melee!" elseif no_see_invis then mobwarnings["Erica"] = "can cast IMB, Confuse, Slow, go Invisible, teleport away, and burn your scrolls in melee!" else mobwarnings["Erica"] = "can cast IMB, Confuse, Slow, teleport away, and burn your scrolls in melee!" end else mobwarnings["fire drake"] = "can breathe blasts of flame!" if no_rC or no_rF or no_rP then mobwarnings["Joseph"] = "shoots branded sling bullets!" end 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 end if no_rP then mobwarnings["soldier ant"] = "is fast and can poison!" mobwarnings["water moccasin"] = "is fast and can poison!" mobwarnings["killer bee"] = "is very fast and can poison!" mobwarnings["black mamba"] = "is very fast and can hit for high damage in melee, and can poison!" mobwarnings["spiny frog"] = "is fast and can hit for high damage in melee, and can poison!" mobwarnings["queen ant"] = "can berserk other ants, and can poison!" mobwarnings["naga"] = "can constrict and spit poison!" mobwarnings["redback"] = "is fast and can poison!" mobwarnings["swamp drake"] = "breathes Mephitic clouds!" mobwarnings["green ugly thing"] = "is fast and can do high poison damage in melee!" else mobwarnings["soldier ant"] = "is fast!" mobwarnings["redback"] = "is fast!" mobwarnings["water moccasin"] = "is fast!" mobwarnings["killer bee"] = "is very fast!" mobwarnings["black mamba"] = "is very fast and can hit for high damage in melee!" mobwarnings["spiny frog"] = "is fast and can hit for high damage in melee!" mobwarnings["queen ant"] = "can berserk other ants!" mobwarnings["naga"] = "cand constrict!" end if no_rE then mobwarnings["electric eel"] = "can hit for high damage at range!" mobwarnings["cyan ugly thing"] = "is fast and can do high electric damage in melee!" end if no_rCorr then mobwarnings["jelly"] = "can corrode equipment in melee!" end mobwarnings["elephant"] = "can hit for high damage in melee, and can trample!" mobwarnings["Maud"] = "can hit for high damage in melee!" mobwarnings["warg"] = "is fast and can hit for moderate damage in melee!" mobwarnings["slave"] = "means Pikel is nearby!" mobwarnings["Pikel"] = "can hit for high damage in melee!" mobwarnings["draconian"] = "can hit for high damage in melee!" mobwarnings["gargoyle"] = "can cast Stone Arrow!" mobwarnings["blink frog"] = "is fast, can hit for moderate damage in melee, and blinks!" mobwarnings["wolf"] = "is very fast and can hit for moderate damage in melee!" mobwarnings["goliath beetle"] = "can hit for high damage in melee!" mobwarnings["wyvern"] = "is fast and can hit for high damage in melee!" mobwarnings["hippogriff"] = "can hit for high damage in melee!" mobwarnings["small abomination"] = "might be fast and can hit for high damage in melee!" mobwarnings["gnoll shaman"] = "can heal itself and can heal or Haste other gnolls!" mobwarnings["Prince Ribbit"] = "is fast and can hit for high damage in melee!" mobwarnings["orc warrior"] = "can hit for high damage!" mobwarnings["hill giant"] = "can hit for high damage in melee!" mobwarnings["troll"] = "can hit for high damage in melee, and regenerates quickly!" mobwarnings["Psyche"] = "might banish you in melee!" mobwarnings["two-headed ogre"] = "can hit for high damage in melee!" mobwarnings["raven"] = "is very fast and can hit for moderate damage in melee!" mobwarnings["yak"] = "can hit for moderate damage in melee!" mobwarnings["centaur"] = "is fast and can hit for moderate damage at range!" mobwarnings["slime creature"] = "can hit for high damage in melee!" mobwarnings["wraith"] = "can slow you in melee!" end if you.xl() < 21 then local tenguconjwarn = "" local orcsorcwarn = "" if no_rF then if no_Cons then if no_see_invis and no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, go Invisible, teleport away, and burn your scrolls in melee!" elseif no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, teleport away, and burn your scrolls in melee!" elseif no_see_invis then mobwarnings["Erica"] = "can cast IMB, go Invisible, teleport away, and burn your scrolls in melee!" else mobwarnings["Erica"] = "can cast IMB, teleport away, and burn your scrolls in melee!" end mobwarnings["deep elf mage"] = "can cast fireball and slow, and burn your scrolls!" mobwarnings["salamander"] = "does fire damage and burn your scrolls!" mobwarnings["efreet"] = "can cast Bolt of Fire, Fireball, and burn your scrolls!" mobwarnings["Harold"] = "can throw nets, cast Bolt of Fire, and burn your scrolls!" mobwarnings["lindwurm"] = "has a nasty fire breath attack and burn your scrolls!" mobwarnings["fire drake"] = "can burn your scrolls!" tenguconjwarn = tenguconjwarn .. ", Bolt of Magma and burn your scrolls" orcsorcwarn = orcsorcwarn .. ", Bolt of Fire and burn your scrolls" 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["Harold"] = "can throw nets and cast Bolt of Fire!" mobwarnings["deep elf mage"] = "can cast Fireball and Slow!" mobwarnings["salamander"] = "uses fire branded attacks!" mobwarnings["efreet"] = "can cast Bolt of Fire and Fireball!" mobwarnings["lindwurm"] = "has a nasty fire breath attack!" tenguconjwarn = tenguconjwarn .. ", Bolt of Magma" orcsorcwarn = orcsorcwarn .. ", Bolt of Fire" end else if no_Cons then if no_see_invis and no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, go Invisible, teleport away, and burn your scrolls in melee!" elseif no_rP then mobwarnings["Erica"] = "can cast Venom Bolt, IMB, teleport away, and burn your scrolls in melee!" elseif no_see_invis then mobwarnings["Erica"] = "can cast IMB, go Invisible, teleport away, and burn your scrolls in melee!" else mobwarnings["Erica"] = "can cast IMB, teleport away, and burn your scrolls in melee!" end mobwarnings["Harold"] = "can throw nets and burn your scrolls!" mobwarnings["deep elf mage"] = "can cast slow and burn your scrolls!" mobwarnings["salamander"] = "can burn your scrolls!" mobwarnings["efreet"] = "can burn your scrolls!" mobwarnings["lindwurm"] = "can burn your scrolls!" mobwarnings["fire drake"] = "can burn your scrolls!" 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["Harold"] = "can throw nets!" mobwarnings["deep elf mage"] = "can cast slow!" mobwarnings["lindwurm"] = "can do high damage in melee!" end end if no_rP then mobwarnings["wolf spider"] = "is fast and can hit for high damage in melee, and can poison!" mobwarnings["naga warrior"] = "can constrict you and hit for high damage in melee, and spits poison!" 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["redback"] = "is fast and can poison!" mobwarnings["Sonja"] = "shoots Curare needles and will probably banish you in melee!" tenguconjwarn = tenguconjwarn .. ", Venom Bolt" else mobwarnings["naga warrior"] = "can constrict you and hit for high damage in melee, and spits poison!" mobwarnings["naga mage"] = "can cast IMB and Poison Arrow!" mobwarnings["wolf spider"] = "is fast and can hit for high damage in melee!" mobwarnings["naga ritualist"] = "can remove poison resistance, and do damage over time with toxic radiance!" mobwarnings["Sonja"] = "will probably banish you in melee!" end if no_rE then tenguconjwarn = tenguconjwarn .. ", Lightning Bolt" mobwarnings["raiju"] = "is fast and can Lightning Bolt itself at you!" mobwarnings["shock serpent"] = "is fast and can cast Lightning Bolt and has an electric aura!" else mobwarnings["raiju"] = "is fast and blinks around!" mobwarnings["shock serpent"] = "is fast, and does damage on being hit!" end if no_rC then if no_Cons then mobwarnings["bog body"] = "can cast Slow, Bolt of Cold, and break your potions!" mobwarnings["Fannar"] = "can cast Bolt of Cold, Ozo's Refrigeration, Summon Ice Beast, Blink, and break your potions!" mobwarnings["simulacr"] = "can do high damage in melee and break your potions!" mobwarnings["freezing wraith"] = "can do high cold damage and slow you in melee, and break your potions!" else 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["simulacr"] = "can do high damage in melee!" mobwarnings["freezing wraith"] = "can do high cold damage and slow you in melee,!" end else if no_Cons then mobwarnings["bog body"] = "can cast Slow, and break your potions!" mobwarnings["Fannar"] = "can Blink, Summon Ice Beasts, and break your potions!" mobwarnings["simulacr"] = "can break your potions!" mobwarnings["freezing wraith"] = "can slow you in melee, and break your potions!" else mobwarnings["bog body"] = "can cast Slow!" mobwarnings["Fannar"] = "can Blink and Summon Ice Beasts!" mobwarnings["freezing wraith"] = "can slow you in melee!" end 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 fast and can cause corrosion in melee!" mobwarnings["brown very ugly thing"] = "is fast and can cause corrosion in melee!" mobwarnings["oklob"] = "can corrode equipment at range!" else mobwarnings["brown ugly thing"] = "is fast!" mobwarnings["brown very ugly thing"] = "is fast!" end mobwarnings["spriggan"] = "is very fast and can hit for moderate damage!" mobwarnings["firefly"] = "is very fast, can hit for moderate damage, and flashes a warning beacon!" mobwarnings["komodo dragon"] = "can hit for high damage and cause sickness in melee!" mobwarnings["purple ugly thing"] = "is fast and can cause sickness in melee!" mobwarnings["tengu conjurer"] = "is fast and can cast Force Lance, IMB"..tenguconjwarn.."!" mobwarnings["orc sorcerer"] = "can cast Paralyse, Summon Demon, Animate Dead"..orcsorcwarn.."!" mobwarnings["minotaur"] = "can hit for very high damage!" mobwarnings["Snorg"] = "can berserk and hit for high damage!" mobwarnings["manticore"] = "can hit for high damage at range, and Barbs causes damage when you move!" mobwarnings["large abomination"] = "might be fast and can hit for high damage in melee!" mobwarnings["harpy"] = "is very fast and can hit for high damage in melee!" mobwarnings["anaconda"] = "is very fast and can constrict you!" mobwarnings["Kirke"] = "can summon Monstrous Menageries, go invisible, turn you into a pig, and deflects missiles!" mobwarnings["thorn lotus"] = "can hit for high damage at range!" mobwarnings["tengu warrior"] = "is fast and can hit for high damage in melee!" mobwarnings["kobold demonologist"] = "can summon minor demons!" mobwarnings["death yak"] = "can hit for high damage in melee!" mobwarnings["centaur warrior"] = "can hit for high damage at range!" mobwarnings["skeletal warrior "] = "can hit for high damage in melee!" mobwarnings["large slime creature"] = "can hit for high damage in melee!" mobwarnings["enormous slime creature"] = "can hit for high damage in melee!" mobwarnings["hydra"] = "can hit for high damage in melee!" mobwarnings["dire elephant"] = "can hit for high damage in melee!" mobwarnings["tarantella"] = "is fast and can cause confusion in melee!" mobwarnings["orc knight"] = "can hit for high damage!" mobwarnings["naga sharpshooter"] = "can shoot you with portal projectiles!" mobwarnings["cyclops"] = "can throw large rocks!" mobwarnings["Maurice"] = "can steal items, go invisible, and teleport away!" mobwarnings["Erolcha"] = "might cast banishment, paralyse, or LCS!" end if you.xl() < 27 then local tengureaverwarn = "" if no_rF then if no_Cons then mobwarnings["salamander firebrand"] = "is fast and melee attacks will surround you with flame clouds and burn your scrolls!" mobwarnings["salamander mystic"] = "can haste allies, and casts Bolt of Magma, IMB, and burn your scrolls!" mobwarnings["red very ugly thing"] = "is fast, can cause sticky flames in melee, and burn your scrolls!" mobwarnings["flaming corpse"] = "is fast and can cause sticky flames in melee and annihilate your scrolls!" mobwarnings["mottled draconian"] = "can spit sticky flames at range and annihilate your scrolls!" mobwarnings["fire dragon"] = "has a nasty fire breath attack and burn your scrolls!" mobwarnings["fire giant"] = "can cast Fireball, Bolt of Fire, and burn your scrolls!" tengureaverwarn = tengureaverwarn .. ", Bolt of Magma, Fireball, and burn your scrolls" else 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!" mobwarnings["red very ugly thing"] = "is fast, can cause sticky flames in melee!" mobwarnings["flaming corpse"] = "is fast, can cause sticky flames in melee!" mobwarnings["mottled draconian"] = "can spit sticky flames at range!" mobwarnings["fire dragon"] = "has a nasty fire breath attack!" mobwarnings["fire giant"] = "can cast Fireball and Bolt of Fire!" tengureaverwarn = tengureaverwarn .. ", Bolt of Magma, Fireball" end else if no_Cons then mobwarnings["salamander firebrand"] = "is fast and melee attacks will surround you with flame clouds and burn your scrolls!" mobwarnings["salamander mystic"] = "can haste allies, and casts IMB and and burn your scrolls!" mobwarnings["red very ugly thing"] = "is fast, can cause sticky flames in melee, and burn your scrolls!" mobwarnings["flaming corpse"] = "is fast, can cause sticky flames in melee, and annihilate your scrolls!" mobwarnings["mottled draconian"] = "can spit sticky flames at range, and annihilate your scrolls!" mobwarnings["fire dragon"] = "can burn your scrolls!" mobwarnings["fire giant"] = "can burn your scrolls!" tengureaverwarn = tengureaverwarn .. "burns your scrolls" else mobwarnings["salamander mystic"] = "can haste allies and casts IMB!" mobwarnings["salamander firebrand"] = "is fast and melee attacks will surround you with flame clouds!" mobwarnings["red very ugly thing"] = "is fast!" mobwarnings["flaming corpse"] = "is fast!" mobwarnings["fire dragon"] = "can do high damage in melee!" mobwarnings["fire giant"] = "can do high damage in melee!" end end if no_rC then if no_Cons then tengureaverwarn = tengureaverwarn .. ", Freezing Cloud, breaks your potions" mobwarnings["frost giant"] = "can cast Bolt of Cold, and breaks your potions!" mobwarnings["ice dragon"] = "has a nasty cold breath attack, and break your potions!" else tengureaverwarn = tengureaverwarn .. ", Freezing Cloud" mobwarnings["frost giant"] = "can cast Bolt of Cold!" mobwarnings["ice dragon"] = "has a nasty cold breath attack!" end else if no_Cons then tengureaverwarn = tengureaverwarn .. "breaks your potions" mobwarnings["frost giant"] = "can do high damage in melee and breaks your potions!" mobwarnings["ice dragon"] = "can do high damage in melee and break your potions!" else mobwarnings["frost giant"] = "can do high damage in melee!" mobwarnings["ice dragon"] = "can do high damage in melee!" end 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 .. ", Lightning Bolt" mobwarnings["storm dragon"] = "has a nasty electric breath attack!" else mobwarnings["storm dragon"] = "can do high damage in melee!" end if no_rP then mobwarnings["greater naga"] = "is strong in melee, and casts Venom Bolt, Poison Arrow, IMB, and spits poison!" mobwarnings["Aizul"] = "is very fast and casts Sleep, Poison Arrow, and Venom Bolt!" else mobwarnings["greater naga"] = "is strong in melee, and can cast Poison Arrow and IMB!" mobwarnings["Aizul"] = "is very fast and casts Sleep and Poison Arrow!" end if no_rCorr then mobwarnings["yellow draconian"] = "can corrode your equipment at range!" end if no_see_invis then mobwarnings["wizard"] = "might cast banishment, paralyse, LCS, or go Invisible!" if no_rN then if no_rC or no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, Bolt of Cold, go Invisible, and destroy potions or scrolls!" elseif no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, go Invisible, and destroy potions or scrolls!" elseif no_rF then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, or go Invisible!" elseif no_rC and no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Cold, go Invisible and destroy potions or scrolls!" elseif no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, go Invisible, and destroy potions or scrolls!" else mobwarnings["necromancer"] = "can cast Agony, Animate Dead, or go Invisible!" end else if no_rC or no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Fire, Bolt of Cold, go Invisible, and destroy potions or scrolls!" elseif no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Fire, go Invisible, and destroy potions or scrolls!" elseif no_rF then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Fire, or go Invisible!" elseif no_rC and no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Cold, go Invisible and destroy potions or scrolls!" elseif no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, go Invisible, and destroy potions or scrolls!" else mobwarnings["necromancer"] = "can cast Animate Dead, or go Invisible!" end end else mobwarnings["wizard"] = "might cast banishment, paralyse, or LCS!" if no_rN then if no_rC or no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, Bolt of Cold, and destroy potions or scrolls!" elseif no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Fire, and destroy potions or scrolls!" elseif no_rF then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, or Bolt of Fire!" elseif no_rC and no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, Bolt of Cold, and destroy potions or scrolls!" elseif no_Cons then mobwarnings["necromancer"] = "can cast Agony, Animate Dead, and destroy potions or scrolls!" else mobwarnings["necromancer"] = "can cast Agony and Animate Dead!" end else if no_rC or no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Fire, Bolt of Cold, and destroy potions or scrolls!" elseif no_rF and no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Fire, and destroy potions or scrolls!" elseif no_rF then mobwarnings["necromancer"] = "can cast Animate Dead, or Bolt of Fire!" elseif no_rC and no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, Bolt of Cold, and destroy potions or scrolls!" elseif no_Cons then mobwarnings["necromancer"] = "can cast Animate Dead, and destroy potions or scrolls!" else mobwarnings["necromancer"] = "can cast Animate Dead!" end end end mobwarnings["Lernaean hydra"] = "don't fight it in melee! Just don't!" mobwarnings["tengu reaver"] = "is fast and casts"..tengureaverwarn.."!" mobwarnings["water nymph"] = "can create water, teleport to other water, and Waterstrike you!" mobwarnings["yaktaur"] = "can hit for high damage at range!" mobwarnings["Wiglaf"] = "can cast might and haste on himself!" mobwarnings["orc warlord"] = "can hit for high damage!" mobwarnings["titanic slime creature"] = "can hit for high damage in melee!" mobwarnings["Rupert"] = "can paralyse you in fear!" mobwarnings["Vashnia"] = "can blink herself and allies away!" mobwarnings["great orb of eyes"] = "can cast paralyse, disintegrate, slow, confuse, and teleport you!" mobwarnings["vampire knight"] = "can cast paralyse!" mobwarnings["vampire mage"] = "can Summon Undead and Animate Dead!" mobwarnings["stone giant"] = "throws large rocks and hit for very high damage!" mobwarnings["ettin"] = "can do very high damage in melee!" mobwarnings["Louise"] = "can cast banishment!" mobwarnings["purple very ugly thing"] = "is fast and can cause rotting in melee!" mobwarnings["deep troll earth mage"] = "can cast LRD and dig!" mobwarnings["ogre mage"] = "might cast banishment, paralyse, or LCS!" mobwarnings["purple draconian"] = "can dispel your buffs!" mobwarnings["vault sentinel"] = "can mark you and blow a signal horn!" mobwarnings["vault warden"] = "can lockdown doors and staircases!" mobwarnings["ironheart preserver"] = "can absorb the damage of its allies and heal itself!" 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 Paralyse, Slow, and poison in melee!" end if no_rF then mobwarnings["fire giant"] = "can cast fireball and bolt of fire!" mobwarnings["fire dragon"] = "has a nasty fire breath attack!" mobwarnings["deep elf mage"] = "can cast fireball and slow!" if no_Cons then mobwarnings["fire crab"] = "has a flaming cloud breath attack!" end end if no_rC then if no_Cons then mobwarnings["fire crab"] = "has a flaming cloud breath attack!" end end if no_rN then mobwarnings["shadow dragon"] = "has a nasty draining breath attack!" end local electricwarning = "" if no_rE then electricwarning = " You are not wearing rElec!" end mobwarnings["electric golem"] = "is fast, has electric attacks, and blinks!" .. electricwarning mobwarnings["Nikola"] = "casts Lightning Bolt, Chain Lightning and blinks!" .. electricwarning local statdrainwarning = "" if no_Sustab then statdrainwarning = ", or drain your Int" mobwarnings["brain worm"] = "can drain your Int!" end mobwarnings["Norris"] = "can cast paralyse and smite you"..statdrainwarning.."!" mobwarnings["orange crystal statue"] = "can cast confuse and Shadow Creatures"..statdrainwarning.."!" mobwarnings["neqoxec"] = "can mutate you"..statdrainwarning.."!" mobwarnings["giant orange brain"] = "can cast Shadow Creatures"..statdrainwarning.."!" local mutationwarning = "" if no_rMut then mutationwarning = ", and can mutate you" mobwarnings["cacodemon"] = "can mutate you!" mobwarnings["shining eye"] = "can mutate you!" mobwarnings["pulsating lump"] = "can mutate you in melee!" end mobwarnings["orb of fire"] = "can cast Fireball and Bolt of Fire"..mutationwarning.."!" if (no_rF or no_rP or no_rC or no_rN) then mobwarnings["golden dragon"] = "has multiple nasty breath attacks!" end local flightwarning = "" if you_are_flying then flightwarning = "You are in flight!" end mobwarnings["air mage"] = "can cast Airstrike! "..flightwarning mobwarnings["titan"] = "can cast Airstrike! "..flightwarning mobwarnings["blizzard demon"] = "can cast Airstrike! "..flightwarning mobwarnings["wind drake"] = "can cast Airstrike! "..flightwarning mobwarnings["Gastronok"] = "can cast Airstrike! "..flightwarning mobwarnings["Sojobo"] = "is fast and can cast Airstrike! "..flightwarning if no_Cons then mobwarnings["mottled"] = "can cast sticky flames at range, annihilating your scrolls!" mobwarnings["Joseph"] = "shoots branded sling bullets which might destroy your potions or scrolls!" if no_see_invis then mobwarnings["orc wizard"] = "might go Invisible, or destroy your potions or scrolls!" else mobwarnings["orc wizard"] = "might destroy your potions or scrolls!" end end mobwarnings["rakshasa"] = "can cast IMB, Phantom Mirror, duplicating itself and allies, and blinks!" mobwarnings["phantasmal warrior"] = "can bypass armour and shields, and lowers MR!" mobwarnings["giant eyeball"] = "can paralyse you!" mobwarnings["mana viper"] = "is fast and has an antimagic bite!" mobwarnings["golden eyeball"] = "can confuse you!" mobwarnings["spriggan druid"] = "is very fast, can awaken trees, recall animals, and cast Stone Arrow!" mobwarnings["thorn hunter"] = "can throw a nasty volley of thorns, and create brambles!" mobwarnings["apocalypse crab"] = "is fast and has a chaos cloud breath attack!" mobwarnings["tentacled monstrosity"] = "has dangerous constriction in melee!" mobwarnings["jumping spider"] = "is fast and can ensnare you in webs!" mobwarnings["Arachne"] = "can ensnare you in her webs!" mobwarnings["Enchantress"] = "is very fast and can cast Dimension Anchor, Slow, Haste, Mass Confusion, and Strip Resistance!" mobwarnings["deep elf demonologist"] = "can cast banishment or summon Greater Demons!" mobwarnings["draconian caller"] = "can summon Dragons and Death Drakes!" mobwarnings["draconian annihilator"] = "can cast Lehudib's Crystal Spear or Iron Shot!" mobwarnings["draconian zealot"] = "can cast smite-targeted Hellfire or smite you!" mobwarnings["deep elf annihilator"] = "can cast Lehudib's Crystal Spear or Iron Shot!" mobwarnings["blood saint"] = "can cast LCS and other Legendary Destruction!" mobwarnings["black sun"] = "can give allies a dangerous black mark which gives melee effects!" mobwarnings["corrupter"] = "can summon allies from various branches!" mobwarnings["moth of wrath"] = "is fast and can enrage both enemies and you!" mobwarnings["orb spider"] = "is fast and can cast Orb of Destruction!" mobwarnings["deep troll shaman"] = "can cast haste and might on allies!" mobwarnings["warmonger"] = "can sap your magic and summon a grand avatar!" mobwarnings["chaos champion"] = "can dispel buffs, entrap you, and other chaotic effects!" mobwarnings["draconian shifter"] = "can block teleports, blink allies encircling you, or cause you to blink!" mobwarnings["guardian serpent"] = "can blink allies encircling you!" mobwarnings["Roxanne"] = "can cast LCS and Iron Shot at you, or shift your position!" mobwarnings["lich"] = "might cast banishment, paralyse, summon demon, or LCS!" mobwarnings["draconian scorcher"] = "can cast smite-targeted Hellfire!" mobwarnings["hellion"] = "can cast smite-targeted Hellfire!" mobwarnings["Azrael"] = "can cast smite-targeted Hellfire!" mobwarnings["deep elf sorcerer"] = "can cast banishment or line-of-sight Hellfire!" mobwarnings["quicksilver dragon"] = "can dispel your buffs!" mobwarnings["ironbrand convoker"] = "can recall allies and cast might on them!" mobwarnings["Hell Sentinel"] = "can cast line-of-sight Hellfire and Iron Shot!" mobwarnings["Asmodeus"] = "can cast line-of-sight Hellfire and Summon Greater Demons!" mobwarnings["flayed ghost"] = "can Flay you to shreds!" mobwarnings["Ice Fiend"] = "can cast Torment!" mobwarnings["Shadow Fiend"] = "can cast Torment and Dispel Undead!" mobwarnings["curse skull"] = "can cast Torment and Summon Undead!" mobwarnings["tormentor"] = "can cast Torment!" mobwarnings["curse toe"] = "can cast Torment and Summon Fungus!" mobwarnings["Menkaure"] = "can cast Torment!" mobwarnings["Gloorx Vloq"] = "can cast Torment!" mobwarnings["Ereshkigal"] = "can cast Torment and paralyse!" mobwarnings["Brimstone Fiend"] = "can cast Torment and line-of-sight Hellfire!" mobwarnings["daeva"] = "can smite you!" mobwarnings["balrug"] = "can smite you, and cast fireball!" mobwarnings["smoke demon"] = "can smite you, and cast ranged sticky flame!" mobwarnings["deep elf priest"] = "can smite you!" mobwarnings["orc priest"] = "can smite you!" mobwarnings["orc high priest"] = "can smite you!" mobwarnings["starcursed mass"] = "can smite you!" mobwarnings["Frances"] = "can smite you!" mobwarnings["Mnoleg"] = "cast Summon Eyes and smite you!" mobwarnings["deep elf high priest"] = "can cast smite-targeted Hellfire or smite you!" mobwarnings["mummy priest"] = "can cast Torment and smite you!" mobwarnings["greater mummy"] = "can cast Torment and smite you!" mobwarnings["Khufu"] = "can cast Torment and smite you!" mobwarnings["sphinx"] = "can cast paralyse, slow, confuse, and smite you!" mobwarnings["catoblepas"] = "can petrify you with its breath!" mobwarnings["Jorgrun"] = "can cast petrify and shatter!" mobwarnings["Jory"] = "can mesmerise, cast LCS and blink close!" mobwarnings["Cerebov"] = "can cast Fire Storm, Iron Shot, and Summon Greater Demons!" mobwarnings["Mennas"] = "can cast silence and confuse!" mobwarnings["Ignacio"] = "can cast Agony!" mobwarnings["boggart"] = "can cast Shadow Creatures!" mobwarnings["shadow demon"] = "can cast Shadow Creatures!" mobwarnings["ynoxinul"] = "can cast Iron Shot!" mobwarnings["Frederick"] = "can cast Iron Shot!" mobwarnings["Dispater"] = "can cast line-of-sight Hellfire, Iron Shot, and summon Greater Demons!" mobwarnings["ghost moth"] = "will drain your Magic!" mobwarnings["eye of draining"] = "will drain your Magic!" -- 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 incapacited 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, "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 -- 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 = -8,8 do for y = -8,8 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 >