show_more=false # last added pickup_mode=multi # tile_realtime_anim = true tile_show_minihealthbar = true tile_show_minimagicbar = true #########Explore # explore_greedy = true explore_greedy_visit += glowing_items, artefacts explore_greedy_visit -= stacks explore_item_greed = 999 explore_stop = stairs,shops,altars,portals,branches,runed_doors explore_stop += greedy_pickup_smart,glowing_items,artefacts fail_severity_to_confirm = 3 warn_hatches = true warn_contam_cost = true confirm_action += Sanctuary, Silence, End Transformation, Enter Abyss, Step From Time, ######Message and Display Enhancements item_stack_summary_minimum = 4 default_show_all_skills = true cloud_status = true unusual_monster_items += venom, protection, elec, holy wrath, draining ### stop = Trog's voice booms out, "Feel my wrath!" stop = Your transformation is almost over. stop = Your reaping aura is weakening. runrest_stop_message ^= You feel you are being watched by something. autofight_wait = true autofight_stop = 70 explore_auto_rest = true rest_wait_percent = 86 travel_delay = 2 #travel_open_doors = false explore_wall_bias = 4 view_delay = 500 bindkey = [Tab] CMD_AUTOFIGHT_NOMOVE bindkey = [F1] CMD_AUTOFIGHT tile_font_msg_size = 15 tile_font_crt_size = 14 tile_font_stat_size = 14 tile_font_tip_size = 16 tile_font_lbl_size = 16 # new # Remove the menu selector, it always selects the first item in any # selection (w,W,q,r,Q,z,Z) # menu_arrow_control = false # Quality of life # =============== default_manual_training = true auto_hide_spells = true # Viewport # ======== view_max_width = 32 view_max_height = 32 # Webtiles # ======== tile_display_mode = tiles tile_web_mouse_control = false tile_viewport_scale = 1.2 # Travel travel_one_unsafe_move = false # HP loss force_more_message += LOW HITPOINT WARNING flash_screen_message += HP: \d+/\d+ \(-\d+\).*!+ # Statuses force_more_message += You feel strangely unstable flash_screen_message += You are (confused|paralysed|sleeping|corroded|poisoned) flash_screen_message += You feel sluggish # Threats force_more_message += wielding.*(distortion|chaos|electrocution|venom) force_more_message += quivering.*tipped darts force_more_message += carrying a wand flash_screen_message += You feel you are being watched by something flash_screen_message += The.*attacks as you move away! #---------------------------------------------------------------------------- # # LUA # #---------------------------------------------------------------------------- # < local prev_hp = nil local prev_mp = nil function bar(current, change, max, length) local length = length or 12 local fraction_filled = current / max local fraction_changed = math.abs(change / max) local characters_filled = math.min(length, math.floor(length * fraction_filled)) local characters_changed = math.min(length, math.ceil(length * fraction_changed)) local filled = ''..string.rep('=', characters_filled)..'' local lost = ''..string.rep('-', characters_changed)..'' local rest = string.rep('-', length - characters_filled - characters_changed) return ' '..filled..lost..rest..' ' end function bighit(hp_loss, hp_max, fraction) if hp_loss >= 0 then return '' end -- Add '!' per every 10th of HP by default multiplier = fraction and 1/fraction or 10 local fraction_changed = math.abs(hp_loss / hp_max) local ouch = string.rep('!', math.floor(fraction_changed * multiplier)) return ouch == '' and '' or ' '..ouch end function announce_damage() local hp_curr, hp_max = you.hp() local mp_curr, mp_max = you.mp() -- Skips message on initializing game if prev_hp ~= nil and prev_mp ~= nil then local hp_diff = hp_curr - prev_hp local mp_diff = mp_curr - prev_mp local message = nil if hp_diff < 0 then message = string.format("HP: %s/%s (%s)", hp_curr, hp_max, hp_diff) end if mp_diff < 0 then if hp_diff < 0 and mp_diff < 0 then message = message .. ' ' end message = (message or '') .. string.format("MP: %s/%s (%s)", mp_curr, mp_max, mp_diff) end if message ~= nil then if hp_diff < 0 then -- Always warn about HP loss message = message..bar(hp_curr, hp_diff, hp_max) message = message..bighit(hp_diff, hp_max) end local channel = hp_curr < hp_max * 0.5 and "danger" or hp_diff < 0 and "warning" or "plain" crawl.mpr(message, channel) end end -- Set previous hp/mp and form at end of turn prev_hp = hp_curr prev_mp = mp_curr end -- Run every player turn function ready() -- Display damage taken in log announce_damage() end >