# CRAWL.NEMELEX.CARDS



# 방어구 자동 줍기
{
add_autopickup_func(function(it, name)

  local class = it.class(true)
  local armour_slots = {cloak="Cloak", helmet="Helmet", gloves="Gloves", boots="Boots", body="Armour", shield="Shield"}

  if (class == "armour") then
  if it.is_useless then return false end

    sub_type = it.subtype()
    equipped_item = items.equipped_at(armour_slots[sub_type])

    if (sub_type == "cloak") or (sub_type == "helmet") or (sub_type == "gloves") or (sub_type == "boots") then
      if not equipped_item then
        return true
      else
        return it.artefact or it.branded or it.ego
      end
    end

    if (sub_type == "body") then
    return false
    end

    if (sub_type == "shield") then
      if equipped_item then
          return it.artefact or it.branded or it.ego
      end
    end
  end
end)
}








# 언데드 홀리무기 경고
: if you.race() == "Poltergeist" or you.race() == "Mummy" or you.race() == "Revenant" or you.race() == "Demonspawn" then
unusual_monster_items += holy
: end


#디스펠언데드 피격, 신성공격 피격
force_more_message += You convulse


#카오스무기 장비한 몬스터, 춤추는 카오스무기 출현
force_more_message += It is wielding.*of chaos
force_more_message += She is wielding.*of chaos
force_more_message += He is wielding.*of chaos
force_more_message += wielding.* chaos.*(come.*into view|open.*door)
flash_screen_message += It is wielding.*of chaos
flash_screen_message += She is wielding.*of chaos
flash_screen_message += He is wielding.*of chaos
flash_screen_message += wielding.* chaos.*(come.*into view|open.*door)
flash_screen_message += chaos.*(come.*into view|open.*door)


#신성공격에 취약한 종족일 때 신성무기 장비한 몬스터, 춤추는 신성무기 출현
: if you.race() == "Poltergeist" or you.race() == "Mummy" or you.race() == "Revenant" or you.race() == "Demonspawn" then
force_more_message += It is wielding.*of holy wrath
force_more_message += She is wielding.*of holy wrath
force_more_message += He is wielding.*of holy wrath
force_more_message += wielding.* holy wrath.*(come.*into view|open.*door)
force_more_message += holy wrath.*(come.*into view|open.*door)
flash_screen_message += It is wielding.*of holy wrath
flash_screen_message += She is wielding.*of holy wrath
flash_screen_message += He is wielding.*of holy wrath
flash_screen_message += wielding.* holy wrath.*(come.*into view|open.*door)
flash_screen_message += holy wrath.*(come.*into view|open.*door)
: end

#킬러클라운 파이 피격
force_more_message += pie hits you

#포스랜스 피격
force_more_message += You are knocked back

#윈드 블라스트 피격
force_more_message += You are blown backwards

# engulf 상태에서 주문 시전 시도
force_more_message += You cannot cast spells while unable to breathe!

# 침묵 상태에서 주문 시전 시도
force_more_message += You cannot cast spells when silenced!



#메세지가 너무 많이 떴을 때 강제로 more 띄우지 않게 함
show_more = false


default_manual_training = true






#유니크 몬스터 알림
force_more_message += .*(Agnes|Aizul|Amaemon|Antaeus|Arachne|Asmodeus|Azrael|Bai suzhen|Blork the orc|Boris|Cerebov|Crazy Yiuf|Dispater|Dissolution|Donald|Dowan|Duvessa|Edmund|the Enchantress|Ereshkigal|Erica|Erolcha|Eustachio|Fannar|Frances|Frederick|Gastronok|Geryon|Gloorx Vloq|Grinder|Grum|Grunn|Harold|Ignacio|Ijyb|Ilsuiw|Jessica|Jorgrun|Jory|Joseph|Josephina|Josephine|Khufu|Kirke|the Lernaean hydra|Lodul|Lom Lobon|Louise|Maggie|Mara|Margery|Maurice|Menkaure|Mlioglotl|Mennas|Mnoleg|Murray|Nergalle|Natasha|Nessos|Nikola|Pan|Parghit|Pikel|Polyphemus|Prince Ribbit|Psyche|Purgy|Robin|Roxanne|the royal jelly|Rupert|Saint Roka|the Serpent of Hell|Sigmund|Snorg|Sojobo|Sonja|Terence|Tiamat|Urug|Vashnia|Vv|Xtahua|Zenata|nobody).*comes? into view

