# TEAMCAPTAIN Antunes # Crawl Init file # include = 034_command_keys.txt # target_unshifted_dirs = true # clear_messages = true # # And to revert monster glyph and colouring changes: # include = 034_monster_glyphs.txt # include = 052_monster_glyphs.txt # include = 060_monster_glyphs.txt # include = 071_monster_glyphs.txt # include = 080_monster_glyphs.txt # include = 0.9_monster_glyphs.txt # include = 0.12_monster_glyphs.txt # include = 0.13_monster_glyphs.txt ##### 1- Starting Screen ############################################ # # name = Delilah # remember_name = false # weapon = (short sword | falchion | quarterstaff | hand axe | spear | mace # | trident | unarmed | random) # species = (Human |...| Vampire | random) # job = (Fighter |...| Wanderer | random) # random_pick = true # good_random = false # restart_after_game = true # default_manual_training = true ##### 2- File System ############################################### # # crawl_dir = # morgue_dir = morgue # save_dir = saves # macro_dir = settings/ # sound = : ##### 3- Interface ################################################# # ##### 3-a Picking up and Dropping ############### # # Rods are \ here. # autopickup = $?!:"/% # drop_filter += useless_item # default_autopickup = false # autopickup_no_burden = false # pickup_thrown = false # chunks_autopickup = false # assign_item_slot = (forward | backward) # # pickup_menu = false # pickup_menu_limit = 4 # drop_filter += skeleton, corpse, useless_item # default_friendly_pickup = (none | friend | player | all) ##### 3-b Targeting ############################ # # default_target = false # target_unshifted_dirs = true # darken_beyond_range = false ##### 3-c Passive Sightings ##################### # # detected_monster_colour = lightred # detected_item_colour = green # remembered_monster_colour = darkgrey # clean_map = true ##### 3-d Branding ############################## # # friend_brand = hi:green # neutral_brand = hi:lightgrey # stab_brand = hi:blue # may_stab_brand = hi:yellow # heap_brand = reverse # feature_item_brand = reverse # trap_item_brand = reverse ##### 3-e Level Map Functions ################### # # level_map_cursor_step = 7 # level_map_title = false # show_waypoints = false ##### 3-f Viewport Options ################### # # view_max_width = 33 # view_max_height = 21 # view_lock_x = false # view_lock_y = false # view_lock = false # center_on_scroll = true # symmetric_scroll = false # scroll_margin_x = 2 # scroll_margin_y = 2 # scroll_margin = 2 ##### 3-g Travel and Exploration ################# # # travel_delay = 20 (or -1 online) # explore_delay = -1 # rest_delay = 0 (or -1 online) # travel_avoid_terrain = shallow water # # explore_greedy = false # explore_stop = items,stairs,shops,altars,portals,branches,runed_doors # explore_stop += greedy_pickup_smart,greedy_visited_item_stack # explore_stop += greedy_sacrificeable # sacrifice_before_explore = true # explore_improved = true # explore_wall_bias = 0 # travel_key_stop = false # auto_sacrifice = true # # explore_stop_pickup_ignore += curare # auto_exclude += oklob,statue,curse skull,roxanne,hyperactive,lightning spire # auto_exclude += mimic # tc_reachable = blue # tc_dangerous = cyan # tc_disconnected = darkgrey # tc_excluded = lightmagenta # tc_exclude_circle = red # Interrupting run and rest compound commands: # runrest_safe_poison = 80:100 # runrest_ignore_monster ^= butterfly:1 # runrest_ignore_monster ^= swamp worm:3 # runrest_stop_message += You hear a.* slurping noise # runrest_ignore_message += Jiyva's power touches on your attributes # A good number of runrest_messages are defined by default; you may want to # clear them or override some. # trapwalk_safe_hp = dart:20,needle:15,arrow:35,bolt:45,spear:40,blade:95 #rest_wait_both = true ##### 3-h Command Enhancements ################## # auto_switch = true # easy_open = false # easy_unequip = false # equip_unequip = true # easy_confirm = (none | safe | all) # allow_self_target = (yes | no | prompt) # confirm_butcher = (auto | always | never) easy_eat_chunks = true auto_eat_chunks = true auto_drop_chunks = rotten # prompt_for_swap = false # easy_quit_item_prompts = false # easy_exit_menu = true # sort_menus = pickup: true : art, ego, basename, qualname, curse, qty # sort_menus = inv: true : equipped, freshness, charged # autofight_stop = 30 # automagic_enable = false # automagic_stop = 0 # automagic_fight = false ##### 3-i Messages and Display Enhancements ##### # hp_warning = 30 mp_warning = 0 hp_colour = 50:yellow, 25:red mp_colour = 50:yellow, 25:red stat_colour = 1:lightred, 3:red # status_caption_colour = yellow # mlist_min_height = 4 # msg_min_height = 7 # msg_max_height = 10 # mlist_allow_alternate_layout = true # messages_at_top = true # mlist_targeting = true # show_gold_turns = false show_game_turns = true # show_newturn_mark = false # clear_messages = true # small_more = true # show_more = false # show_inventory_weights = (drop_pickup | true | false) # item_stack_summary_minimum = 5 # msg_condense_repeats = false # msg_condense_short = false # skill_focus = false show_travel_trail = true # view_delay = 600 ##### 3-j Colours (messages and menus) ########## # # Food is colour coded by default as follows: # # yellow = preferred food # darkgrey = cannot be eaten at all # lightred = causes rot # magenta = dangerous to use, mutagenic # red = considered "evil" by your deity # lightgreen = poisonous # brown = contaminated, may cause nausea # # You can change colours by using something like # menu_colour ^= magenta:contaminated # You can redefine inventory items like this: # menu_colour ^= inventory:magenta:shillelagh # or ones in pick-up dialogs: # menu_colour ^= pickup:green:god gift # Colouring of messages # Messages are colour coded as follows: # # lightred = really important messages # yellow = significant messages # lightred = item damaged/destroyed # darkgrey = boring, message clutter # # Notes also use, quite misnamed, menu_colour: # menu_colour ^= notes:white:Reached XP level # These lines will suppress extra feedback messages from travel/shift-running. # # message_colour ^= mute:warning:comes into view # message_colour ^= mute:You start (searching|resting) # message_colour ^= mute:Done searching # message_colour ^= mute:(HP|Magic) restored # message_colour ^= mute:warning:Not with.*(in view|monsters around) # You can also enforce a --more-- prompt for messages ## Avoid wasting turns with aborted actions: # force_more_message += There are no visible monsters within range # force_more_message += This wand has no charges ##### 3-k Firing Commands ####################### # # fire_items_start = a # fire_order = launcher, return # fire_order += javelin / tomahawk / dart / stone / rock / net # fire_order += inscribed ##### 3-l Channels ############################## # # channel.multiturn = mute ##### 3-m Inscriptions ########################## # # autoinscribe += bad_item.*potion:!q # autoinscribe += potion.*mutation:!q # autoinscribe_cursed = false # autoinscribe += fruit:!e # show_god_gift = yes|unident|no ##### 3-n Macro related Options ################# # # flush.failure = false # flush.command = true # flush.message = true ##### 3-o Tile related Options ################## # # tile_show_items = !?/%=([)x}:|\ # tile_skip_title = true # tile_menu_icons = false ### The following lines define the colours of various objects within the ### tiles minimap. See options_guide.txt for more details. # tile_player_col = white # tile_monster_col = #660000 # tile_neutral_col = #660000 # tile_peaceful_col = #664400 # tile_friendly_col = #664400 # tile_plant_col = #446633 # tile_item_col = #005544 # tile_unseen_col = black # tile_floor_col = #333333 # tile_wall_col = #666666 # tile_mapped_floor_col = #222266 # tile_mapped_wall_col = #444499 # tile_door_col = #775544 # tile_downstairs_col = #ff00ff # tile_upstairs_col = cyan # tile_branchstairs_col = #ff7788 # tile_portal_col = #ffdd00 # tile_feature_col = #997700 # tile_trap_col = #aa6644 # tile_water_col = #114455 # tile_deep_water_col = #001122 # tile_lava_col = #552211 # tile_excluded_col = #552266 # tile_excl_centre_col = #552266 # tile_window_col = #558855 # If Crawl's response rate is too slow, try increasing the update rate. # tile_update_rate = 1000 # If Crawl is lagging when running or resting, try increasing this number. # tile_runrest_rate = 100 # tile_key_repeat_delay = 200 # tile_tooltip_ms = 500 # tile_tag_pref = enemy ### Note: setting window, map or font sizes to '0' implies auto-sizing. # tile_full_screen = true # tile_window_width = 1024 # tile_window_height = 768 # tile_use_small_layout = true # tile_map_pixels = 3 # tile_cell_pixels = 32 # tile_filter_scaling = true # tile_force_overlay = true # tile_layout_priority = minimap, inventory, gold_turn, command, spell # tile_layout_priority += ability, monster # tile_font_crt_file = VeraMono.ttf # tile_font_stat_file = VeraMono.ttf # tile_font_msg_file = VeraMono.ttf # tile_font_tip_file = VeraMono.ttf # tile_font_lbl_file = Vera.ttf # tile_font_ft_light = false # tile_font_crt_size = 15 # tile_font_stat_size = 16 # tile_font_msg_size = 14 # tile_font_tip_size = 15 # tile_font_lbl_size = 14 # tile_show_minihealthbar = false # tile_show_minimagicbar = false # tile_show_demon_tier = false # tile_water_anim = false # tile_misc_anim = false ### WebTiles only # tile_font_crt_family = monospace # tile_font_stat_family = monospace # tile_font_msg_family = monospace # tile_font_lbl_family = monospace # tile_realtime_anim = true # tile_display_mode = glyph # tile_level_map_hide_messages = false # tile_level_map_hide_sidebar = true ##### 4- Dump File ################################################# # ##### 4-a Saving ################################ # dump_on_save = true ##### 4-b Items and Kill List ################### # ##### 4-c Notes ################################# # user_note_prefix=@@@ # note_hp_percent = 5 # note_skill_levels = 1,5,10,15,27 # note_all_skill_levels = true # note_skill_max = false # note_xom_effects = false # note_chat_messages = false note_items += rod of, acquirement, preservation, running, of Zot note_monsters += orb of fire, ancient lich, Sigmund ##### 5- Miscellaneous ############################################# # ##### 5-a All OS ################################ # # mouse_input = true # wiz_mode = no # char_set = ascii # use_fake_player_cursor = false # # Translation to use (descriptions only for now). # language = pl|fr|zh|ko|fi|ru|el|da|li|pt|de|lv|cs|hu # # Joke translations (complete!). # language = dwarven|jagerkin|kraut|runes|wide # # colour.lightgray = black # colour.lightcyan = cyan # colour.yellow = brown # # show_player_species = true # See options_guide.txt for the options # cset, feature, mon_glyph, item_glyph ## Highlight the edge of unexplored terrain. # feature = explore horizon {',,green} ##### 5-b Windows console ####################### # # dos_use_background_intensity = true # background = black Mittwoch, 13. August 2014 ################## # Mob Warnings # # orig. ScarletJ # ################## < 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] mobwarnings["giant eyeball"] = "can paralyse you!" mobwarnings["naga ritualist"] = "can remove poison resistance, and do damage over time with toxic radiance!" mobwarnings["naga sharpshooter"] = "can shoot you with portal projectiles!" mobwarnings["greater naga"] = "is strong in melee, and can cast poison arrow and IMB!" mobwarnings["salamander mystic"] = "can haste allies, and can cast bolt of magma and IMB!" mobwarnings["mana viper"] = "has an antimagic bite!" mobwarnings["Vashnia"] = "can blink herself and allies away!" mobwarnings["golden eyeball"] = "can confuse you!" mobwarnings["electric golem"] = "has nasty electric attacks!" mobwarnings["storm dragon"] = "has a nasty electric breath attack!" 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["orc sorcerer"] = "can cast paralyse!" mobwarnings["fire giant"] = "can cast fireball and bolt of fire!" mobwarnings["frost giant"] = "can cast bolt of cold!" mobwarnings["spriggan druid"] = "can awaken trees, and cast might on recalled animals!" mobwarnings["thorn hunter"] = "can throw a nasty volley of thorns, and create brambles!" mobwarnings["ice giant"] = "can cast bolt of ice!" --mobwarnings["orc wizard"] = "might cast slow or confuse!" mobwarnings["wraith"] = "can slow you in melee!" mobwarnings["stone giant"] = "can throw large rocks and is a brute in melee!" mobwarnings["ettin"] = "is a beast in melee!" mobwarnings["fire dragon"] = "has a nasty fire breath attack!" mobwarnings["fire crab"] = "has a flaming cloud breath attack!" mobwarnings["ice dragon"] = "has a nasty cold breath attack!" mobwarnings["apocalypse crab"] = "has a chaos cloud breath attack!" mobwarnings["shadow dragon"] = "has a nasty draining breath attack!" mobwarnings["golden dragon"] = "has multiple nasty breath attacks!" mobwarnings["tentacled monstrosity"] = "is a beast in melee!" mobwarnings["cyclops"] = "can throw large rocks!" mobwarnings["red wasp"] = "can paralyse, slow, and poison in melee!" mobwarnings["yellow wasp"] = "can paralyse and poison in melee!" mobwarnings["Grinder"] = "can cast paralyse!" mobwarnings["Rupert"] = "can paralyse you in fear!" mobwarnings["air mage"] = "can cast airstrike!" mobwarnings["titan"] = "can cast airstrike!" mobwarnings["jumping spider"] = "can ensnare you in webs!" mobwarnings["Aizul"] = "will try to put you to sleep and casts strong poison conjurations!" mobwarnings["Arachne"] = "can ensnare you in her webs!" mobwarnings["Harold"] = "can throw nets and cast bolt of fire" mobwarnings["blizzard demon"] = "can cast airstrike!" mobwarnings["wind drake"] = "can cast airstrike!" mobwarnings["Gastronok"] = "can cast airstrike!" mobwarnings["Enchantress"] = "can cast Dimension Anchor, Slow, Haste, Mass Confusion, and Strip Resistance!" mobwarnings["Sojobo"] = "can cast airstrike!" mobwarnings["Maurice"] = "can steal items, go invisible, and teleport away!" mobwarnings["deep elf demonologist"] = "can cast banishment or summon Greater Demons!" mobwarnings["Louise"] = "can cast banishment!" mobwarnings["Psyche"] = "might banish you in melee!" mobwarnings["Sonja"] = "will probably banish you in melee!" 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"] = "can enrage both enemies and you!" mobwarnings["orb spider"] = "can cast Orb of Destruction!" mobwarnings["tarantella"] = "can cause confusion in melee!" mobwarnings["brown ugly thing"] = "can cause corrosion in melee!" mobwarnings["brown very ugly thing"] = "can cause corrosion in melee!" mobwarnings["red ugly thing"] = "can burn your scrolls in melee!" mobwarnings["red very ugly thing"] = "can cause sticky flames in melee!" mobwarnings["flaming corpse"] = "can cause sticky flames in melee!" mobwarnings["purple ugly thing"] = "can cause sickness in melee!" mobwarnings["purple very ugly thing"] = "can cause rotting in melee!" mobwarnings["komodo dragon"] = "can cause sickness in melee!" mobwarnings["deep troll earth mage"] = "can cast LRD and dig!" 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 or entrap you, or other chaos 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["wizard"] = "might cast banishment, paralyse, or LCS!" mobwarnings["ogre mage"] = "might cast banishment, paralyse, or LCS!" mobwarnings["lich"] = "might cast banishment, paralyse, summon demon, or LCS!" mobwarnings["Erolcha"] = "might cast banishment, paralyse, 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["deep elf mage"] = "can cast fireball and slow!" mobwarnings["quicksilver dragon"] = "can dispel your buffs!" mobwarnings["purple draconian"] = "can dispel your buffs!" mobwarnings["yellow draconian"] = "can corrode your equipment at range!" mobwarnings["mottled draconian"] = "can spit sticky flames at range!" mobwarnings["vault sentinel"] = "can mark you and blow a signal horn!" mobwarnings["vault warden"] = "can lockdown doors and staircases!" mobwarnings["ironbrand convoker"] = "can recall allies and cast might on them!" mobwarnings["ironheart preserver"] = "can absorb the damage of its allies and heal itself!" 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["Norris"] = "can cast paralyse and smite you, or drain your Int!" mobwarnings["catoblepas"] = "can petrify you with its breath!" mobwarnings["Jorgrun"] = "can cast petrify and shatter!" mobwarnings["brain worm"] = "can drain your Int!" mobwarnings["orange crystal statue"] = "can cast confuse and Shadow Creatures, or drain your Int!" mobwarnings["Jory"] = "can mesmerise, cast LCS and blink close!" mobwarnings["neqoxec"] = "can mutate you or drain your Int!" mobwarnings["cacodemon"] = "can mutate you!" mobwarnings["shining eye"] = "can mutate you!" mobwarnings["orb of fire"] = "can mutate you!" mobwarnings["pulsating lump"] = "can mutate you in melee!" 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["giant orange brain"] = "can cast Shadow Creatures, or drain your Int!" 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, "orc wizard") -- there should be a better way to do this 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") 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) and not is_fiend --Holds this mobs alert message local alert = "" local mob_name = "" --Formatting for uniques if is_uppercase then alert = "" .. mons .. " " .. message mob_name = mons --For more than 1 of the same monster elseif (count > 1) then alert = "The ".. mons .. " " .. message .. "(" .. count .. "x)" mob_name = mons .. "(" .. count .. "x)" --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(" ..total_dangers .. "x):" .. alerts .. "") --For 4 to 7 elseif total_dangers < 8 and (not string.find(crawl.messages(6), escape(short_alert))) then crawl.mpr("Danger(" ..total_dangers .. "x):" .. short_alert .. "") --For 8 or more elseif not string.find(crawl.messages(6), escape(short_alert)) then crawl.mpr("PANIC(" ..total_dangers .. "x):" .. 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) if m and (m:attitude() == 0) 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 > ############### # Damage Calc # ############### : local previous_hp = 0 : local previous_mp = 0 : local max_hp = you.hp() : local max_mp = you.mp() : : function AnnounceDamage() : local current_hp = you.hp() : local current_mp = you.mp() : -- Set max hp/mp at beginning of turn : if current_mp > max_mp then : max_mp = current_mp : end : if current_hp > max_hp then : max_hp = current_hp : end : : --Skips message on initializing game : if previous_hp > 0 then : local hp_difference = previous_hp - current_hp : local mp_difference = previous_mp - current_mp : : --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 : crawl.mpr("You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.") : 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("Danger: You now have " .. current_mp .. "/" ..max_mp .." mp.") : elseif current_mp <= (max_mp / 2) then : crawl.mpr("Warning: You now have " .. current_mp .. "/" ..max_mp .." mp.") : else : crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." mp.") : end : end : end : --Set previous hp and mp at end of turn : previous_hp = current_hp : previous_mp = current_mp : end ############# # 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 = true fire_order = launcher, return fire_order += large rock, javelin, tomahawk, dart, stone # Prevent me from tab-fighting to death below 75% HP autofight_stop = 75 # Enables automagic attacks automagic_enable = false automagic_slot = a # Percentage of MP to stop automagic at automagic_stop = 0 # If set to true, resort to melee when automagic_stop is active automagic_fight = false ############## # Autopickup # ############## # Used # $ = gold # ? = scroll # ! = potion # : = book # " = jewellery # / = wand # % = food # } = miscellaneous # \ = rods # | = staves autopickup += $?!:"/%}\| # Unused # ) = weapon # ( = missiles # [ = armour # X = corpses # Secondary Armour Auto-Pickup { add_autopickup_func(function(item, name) if item.class(true) == "armour" then local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} sub_type, _ = item.subtype() current_item = items.equipped_at(good_slots[sub_type]) if (good_slots[sub_type] ~= nil) and (current_item == nil) then return true end return false end end) } # Allows easily dropping multiple items drop_mode += multi # Always show the full list of items when you pick up a stack pickup_mode += multi # Allows followers to pick up ANYTHING (take care not to lose artifacts) default_friendly_pickup += all # Set Alias for Autopickup Exceptions ae := autopickup_exceptions ae += useless_item, dangerous_item, evil_item # Dont pickup potion(s) of [coagulated] blood if you are not a vampire : if you.race() ~= "Vampire" then ae += potions? of.*blood : end # Autopickup artefacts/ego ae +=