# Alternative vi bindings for Colemak users. include = colemak_command_keys.txt ############### #### MACRO #### ############### ## HP/MP 알림 ## { local need_skills_opened = true local previous_hp = 0 local previous_mp = 0 local previous_form = '' local was_berserk_last_turn = false function announce_damage_ko() 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 --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('Now you have [' .. current_hp .. '/' .. max_hp .. '] HP') else crawl.mpr('Now you have [' .. current_hp .. '/' .. max_hp .. '] HP') end else --체력 잃을때 if (current_hp < previous_hp) then if current_hp <= (max_hp * 0.30) then crawl.mpr('You take ' .. hp_difference .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') elseif current_hp <= (max_hp * 0.50) then crawl.mpr('You take ' .. hp_difference .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') elseif current_hp <= (max_hp * 0.70) then crawl.mpr('You take ' .. hp_difference .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') elseif current_hp <= (max_hp * 0.90) then crawl.mpr('You take ' .. hp_difference .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') else crawl.mpr('You take ' .. hp_difference .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') end if hp_difference > (max_hp * 0.20) then crawl.mpr('!!!!! HP Warning !!!!!') end end --체력 얻을때 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 gain ' .. health_inturn .. ' hp, and have [' .. current_hp .. '/' .. max_hp .. '] hp.') elseif current_hp <= (max_hp * 0.50) then crawl.mpr('You gain ' .. health_inturn .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] hp.') elseif current_hp <= (max_hp * 0.70) then crawl.mpr('You gain ' .. health_inturn .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') elseif current_hp <= (max_hp * 0.90) then crawl.mpr('You gain ' .. health_inturn .. ' HP, and have [' .. current_hp .. '/' .. max_hp ..'] HP') else crawl.mpr('You gain ' .. health_inturn .. ' HP, and have [' .. current_hp .. '/' .. max_hp .. '] HP') end end if (current_hp == max_hp) then crawl.mpr(' HP Full. (' .. current_hp .. ')') end end --마력 얻을때 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 gain ' .. mp_inturn .. ' MP, and have [' .. current_mp .. '/' .. max_mp .. '] MP') elseif current_mp < (max_mp * 0.50) then crawl.mpr('You gain ' .. mp_inturn .. ' MP, and have [' .. current_mp .. '/' .. max_mp .. '] MP') else crawl.mpr('You gain ' .. mp_inturn .. ' MP, and have [' .. current_mp .. '/' .. max_mp .. '] MP') end end if (current_mp == max_mp) then crawl.mpr('MP Full (' .. current_mp .. ')') end end --마력 잃을때 if current_mp < previous_mp then if current_mp <= (max_mp * 0.25) then crawl.mpr('You lose ' .. mp_difference .. 'MP, and have [' .. current_mp .. '/' ..max_mp ..'] MP') elseif current_mp <= (max_mp * 0.50) then crawl.mpr('You lose ' .. mp_difference .. 'MP, and have [' .. current_mp .. '/' ..max_mp ..'] MP') else crawl.mpr('You lose ' .. mp_difference .. 'MP, and 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 function ready() -- Enable AnnounceDamage. announce_damage_ko() if you.turns() == 0 and need_skills_opened then need_skills_opened = false crawl.sendkeys("m") end end } ## F2 누르면 마법 스태프 예상데미지 출력 ## { function calc_staff_info(school_level, evo_level, multiplier) -- multiplier 파라미터 추가, 기본값은 1.575 multiplier = multiplier or 1.575 local max_damage = multiplier * (school_level + evo_level/2) local activation = (evo_level + school_level/2) * 6.66 if activation > 100 then activation = 100 end return max_damage, activation end function staff_info_display() local evo = you.skill("Evocations") local output = "" -- Fire staff local fire = you.skill("Fire Magic") local fire_dmg, fire_chance = calc_staff_info(fire, evo) output = output .. string.format("[Fire] D: 0-%.1f, P: %.1f%% \n", fire_dmg, fire_chance) -- Cold staff local ice = you.skill("Ice Magic") local cold_dmg, cold_chance = calc_staff_info(ice, evo) output = output .. string.format("[Cold] D: 0-%.1f, P: %.1f%% \n", cold_dmg, cold_chance) -- Earth staff (1.5x 공식) local earth = you.skill("Earth Magic") local earth_dmg, earth_chance = calc_staff_info(earth, evo, 1.5) output = output .. string.format("[Earth] D: 0-%.1f, P: %.1f%% (33%% to flying)\n", earth_dmg, earth_chance) -- Air staff (1.25x 공식) local air = you.skill("Air Magic") local air_dmg, air_chance = calc_staff_info(air, evo, 1.25) output = output .. string.format("[Air] D: 0-%.1f, P: %.1f%% (Half AC)\n", air_dmg, air_chance) -- Alchemy staff local alchemy = you.skill("Alchemy") local poison_dmg, poison_chance = calc_staff_info(alchemy, evo) output = output .. string.format("[Alchemy] D: 0-%.1f, P: %.1f%% \n", poison_dmg, poison_chance) -- Death staff local necro = you.skill("Necromancy") local death_dmg, death_chance = calc_staff_info(necro, evo) output = output .. string.format("[Death] D: 0-%.1f, P: %.1f%% \n", death_dmg, death_chance) -- Conjuration staff (1.25x 공식) local conj = you.skill("Conjurations") local conj_dmg, conj_chance = calc_staff_info(conj, evo, 1.25) output = output .. string.format("[Conj] D: 0-%.1f, P: %.1f%% (Irresistible)", conj_dmg, conj_chance) crawl.formatted_mpr(output) end crawl.setopt("macros += M \\{F2} ===staff_info_display") } ## @ 누르면 GDR 출력 ## { function with_gdr() local armour_class = you.ac() local gdr = math.floor(16 * math.sqrt(math.sqrt(math.max(0, armour_class)))) crawl.formatted_mpr(string.format("GDR: %d%%", gdr)) crawl.sendkeys('@') end crawl.setopt("macros += M @ ===with_gdr") } ## display damage, healing, exhausted (sepcially serpent's lash) ## { ------- hp, mp, exhaust local last_hp = you.hp() local last_mp = you.mp() local last_turn = you.turns() function get_damage_color(damage, max_hp) local damage_percent = (damage / max_hp) * 100 if damage_percent >= 25 then -- 1/4 이상 데미지 return "lightmagenta" -- 매우 심각 elseif damage_percent >= 15 then -- 1/6.67 데미지 return "lightred" -- 매우 위험 elseif damage_percent >= 10 then -- 1/10 데미지 return "red" -- 위험 elseif damage_percent >= 5 then -- 1/20 데미지 return "yellow" -- 주의 elseif damage > 1 or damage_percent > 2 then -- 2% 초과 또는 2 이상의 모든 데미지 return "white" else return "lightgray" -- 1 데미지나 2% 이하만 회색으로 end end ------- ready function ready() local current_hp, max_hp = you.hp() local current_mp, max_mp = you.mp() -- 메시지 표시는 턴이 변경되었을 때만 if you.turns() ~= last_turn then -- HP 변화 체크 local hp_change = current_hp - last_hp if hp_change ~= 0 then local msg if hp_change < 0 then local damage = -hp_change local color = get_damage_color(damage, max_hp) msg = string.format("You took <%s>%d damage!", color, damage, color) else msg = string.format("You recovered %d HP!", hp_change) end crawl.formatted_mpr(msg) end -- MP 변화 체크 local mp_change = current_mp - last_mp if mp_change > 0 then local msg = string.format("You recovered %d MP!", mp_change) crawl.formatted_mpr(msg) end end -- 현재 상태 저장 last_hp = current_hp last_mp = current_mp last_turn = you.turns() end } #----------------------------------------- ########################### ### Spell/Ability slots ### ########################### ability_slot += Fly|flight:lF ability_slot += Stop Flying:L ability_slot += Breathe:t ability_slot += Invisibility:iv # Abilities prone to miskeys. ability_slot += Blink:IB ability_slot += Berserk:k ability_slot += Corrupt:C ability_slot += Enter the Abyss:E ability_slot += Purification:P ability_slot += Heal Other:O ability_slot += Heal Self:S ability_slot += Divine Vigour:D ability_slot += Dual:D # 4 letters from words of the spell name at (1) beginning, (2) end, # of words in the spell, (3) anywhere from the spell name, or (4) from the # names of the spell schools, in order of preference. spell_slot += Alistair's intoxication:aisn spell_slot += Animate Armour:aret spell_slot += Apportation:anpt spell_slot += Airstrike:ae spell_slot += Anguish:ahgi spell_slot += Animate dead:adet spell_slot += Arcjolt:atjc spell_slot += Blazeheart golem:bgtm spell_slot += Blink:BKLN spell_slot += Bombard:bdmb spell_slot += Borgnjor's revivification:BRSN spell_slot += Borgnjor's vile clutch:bvch spell_slot += Brom's barelling boulder:bmgr spell_slot += Call canine familiar:cflr spell_slot += Call imp:cilp spell_slot += Cause fear:cfre spell_slot += Chain lightning:clng spell_slot += Confusing touch:ctgh spell_slot += Curse of agony:caye spell_slot += Corpse rot:cret spell_slot += Dazzling Flash:dfgh spell_slot += Death channel:dtcl # Upper-case to prevent miskeys. spell_slot += Death's door:DROT spell_slot += Dimensional bullseye:dble spell_slot += Discord:DCSR spell_slot += Disjunction:iuoe spell_slot += Dispel undead:ndp spell_slot += Dispersal:iea spell_slot += Dragon's call:dcls spell_slot += Enfeeble:efbl spell_slot += Ensorcelled hibernation:ehnd spell_slot += Eringya's Noxious Bog:enb spell_slot += Fire storm:fsmt spell_slot += Fireball:flbr spell_slot += Flame wave:fwme spell_slot += Foxfire:fxro spell_slot += Freezing cloud:fcgd spell_slot += Freeze:fezr spell_slot += Frozen Ramparts:frnt spell_slot += Fugue of the fallen:fenl spell_slot += Fulminant prism:fpmt spell_slot += Gell's Gravitas:glvt spell_slot += Hailstorm:hmls spell_slot += Haunt:htna spell_slot += Ignition:ntg spell_slot += Inner flame:frn spell_slot += Irradiate:ierd spell_slot += Iskenderun's battlesphere:ibne spell_slot += Jinxbite:jxbe spell_slot += Leda's Liquefaction:lanq spell_slot += Lee's rapid deconstruction:ldr spell_slot += Lesser Beckoning:lbg spell_slot += Lehudib's crystal spear:lcsb spell_slot += Magic dart:mdtc spell_slot += Malign gateway:mgy spell_slot += Manifold Assault:madt spell_slot += Maxwell's Capacitive Coupling:mclp spell_slot += Martyr's Knell:mkrl spell_slot += Mephitic cloud:mcdp spell_slot += Mercury vapours:mvs spell_slot += Metabolic englaciation:mcn spell_slot += Monstrous menagerie:mst spell_slot += Necrotize:nzte spell_slot += Olgreb's toxic radiance:oia spell_slot += Orb of destruction:dbn spell_slot += Ozocubu's armour:oau spell_slot += Ozocubu's refrigeration:cbz spell_slot += Pain:pnai spell_slot += Passage of golubria:uoi spell_slot += Passwall:aeu spell_slot += Petrify:pyt spell_slot += Portal projectile:oei spell_slot += Sandblast:zst spell_slot += Scorch:shcr spell_slot += Sculpt simulacrum:stml spell_slot += Searing ray:sry spell_slot += Kinetic Grapnel:kg spell_slot += Construct Spike Launcher:cls spell_slot += Launch Clockwork Bee:bc spell_slot += Awaken Armour:rao spell_slot += Forge Blazeheart Golem:gh spell_slot += Forge Lightning Spire:ls spell_slot += Rending Blade:rb spell_slot += Alistair's Walking Alembic:wr spell_slot += Hoarfrost Cannonade:hc spell_slot += Nazja's Percussive Tempering:t spell_slot += Forge Monarch Bomb:mb spell_slot += Forge Phalanx Beetle:px spell_slot += Fortress Blast:frt spell_slot += Diamond Sawblades:dw spell_slot += Hellfire Mortar:mhf spell_slot += Splinterfrost Shell:sfr spell_slot += Platinum Paragon:p spell_slot += Vhi's Electric Charge:v # Upper-case to prevent miskeys. spell_slot += Shatter:STH spell_slot += Shock:zok spell_slot += Sigil of binding:sblg spell_slot += Silence:SLC spell_slot += Slow:swlh spell_slot += Spellspark servitor:spvt spell_slot += Static discharge:tdc spell_slot += Sticky flame:yfk spell_slot += Sting:zptg spell_slot += Stone arrow:wtn spell_slot += Summon cactus giant:cgst spell_slot += Summon forest:fsnt spell_slot += Summon horrible things:hts spell_slot += Summon hydra:hsy spell_slot += Summon ice beast:bct spell_slot += Summon lightning spire:lst spell_slot += Summon mana viper:vms spell_slot += Summon small mammal:zsm spell_slot += Swiftness:ieao spell_slot += Teleport other:tprh spell_slot += Tornado:TDN spell_slot += Tukima's Dance:dkc spell_slot += Vampiric draining:vnd spell_slot += Volatile Blastmotes:vbme spell_slot += Yara's violent unraveling:yvut # Default letters spell_slot += .*:XYZ ################## ### Item slots ### ################## ## Rings, in order of letter used. consumable_shortcut += Scroll of revelation : R ######################## ### Autoinscriptions ### ######################## show_god_gift = unident ai := autoinscribe ai += potions? of berserk rage:!q ai += scrolls? of silence:!r ai += of brand:!r ai += of faith:!P # Prevent melee with all staves; if we want to melee with one, it's safe to # require removing the annotation. #ai += magical staff:!a ai += (large rock|throwing net|curare|of dispersal):=f # Convenient shortcuts ai += curing:@q1 ai += potions? of heal wounds:@q2 ai += potions? of haste:@q3 ai += scrolls? of teleportation:@r2 ai += identify:@r1 ######### ## CNC ## ######### ## SOUND ## sound_on = true #sound_pack += https://osp.nemelex.cards/build/latest.zip:["init.txt", "zin.txt", "trog.txt", "xobeh.txt"] sound_pack += https://osp.nemelex.cards/build/latest.zip:["init.txt", "zin.txt", "xobeh.txt"] #sound_pack += https://sound-packs.nemelex.cards/Autofire/BindTheEarth/BindTheEarth.zip one_SDL_sound_channel = true sound_fade_time = 0.5 sound_volume = 0.3 #BGM# sound_pack += https://sound-packs.nemelex.cards/DCSS-UST/v1.0.1.zip bgm_volume = 0.3 ## 방을 이동해도 채팅을 지우지 않음 ## #$ lab_disable_chat_clear = true ## 사운드 자동 켜기 ## #$ lab_sound_on = true ## 우클릭시 채팅창에 아이템 공유 ## #lab_use_click_to_send_chat = true ################# ### Interface ### ################# always_show_gems = true always_show_zot = true default_manual_training = true autofight_stop = 50 autofight_caught = true autofight_wait = false more_gem_info = true equip_bar = false sort_menus = true:equipped,identified,basename,art,ego,glowing,qualname,charged,slot ability_menu = false ############################ ### Travel & Exploration ### ############################ travel_delay = -1 explore_delay = -1 rest_delay = -1 show_travel_trail = true #explore_stop += greedy_items explore_auto_rest = false ################## ### Autopickup ### ################## # Add staves, misc; note you can't use += with this option. autopickup = $?!+=/}|♦ ae := autopickup_exceptions ae +=