#위험한 몬스터 알림
force_more_message += ((giant|floating|shining) eye).*into view
force_more_message += (moth of wrath|ghost moth|torpor snail).*into view
force_more_message += (guardian serpent|draconian shifter|convoker).*into view
force_more_message += (flayed ghost|royal mummy|mummy priest|fiend|tzitzimitl|wyrmhole).*into view
force_more_message += (tormentor|curse toe|curse skull|alderking).*into view
force_more_message += (hellion|hell sentinel|deep elf sorcerer).*into view
force_more_message += (deep elf high priest|scorcher).*into view
force_more_message += (ancient lich|dread lich|orb of fire|executioner|juggernaut|shrike|undying armoury).*into view
force_more_message += (wretched star|lurking horror).*into view
force_more_message += (neqoxec|cacodemon|doom hound|nekomata).*into view
force_more_message += 27-headed.* comes? into view
force_more_message += (radroach|entropy weaver|meliai).*into view
force_more_message += (salamander tyrant|ironbound frostheart).*into view
force_more_message += (walking crystal tome|walking divine tome|walking earthen tome|walking frostbound tome).*into view

#위험한 몬스터로 변신 시
force_more_message += changes into.*((giant|floating|shining) eye|eye of draining)

force_more_message += changes into.*(moth of wrath|ghost moth|torpor snail)

force_more_message += changes into.*(guardian serpent|draconian shifter|convoker)

force_more_message += changes into.*(flayed ghost|royal mummy|mummy priest|fiend|tzitzimitl)

force_more_message += changes into.*(tormentor|curse toe|curse skull)

force_more_message += changes into.*(hellion|hell sentinel|deep elf sorcerer)

force_more_message += changes into.*(deep elf high priest|scorcher)

force_more_message += changes into.*(ancient lich|orb of fire|executioner|juggernaut|shrike)

force_more_message += changes into.*(wretched star|lurking horror)

force_more_message += changes into.*(neqoxec|cacodemon|doom hound)

force_more_message += changes into.*(radroach|entropy weaver|meliai)

force_more_message += changes into.*(salamander tyrant|ironbound frostheart)

force_more_message += changes into.*(walking crystal tome|walking divine tome|walking earthen tome|walking frostbound tome)





#왜곡무기 장비한 몬스터, 춤추는 왜곡무기 출현 시 more를 띄워주고 화면이 번쩍이는 효과를 줌

force_more_message += It is wielding.*of distortion

force_more_message += She is wielding.*of distortion

force_more_message += He is wielding.*of distortion

force_more_message += wielding.* distortion.* comes? into view

flash_screen_message += It is wielding.*of distortion

flash_screen_message += She is wielding.*of distortion

flash_screen_message += He is wielding.*of distortion

flash_screen_message += wielding.* distortion.* comes? into view

flash_screen_message += distortion.* comes? into view






#폰트를 Consolas로 바꿈
tile_font_crt_family = Consolas

tile_font_stat_family = Consolas

tile_font_msg_family = Consolas

tile_font_lbl_family = Consolas




#아이템 더미로 이동

explore_stop -= greedy_visited_item_stack




#그물, 다투라 던지기 전 확인
autoinscribe += throwing net:!f

autoinscribe += datura:!f




autopickup_exceptions ^= >useless_item
autopickup_exceptions ^= >atropa

