# ccsdt
##### Crawl Init file ###############################################
# For descriptions of all options, as well as some more in-depth information
# on setting them, consult the file
# options_guide.txt
# in your /docs directory. If you can't find it, the file is also available
# online at:
# https://github.com/crawl/crawl/blob/master/crawl-ref/docs/options_guide.txt
###### WebTiles setting #############################################
# Option for the WebTiles convenience. It can skip.
#tile_player_tile = tile:mons_maurice
#$ lab_maintain_session = true
tile_web_mouse_control = false
dump_on_save = true
dump_message_count = 100
tile_realtime_anim = true
view_delay = 500
travel_delay = -1
rest_delay = -1
explore_delay = -1
sound_on = true
sound_pack += https://osp.nemelex.cards/build/latest.zip:["xobeh.txt", "init.txt"]
one_SDL_sound_channel = true
sound_fade_time = 0.5
###### Crawling setting #############################################
# Option for the dungeon crawling.
default_manual_training = true
autofight_stop = 70
delay_safe_poison = 30:10
runrest_ignore_monster += butterfly:1
travel_avoid_terrain = shallow water | deep water
explore_auto_rest=false
cloud_status = true
always_show_zot = true
tile_show_threat_levels = tough nasty unusual
###### Message setting ##############################################
# Option for the check special or unless situation.
show_more = false
runrest_ignore_message += zot
runrest_ignore_message += grinding noise
runrest_ignore_message += You can no longer merge with and destroy a victim
runrest_ignore_message += You can no longer pass through a line of other dancers
runrest_ignore_message ^= You feel.*sick
runrest_ignore_message += withers and dies
runrest_ignore_message += The forest fire spreads
force_more_message += You can now merge with and destroy a victim
force_more_message += The catoblepas breathes
force_more_message += You feel yourself slow down
force_more_message += your limbs are stiffening
force_more_message += The floating eye.*(glare|focuse|fixate)
force_more_message += sentinel's mark forms upon you
force_more_message += You have finished your manual of
force_more_message += You now have enough gold to buy
force_more_message += snapping sound
force_more_message += time is quickly running out
force_more_message += life is in your own
force_more_message += Your transformation is almost over
force_more_message += You have a feeling this form
force_more_message += Your skin feels tender
force_more_message += You feel yourself come back to life
force_more_message += Your unholy channel is weakening
force_more_message += into view
force_more_message += watched by something
force_more_message += A gut-wrenching scream fills the air!
force_more_message += You hear words spoken in a strange and terrible language...
force_more_message += You hear diabolical laughter!
force_more_message += wielding a .* of distortion
flash_screen_message += wielding a .* of distortion
flash_screen_message += You are slowing down
flash_screen_message += The catoblepas breathes
flash_screen_message += your limbs are stiffening
flash_screen_message += The floating eye.*(glare|focuse|fixate)
flash_screen_message += time is quickly running out
flash_screen_message += life is in your own
flash_screen_message += A gut-wrenching scream fills the air!
flash_screen_message += You hear words spoken in a strange and terrible language...
flash_screen_message += You hear diabolical laughter!
flash_screen_message += Uskayaw will force your foes to share their pain.
flash_screen_message += watched by something
message_colour = yellow:you hear .*(shout|bark|howl|roar|shriek|bellow|bleat|trumpet|screech|buzz|moan|gurgling|croak|growl|hiss|squeal|low|rustle)
###### Item setting #################################################
autoinscribe += potion.*berserk rage:!q
autoinscribe += potion.*ambrosia:!q
autoinscribe += potion.*cancellation:!q
autoinscribe += scroll.*silence:!r
autoinscribe += scroll.*mapping:!r
autoinscribe += throwing net:!f
autoinscribe += curare:!f
###### Spell setting #################################################
# low-level attack spells: abc
spell_slot += freeze:abc
spell_slot += magic dart:abc
spell_slot += foxfire:abc
spell_slot += pain:abc
spell_slot += shock:abc
spell_slot += sandblast:abc
spell_slot += sting:abc
spell_slot += beastly appendage:abc
spell_slot += call imp:abc
spell_slot += confuse:abc
spell_slot += static discharge:abc
spell_slot += vampiric draining:abc
spell_slot += spider form:abc
# bolts: Bde
spell_slot += bolt:Bde
spell_slot += starburst:Bde
# staple spells for killing stuff: qwer
spell_slot += stone arrow:qwer
spell_slot += iskenderun's mystic blast:qwer
spell_slot += fireball:qwer
spell_slot += freezing cloud:qwer
spell_slot += ozocubu's refrigeration:qwer
spell_slot += conjure ball lightning:qwer
spell_slot += iskenderun's battlesphere:qwer
spell_slot += airstrike:qwer
spell_slot += fulminant prism:qwer
spell_slot += hail:qwer
spell_slot += olgreb's toxic radiance:qwer
spell_slot += agony:qwer
spell_slot += lee's rapid deconstruction:qwer
spell_slot += sticky flame:qwer
spell_slot += iron shot:qwer=
spell_slot += orb of destruction:qwer
spell_slot += lehudib's crystal spear:qwer
spell_slot += haunt:qwer
spell_slot += monstrous menagerie:qwer
spell_slot += hydra:qwer
spell_slot += irradiate:qwer
# big stuff: QWER
spell_slot += fire storm:QWER
spell_slot += chain lightning:QWER
spell_slot += shatter:QWER
spell_slot += polar:QWER
spell_slot += Infestation:QWER
spell_slot += dragon's call:QWER
spell_slot += summon horrible things:QWER
spell_slot += maxwell:QWER
# util spells
spell_slot += ensorcelled hibernation:e
spell_slot += lesser beckon:f
spell_slot += ozocubu's armour:o
spell_slot += swiftness:s
spell_slot += blink:v
spell_slot += dispel undead:x
spell_slot += sublimation of blood:z
spell_slot += apportation:A
spell_slot += blade hands:B
spell_slot += mephitic cloud:C
spell_slot += dazzling spray:C
spell_slot += shadow creature:C
spell_slot += dispersal:DE
spell_slot += dragon form:D
spell_slot += ice form:I
spell_slot += summon ice beast:I
spell_slot += disjunction:J
spell_slot += necromutation:L
spell_slot += borgnjor's revivification:P
spell_slot += statue form:S
spell_slot += death's door:Y
spell_slot += malign gateway:G
spell_slot += alistair's intoxication:M
spell_slot += passwall:X
spell_slot += confusing touch:C
spell_slot += dazzling flash:Z
spell_slot += Yara's Violent Unravelling:Y
spell_slot += Eringya:E
spell_slot += Leda:L
spell_slot += metabolic englaciation:E
###### Damage calc ##############################################
#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("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
>