##tile_player_tile = tile: mons_WIGLAF easy_confirm = all note_chat_messages = true runrest_ignore_message -= Ru believes you are ready to make a new sacrifice runrest_ignore_message -= Ashenzari invites you to partake force_more_message += You feel your power leaking away. force_more_message += You feel you are being watched by something. force_more_message += You convulse! force_more_message += A malevolent explore_stop += greedy_pickup,stairs,shops,altars,portals,branches,runed_doors autofight_throw = false use_animations = beam, range, hp, monster_in_sight, pickup, monster, player show_more = false message_colour += mute:You hear a slurping noise message_colour += mute:You hear a distant slurping noise message_colour += mute:You hear a squelching noise ae := autopickup_exceptions ae += = werebackratio then crawl.take_note("we're so back!") crawl.mpr("we're so back!") itsover = false elseif not itsover and hp_ratio() <= itsoverratio then crawl.take_note("it's so over!") crawl.mpr("it's so over!") itsover = true end end } ###### Damage calc (less obnoxious version) ###### #이건 모 갤럼꺼에서 ê°€ì ¸ì˜¨ rc #include += HDamage.rc { 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("") else crawl.mpr("") 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") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You take " .. hp_difference .. " damage") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You take " .. hp_difference .. " damage") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You take " .. hp_difference .. " damage") else crawl.mpr("You take " .. hp_difference .. " 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") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("You regained " .. health_inturn .. " hp") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("You regained " .. health_inturn .. " hp") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("You regained " .. health_inturn .. " hp") else crawl.mpr("You regained " .. health_inturn .. " hp") end end if (current_hp == max_hp) then 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") elseif current_mp < (max_mp * 0.50) then crawl.mpr("You regained " .. mp_inturn .. " mp") else crawl.mpr("You regained " .. mp_inturn .. " mp") end end if (current_mp == max_mp) then end end --On losing magic if current_mp < previous_mp then if current_mp <= (max_mp / 5) then crawl.mpr("") elseif current_mp <= (max_mp / 2) then crawl.mpr("") else crawl.mpr("") 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 }