#골드, 스크롤, 포션, 책, 장신구, 완드, 스태프, 잡동사니를 자동으로 주움

autopickup = $?!:"/|}



#그물, 쿠라레 자동으로 주움

autopickup_exceptions += <throwing net

autopickup_exceptions += <dart


#보라색 템 자동으로 주움
autopickup_exceptions ^= <(immolation|lignification|mutation|attraction|vulnerability|torment|scroll of poison|scrolls of poison)

autopickup_exceptions ^= <tin of tremorstones




# 악! 이건 정말 아프다!
force_more_message += Ouch! That really hurt!




# 자동줍기 해제 시 다음 장 (투명몹 대비)
force_more_message += Deactivating autopickup

# 안 보이는 무언가에게 마나가 빨리면 다음 장 
force_more_message += watched by something




## 자동공격이 멈추는 체력 비율 ##
autofight_stop = 65




## 사운드 자동 켜기 ##
sound_on = true
sound_pack += https://osp.nemelex.cards/build/latest.zip:["init.txt"]
one_SDL_sound_channel = true
sound_fade_time = 0.5
sound_volume = 0.1


{
function ready()
  DDoorWarning()
  DDoorCounter()
  Slowed_Check()
  Blurry_Check()
  XLCheckOptions()
  check_contam()
  crawlstart()
 end
}



#하얀 컨탬에서 이레디 시전 시 y/n뜸
{
 function check_contam()
    if you.contaminated() > 1 then
      crawl.setopt("confirm_action += Irradiate")
    else
      crawl.setopt("confirm_action -= Irradiate")
    end
  end
}




#이미 확인 된 스태프는 줍지 않도록 함
#이미 확인 된 목걸이는 줍지 않도록 함
#종족이 문어가 아닐 경우 확인 된 반지는 줍지 않도록 함
#몬스터 드랍, 획득의 경우 줍지 않는 문제가 있어서 일정 XL 초과인 경우만 적용되도록 함
#아티팩트 스태프는 무기로 분류되어 줍지 않음
{
local check1 = true
local check2 = true
local check3 = true
function XLCheckOptions()
  if you.xl() > 18 and check1 then
    crawl.setopt("autopickup_exceptions += >staff of (fire|cold|air|earth|conj|pois|death)")
    check1 = false
  end
  if you.xl() > 18 and check2 then
    crawl.setopt("autopickup_exceptions += >amulet of (faith|regen|reflect|the acrobat|guardian|magic)")
    check2 = false
  end
  if you.xl() > 18 and you.race() ~= "Octopode" and check3 then
    crawl.setopt("autopickup_exceptions += >ring of (slaying|protect)")
    crawl.setopt("autopickup_exceptions += >ring of (will)")
    crawl.setopt("autopickup_exceptions += >ring of (evasion|int|str|dex)")
    crawl.setopt("autopickup_exceptions += >ring of (magical)")
    crawl.setopt("autopickup_exceptions += >ring of (protection from fire|protection from cold)")
    crawl.setopt("autopickup_exceptions += >ring of (fire|ice)")
    crawl.setopt("autopickup_exceptions += >ring of (positive)")
    crawl.setopt("autopickup_exceptions += >ring of (stealth|wiz)")
    crawl.setopt("autopickup_exceptions += >ring of (flight|poison|resist corr|see)")
    check3 = false
  end
end
}




# 시작 시 경험치 창 띄움

{
local need_skills_opened = true
    function crawlstart()
        if you.turns() == 0 and need_skills_opened then
            need_skills_opened = false
            crawl.sendkeys("m")
        end
    end
}





# DDoor 관련 펑션

{
local door = true
function DDoorWarning()
  if you.status("in death's door (expiring)") and door then
  crawl.yesno("DDoor is almost expired! (Y or N to confirm.)", false, false, true, false)
  crawl.mpr("<white>It will be ended in 5-10 turns......      </white>")
  door = false
  end
  if not you.status("in death's door (expiring)") then
  door = true
  end
end
}

