BackslashEcho

Shareable init file

Jun 9th, 2020
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.92 KB | None | 0 0
  1. # TEAMCAPTAIN BackslashEcho
  2. # Crawl Init file
  3. #
  4. # On Unix systems (such as Mac OS X, Linux and the BSDs), you must copy
  5. # init.txt to ~/.crawlrc or ~/.crawl/init.txt as:
  6. # cp init.txt ~/.crawlrc
  7. #
  8. # Lines beginning with '#' are comments. The basic syntax is:
  9. #
  10. # field = value or field.subfield = value
  11. #
  12. # Only one specification is allowed per line.
  13. #
  14. # The terms are typically case-insensitive except in the fairly obvious
  15. # cases (the character's name and specifying files or directories when
  16. # on a system that has case-sensitive filenames).
  17. #
  18. # White space is stripped from the beginning and end of the line, as
  19. # well as immediately before and after the '='. If the option allows
  20. # multiple comma/semicolon-separated terms (such as
  21. # autopickup_exceptions), all whitespace around the separator is also
  22. # trimmed. All other whitespace is left intact.
  23. #
  24. # For descriptions concerning an option consult the file
  25. # options_guide.txt
  26. # in your /docs directory. Also note that the ordering of the options
  27. # is taken from that file; this is for presentational reasons only.
  28. #
  29. # Note that all boolean options (i.e. values of 'true' or 'false') have
  30. # their non-default value commented out. You can toggle these by just
  31. # uncommenting.
  32. # Options with several values, e.g. drop_mode = (multi | single),
  33. # usually have the first value as default.
  34. #
  35. # The options for monster glyphs and item colours don't matter for Tiles.
  36. # Similarily, tile options are ignored in console games.
  37.  
  38. ##### Ancient versions ##############################################
  39. # If you're used to the interface of ancient versions of Crawl, you may
  40. # get back parts of it by uncommenting the following options:
  41.  
  42. # include = 034_command_keys.txt
  43. # target_unshifted_dirs = true
  44. # clear_messages = true
  45. #
  46. # And to revert monster glyph and colouring changes:
  47. # include = 034_monster_glyphs.txt
  48. # include = 052_monster_glyphs.txt
  49. # include = 060_monster_glyphs.txt
  50. # include = 071_monster_glyphs.txt
  51. # include = 080_monster_glyphs.txt
  52. # include = 0.9_monster_glyphs.txt
  53.  
  54. ##### 1- Starting Screen ############################################
  55. #
  56. # name = Delilah
  57. # remember_name = false
  58. # weapon = (short sword | falchion | quarterstaff | hand axe | spear | mace
  59. # | trident | unarmed | random)
  60. # species = (Human |...| Vampire | random)
  61. # job = (Fighter |...| Wanderer | random)
  62. # random_pick = true
  63. # good_random = false
  64. # restart_after_game = true
  65. default_manual_training = true
  66.  
  67. ##### 2- File System ###############################################
  68. #
  69. # crawl_dir = <path>
  70. # morgue_dir = morgue
  71. # save_dir = saves
  72. # macro_dir = settings/
  73. # sound = <regex>:<path to sound file>
  74.  
  75. ##### 3- Interface #################################################
  76. #
  77. ##### 3-a Picking up and Dropping ###############
  78. #
  79. # Rods are \ here.
  80. autopickup = $?!:"/%\
  81.  
  82. # drop_filter += useless_item
  83.  
  84. # default_autopickup = false
  85. # autopickup_no_burden = false
  86. # pickup_thrown = false
  87. # chunks_autopickup = false
  88. # assign_item_slot = (forward | backward)
  89. #
  90. # drop_mode = (multi | single)
  91. # pickup_mode = (single | multi | auto:5)
  92. # drop_filter += skeleton, corpse, useless_item
  93. # default_friendly_pickup = (none | friend | player | all)
  94.  
  95. ##### 3-b Targetting ############################
  96. #
  97. # default_target = false
  98. # target_unshifted_dirs = true
  99. # darken_beyond_range = false
  100.  
  101. ##### 3-c Passive Sightings #####################
  102. #
  103. # detected_monster_colour = lightred
  104. # detected_item_colour = green
  105. # remembered_monster_colour = darkgrey
  106. # clean_map = true
  107.  
  108. ##### 3-d Branding ##############################
  109. #
  110. # friend_brand = hi:green
  111. # neutral_brand = hi:lightgrey
  112. # stab_brand = hi:blue
  113. # may_stab_brand = hi:yellow
  114. # heap_brand = reverse
  115. # feature_item_brand = reverse
  116. # trap_item_brand = reverse
  117.  
  118. ##### 3-e Level Map Functions ###################
  119. #
  120. # level_map_cursor_step = 7
  121. # level_map_title = false
  122. # show_waypoints = false
  123.  
  124. ##### 3-f Viewport Options ###################
  125. #
  126. # view_max_width = 33
  127. # view_max_height = 21
  128. # view_lock_x = false
  129. # view_lock_y = false
  130. # view_lock = false
  131. # center_on_scroll = true
  132. # symmetric_scroll = false
  133. # scroll_margin_x = 2
  134. # scroll_margin_y = 2
  135. # scroll_margin = 2
  136.  
  137. ##### 3-g Travel and Exploration #################
  138. #
  139. # travel_delay = 20
  140. # explore_delay = -1
  141. # travel_avoid_terrain = shallow water
  142. #
  143. # explore_greedy = false
  144. # explore_stop = items,stairs,shops,altars,portals,branches
  145. # explore_stop += greedy_pickup_smart,greedy_visited_item_stack
  146. # sacrifice_before_explore = true
  147. # explore_improved = true
  148. # explore_wall_bias = 0
  149. # travel_key_stop = false
  150. # auto_sacrifice = true
  151. #
  152. # explore_stop_pickup_ignore += curare
  153. # auto_exclude += oklob,statue,curse skull,roxanne,hyperactive,lightning spire
  154. # auto_exclude += mimic
  155.  
  156. # tc_reachable = blue
  157. # tc_dangerous = cyan
  158. # tc_disconnected = darkgrey
  159. # tc_excluded = lightmagenta
  160. # tc_exclude_circle = red
  161.  
  162. # Interrupting run and rest compound commands:
  163. runrest_ignore_poison = 20:30
  164. # runrest_ignore_monster ^= butterfly:1
  165. # runrest_ignore_monster ^= swamp worm:3
  166. # runrest_stop_message ^= You hear a.* slurping noise
  167. # runrest_ignore_message ^= Jiyva's power touches on your attributes
  168. runrest_ignore_message = _Some of the chunks of flesh in your inventory have rotted away.
  169. runrest_ignore_message = _All of the chunks of flesh in your inventory have rotted away.
  170. runrest_stop_message = Your transformation is almost over.
  171. runrest_ignore_message ^= You feel.*sick
  172. delay_safe_poison = 20:50
  173.  
  174. # A good number of runrest_messages is defined by default; you may want to
  175. # clear them or override some.
  176.  
  177. # trapwalk_safe_hp = dart:20,needle:15,arrow:35,bolt:45,spear:40,blade:95
  178.  
  179. #rest_wait_both = true
  180.  
  181. ##### 3-h Command Enhancements ##################
  182. #
  183. # auto_list = false
  184. # auto_switch = true
  185. # easy_open = false
  186. # easy_unequip = false
  187. # equip_unequip = true
  188. # easy_confirm = (none | safe | all)
  189. # allow_self_target = (yes | no | prompt)
  190. confirm_butcher = no
  191. auto_butcher = hungry
  192. prefer_safe_chunks = true
  193. easy_eat_chunks = true
  194. easy_eat_gourmand = true
  195. easy_eat_contaminated = true
  196. auto_eat_chunks = true
  197. # prompt_for_swap = false
  198. # easy_quit_item_prompts = false
  199. # easy_exit_menu = true
  200. # sort_menus += pickup: true : art, ego, basename, qualname, curse, qty
  201. # sort_menus += inv: true : equipped, freshness, charged
  202.  
  203. # autofight_stop = 30
  204.  
  205. ##### 3-i Messages and Display Enhancements #####
  206. #
  207. # hp_warning = 30
  208. # mp_warning = 0
  209. # hp_colour = 50:yellow, 25:red
  210. # mp_colour = 50:yellow, 25:red
  211. # stat_colour = 1:lightred, 3:red
  212.  
  213. # status_caption_colour = yellow
  214. # mlist_min_height = 4
  215. # msg_min_height = 7
  216. # msg_max_height = 10
  217. msg_webtiles_height = 12
  218. # mlist_allow_alternate_layout = true
  219. # messages_at_top = true
  220. # mlist_targetting = true
  221. # show_gold_turns = false
  222. show_game_turns = true
  223. # show_newturn_mark = false
  224. # clear_messages = true
  225. # small_more = true
  226. # show_more = false
  227. # show_inventory_weights = true
  228. # item_stack_summary_minimum = 5
  229. auto_drop_chunks = rotten
  230. msg_condense_repeats = true
  231. # msg_condense_short = false
  232. skill_focus = true
  233. # show_travel_trail = true
  234.  
  235. ##### 3-j Colours (messages and menus) ##########
  236. #
  237. # Food is colour coded by default as follows:
  238. #
  239. # yellow = preferred food ($preferred)
  240. # darkgrey = cannot be eaten at all ($inedible)
  241. # lightred = causes rot ($rot-inducing)
  242. # magenta = dangerous to use, mutagenic ($dangerous, $mutagenic)
  243. # red = considered "evil" by your deity ($evil)
  244. # lightgreen = poisonous ($poisonous)
  245. # brown = contaminated, may cause nausea ($contaminated)
  246. #
  247. # You can change colours by using something like
  248. # $contaminated := magenta
  249.  
  250. # You can redefine inventory items like this:
  251. # menu_colour ^= inventory:magenta:shillelagh
  252. # or ones in pick-up dialogs:
  253. # menu_colour ^= pickup:green:god gift
  254.  
  255. # Colouring of messages
  256. # Messages are colour coded as follows:
  257. #
  258. # lightred = really important messages ($danger)
  259. # yellow = significant messages ($warning)
  260. # lightred = item damaged/destroyed ($item_dmg [same as $danger])
  261. # darkgrey = boring, message clutter ($boring)
  262. #
  263.  
  264. # Notes also use, quite misnamed, menu_colour:
  265. # menu_colour ^= notes:white:Reached XP level
  266.  
  267. # These lines will suppress extra feedback messages from travel/shift-running.
  268. #
  269. # message_colour ^= mute:warning:comes into view
  270. # message_colour ^= mute:You start (searching|resting)
  271. # message_colour ^= mute:Done searching
  272. # message_colour ^= mute:(HP|Magic) restored
  273. # message_colour ^= mute:warning:Not with.*(in view|monsters around)
  274. message_colour ^= mute:chunks
  275.  
  276. # You can also enforce a --more-- prompt for messages
  277.  
  278. ## Avoid wasting turns with aborted actions:
  279. # force_more_message += There are no visible monsters within range
  280. # force_more_message += This wand has no charges
  281. force_more_message += A sentinel's mark forms
  282.  
  283. more += teleport trap
  284. more += Training target
  285. more += grants you a
  286. # more += Your scales start
  287. more += Careful!
  288. more += Found a gateway leading out of the Abyss
  289. more += Found .* abyssal rune of Zot
  290. more += You are starting to lose your buoyancy
  291. more += You start to feel a little slower
  292. # more += Your transformation is almost over
  293. more += You have a feeling this form
  294. more += You feel yourself come back to life
  295. more += You fall through a shaft
  296. more += The alarm trap emits a blaring wail
  297. more += time is quickly running out
  298. more += life is in your own hands
  299. more += dispelling energy hits you
  300. more += You convulse
  301. more += god:(sends|finds|silent|anger)
  302. more += divine experience
  303. more += You have finished your manual
  304. more += You are (blasted|electrocuted)!
  305. more += Your surroundings flicker
  306. more += The writing blurs in front of your eyes
  307. more += Space warps.* around you
  308. more += Space bends around you
  309. more += The blast of calcifying dust hits you
  310. more += You feel less protected from missiles
  311. more += you are ready to make a new
  312. more += offers you knowledge of
  313.  
  314. ##### 3-k Firing Commands #######################
  315. #
  316. # fire_items_start = a
  317. # fire_order = launcher, return
  318. # fire_order += javelin / dart / stone / rock / spear / net / handaxe / dagger / club
  319. # fire_order += inscribed
  320.  
  321. ##### 3-l Channels ##############################
  322. #
  323. # channel.multiturn = mute
  324.  
  325. ##### 3-m Inscriptions ##########################
  326. #
  327. # autoinscribe += bad_item.*potion:!q
  328. # autoinscribe += potion.*mutation:!q
  329. # autoinscribe_cursed = false
  330. # autoinscribe += fruit:!e
  331.  
  332. ##### 3-n Macro related Options #################
  333. #
  334. # flush.failure = false
  335. # flush.command = true
  336. # flush.message = true
  337.  
  338. ##### 3-o Tile related Options ##################
  339. #
  340. # tile_show_items = !?/%=([)x}:|\
  341.  
  342. # tile_skip_title = true
  343. # tile_menu_icons = false
  344.  
  345. ### The following lines define the colours of various objects within the
  346. ### tiles minimap. See options_guide.txt for more details.
  347.  
  348. # tile_player_col = white
  349. # tile_monster_col = red
  350. # tile_neutral_col = red
  351. # tile_peaceful_col = lightred
  352. # tile_friendly_col = lightred
  353. # tile_plant_col = darkgreen
  354. # tile_item_col = green
  355. # tile_unseen_col = black
  356. # tile_floor_col = lightgrey
  357. # tile_wall_col = darkgrey
  358. # tile_mapped_wall_col = blue
  359. # tile_door_col = brown
  360. # tile_downstairs_col = magenta
  361. # tile_upstairs_col = blue
  362. # tile_feature_col = cyan
  363. # tile_trap_col = yellow
  364. # tile_water_col = grey
  365. # tile_lava_col = grey
  366. # tile_excluded_col = darkcyan
  367. # tile_excl_centre = darkblue
  368. # tile_window_col = yellow
  369.  
  370. # If Crawl's response rate is too slow, try increasing the update rate.
  371. # tile_update_rate = 1000
  372.  
  373. # If Crawl is lagging when running or resting, try increasing this number.
  374. # tile_runrest_rate = 100
  375.  
  376. # tile_key_repeat_delay = 200
  377. # tile_tooltip_ms = 500
  378.  
  379. # tile_tag_pref = enemy
  380.  
  381. ### Note: setting window, map or font sizes to '0' implies auto-sizing.
  382.  
  383. # tile_full_screen = true
  384. # tile_window_width = 1024
  385. # tile_window_height = 768
  386. # tile_use_small_layout = true
  387. # tile_map_pixels = 3
  388. # tile_cell_pixels = 32
  389. # tile_filter_scaling = true
  390. # tile_force_overlay = true
  391. # tile_layout_priority = minimap, inventory, gold_turn, command, spell
  392. # tile_layout_priority += ability, monster
  393.  
  394. # tile_font_crt_file = VeraMono.ttf
  395. # tile_font_crt_size = 15
  396. # tile_font_stat_file = VeraMono.ttf
  397. # tile_font_stat_size = 16
  398. # tile_font_msg_file = VeraMono.ttf
  399. # tile_font_msg_size = 14
  400. # tile_font_tip_file = VeraMono.ttf
  401. # tile_font_tip_size = 15
  402. # tile_font_lbl_file = Vera.ttf
  403. # tile_font_lbl_size = 14
  404. # tile_font_ft_light = false
  405.  
  406. # tile_show_minihealthbar = false
  407. # tile_show_minimagicbar = false
  408.  
  409.  
  410. ##### 4- Dump File #################################################
  411. #
  412. ##### 4-a Saving ################################
  413. #
  414. dump_on_save = true
  415.  
  416. ##### 4-b Items and Kill List ###################
  417. #
  418. # kill_map = friend:you, other:you
  419. # dump_kill_places = (single | all | none)
  420. # dump_kill_breakdowns = true
  421. # dump_item_origins = all,artifacts,ego_arm,ego_weap,jewellery,runes
  422. # dump_item_origin_price = -1
  423. # dump_message_count = 20
  424. # dump_order = header, hiscore, stats, misc, notes, inventory,
  425. # dump_order += turns_by_place, skills, spells, overview, mutations,
  426. # dump_order += messages, screenshot, monlist, kills_by_place, kills
  427. # dump_order += action_counts
  428. # dump_book_spells = false
  429.  
  430. ##### 4-c Notes #################################
  431. #
  432. # user_note_prefix=@@@
  433. # note_hp_percent = 5
  434. # note_skill_levels = 1,5,10,15,27
  435. # note_all_skill_levels = true
  436. # note_skill_max = false
  437. # note_xom_effects = false
  438. # note_chat_messages = false
  439. # note_items += rod of, acquirement, preservation, running, of Zot
  440. # note_monsters += orb of fire, ancient lich, Sigmund
  441.  
  442. ##### 5- Miscellaneous #############################################
  443. #
  444. ##### 5-a All OS ################################
  445. #
  446. # mouse_input = true
  447. # wiz_mode = no
  448. # char_set = ascii
  449. # use_fake_player_cursor = false
  450. #
  451. # Translation to use (in 0.11, only badly incomplete descriptions; Polish
  452. # has god messages and a few misc, Greek has sheep).
  453. # language = pl|fr|zh|ko|fi|ru|el|da|li|pt|de|lv|cs|hu
  454. #
  455. # Joke translations (complete!).
  456. # language = dwarven|jagerkin|kraut|runes|wide
  457. #
  458. # colour.lightgray = black
  459. # colour.lightcyan = cyan
  460. # colour.yellow = brown
  461. #
  462. # show_player_species = true
  463.  
  464. # See options_guide.txt for the options
  465. # cset, feature, mon_glyph, item_glyph
  466.  
  467. ## Highlight the edge of unexplored terrain.
  468. # feature = explore horizon {',,green}
  469.  
  470. ##### 5-b Windows console #######################
  471. #
  472. # dos_use_background_intensity = true
  473. # background = black
  474.  
  475. ##### 5-c Unix console ##########################
  476. #
  477. # use_fake_cursor = false
  478.  
  479. ##### 5-d Alternative keybinding files ##########
  480. #
  481. # Alternative vi bindings for Dvorak users.
  482. # include = dvorak_command_keys.txt
  483. #
  484. # Override the vi movement keys with a non-command.
  485. # include = no_vi_command_keys.txt
  486.  
  487. ##### Lua Sorcery #################################
  488. {
  489. local need_skills_opened = true
  490. function OpenSkills()
  491. if you.turns() == 0 and need_skills_opened then
  492. need_skills_opened = false
  493. crawl.sendkeys("m")
  494. end
  495. end
  496.  
  497. <
  498. local previous_hp = 0
  499. local previous_mp = 0
  500. local previous_form = ""
  501. local was_berserk_last_turn = false
  502.  
  503. function AnnounceDamage()
  504. local current_hp, max_hp = you.hp()
  505. local current_mp, max_mp = you.mp()
  506. --Things that increase hp/mp temporarily really mess with this
  507. local current_form = you.transform()
  508. local you_are_berserk = you.berserk()
  509. local max_hp_increased = false
  510. local max_hp_decreased = false
  511.  
  512. if (current_form ~= previous_form) then
  513. if (previous_form:find("dragon") or
  514. previous_form:find("statue") or
  515. previous_form:find("tree") or
  516. previous_form:find("ice")) then
  517. max_hp_decreased = true
  518. elseif (current_form:find("dragon") or
  519. current_form:find("statue") or
  520. current_form:find("tree") or
  521. current_form:find("ice")) then
  522. max_hp_increased = true
  523. end
  524. end
  525. if (was_berserk_last_turn and not you_are_berserk) then
  526. max_hp_decreased = true
  527. elseif (you_are_berserk and not was_berserk_last_turn) then
  528. max_hp_increased = true
  529. end
  530.  
  531. --crawl.mpr(string.format("previous_form is: %s", previous_form))
  532. --crawl.mpr(string.format("current_form is: %s", current_form))
  533. --crawl.mpr(string.format("max_hp_increased is: %s", max_hp_increased and "True" or "False"))
  534. --crawl.mpr(string.format("max_hp_decreased is: %s", max_hp_decreased and "True" or "False"))
  535.  
  536. --crawl.mpr(string:format("you_are_berserk is: %s", you_are_berserk and "True" or "False"))
  537. --crawl.mpr(string:format("was_berserk_last_turn is: %s", was_berserk_last_turn and "True" or "False"))
  538.  
  539.  
  540. --Skips message on initializing game
  541. if previous_hp > 0 then
  542. local hp_difference = previous_hp - current_hp
  543. local mp_difference = previous_mp - current_mp
  544.  
  545. if max_hp_increased or max_hp_decreased then
  546. if max_hp_increased then
  547. crawl.mpr("<green>You now have " .. current_hp .. "/" .. max_hp .. " hp.</green>")
  548. else
  549. crawl.mpr("<yellow>You now have " .. current_hp .. "/" .. max_hp .. " hp.</yellow>")
  550. end
  551. else
  552. --On losing health
  553. if (current_hp < previous_hp) then
  554. if current_hp <= (max_hp * 0.30) then
  555. crawl.mpr("<red>You take " .. hp_difference .. " damage,</red><lightred> and have " .. current_hp .. "/" .. max_hp .. " hp.</lightred>")
  556. elseif current_hp <= (max_hp * 0.50) then
  557. crawl.mpr("<red>You take " .. hp_difference .. " damage, and have " .. current_hp .. "/" .. max_hp .. " hp.</red>")
  558. elseif current_hp <= (max_hp * 0.70) then
  559. crawl.mpr("<red>You take " .. hp_difference .. " damage,</red><yellow> and have " .. current_hp .. "/" .. max_hp .. " hp.</yellow>")
  560. elseif current_hp <= (max_hp * 0.90) then
  561. crawl.mpr("<red>You take " .. hp_difference .. " damage,</red><lightgrey> and have " .. current_hp .. "/" .. max_hp .. " hp.</lightgrey>")
  562. else
  563. crawl.mpr("<red>You take " .. hp_difference .. " damage,</red><green> and have " .. current_hp .. "/" .. max_hp .. " hp.</green>")
  564. end
  565. if hp_difference > (max_hp * 0.20) then
  566. crawl.mpr("<lightred>MASSIVE DAMAGE!!</lightred>")
  567. end
  568. end
  569.  
  570. --On gaining more than 1 health
  571. if (current_hp > previous_hp) then
  572. --Removes the negative sign
  573. local health_inturn = (0 - hp_difference)
  574. if (health_inturn > 1) and not (current_hp == max_hp) then
  575. if current_hp <= (max_hp * 0.30) then
  576. crawl.mpr("<green>You regained " .. health_inturn .. " hp,</green><lightred> and now have " .. current_hp .. "/" .. max_hp .. " hp.</lightred>")
  577. elseif current_hp <= (max_hp * 0.50) then
  578. crawl.mpr("<green>You regained " .. health_inturn .. " hp,</green><red> and now have " .. current_hp .. "/" .. max_hp .. " hp.</red>")
  579. elseif current_hp <= (max_hp * 0.70) then
  580. crawl.mpr("<green>You regained " .. health_inturn .. " hp,</green><yellow> and now have " .. current_hp .. "/" .. max_hp .. " hp.</yellow>")
  581. elseif current_hp <= (max_hp * 0.90) then
  582. crawl.mpr("<green>You regained " .. health_inturn .. " hp,</green><lightgrey> and now have " .. current_hp .. "/" .. max_hp .. " hp.</lightgrey>")
  583. else
  584. crawl.mpr("<green>You regained " .. health_inturn .. " hp, and now have " .. current_hp .. "/" .. max_hp .. " hp.</green>")
  585. end
  586. end
  587. if (current_hp == max_hp) then
  588. crawl.mpr("<green>Health restored: " .. current_hp .. "</green>")
  589. end
  590. end
  591.  
  592. --On gaining more than 1 magic
  593. if (current_mp > previous_mp) then
  594. --Removes the negative sign
  595. local mp_inturn = (0 - mp_difference)
  596. if (mp_inturn > 1) and not (current_mp == max_mp) then
  597. if current_mp < (max_mp * 0.25) then
  598. crawl.mpr("<lightcyan>You regained " .. mp_inturn .. " mp,</lightcyan><red> and now have " .. current_mp .. "/" .. max_mp .. " mp.</red>")
  599. elseif current_mp < (max_mp * 0.50) then
  600. crawl.mpr("<lightcyan>You regained " .. mp_inturn .. " mp,</lightcyan><yellow> and now have " .. current_mp .. "/" .. max_mp .. " mp.</yellow>")
  601. else
  602. crawl.mpr("<lightcyan>You regained " .. mp_inturn .. " mp,</lightcyan><green> and now have " .. current_mp .. "/" .. max_mp .. " mp.</green>")
  603. end
  604. end
  605. if (current_mp == max_mp) then
  606. crawl.mpr("<lightcyan>MP restored: " .. current_mp .. "</lightcyan>")
  607. end
  608. end
  609.  
  610. --On losing magic
  611. if current_mp < previous_mp then
  612. if current_mp <= (max_mp / 5) then
  613. crawl.mpr("<lightcyan>You now have </lightcyan><red>" .. current_mp .. "/" ..max_mp .." mp.</red>")
  614. elseif current_mp <= (max_mp / 2) then
  615. crawl.mpr("<lightcyan>You now have </lightcyan><yellow>" .. current_mp .. "/" ..max_mp .." mp.</yellow>")
  616. else
  617. crawl.mpr("<lightcyan>You now have </lightcyan><green>" .. current_mp .. "/" ..max_mp .." mp.</green>")
  618. end
  619. end
  620. end
  621. end
  622.  
  623. --Set previous hp/mp and form at end of turn
  624. previous_hp = current_hp
  625. previous_mp = current_mp
  626. previous_form = current_form
  627. was_berserk_last_turn = you_are_berserk
  628. end
  629. >
  630.  
  631. -- More?
  632.  
  633. -- Auto pickup function which picks up items for free aux slots
  634. function autopickup(it, name)
  635. if it.is_useless then
  636. return
  637. end
  638. if it.artefact then
  639. return true
  640. end
  641. local class = it.class(true)
  642. if class == "armour" then
  643. local good_slots = { cloak="Cloak", helmet="Helmet",
  644. gloves="Gloves", boots="Boots" }
  645. st, _ = it.subtype()
  646. if good_slots[st] ~= nil and items.equipped_at(good_slots[st]) == nil then
  647. return true
  648. end
  649. end
  650. return
  651. end
  652.  
  653. function ready()
  654. AnnounceDamage()
  655. OpenSkills()
  656. -- add_autopickup_func(autopickup)
  657. end
  658.  
  659. }
Add Comment
Please, Sign In to add comment