## 체력, 마력 색깔 설정 ## hp_colour = 100:green, 99:lightgrey, 75:yellow, 50:lightred, 25:red mp_colour = 100:green, 99:lightgrey, 75:yellow, 50:lightred, 25:red stat_colour = 3:red, 7:lightred ## 체력, 마력 추가 경고 ## menu := menu_colour # Variables (Worst to Best) $evil := red $negative := brown $danger := lightred $warning := yellow $boring := darkgrey $decent := white $good := lightblue $positive := green $verypositive := lightgreen $awesome := lightmagenta # Unusual Variables $mp := lightcyan $equipped := cyan $mutation := magenta # 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("" .. hp_difference .. "의 피해를 받았습니다. 현재 남은 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("" .. hp_difference .. "의 피해를 받았습니다. 현재 남은 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("" .. hp_difference .. "의 피해를 받았습니다. 현재 남은 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("" .. hp_difference .. "의 피해를 받았습니다. 현재 남은 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") else crawl.mpr("" .. hp_difference .. "의 피해를 받았습니다. 현재 남은 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") end if hp_difference > (max_hp * 0.20) then crawl.mpr("악! 이건 정말로 아프다!") 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("" .. health_inturn .. "의 체력을 얻었습니다. 현재 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") elseif current_hp <= (max_hp * 0.50) then crawl.mpr("" .. health_inturn .. "의 체력을 얻었습니다. 현재 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") elseif current_hp <= (max_hp * 0.70) then crawl.mpr("" .. health_inturn .. "의 체력을 얻었습니다. 현재 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") elseif current_hp <= (max_hp * 0.90) then crawl.mpr("" .. health_inturn .. "의 체력을 얻었습니다. 현재 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") else crawl.mpr("" .. health_inturn .. "의 체력을 얻었습니다. 현재 체력은 [" .. current_hp .. "/" .. max_hp .. "] 입니다.") end end if (current_hp == max_hp) then crawl.mpr("체력이 전부 회복되었습니다. (" .. 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("" .. mp_inturn .. "의 마력를 얻었습니다. 현재 마력은 [" .. current_mp .. "/" .. max_mp .. "] 입니다.") elseif current_mp < (max_mp * 0.50) then crawl.mpr("" .. mp_inturn .. "의 마력을 얻었습니다. 현재 마력은 [" .. current_mp .. "/" .. max_mp .. "] 입니다.") else crawl.mpr("" .. mp_inturn .. "의 마력을 얻었습니다. 현재 마력은 [" .. current_mp .. "/" .. max_mp .. "] 입니다.") end end if (current_mp == max_mp) then crawl.mpr("마력이 전부 회복되었습니다. (" .. current_mp .. ")") end end --On losing magic if current_mp < previous_mp then if current_mp <= (max_mp / 5) then crawl.mpr("현재 남은 마력은 [" .. current_mp .. "/" ..max_mp .."] 입니다.") elseif current_mp <= (max_mp / 2) then crawl.mpr("현재 남은 마력은 [" .. current_mp .. "/" ..max_mp .."] 입니다.") else crawl.mpr("현재 남은 마력은 [" .. current_mp .. "/" ..max_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 } ## 스킬 메뉴 열기 ## { local need_skills_opened = true function OpenSkills() if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end } ## Logs chat messages into the notes ## note_chat_messages = false ## 게임 시작시 실행하는 함수 목록 ## { function ready() AnnounceDamage() --SpoilerAlert() OpenSkills() end } ## 스킬 수련 기본 설정값 메뉴얼 ## default_manual_training = true travel_delay = -1 rest_delay = -1 explore_delay = -1 show_travel_trail = 1 autofight_stop = 50 hp_warning = 50 rest_wait_both = true rest_wait_percent = 100 confirm_butcher = never auto_eat_chunks = true easy_eat_chunks = true show_more = false tile_show_player_species = true include += RandomTiles.rc macros += M \{-1011} o macros += M \{-1012} za macros += M \{-1013} za\{32} macros += M \{-1014} zb\{32} macros += M \{-1017} ===toggle_random_tile macros += M \{-1018} ===set_tile_by_name macros += M \{-1019} ===new_random_tile language = ko #$# lab_magic_window_translate = true #$ lab_gold_status = true #$ lab_disable_mouse_move = true #$ lab_disable_chat_clear = true more := force_more_message : if you.god() == "Ashenzari" then more += You have a vision of.*gates? : end more += The mighty Pandemonium lord .* resides here more += The mighty Pandemonium lord .* resides here # Interrupts more += skill increases to level more += Uskayaw prepares the audience for your solo! more += You don't .* that spell more += You fail to use your ability more += You miscast.*(Blink|Borgnjor|Door|Haste|Invisibility) more += You can't (read|drink|do) more += You cannot .* while unable to breathe more += You cannot .* in your current state more += when .*silenced more += too confused more += There's something in the way more += There's nothing to (close|open) nearby more += not good enough to have a special ability more += You are too berserk more += no means to grasp more += That item cannot be evoked more += This wand has no charges more += You are held in a net more += You don't have any such object more += You can't unwield more += enough magic points more += You don't have the energy to cast that spell more += You are unable to access your magic # Bad things more += Your surroundings flicker more += You cannot teleport right now more += A sentinel's mark forms upon you more += (blundered into a|invokes the power of) Zot more += enter a teleport trap more += Ouch! That really hurt! more += dispelling energy hits you more += You are blasted by holy energy! more += You are (blasted|electrocuted)! more += You are.*(confused|poisoned) more += starving more += god:(sends|finds|silent|anger) more += You feel a surge of divine spite more += disloyal to dabble more += lose consciousness more += You are too injured to fight blindly more += calcifying dust hits #more += Space warps.*around you more += Space bends around you more += watched by something more += flickers and vanishes! more += doesn't seem very happy more += is no longer charmed # Hell effects more += hell_effect: # Expiring effects more += You feel yourself slow down more += suddenly seem different more += Your hearing returns more += You have a feeling this form more += You feel yourself come back to life more += time is quickly running out more += life is in your own hands more += Your shroud falls apart more += You start to feel a little slower more += You feel less protected from missiles # Problematic monsters more += (giant eyeball|shining eye|cacodemon|neqoxec|guardian serpent|flayed ghost|greater mummy|mummy priest|hell sentinel|fiend|tzitzimitl|tormentor|hellion|lich|executioner|orb of fire|death cob|juggernaut|moth of wrath|ghost moth|curse toe|curse skull|draconian shifter).*into view ## Any uniques and any pan lords more += (?-i:[A-Z]).* comes? into view # include = 034_monster_glyphs.txt # include = 052_monster_glyphs.txt # include = 060_monster_glyphs.txt # include = 071_monster_glyphs.txt # include = 080_monster_glyphs.txt # include = 0.9_monster_glyphs.txt # include = 0.12_monster_glyphs.txt # include = 0.13_monster_glyphs.txt # include = 0.14_monster_glyphs.txt