# /u/kitchen_ace on reddit.com/r/dcss # it's an anagram! # cosplay challenge macros += M \{-1018} ===CRAWL_COSPLAY_CONDUCT < function ready() AnnounceDamage() end > include = CosplayChallenge.rc auto_butcher = very full #tile_cell_pixels = 48 msg_max_height = 5 tile_font_crt_family = Inconsolata tile_font_stat_family = Inconsolata tile_font_msg_family = Inconsolata tile_font_lbl_family = Inconsolata tile_font_crt_size = 14 tile_font_stat_size = 16 tile_font_msg_size = 12 tile_font_lbl_size = 11 note_chat_messages = true note_dgl_messages = true tile_map_pixels = 3 tile_water_anim = false # Use a custom tile when playing a Felid : if you.race() == "Felid" then tile_player_tile = tile:felid_3 : end # other tiles: octopode_2 # kobold? demonspawn_1 tengu_5 gnoll_3 # naga_8 barachi_3 gargoyle_2 centaur_7 # setting them means no equipment or hair :( #tile_runrest_wait = 5000 #tile_update_rate = 2000 mouse_input = false #view_delay = 100 messages_at_top = true tile_level_map_hide_messages = false tile_filter_scaling = true #tile_menu_icons = false #tile_skip_title = true tile_tooltip_ms = 0 tile_tag_pref = named remember_name = false # dangerous items need ^= instead of += #autopickup_exceptions ^= : item_slot += potion of blood:q item_slot += scroll of identify:i item_slot += ration:s autofight_stop = 55 autofight_wait = true autofight_caught = true hp_warning = 30 show_more = false small_more = true default_show_all_skills = true default_manual_training = true dump_on_save = false dump_message_count = 100 dump_kill_places = all dump_item_origins = all dump_book_spells = false show_god_gift = yes autoinscribe += throwing net:!f autoinscribe += of dispersal:!f #autoinscribe += manual:!d user_note_prefix = ~~ # not working either I think #: if you.god() == "Beogh" or you.god() == "Yredelemnul" then #travel_avoid_terrain = deep water #: end force_more_message += floating eye.*(you|view) force_more_message += less protected from missiles force_more_message += Your magical effects are unravelling force_more_message += You are sucked into a shaft force_more_message += You.*guilty force_more_message += suddenly yanked #force_more_message += Your unholy channel expires force_more_message += Your time is quickly running out #force_more_message += skill increases to force_more_message += You have mastered force_more_message += You have finished your manual force_more_message += The mighty Pandemonium lord force_more_message += no longer ripe for the taking force_more_message += Deactivating autopickup #force_more_message += Your transformation is almost over force_more_message += hits you.*distortion force_more_message += warns you.*of distortion force_more_message += is wielding.*of distortion force_more_message += (He|She|It) is.*carrying a wand of #force_more_message += Ouch! force_more_message += MASSIVE DAMAGE runrest_ignore_message += .* says, "Be careful!" runrest_ignore_message += blood rot.* away message_colour += mute:(melds into|unmelds from) your body message_colour += mute:No target in view #include = no_vi_command_keys.txt # set up bindkeys etc in here ### HDamage.txt ############### # 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("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("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 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 } #macros in rc form macros += K1 & Y macros += K1 ( U macros += K1 * K macros += K1 7 y macros += K1 8 k macros += K1 9 u macros += K1 J B macros += K1 K J macros += K1 L N macros += K1 O L macros += K1 U H macros += K1 j b macros += K1 k j macros += K1 l n macros += K1 o l macros += K1 u h macros += K2 & Y macros += K2 ( U macros += K2 * K macros += K2 7 y macros += K2 8 k macros += K2 9 u macros += K2 J B macros += K2 K J macros += K2 L N macros += K2 O L macros += K2 U H macros += K2 j b macros += K2 k j macros += K2 l n macros += K2 o l macros += K2 u h macros += K3 & Y macros += K3 ( U macros += K3 * K macros += K3 7 y macros += K3 8 k macros += K3 9 u macros += K3 J B macros += K3 K J macros += K3 L N macros += K3 O L macros += K3 U H macros += K3 j b macros += K3 k j macros += K3 l n macros += K3 o l macros += K3 u h macros += M \{-1073741893} & macros += M \{-1073741891} ZFkkkkk\{32}5 macros += M \{-1073741884} aaf macros += M \{-1073741882} zG\{32} macros += M \{-1013} # macros += M \{-1011} zG. macros += M \{-41} \{25} macros += M \{-40} \{11} macros += M \{-39} \{21} macros += M \{-39}9 p macros += M \{8} \{15} macros += M \{10} \{2} macros += M \{11} \{10} macros += M \{12} \{14} macros += M \{15} \{12} macros += M \{21} \{8} macros += M \{29} ?% macros += M \{31} \{25} macros += M # aaf macros += M & Y macros += M ( U macros += M * K macros += M + * macros += M 1 ' macros += M 2 ) macros += M 3 \{-233} macros += M 4 \{9} macros += M 7 y macros += M 8 k macros += M 9 u macros += M J B macros += M K J macros += M L N macros += M O L macros += M U H macros += M Y O macros += M j b macros += M k j macros += M l n macros += M o l macros += M u h macros += M y o macros += M \{283} Za.