{
local counter = you.turns()
function DDoorCounter()
 if you.status("in death's door (expiring)") then
 crawl.mpr("<white>Count "..you.turns() - counter.."......</white>")
 end
 if not you.status("in death's door (expiring)") then
 counter = you.turns()+1
 end
end
}


{
local speed = true
function Slowed_Check()
 if speed and string.find(crawl.messages(8), "yourself slow down") and you.status("in death's door (expiring)") then
 crawl.yesno("Warning: You are slowed while DDoor running out! (Y or N to confirm.)", false, false, true, true)
 speed = false
 end
 if not speed and not you.status("in death's door (expiring)") then
 speed = true
 end
end
}


{
local scro = true
function Blurry_Check()
 if scro and you.mutation("blurry vision") > 0 and you.status("in death's door (expiring)") and you.mp() < 8 then
 crawl.yesno("Warning: Your reading rate is slowed while standing at death's door! (Y or N to confirm.)", false, false, true, true)
 scro = false
 end
 if not scro and not you.status("in death's door (expiring)") then
 scro = true
 end
end
}




hp_warning = 50
force_more_message += LOW HITPOINT WARNING

force_more_message += You have finished your manual


#몬스터가 소리지르는 메세지, 문 여닫았는데 소리날 때 메세지 색 변경
message_colour ^= lightgreen:.*(shouts|hear a shout|hisses angrily|hear an angry hiss|shouts in stereo|hear two shouts|barks|hear a bark|howls|hear a howl|roars deafeningly|hear a deafening roar|roars|hear a roar|growls angrily|hear an angry growl|deep croak|croaks|hear a croak|buzzes angrily|hear an angry buzzing noise|screeches|hear a screech|bellows|hear a bellow|gurgles horribly|hear a horrible gurgling sound|squeals angrily|hear an angry squeal|bleats|hear a bleat|trumpets|hear a trumpeting|skitter|hear a skittering sound|skitter faintly|hear a faint skittering sound)
message_colour ^= lightgreen:it creaks loudly




#데몬스폰 몬스터러스 메세지 색 변경
message_colour ^= lightcyan:You feel monstrous as your demonic heritage exerts itself.



# 젬카운트 설정
# always_show_gems = true
# more_gem_info = true



travel_avoid_terrain = deep water


confirm_action += (Blink|Silence|Swiftness|Maxwell's Capacitive Coupling|Death's Door)


force_more_message += Your magical effects are unravelling


# 키패드용 세이프 무브 설정

bindkey = [NP1] CMD_SAFE_MOVE_DOWN_LEFT
bindkey = [NP2] CMD_SAFE_MOVE_DOWN
bindkey = [NP3] CMD_SAFE_MOVE_DOWN_RIGHT
bindkey = [NP4] CMD_SAFE_MOVE_LEFT
bindkey = [NP6] CMD_SAFE_MOVE_RIGHT
bindkey = [NP7] CMD_SAFE_MOVE_UP_LEFT
bindkey = [NP8] CMD_SAFE_MOVE_UP
bindkey = [NP9] CMD_SAFE_MOVE_UP_RIGHT

bindkey = [-243] CMD_MOVE_UP
bindkey = [-242] CMD_MOVE_DOWN 
bindkey = [-241] CMD_MOVE_LEFT
bindkey = [-240] CMD_MOVE_RIGHT
bindkey = [-238] CMD_MOVE_UP_LEFT
bindkey = [-237] CMD_MOVE_DOWN_LEFT
bindkey = [-235] CMD_MOVE_UP_RIGHT
bindkey = [-234] CMD_MOVE_DOWN_RIGHT


tile_player_tile = playermons


force_more_message += The mighty Pandemonium lord .* resides here
force_more_message += You feel yourself slow down

