# https://crawl.kelbi.org/crawl/rcfiles/crawl-git/Nomi.rc # my current default settings name = Erin # to make u stop being bad autofight_stop = 80 autofight_caught = true explore_delay = 20 explore_wall_bias = 0 show_more = false auto_butcher = true # general settings trap_item_highlight = reverse autopickup_search = true default_manual_training = true show_more = false travel_open_doors = false ood_interesting = 8 note_hp_percent = 10 note_skill_levels = 1 #note_skill_levels = 1,5,10,15,27 # item slots item_slot += identify:r item_slot += stones:g item_slot += poisoned dart:f item_slot += boomerang of dispersal:i item_slot += boomerang:e item_slot += javelin:h : if (you.god() == "Trog" or you.class() == "Fighter") then item_slot += axe:a item_slot += mace:b item_slot += flail:b item_slot += club:b item_slot += whip:b item_slot += ingstar:b : end # messages, show more, etc force_more_message += floating eye force_more_message += Ouch! That really hurt! force_more_message += flesh start force_more_message += very hungry force_more_message += calcifying dust hits force_more_message += You are slowing down force_more_message += Space warps horribly around you force_more_message += your body is wracked force_more_message += phantom blinks! #force_more_message += You feel yourself slow down force_more_message += hits you.*distortion force_more_message += Space bends around you force_more_message += fumble force_more_message += wearing a (* shield|buckler) force_more_message += A sentinel's mark forms upon you note_items = experience, acquirement, tremorstones, vane, running, of Zot, scarf of resistance note_messages = You pass through the gate note_messages = cast .* Abyss note_messages = Your scales start note_messages = protects you from harm note_messages = shaft note_monsters = orb of fire, ancient lich, Sigmund, Grinder, Maggie, Rupert, Louise, catoblepas, hydra, basilisk : if you.god() == "Jiyva" then ignore = Jiyva gurgles merrily ignore = Jiyva appreciates your sacrifice ignore = Jiyva says: Divide and consume ignore = You hear.*splatter ignore = Jiyva alters your body : end # autopickups ae := autopickup_exceptions ae += scrolls? of (vulnerability|amnesia|enchant|brand) : if (you.race() == "Ogre" or you.race() == "Troll") then ae += ############### # 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("(" .. current_hp .. "/" .. max_hp .. ")") else crawl.mpr("(" .. current_hp .. "/" .. max_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 (" .. current_hp .. "/" .. max_hp .. ")") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You take " .. hp_difference .. " damage (" .. current_hp .. "/" .. max_hp .. ")") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You take " .. hp_difference .. " damage (" .. current_hp .. "/" .. max_hp .. ")") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You take " .. hp_difference .. " damage (" .. current_hp .. "/" .. max_hp .. ")") else crawl.mpr("You take " .. hp_difference .. " damage (" .. current_hp .. "/" .. max_hp .. ")") end if hp_difference > (max_hp * 0.20) then crawl.mpr("Ouch! That really hurt!") 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 recover " .. health_inturn .. " health (" .. current_hp .. "/" .. max_hp .. ")") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You recover " .. health_inturn .. " health (" .. current_hp .. "/" .. max_hp .. ")") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You recover " .. health_inturn .. " health (" .. current_hp .. "/" .. max_hp .. ")") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You recover " .. health_inturn .. " health (" .. current_hp .. "/" .. max_hp .. ")") else crawl.mpr("You recover " .. health_inturn .. " health (" .. current_hp .. "/" .. max_hp .. ")") end 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 regain " .. mp_inturn .. " magic (" .. current_mp .. "/" .. max_mp .. ")") elseif current_mp < (max_mp * 0.50) then crawl.mpr("You regain " .. mp_inturn .. " magic (" .. current_mp .. "/" .. max_mp .. ")") else crawl.mpr("You regain " .. mp_inturn .. " magic (" .. current_mp .. "/" .. max_mp .. ")") end 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 .." magic.") elseif current_mp <= (max_mp / 2) then crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." magic.") else crawl.mpr("You now have " .. current_mp .. "/" ..max_mp .." magic.") 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 >