macros += M 1 ' macros += M 2 . macros += K2 1 + macros += K2 2 . macros += M 3 za macros += M 4 zb macros += M s zk macros += M z z? macros += M Z Z? macros += M ` o macros += M \{-265} f.\{27} macros += M \{-266} zff macros += M \{-250} ===toggle_autothrow spell_slot ^= Apportation: f #{ function c_answer_prompt(prompt) if prompt:find("Really attack near your") then return true end end } always_show_zot = true small_more = true local aft = false function toggle_autothrow() if aft then crawl.setopt("use_animations += beam") crawl.setopt("autofight_throw = false") crawl.mpr("Autofight_throw is off.") else crawl.setopt("use_animations -= beam") crawl.setopt("autofight_throw = true") crawl.mpr("Autofight_throw is on.") end aft = not aft end < function ready() AnnounceDamage() end > < 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("NOW THAT'S A LOTTA 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 > cloud_status = true simple_targeting = false skill_focus = false tile_show_threat_levels = trivial, easy, tough, nasty tile_filter_scaling = true default_show_all_skills = true default_manual_training = true show_more = false bold_brightens_foreground = true autofight_caught = true item_slot += weapon: ab explore_delay = -1 travel_delay = -1 rest_delay = -1 show_travel_trail = false travel_key_stop = false easy_confirm = all force_more_message -= vehumet offers you knowledge tile_show_demon_tier = true use_animations -= hp #use_animations = false hp_colour = 0:green mp_colour = 0:blue ability_slot ^=Heroism:b ability_slot ^=Finesse:d item_slot ^= potion of curing:q item_slot ^= potion of heal wounds:w item_slot ^= potion of haste:h item_slot ^= potion of might:d item_slot ^= potion of resistance:n item_slot ^= scroll of identify:r item_slot ^= scroll of remove curse:x item_slot ^= scroll of teleportation:t item_slot ^= scroll of blinking:z item_slot ^= wand of digging:d item_slot ^= condenser vane:v item_slot ^= box of beasts:B item_slot ^= ring of protection: p item_slot ^= ring of protection from cold: k item_slot ^= ring of resist corrosion: k item_slot ^= ring of evasion: l item_slot ^= ring of protection from fire: f item_slot ^= ring of see invisible: i item_slot ^= ring of protection from magic: m item_slot ^= ring of poison resistance: o item_slot ^= ring of slaying: j autopickup_exceptions -= dangerous_item menu_colour += cyan:brand weapon menu_colour += cyan:enchant weapon menu_colour += cyan:enchant armour menu_colour += cyan:magic mapping menu_colour += green:potions? of might menu_colour += green:potions? of agility menu_colour += green:potions? of brilliance menu_colour += green:potions? of haste menu_colour += green:potions? of resistance menu_colour += green:potions? of berserk menu_colour += cyan:wand of para menu_colour += cyan:wand of conf menu_colour += cyan:wand of poly menu_colour += cyan:wand of ensl menu_colour += cyan:wand of dis { add_autopickup_func(function(it, name) if it.is_useless then return end if it.class(true) == "armour" then local good_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots"} st, _ = it.subtype() if good_slots[st] ~= nil and items.equipped_at(good_slots[st]) == nil then return true end end end) } autopickup_exceptions += >mulet of the acrobat autopickup_exceptions += >mulet of faith autopickup_exceptions += >mulet of guardian spirit autopickup_exceptions += >mulet of magic regeneration autopickup_exceptions += >mulet of reflection autopickup_exceptions += >mulet of regeneration autopickup_exceptions += >mulet of magic regeneration autopickup_exceptions += >ing of willpower autopickup_exceptions += >ing of dexterity autopickup_exceptions += >ing of evasion autopickup_exceptions += >ing of fire autopickup_exceptions += >ing of flight autopickup_exceptions += >ing of ice autopickup_exceptions += >ing of intelligence autopickup_exceptions += >ing of magical power autopickup_exceptions += >ing of poison resistance autopickup_exceptions += >ing of positive energy autopickup_exceptions += >ing of protection autopickup_exceptions += >ing of protection from cold autopickup_exceptions += >ing of protection from fire autopickup_exceptions += >ing of resist corrosion autopickup_exceptions += >ing of see invisible autopickup_exceptions += >ing of slaying autopickup_exceptions += >ing of stealth autopickup_exceptions += >ing of strength autopickup_exceptions += >ing of wizardry autopickup_exceptions +=