flash_screen_message += time is quickly running out
force_more_message += time is quickly running out

# autoinscribe += scroll:!r
# autoinscribe += potion:!q


cloud_status = true





#스펠 단축키 설정

spell_slot += Sublimation of Blood:+C
spell_slot += Apportation:+N
spell_slot += passwall:+a

#아이템 단축키 자동 지정(기존 아이템과 겹칠 시 변경)
# abcWXYZ 빈칸으로 남겨 놓을것

item_slot ^= scroll of identify:+d
item_slot ^= scroll of fear:+f
item_slot ^= scroll of fog:+g
item_slot ^= scroll of blinking:+l
item_slot ^= scroll of revelation:+m
item_slot ^= scroll of torment:+n
item_slot ^= scroll of immolation:+o
item_slot ^= scroll of poison:+p
item_slot ^= scroll of silence:+s
item_slot ^= scroll of teleportation:+t
item_slot ^= scroll of summoning:+u
item_slot ^= scroll of vulnerability:+v
item_slot ^= scroll of butterflies:+u

item_slot ^= potion of haste:+e
item_slot ^= potion of heal wounds:+h
item_slot ^= potion of invisibility:+i
item_slot ^= potion of brilliance:+j
item_slot ^= potion of might:+k
item_slot ^= potion of curing:+q
item_slot ^= potion of resistance:+r
item_slot ^= potion of ambrosia:+x
item_slot ^= potion of enlightenment:+y
item_slot ^= potion of magic:+z
item_slot ^= potion of cancellation:+C
item_slot ^= potion of lignification:+N
item_slot ^= potion of berserk rage:+S
item_slot ^= potion of attraction:+U

item_slot ^= wand of acid:+A
item_slot ^= wand of light:+A
item_slot ^= wand of quicksilver:+A
item_slot ^= wand of mindburst:+M
item_slot ^= wand of charming:+H
item_slot ^= wand of paralysis:+H
item_slot ^= wand of digging:+D
item_slot ^= wand of iceblast:+I
item_slot ^= wand of roots:+I
item_slot ^= wand of warping:+I
item_slot ^= wand of polymorph:+O
item_slot ^= wand of flame:+Q

item_slot ^= Box of beasts:+B
item_slot ^= phial of floods:+F
item_slot ^= Gell's Gravitambourine:+G
item_slot ^= lightning rod:+L
item_slot ^= Phantom mirror:+P
item_slot ^= tin of tremorstones:+T
item_slot ^= Condenser vane:+V




#탐색시 벽 쪽으로 향하는 정도
explore_wall_bias = 0




#디스펠언데드 피격, 신성공격 피격
force_more_message += You convulse

#왜곡무기 피격
force_more_message += Space warps .* around you
force_more_message += hits you.*distortion
force_more_message += Its appearance distorts for a moment
force_more_message += you fell strangely unstable

#카오스무기 피격
force_more_message += hits you.*chaos




#미니서브던전 알림
force_more_message += ticking.*clock
force_more_message += dying ticks
force_more_message += distant snort
force_more_message += coins.*counted
force_more_message += tolling.*bell
force_more_message += roar of battle
force_more_message += creaking.*portcullis
force_more_message += portcullis is probably
force_more_message += wave of frost
force_more_message += crackling.*melting
force_more_message += hiss.*sand
force_more_message += sound.*rushing water
force_more_message += rusting.*drain
force_more_message += drain falling apart
force_more_message += heat about you
force_more_message += falling.*rocks
force_more_message += rumble.*avalanche of rocks
force_more_message += crackle.*arcane power
force_more_message += crackle.*magical portal
force_more_message += distant wind
force_more_message += whistling.*wind
force_more_message += rapidly growing quiet
force_more_message += beating





rest_delay=-1
travel_delay =-1
show_travel_trail=true



## 방을 이동해도 채팅을 지우지 않음 ##
$ lab_disable_chat_clear = true