BackslashEcho

My RCfile

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