##### 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
#
# Crawl uses the first file of the following list as its option file:
# * init.txt in the -rcdir directory (if specified)
# * .crawlrc in the -rcdir directory (if specified)
# * init.txt (in the Crawl directory)
# * ~/.crawl/init.txt (Unix only)
# * ~/.crawlrc (Unix only)
# * ~/init.txt (Unix only)
# * settings/init.txt (in the Crawl directory)
##### Some basic explanation of option syntax #######################
# Lines beginning with '#' are comments. The basic syntax is:
#
# field = value or field.subfield = value
#
# Only one specification is allowed per line.
#
# The terms are typically case-insensitive except in the fairly obvious
# cases (the character's name and specifying files or directories when
# on a system that has case-sensitive filenames).
#
# White space is stripped from the beginning and end of the line, as
# well as immediately before and after the '='. If the option allows
# multiple comma/semicolon-separated terms (such as
# autopickup_exceptions), all whitespace around the separator is also
# trimmed. All other whitespace is left intact.
#
# There are three broad types of Crawl options: true/false values (booleans),
# arbitrary values, and lists of values. The first two types use only the
# simple =, with later options - which includes your options that are different
# from the defaults - overriding earlier ones. List options allow using +=, ^=,
# -=, and = to append, prepend, remove, and reset, respectively. Usually you will
# want to use += to add to a list option. Lastly, there is := which you can use
# to create an alias, like so:
# ae := autopickup_exceptions
# From there on, 'ae' will be treated as if it you typed autopickup_exceptions,
# so you can save time typing it.
#
##### Other files ###################################################
# You can include other files from your options file using the 'include'
# option. Crawl will treat it as if you copied the whole text of that file
# into your options file in that spot. You can uncomment some of the following
# lines by removing the beginning '#' to include some of the other files in
# this folder.
# Some useful, more advanced options, implemented in LUA.
# include = advanced_optioneering.txt
# Alternative vi bindings for Dvorak users.
# include = dvorak_command_keys.txt
# Alternative vi bindings for Colemak users.
# include = colemak_command_keys.txt
# Alternative vi bindings for Neo users.
# include = neo_command_keys.txt
# Override the vi movement keys with a non-command.
# include = no_vi_command_keys.txt
# Turn the shift-vi keys into safe move, instead of run.
# include = safe_move_shift.txt
##### Ancient versions ##############################################
# If you're used to the interface of ancient versions of Crawl, you may
# get back parts of it by uncommenting the following options:
# include = 034_command_keys.txt
# And to revert monster glyph and colouring changes:
# 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
# Turn the shift-vi keys into safe move, instead of run.
include = safe_move_shift.txt
show_more = false
mlist_min_height = 10
travel_delay = -1
explore_delay = -1
autofight_stop = 40
autofight_throw = true
default_manual_training = true
auto_butcher = true
automagic_slot = a
mouse_input = false
tile_web_mouse_control = true
# rc file dump length
dump_message_count = 150
# Skill menu at game start
{
local need_skills_opened = true
function ready()
if you.turns() == 0 and need_skills_opened then
need_skills_opened = false
crawl.sendkeys("m")
end
AnnounceDamage()
end
}
## Show exact damage taken each turn
# include = HDamage.rc
runrest_stop_message += Your transformation is almost over.
# auto inscribes
ai := autoinscribe
ai += curing:@q1
ai += potions? of heal wounds:@q2
ai += identify:@r1
ai += remove curse:@r2
# force "more" when these happen:
# finished manual - normally doesn't prompt for a key press
force_more_message += You have finished your manual of
# distortion weapon hit you yielding a damage effect (other effects are more noticeable)
force_more_message += Space bends around you
force_more_message += You feel less protected from missiles
force_more_message += You feel strangely unstable
# ghost moths/antimagic
more += watched by something
## more += You feel your power leaking
# torment/holy wrath
more += You convulse
# dispel breath
more += dispelling energy hits you
# early unseen horrors
more += It hits you!
## more += Something hits you
more += Something. *misses you.
more += You have reached level
more += You fall through a shaft
# abyss convenience prompts
more += Found an abyssal rune
more += Found a gateway leading out of the Abyss
# necromutation
more += You feel yourself coming back to life
# summon greater demon
more += is no longer charmed
# Announcements of timed portal vaults:
more += interdimensional caravan
more += distant snort
more += roar of battle
more += wave of frost
more += hiss of flowing sand
more += sound of rushing water
more += oppressive heat about you
more += crackle of arcane power
more += Found a gateway leading out of the Abyss
more += Found .* abyssal rune of Zot
more += You feel a terrible weight on your shoulders
more += .* resides here
# Interrupts
more += You don't.* that spell
more += You miscast (Controlled Blink|Blink|Death's|Borg|Necromutation)
more += You can't (read|drink|do) that
more += That item cannot be evoked
more += This wand has no charges
more += You are held in a net
more += You have disarmed
more += You don't have any such object
more += do not work when you're silenced
more += You can't unwield
more += enough magic points
more += You feel your control is inadequate
more += Something interferes with your magic
more += You enter a teleport trap
# Bad things
more += Your surroundings flicker
more += You cannot teleport right now
more += The writing blurs in front of your eyes
more += You fall through a shaft
more += A huge blade swings out and slices into you!
more += (blundered into a|invokes the power of) Zot
more += Ouch! That really hurt!
more += dispelling energy hits you
more += You convulse
more += You are (blasted|electrocuted)
more += You are.*confused
more += flesh start
more += (starving)
more += wrath finds you
more += god:(sends|finds|silent|anger)
more += You feel a surge of divine spite
more += lose consciousness
more += You are too injured to fight blindly
more += calcifying dust hits
more += Space warps horribly around you
more += hits you.*distortion
more += Space bends around you\.
## more += watched by something
more += A sentinel's mark forms upon you
more += Your limbs have turned to stone
more += You are slowing down
## more += .*LOW HITPOINT WARNING.*
more += warns you.*of distortion
more += lethally poison
more += space bends around your
## more += wielding.*of (distortion|chaos)
force_more_message += (He|She|It) is.*carrying a wand of
# Hell effects
# Re-enabled
more += "You will not leave this place."
more += "Die, mortal!"
more += "We do not forgive those who trespass against us!"
more += "Trespassers are not welcome here!"
more += "You do not belong in this place!"
more += "Leave now, before it is too late!"
more += "We have you now!"
more += You smell brimstone.
more += Brimstone rains from above.
more += You feel lost and a long, long way from home...
more += You shiver with fear.
more += You feel a terrible foreboding...
more += Something frightening happens.
more += You sense an ancient evil watching you...
more += You suddenly feel all small and vulnerable.
more += You sense a hostile presence.
more += A gut-wrenching scream fills the air!
more += You hear words spoken in a strange and terrible language...
more += You hear diabolical laughter!
# Expiring effects
more += You feel yourself slow down
more += less insulated
more += You are starting to lose your buoyancy
more += You lose control over your flight
more += Your hearing returns
################## more += Your transformation is almost over
more += You have a feeling this form
more += You feel yourself come back to life
more += uncertain
more += time is quickly running out
more += life is in your own hands
more += is no longer charmed
more += shroud falls apart
more += You start to feel a little slower
more += You flicker
more += You feel less protected from missiles
# Others
more += You have finished your manual of
more += Your scales start
more += You feel monstrous
more += zaps a wand
more += is unaffected
more += Jiyva alters your body
# Uniques and baddies
# Any uniques and any pan lords
more += (?-i:[A-Z]).* comes? into view
more += .*player ghost.* comes? into view
more += .*Ancient Lich.*comes? into view.
more += .*Orb of Fire.*comes? into view.
more += .*Fiend.*comes? into view.
more += .*Hellion.*comes? into view.
more += .*Tormentor.*comes? into view.
more += .*Hell Sentinel.*comes? into view.
more += .*Executioner.*comes? into view.
more += .*Neqoxec.*comes? into view.
more += .*Cacodemon.*comes? into view.
more += .*Shining Eye.*comes? into view.
more += .*Greater Mummy.*comes? into view.
more += .*Curse Toe.*comes? into view.
more += .*Curse Skull.*comes? into view.
more += .*('s|s') ghost.*comes? into view.
more += .*shrike.*comes? into view.
more += .*wretched star.*comes? into view
more += .*lurking horror.*comes? into view
more += .*Hell Juggernaut.*comes? into view.
#Paralysis enemies
more += .*Giant Eyeball.*comes? into view.
more += .*Lich.*comes? into view.
more += .*Ogre Mage.*comes? into view.
more += .*a Wizard.*comes? into view.
more += .*orc sorcerer.*comes? into view.
more += .*sphinx.*comes? into view.
more += .*Vampire knight.*comes? into view.
more += .*Great orb of eyes.*comes? into view.
# Dancing weapon
more += Your.*falls from the air.
###############
# 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
>