summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2020-05-27 16:44:24 -0700
committerManoj Srivastava <srivasta@debian.org>2020-05-27 16:45:26 -0700
commit2c93afb0089a37de798da8d23824a84846ab7d7c (patch)
treea53be684627948ed96d64e2be7aac1bea83507b8
parentd6b913d3ca2e84b75f3675fd6e9f5246c100cf27 (diff)
parente9d08c617ee73f0636e1f1a1d40582f193c37e81 (diff)
Merge branch 'upstream'
-rw-r--r--CMakeLists.txt23
-rw-r--r--README.md6
-rw-r--r--lib/CMakeLists.txt1
-rw-r--r--lib/dngn/dun1.142
-rw-r--r--lib/dngn/dun10.03
-rw-r--r--lib/dngn/dun11.202
-rw-r--r--lib/dngn/dun11.222
-rw-r--r--lib/dngn/dun17.155
-rw-r--r--lib/dngn/dun18.02
-rw-r--r--lib/dngn/dun18.12
-rw-r--r--lib/dngn/dun19.115
-rw-r--r--lib/dngn/dun2.312
-rw-r--r--lib/dngn/dun22.102
-rw-r--r--lib/dngn/dun22.55
-rw-r--r--lib/dngn/dun24.03
-rw-r--r--lib/dngn/dun29.156
-rw-r--r--lib/dngn/dun3.185
-rw-r--r--lib/dngn/dun3.285
-rw-r--r--lib/dngn/dun3.35
-rw-r--r--lib/dngn/dun5.03
-rw-r--r--lib/dngn/dun5.1414
-rw-r--r--lib/dngn/dun6.03
-rw-r--r--lib/edit/a_info.txt39
-rw-r--r--lib/edit/ba_info.txt13
-rw-r--r--lib/edit/d_info.txt80
-rw-r--r--lib/edit/k_info.txt185
-rw-r--r--lib/edit/p_info.txt3
-rw-r--r--lib/edit/ra_info.txt9
-rw-r--r--lib/edit/s_orc.map11
-rw-r--r--lib/edit/set_info.txt1
-rw-r--r--lib/edit/st_info.txt33
-rw-r--r--lib/edit/t_bree.txt9
-rw-r--r--lib/edit/t_d_bree.txt9
-rw-r--r--lib/file/book-10.txt250
-rw-r--r--lib/file/book-11.txt250
-rw-r--r--lib/file/book-12.txt250
-rw-r--r--lib/file/book-13.txt250
-rw-r--r--lib/file/book-14.txt250
-rw-r--r--lib/file/book-15.txt250
-rw-r--r--lib/file/book-16.txt250
-rw-r--r--lib/file/book-17.txt250
-rw-r--r--lib/file/book-18.txt250
-rw-r--r--lib/file/book-19.txt250
-rw-r--r--lib/file/book-9.txt240
-rw-r--r--lib/help/debug.txt15
-rw-r--r--lib/help/g_eru.txt8
-rw-r--r--lib/help/m_divin.txt13
-rw-r--r--lib/help/macrofaq.txt14
-rw-r--r--lib/help/wishing.txt7
-rw-r--r--lib/mods/theme/CMakeLists.txt1
-rw-r--r--lib/mods/theme/dngn/dun1.142
-rw-r--r--lib/mods/theme/dngn/dun1.222
-rw-r--r--lib/mods/theme/dngn/dun10.03
-rw-r--r--lib/mods/theme/dngn/dun11.202
-rw-r--r--lib/mods/theme/dngn/dun11.222
-rw-r--r--lib/mods/theme/dngn/dun17.155
-rw-r--r--lib/mods/theme/dngn/dun18.02
-rw-r--r--lib/mods/theme/dngn/dun18.12
-rw-r--r--lib/mods/theme/dngn/dun19.115
-rw-r--r--lib/mods/theme/dngn/dun2.312
-rw-r--r--lib/mods/theme/dngn/dun20.15
-rw-r--r--lib/mods/theme/dngn/dun22.102
-rw-r--r--lib/mods/theme/dngn/dun22.205
-rw-r--r--lib/mods/theme/dngn/dun22.55
-rw-r--r--lib/mods/theme/dngn/dun24.03
-rw-r--r--lib/mods/theme/dngn/dun29.156
-rw-r--r--lib/mods/theme/dngn/dun3.185
-rw-r--r--lib/mods/theme/dngn/dun3.285
-rw-r--r--lib/mods/theme/dngn/dun3.35
-rw-r--r--lib/mods/theme/dngn/dun36.55
-rw-r--r--lib/mods/theme/dngn/dun39.09
-rw-r--r--lib/mods/theme/dngn/dun4.92
-rw-r--r--lib/mods/theme/dngn/dun40.09
-rw-r--r--lib/mods/theme/dngn/dun5.03
-rw-r--r--lib/mods/theme/dngn/dun5.1414
-rw-r--r--lib/mods/theme/dngn/dun6.03
-rw-r--r--lib/mods/theme/edit/a_info.txt33
-rw-r--r--lib/mods/theme/edit/ba_info.txt18
-rw-r--r--lib/mods/theme/edit/d_info.txt126
-rw-r--r--lib/mods/theme/edit/k_info.txt182
-rw-r--r--lib/mods/theme/edit/p_info.txt3
-rw-r--r--lib/mods/theme/edit/ra_info.txt17
-rw-r--r--lib/mods/theme/edit/set_info.txt6
-rw-r--r--lib/mods/theme/edit/st_info.txt68
-rw-r--r--lib/mods/theme/edit/t_bree.txt9
-rw-r--r--lib/mods/theme/edit/t_d_bree.txt9
-rw-r--r--lib/mods/theme/file/book-10.txt75
-rw-r--r--lib/mods/theme/file/book-11.txt51
-rw-r--r--lib/mods/theme/file/book-12.txt68
-rw-r--r--lib/mods/theme/file/book-13.txt54
-rw-r--r--lib/mods/theme/file/book-14.txt55
-rw-r--r--lib/mods/theme/file/book-15.txt68
-rw-r--r--lib/mods/theme/file/book-16.txt43
-rw-r--r--lib/mods/theme/file/book-17.txt47
-rw-r--r--lib/mods/theme/file/book-18.txt55
-rw-r--r--lib/mods/theme/file/book-19.txt47
-rw-r--r--lib/mods/theme/file/book-9.txt99
-rw-r--r--lib/mods/theme/help/debug.txt15
-rw-r--r--lib/mods/theme/help/g_eru.txt8
-rw-r--r--lib/mods/theme/help/m_divin.txt13
-rw-r--r--lib/mods/theme/help/macrofaq.txt14
-rw-r--r--lib/mods/theme/help/wishing.txt7
-rw-r--r--lib/mods/theme/pref/xtra-xxx.prf137
-rw-r--r--lib/pref/pref.prf4
-rw-r--r--lib/pref/xtra-xxx.prf137
-rw-r--r--src/CMakeLists.txt41
-rw-r--r--src/ability_type.hpp2
-rw-r--r--src/activation.hpp2
-rw-r--r--src/alloc.hpp2
-rw-r--r--src/alloc_entry.hpp2
-rw-r--r--src/angband.h94
-rw-r--r--src/artifact_type.hpp6
-rw-r--r--src/between_exit.hpp6
-rw-r--r--src/birth.cc363
-rw-r--r--src/birth.hpp8
-rw-r--r--src/birther.hpp27
-rw-r--r--src/bldg.cc239
-rw-r--r--src/bldg.hpp5
-rw-r--r--src/cave.cc861
-rw-r--r--src/cave.hpp14
-rw-r--r--src/cave_type.hpp5
-rw-r--r--src/cli_comm.hpp6
-rw-r--r--src/cmd1.cc573
-rw-r--r--src/cmd1.hpp14
-rw-r--r--src/cmd2.cc774
-rw-r--r--src/cmd2.hpp3
-rw-r--r--src/cmd3.cc199
-rw-r--r--src/cmd3.hpp6
-rw-r--r--src/cmd4.cc629
-rw-r--r--src/cmd4.hpp4
-rw-r--r--src/cmd5.cc155
-rw-r--r--src/cmd5.hpp10
-rw-r--r--src/cmd6.cc1334
-rw-r--r--src/cmd6.hpp4
-rw-r--r--src/cmd7.cc262
-rw-r--r--src/cmd7.hpp2
-rw-r--r--src/config.hpp (renamed from src/config.h)0
-rw-r--r--src/corrupt.cc108
-rw-r--r--src/corrupt.hpp8
-rw-r--r--src/defines.hpp (renamed from src/defines.h)196
-rw-r--r--src/device_allocation_fwd.hpp2
-rw-r--r--src/dice.cc20
-rw-r--r--src/dice_fwd.hpp5
-rw-r--r--src/dungeon.cc1465
-rw-r--r--src/dungeon.h12
-rw-r--r--src/dungeon.hpp5
-rw-r--r--src/dungeon_flag_list.hpp2
-rw-r--r--src/dungeon_info_type.hpp12
-rw-r--r--src/effect_type.hpp16
-rw-r--r--src/ego_item_type.hpp10
-rw-r--r--src/fate.hpp6
-rw-r--r--src/feature_type.hpp6
-rw-r--r--src/files.cc625
-rw-r--r--src/files.h15
-rw-r--r--src/files.hpp30
-rw-r--r--src/flag_set.hpp15
-rw-r--r--src/flags_group.hpp2
-rw-r--r--src/format_ext.cc24
-rw-r--r--src/format_ext.hpp33
-rw-r--r--src/frontend.cc1
-rw-r--r--src/frontend.hpp107
-rw-r--r--src/frontend_fwd.hpp3
-rw-r--r--src/game.cc756
-rw-r--r--src/game.hpp34
-rw-r--r--src/game_edit_data.cc18
-rw-r--r--src/game_edit_data.hpp11
-rw-r--r--src/gen_evol.cc40
-rw-r--r--src/gen_evol.hpp6
-rw-r--r--src/gen_maze.cc8
-rw-r--r--src/gen_maze.hpp4
-rw-r--r--src/generate.cc1026
-rw-r--r--src/generate.hpp12
-rw-r--r--src/gods.cc38
-rw-r--r--src/gods.hpp10
-rw-r--r--src/h-basic.h27
-rw-r--r--src/h-basic.hpp134
-rw-r--r--src/h-config.h84
-rw-r--r--src/h-define.h92
-rw-r--r--src/h-system.h90
-rw-r--r--src/h-type.h187
-rw-r--r--src/help.cc70
-rw-r--r--src/help.hpp4
-rw-r--r--src/help_info.hpp8
-rw-r--r--src/hiscore.cc7
-rw-r--r--src/hiscore.hpp2
-rw-r--r--src/hook_build_room1_in.hpp2
-rw-r--r--src/hook_calculate_hp_in.hpp2
-rw-r--r--src/hook_calculate_hp_out.hpp2
-rw-r--r--src/hook_chardump_in.hpp2
-rw-r--r--src/hook_chat_in.hpp2
-rw-r--r--src/hook_eat_out.hpp7
-rw-r--r--src/hook_enter_dungeon_in.hpp2
-rw-r--r--src/hook_identify_in.hpp2
-rw-r--r--src/hook_mon_speak_in.hpp4
-rw-r--r--src/hook_monster_ai_in.hpp2
-rw-r--r--src/hook_monster_ai_out.hpp2
-rw-r--r--src/hook_monster_death_in.hpp2
-rw-r--r--src/hook_new_monster_in.hpp2
-rw-r--r--src/hook_quest_fail_in.hpp2
-rw-r--r--src/hook_quest_finish_in.hpp2
-rw-r--r--src/hook_quest_gen_in.hpp9
-rw-r--r--src/hook_stair_out.hpp4
-rw-r--r--src/hook_wild_gen_in.hpp4
-rw-r--r--src/hooks.cc12
-rw-r--r--src/hooks.hpp4
-rw-r--r--src/identify_mode.hpp3
-rw-r--r--src/include/tome/enum_string_map.hpp8
-rw-r--r--src/include/tome/squelch/condition.hpp56
-rw-r--r--src/include/tome/squelch/object_status.hpp4
-rw-r--r--src/include/tome/squelch/rule.hpp7
-rw-r--r--src/include/tome/unique_handle.hpp88
-rw-r--r--src/init1.cc613
-rw-r--r--src/init1.hpp4
-rw-r--r--src/init2.cc115
-rw-r--r--src/init2.h13
-rw-r--r--src/init2.hpp5
-rw-r--r--src/inscription_info_type.hpp2
-rw-r--r--src/joke.cc8
-rw-r--r--src/joke.hpp2
-rw-r--r--src/key_queue.cc1
-rw-r--r--src/key_queue.hpp76
-rw-r--r--src/key_queue_fwd.hpp3
-rw-r--r--src/level_data.cc1
-rw-r--r--src/level_data.hpp56
-rw-r--r--src/levels.cc238
-rw-r--r--src/levels.hpp51
-rw-r--r--src/loadsave.cc533
-rw-r--r--src/loadsave.h15
-rw-r--r--src/loadsave.hpp11
-rw-r--r--src/lua_bind.cc10
-rw-r--r--src/lua_bind.hpp4
-rw-r--r--src/magic_power.hpp12
-rw-r--r--src/main-gcu.cc (renamed from src/main-gcu.c)473
-rw-r--r--src/main-gtk2.cc (renamed from src/main-gtk2.c)736
-rw-r--r--src/main-sdl.c2117
-rw-r--r--src/main-win.cc (renamed from src/main-win.c)384
-rw-r--r--src/main-x11.cc (renamed from src/main-x11.c)1349
-rw-r--r--src/main.cc76
-rw-r--r--src/main.hpp (renamed from src/main.h)8
-rw-r--r--src/martial_arts.hpp16
-rw-r--r--src/melee1.cc195
-rw-r--r--src/melee1.hpp6
-rw-r--r--src/melee2.cc2653
-rw-r--r--src/melee2.hpp6
-rw-r--r--src/message.hpp2
-rw-r--r--src/messages.cc2
-rw-r--r--src/messages.hpp4
-rw-r--r--src/mimic.cc63
-rw-r--r--src/mimic.hpp10
-rw-r--r--src/module_type.hpp14
-rw-r--r--src/modules.cc168
-rw-r--r--src/modules.hpp11
-rw-r--r--src/monster1.cc295
-rw-r--r--src/monster2.cc588
-rw-r--r--src/monster2.hpp50
-rw-r--r--src/monster3.cc174
-rw-r--r--src/monster3.hpp28
-rw-r--r--src/monster_blow.hpp2
-rw-r--r--src/monster_ego.hpp4
-rw-r--r--src/monster_power.hpp10
-rw-r--r--src/monster_race.hpp4
-rw-r--r--src/monster_type.hpp4
-rw-r--r--src/move_info_type.hpp4
-rw-r--r--src/music.hpp2
-rw-r--r--src/notes.cc51
-rw-r--r--src/obj_theme.hpp2
-rw-r--r--src/object1.cc1328
-rw-r--r--src/object1.hpp24
-rw-r--r--src/object2.cc1021
-rw-r--r--src/object2.hpp34
-rw-r--r--src/object_filter.hpp2
-rw-r--r--src/object_flag_list.hpp1
-rw-r--r--src/object_kind.hpp28
-rw-r--r--src/object_kind_fwd.hpp3
-rw-r--r--src/object_proto.hpp2
-rw-r--r--src/object_type.hpp10
-rw-r--r--src/option_type.hpp8
-rw-r--r--src/options.cc10
-rw-r--r--src/options.hpp132
-rw-r--r--src/owner_type.hpp9
-rw-r--r--src/player_class.hpp6
-rw-r--r--src/player_level_flag.hpp2
-rw-r--r--src/player_race.hpp4
-rw-r--r--src/player_race_ability_type.hpp2
-rw-r--r--src/player_race_mod.hpp12
-rw-r--r--src/player_shared.hpp2
-rw-r--r--src/player_spec.hpp2
-rw-r--r--src/player_type.hpp211
-rw-r--r--src/power_activation.hpp12
-rw-r--r--src/power_type.hpp34
-rw-r--r--src/powers.cc261
-rw-r--r--src/powers.hpp1
-rw-r--r--src/program_args.cc1
-rw-r--r--src/program_args.hpp32
-rw-r--r--src/q_betwen.cc43
-rw-r--r--src/q_betwen.hpp2
-rw-r--r--src/q_bounty.cc53
-rw-r--r--src/q_bounty.hpp6
-rw-r--r--src/q_dragons.cc21
-rw-r--r--src/q_dragons.hpp2
-rw-r--r--src/q_eol.cc26
-rw-r--r--src/q_eol.hpp2
-rw-r--r--src/q_evil.cc17
-rw-r--r--src/q_evil.hpp2
-rw-r--r--src/q_fireprof.cc59
-rw-r--r--src/q_fireprof.hpp4
-rw-r--r--src/q_god.cc45
-rw-r--r--src/q_god.hpp2
-rw-r--r--src/q_haunted.cc19
-rw-r--r--src/q_haunted.hpp2
-rw-r--r--src/q_hobbit.cc30
-rw-r--r--src/q_hobbit.hpp2
-rw-r--r--src/q_invas.cc29
-rw-r--r--src/q_invas.hpp2
-rw-r--r--src/q_library.cc40
-rw-r--r--src/q_library.hpp4
-rw-r--r--src/q_main.cc7
-rw-r--r--src/q_main.hpp2
-rw-r--r--src/q_narsil.cc19
-rw-r--r--src/q_narsil.hpp2
-rw-r--r--src/q_nazgul.cc21
-rw-r--r--src/q_nazgul.hpp2
-rw-r--r--src/q_nirna.cc11
-rw-r--r--src/q_nirna.hpp2
-rw-r--r--src/q_one.cc23
-rw-r--r--src/q_one.hpp2
-rw-r--r--src/q_poison.cc53
-rw-r--r--src/q_poison.hpp2
-rw-r--r--src/q_rand.cc68
-rw-r--r--src/q_rand.hpp4
-rw-r--r--src/q_shroom.cc52
-rw-r--r--src/q_shroom.hpp2
-rw-r--r--src/q_spider.cc14
-rw-r--r--src/q_spider.hpp2
-rw-r--r--src/q_thief.cc32
-rw-r--r--src/q_thief.hpp2
-rw-r--r--src/q_thrain.cc20
-rw-r--r--src/q_thrain.hpp2
-rw-r--r--src/q_troll.cc29
-rw-r--r--src/q_troll.hpp2
-rw-r--r--src/q_ultrae.hpp2
-rw-r--r--src/q_ultrag.cc42
-rw-r--r--src/q_ultrag.hpp2
-rw-r--r--src/q_wight.cc17
-rw-r--r--src/q_wight.hpp2
-rw-r--r--src/q_wolves.cc15
-rw-r--r--src/q_wolves.hpp2
-rw-r--r--src/quest_type.hpp4
-rw-r--r--src/randart.cc64
-rw-r--r--src/randart.hpp8
-rw-r--r--src/randart_part_type.hpp2
-rw-r--r--src/random_artifact.hpp2
-rw-r--r--src/random_quest.hpp2
-rw-r--r--src/random_spell.hpp2
-rw-r--r--src/range.hpp2
-rw-r--r--src/rule_type.hpp2
-rw-r--r--src/school_book.hpp2
-rw-r--r--src/school_type.hpp10
-rw-r--r--src/set_component.hpp4
-rw-r--r--src/skill_descriptor.hpp2
-rw-r--r--src/skill_modifier.hpp2
-rw-r--r--src/skill_modifiers.hpp2
-rw-r--r--src/skill_type.hpp2
-rw-r--r--src/skills.cc185
-rw-r--r--src/skills.hpp19
-rw-r--r--src/spell_type.cc66
-rw-r--r--src/spell_type.hpp42
-rw-r--r--src/spell_type_fwd.hpp3
-rw-r--r--src/spellbinder.hpp2
-rw-r--r--src/spells1.cc1040
-rw-r--r--src/spells1.hpp29
-rw-r--r--src/spells2.cc940
-rw-r--r--src/spells2.hpp142
-rw-r--r--src/spells3.cc1899
-rw-r--r--src/spells3.hpp221
-rw-r--r--src/spells4.cc29
-rw-r--r--src/spells4.hpp8
-rw-r--r--src/spells5.cc99
-rw-r--r--src/spells5.hpp6
-rw-r--r--src/spells6.cc39
-rw-r--r--src/squelch/automatizer.cc2
-rw-r--r--src/squelch/condition.cc263
-rw-r--r--src/squelch/condition_metadata.cc28
-rw-r--r--src/squelch/jsoncons_helpers.hpp27
-rw-r--r--src/squelch/object_status.cc40
-rw-r--r--src/squelch/rule.cc28
-rw-r--r--src/squelch/tree_printer.cc6
-rw-r--r--src/squeltch.cc50
-rw-r--r--src/squeltch.hpp3
-rw-r--r--src/store.cc510
-rw-r--r--src/store_action_type.hpp5
-rw-r--r--src/store_info_type.hpp2
-rw-r--r--src/store_item.hpp49
-rw-r--r--src/store_type.hpp2
-rw-r--r--src/tables.cc757
-rw-r--r--src/tables.h12
-rw-r--r--src/tables.hpp17
-rw-r--r--src/tactic_info_type.hpp4
-rw-r--r--src/timer_type.hpp2
-rw-r--r--src/town_type.hpp8
-rw-r--r--src/util.cc948
-rw-r--r--src/util.h19
-rw-r--r--src/util.hpp95
-rw-r--r--src/variable.cc114
-rw-r--r--src/variable.h31
-rw-r--r--src/variable.hpp98
-rw-r--r--src/vault_type.hpp2
-rw-r--r--src/wild.cc203
-rw-r--r--src/wilderness_map.hpp4
-rw-r--r--src/wilderness_type_info.hpp2
-rw-r--r--src/wizard2.cc271
-rw-r--r--src/wizard2.hpp4
-rw-r--r--src/xtra1.cc700
-rw-r--r--src/xtra1.hpp8
-rw-r--r--src/xtra2.cc788
-rw-r--r--src/xtra2.hpp131
-rw-r--r--src/z-form.cc (renamed from src/z-form.c)68
-rw-r--r--src/z-form.hpp (renamed from src/z-form.h)18
-rw-r--r--src/z-rand.cc8
-rw-r--r--src/z-rand.hpp27
-rw-r--r--src/z-term.cc (renamed from src/z-term.c)1163
-rw-r--r--src/z-term.h269
-rw-r--r--src/z-term.hpp108
-rw-r--r--src/z-util.cc (renamed from src/z-util.c)48
-rw-r--r--src/z-util.h41
-rw-r--r--src/z-util.hpp17
-rw-r--r--tests/arbitrary/boost_optional.cc1
-rw-r--r--tests/arbitrary/boost_optional.hpp60
l---------vendor/CppQuickCheck1
-rw-r--r--vendor/CppQuickCheck-2018-03-28/.travis.yml36
-rw-r--r--vendor/CppQuickCheck-2018-03-28/CMakeLists.txt32
-rw-r--r--vendor/CppQuickCheck-2018-03-28/COPYING23
-rw-r--r--vendor/CppQuickCheck-2018-03-28/INSTALL11
-rw-r--r--vendor/CppQuickCheck-2018-03-28/LICENSE21
-rw-r--r--vendor/CppQuickCheck-2018-03-28/README.md74
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/CMakeLists.txt33
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/BoostTupleSupport.cpp131
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestChooseGenerator.cpp54
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestReverse.cpp59
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestReverseArray.cpp69
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestSlowShrinking.cpp61
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestSort.cpp79
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestSortCompact.cpp95
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/TestWithCustomGenerator.cpp86
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/exampleElementsGen.cpp55
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/sampleOutput.cpp73
-rw-r--r--vendor/CppQuickCheck-2018-03-28/examples/src/sampleShrinkOutput.cpp82
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc.h9
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/Arbitrary.h446
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/CompactCheck.h178
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/Generator.h1355
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/PrettyPrint.h69
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/Property.h461
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/Test.h330
-rw-r--r--vendor/CppQuickCheck-2018-03-28/include/cppqc/cxx-prettyprint.h472
-rw-r--r--vendor/CppQuickCheck-2018-03-28/src/Arbitrary.cpp80
-rw-r--r--vendor/CppQuickCheck-2018-03-28/test/catch-main.cpp27
-rw-r--r--vendor/CppQuickCheck-2018-03-28/test/catch.hpp9427
-rw-r--r--vendor/CppQuickCheck-2018-03-28/test/compact-check-tests.cpp82
-rw-r--r--vendor/CppQuickCheck-2018-03-28/test/functional-tests.cpp110
-rw-r--r--vendor/CppQuickCheck-2018-03-28/test/shrink-explosion-protection.cpp173
l---------vendor/fmt2
-rw-r--r--vendor/fmt-3.0.1/fmt/format.cc940
-rw-r--r--vendor/fmt-3.0.1/fmt/time.h53
-rw-r--r--vendor/fmt-4.1.0/fmt/CMakeLists.txt (renamed from vendor/fmt-3.0.1/fmt/CMakeLists.txt)37
-rw-r--r--vendor/fmt-4.1.0/fmt/container.h82
-rw-r--r--vendor/fmt-4.1.0/fmt/format.cc495
-rw-r--r--vendor/fmt-4.1.0/fmt/format.h (renamed from vendor/fmt-3.0.1/fmt/format.h)776
-rw-r--r--vendor/fmt-4.1.0/fmt/ostream.cc (renamed from vendor/fmt-3.0.1/fmt/ostream.cc)14
-rw-r--r--vendor/fmt-4.1.0/fmt/ostream.h (renamed from vendor/fmt-3.0.1/fmt/ostream.h)63
-rw-r--r--vendor/fmt-4.1.0/fmt/posix.cc (renamed from vendor/fmt-3.0.1/fmt/posix.cc)5
-rw-r--r--vendor/fmt-4.1.0/fmt/posix.h (renamed from vendor/fmt-3.0.1/fmt/posix.h)65
-rw-r--r--vendor/fmt-4.1.0/fmt/printf.cc32
-rw-r--r--vendor/fmt-4.1.0/fmt/printf.h603
-rw-r--r--vendor/fmt-4.1.0/fmt/string.h148
-rw-r--r--vendor/fmt-4.1.0/fmt/time.h143
l---------vendor/jsoncons2
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/heap_only_string.hpp155
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/number_parsers.hpp266
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/number_printers.hpp374
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/obufferedstream.hpp264
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/type_traits_helper.hpp226
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/unicode_traits.hpp1463
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/detail/writer.hpp155
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json.hpp4959
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_decoder.hpp310
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_deserializer.hpp12
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_error_category.hpp (renamed from vendor/jsoncons-0.99.2/jsoncons/json_error_category.hpp)99
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_exception.hpp107
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_filter.hpp465
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_input_handler.hpp308
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_output_handler.hpp (renamed from vendor/jsoncons-0.99.2/jsoncons/json_output_handler.hpp)170
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_parser.hpp2830
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_reader.hpp408
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_serializer.hpp585
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_structures.hpp1864
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/json_type_traits.hpp966
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/jsoncons_config.hpp106
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/jsoncons_utilities.hpp954
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/parse_error_handler.hpp165
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/serialization_options.hpp279
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/serialization_traits.hpp315
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons/version.hpp50
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/binary/binary_utilities.hpp354
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/cbor/cbor.hpp2792
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/csv/csv_error_category.hpp (renamed from vendor/jsoncons-0.99.2/jsoncons_ext/csv/csv_error_category.hpp)37
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/csv/csv_parameters.hpp635
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/csv/csv_parser.hpp1260
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/csv/csv_reader.hpp235
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/csv/csv_serializer.hpp504
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpatch/jsonpatch.hpp530
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpatch/jsonpatch_error_category.hpp82
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpath/json_query.hpp1119
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpath/jsonpath_error_category.hpp (renamed from vendor/jsoncons-0.99.2/jsoncons_ext/jsonpath/jsonpath_error_category.hpp)50
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpath/jsonpath_filter.hpp1874
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpointer/jsonpointer.hpp810
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/jsonpointer/jsonpointer_error_category.hpp87
-rw-r--r--vendor/jsoncons-0.104.0/jsoncons_ext/msgpack/msgpack.hpp795
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json.hpp3574
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_deserializer.hpp267
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_filter.hpp324
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_input_handler.hpp282
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_parser.hpp1587
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_parser.hpp.orig2157
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_reader.hpp176
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_serializer.hpp435
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_structures.hpp860
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/json_type_traits.hpp594
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/jsoncons.hpp347
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/jsoncons_config.hpp123
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/jsoncons_io.hpp358
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/output_format.hpp330
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/ovectorstream.hpp227
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons/parse_error_handler.hpp172
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/boost/type_extensions.hpp59
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/csv/csv_parameters.hpp341
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/csv/csv_parser.hpp903
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/csv/csv_reader.hpp175
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/csv/csv_serializer.hpp445
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/jsonpath/json_query.hpp921
-rw-r--r--vendor/jsoncons-0.99.2/jsoncons_ext/jsonpath/jsonpath_filter.hpp1495
541 files changed, 61638 insertions, 44737 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e56e4c33..f83d0018 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
# Project definition.
PROJECT (tome2)
-CMAKE_MINIMUM_REQUIRED (VERSION 3.1)
+CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
# We want a readable feature summary.
INCLUDE(FeatureSummary)
@@ -9,6 +9,11 @@ INCLUDE(FeatureSummary)
INCLUDE(FindPkgConfig)
#
+# C++ standard
+#
+SET(CMAKE_CXX_STANDARD 17)
+
+#
# Basic common compiler flags.
#
SET(COMMON_COMPILER_FLAGS "-pipe -Wall -Wextra -Wno-unused-value -Wno-unused-parameter")
@@ -28,7 +33,8 @@ SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
#
# C++ Compiler Flags
#
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILER_FLAGS} --std=c++14")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_COMPILER_FLAGS}")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJSONCONS_NO_DEPRECATED")
SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
@@ -77,19 +83,6 @@ FIND_PACKAGE(X11)
FIND_PACKAGE(GTK2)
#
-# SDL support (OPTIONAL)
-#
-FIND_PACKAGE(SDL)
-IF(SDL_FOUND)
- # We assume that if we want to compile for SDL that
- # any required dependencies should be installed.
- FIND_PACKAGE(SDL_image)
- FIND_PACKAGE(SDL_ttf)
- SET_PACKAGE_PROPERTIES(SDL_image PROPERTIES TYPE REQUIRED)
- SET_PACKAGE_PROPERTIES(SDL_ttf PROPERTIES TYPE REQUIRED)
-ENDIF()
-
-#
# Curses support (OPTIONAL)
#
FIND_PACKAGE(Curses)
diff --git a/README.md b/README.md
index 9ab5b368..994ba3e1 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,6 @@ packages.
Each frontend requires the additional packages listed below:
- X11: `libx11-dev`
-- SDL: `libsdl-image1.2-dev` `libsdl-ttf2.0-dev`
- ncurses: `libncurses5-dev`
@@ -81,11 +80,6 @@ linking the executable. As a workaround, set the environment variable
$ env LDFLAGS=-L/usr/X11R6/lib cmake .
$ make
-The SDL frontend also requires these packages:
-
-- `sdl-image`
-- `sdl-ttf`
-
## Compiling on Windows using MinGW
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 15591830..721cee4d 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -2,7 +2,6 @@ INSTALL(DIRECTORY
apex
cmov
data
- dngn
edit
file
help
diff --git a/lib/dngn/dun1.14 b/lib/dngn/dun1.14
deleted file mode 100644
index 6421e80b..00000000
--- a/lib/dngn/dun1.14
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Heart of the Earth
-B:10
diff --git a/lib/dngn/dun10.0 b/lib/dngn/dun10.0
deleted file mode 100644
index b89ce05e..00000000
--- a/lib/dngn/dun10.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is Mirkwood(1), on level 14
-A:1
-L:14
diff --git a/lib/dngn/dun11.20 b/lib/dngn/dun11.20
deleted file mode 100644
index 9cc611d3..00000000
--- a/lib/dngn/dun11.20
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Nether Realm
-B:6
diff --git a/lib/dngn/dun11.22 b/lib/dngn/dun11.22
deleted file mode 100644
index 149e2c33..00000000
--- a/lib/dngn/dun11.22
+++ /dev/null
@@ -1,2 +0,0 @@
-#I'm downright evil
-F:NO_GENO |
diff --git a/lib/dngn/dun17.15 b/lib/dngn/dun17.15
deleted file mode 100644
index d08bf5e7..00000000
--- a/lib/dngn/dun17.15
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Machine
-U:s_factory.map
-D:The clatter of strange machinery surrounds you.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/dngn/dun18.0 b/lib/dngn/dun18.0
deleted file mode 100644
index da1b6c27..00000000
--- a/lib/dngn/dun18.0
+++ /dev/null
@@ -1,2 +0,0 @@
-# The level is SAVED in the playername.mz? file
-#S:mz0
diff --git a/lib/dngn/dun18.1 b/lib/dngn/dun18.1
deleted file mode 100644
index 70f27718..00000000
--- a/lib/dngn/dun18.1
+++ /dev/null
@@ -1,2 +0,0 @@
-# The level is SAVED in the playername.mz? file
-#S:mz1
diff --git a/lib/dngn/dun19.11 b/lib/dngn/dun19.11
deleted file mode 100644
index 7fba690d..00000000
--- a/lib/dngn/dun19.11
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Deathwatch
-U:s_death.map
-D:This level looks filled with evilness.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/dngn/dun2.31 b/lib/dngn/dun2.31
deleted file mode 100644
index dd8669a5..00000000
--- a/lib/dngn/dun2.31
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Mount Doom
-B:5
diff --git a/lib/dngn/dun22.10 b/lib/dngn/dun22.10
deleted file mode 100644
index e7eb116e..00000000
--- a/lib/dngn/dun22.10
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Small Water Cave
-B:24
diff --git a/lib/dngn/dun22.5 b/lib/dngn/dun22.5
deleted file mode 100644
index 11d8e51f..00000000
--- a/lib/dngn/dun22.5
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Orc Town
-U:s_orc.map
-D:You hear orc warcries.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/dngn/dun24.0 b/lib/dngn/dun24.0
deleted file mode 100644
index bbb93f85..00000000
--- a/lib/dngn/dun24.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is the Moria(22), on level 10
-A:22
-L:10
diff --git a/lib/dngn/dun29.15 b/lib/dngn/dun29.15
deleted file mode 100644
index 4df873b5..00000000
--- a/lib/dngn/dun29.15
+++ /dev/null
@@ -1,6 +0,0 @@
-N:Galleon
-U:s_ship.map
-D:A ship of antique design lies jammed in the ice here.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
-
diff --git a/lib/dngn/dun3.18 b/lib/dngn/dun3.18
deleted file mode 100644
index 84c0a74a..00000000
--- a/lib/dngn/dun3.18
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Dim Gates
-U:s_gates.map
-D:Visions of death fill your mind.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/dngn/dun3.28 b/lib/dngn/dun3.28
deleted file mode 100644
index 0acd4193..00000000
--- a/lib/dngn/dun3.28
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Nameless
-U:s_name.map
-D:You sense a powerful artifact here.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/dngn/dun3.3 b/lib/dngn/dun3.3
deleted file mode 100644
index 710ef5f8..00000000
--- a/lib/dngn/dun3.3
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Crypt
-U:s_crypt.map
-D:Looks like a forgotten crypt...
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/dngn/dun5.0 b/lib/dngn/dun5.0
deleted file mode 100644
index 48a7bea6..00000000
--- a/lib/dngn/dun5.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is the Mordor, on level 32
-A:2
-L:31
diff --git a/lib/dngn/dun5.14 b/lib/dngn/dun5.14
deleted file mode 100644
index 3d7a3080..00000000
--- a/lib/dngn/dun5.14
+++ /dev/null
@@ -1,14 +0,0 @@
-# The level is SAVED in the playername.mdm file
-S:mdm
-
-# Use the map in s_doom.map file
-U:s_doom.map
-
-# Use Mt Doom as level name
-N:Mt Doom
-
-D:You finally reach the top of Mount Doom, here must lie the Great Fire.
-F:DESC
-F:NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:NO_TELEPORT
-
diff --git a/lib/dngn/dun6.0 b/lib/dngn/dun6.0
deleted file mode 100644
index c750ea67..00000000
--- a/lib/dngn/dun6.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is Void(11), on level 20
-A:11
-L:20
diff --git a/lib/edit/a_info.txt b/lib/edit/a_info.txt
index c1ab7fa1..643fc954 100644
--- a/lib/edit/a_info.txt
+++ b/lib/edit/a_info.txt
@@ -57,7 +57,6 @@ F:LITE3
F:SEE_INVIS
F:SPEED
a:MAP_LIGHT
-Z:detect curses
D:The shining Star of the West, a famed heirloom of Elendil's house.
@@ -381,25 +380,6 @@ D:wields it. It is rumoured that it may even protect the wearer from
D:the passing of time.
-# This artifact has a low artifact level to prevent it being worthless for
-# chars with poor magic skills.
-
-# The Stone of Lore
-
-N:15:of Lore
-I:39:106:0
-W:15:12:15:20000
-P:0:1d1:0:0:0
-F:ACTIVATE
-F:EASY_USE
-F:INSTA_ART
-F:LITE1
-F:SPECIAL_GENE
-a:STONE_LORE
-D:A great emerald that fills your mind with images of knowledge and dreadful
-D:understanding as you stare into its depths.
-
-
# The Multi-Hued Dragon Scale Mail 'Razorback'
N:16:'Razorback'
@@ -2815,7 +2795,7 @@ F:SLAY_EVIL
F:SPELL_CONTAIN
F:WIELD_CAST
F:WIS
-a:ID_PLAIN
+a:DETECT_ALL
D:The radiant golden staff of an Istari of legend, this wizard's companion
D:grants keen sight and the knowledge of many hidden things.
@@ -3672,23 +3652,6 @@ D:Crafted of purest ice and held solid by powerful spells, this icy axe
D:delivers a chill of death to its victims.
-# The Iron Helm of Knowledge
-
-N:160:of Knowledge
-I:32:5:-6
-W:20:5:75:100000
-P:6:1d3:0:0:20
-F:ACTIVATE
-F:AUTO_ID
-F:HIDE_TYPE
-F:LITE1
-F:LUCK
-F:SPECIAL_GENE
-a:KNOWLEDGE
-D:This helm, designed by Petty-Dwarves ages ago to act as the brain of a
-D:long lost project, is made of finest glass. Its light banishes all secrets,
-D:and makes audible whispers from the deceased.
-
# The Broken Sword 'Narsil'
N:164:'Narsil'
diff --git a/lib/edit/ba_info.txt b/lib/edit/ba_info.txt
index 20e7bb77..ed95662e 100644
--- a/lib/edit/ba_info.txt
+++ b/lib/edit/ba_info.txt
@@ -69,10 +69,6 @@ N:13:Game rules
C:0:0:0
I:13:0:r
-N:14:Research item
-C:1400:1300:1200
-I:1:0:a
-
N:15:Town history
C:0:0:0
I:2:0:h
@@ -109,10 +105,6 @@ N:26:Recharge item
C:350:300:75
I:25:0:r
-N:27:Identify possessions
-C:900:800:100
-I:26:0:i
-
N:28:Healing prayer
C:600:400:0
I:28:0:h
@@ -168,11 +160,6 @@ C:1500:1500:1500
I:1:0:a
#for Star-Dome
-N:46:Identify possessions
-C:1200:1000:250
-I:26:0:i
-
-#for Star-Dome
N:47:Recharge item
C:1200:1000:150
I:25:0:r
diff --git a/lib/edit/d_info.txt b/lib/edit/d_info.txt
index fe20c276..9c73ccd2 100644
--- a/lib/edit/d_info.txt
+++ b/lib/edit/d_info.txt
@@ -56,6 +56,7 @@ F:NO_DESTROY
F:NO_DOORS
F:PRINCIPAL
R:100:0
+@:14:B:10
N:2:Mordor
D:Mdr:a door to the Land of Mordor.
@@ -71,6 +72,7 @@ F:LAVA_RIVER
F:NO_STREAMERS
F:PRINCIPAL
R:100:0
+@:31:B:5
N:3:Angband
D:Ang:an entrance to the Pits of Angband.
@@ -86,6 +88,33 @@ F:NO_EASY_MOVE
F:NO_RECALL
F:PRINCIPAL
R:100:0
+@:3:N:Crypt
+@:3:U:s_crypt.map
+@:3:D:Looks like a forgotten crypt...
+@:3:F:NO_GENO
+@:3:F:NO_NEW_MONSTER
+@:3:F:SPECIAL
+@:3:F:NO_STAIR
+@:3:F:ASK_LEAVE
+@:3:F:NO_TELEPORT
+@:18:N:Dim Gates
+@:18:U:s_gates.map
+@:18:D:Visions of death fill your mind.
+@:18:F:NO_GENO
+@:18:F:NO_NEW_MONSTER
+@:18:F:SPECIAL
+@:18:F:NO_STAIR
+@:18:F:ASK_LEAVE
+@:18:F:NO_TELEPORT
+@:28:N:Nameless
+@:28:U:s_name.map
+@:28:D:You sense a powerful artifact here.
+@:28:F:NO_GENO
+@:28:F:NO_NEW_MONSTER
+@:28:F:SPECIAL
+@:28:F:NO_STAIR
+@:28:F:ASK_LEAVE
+@:28:F:NO_TELEPORT
N:4:Barrow-Downs
D:BDw:a way to the Barrow-Downs.
@@ -122,6 +151,15 @@ F:NO_STREAMERS
F:NO_UP
R:100:1
M:IM_FIRE
+@:14:N:Mt Doom
+@:14:S:mdm
+@:14:U:s_doom.map
+@:14:D:You finally reach the top of Mount Doom, here must lie the Great Fire.
+@:14:F:NO_GENO
+@:14:F:NO_NEW_MONSTER
+@:14:F:SPECIAL
+@:14:F:NO_STAIR
+@:14:F:NO_TELEPORT
# Nether Realm
# Levels 666-696 (!!!)
@@ -273,6 +311,8 @@ M:DRAGON
M:NONLIVING
M:SPIRIT
M:UNDEAD
+@:20:B:6
+@:22:F:NO_GENO
# TEST dungeon
N:12:Test
@@ -311,7 +351,7 @@ M:UNDEAD
# The Illusory Castle
# levels 35-52
-# Guarded by The Glass Golem guarding The Helm of Knowledge
+# Guarded by The Glass Golem
N:17:Illusory Castle
D:Ill:an entrance to the Illusory Castle.
W:35:52:10:24:100
@@ -320,7 +360,6 @@ A:56:50:189:50:56:0:57:58
O:50:10:20:20
E:6d2:6:CONFUSION
F:FILL_METHOD_1
-F:FINAL_ARTIFACT_160
F:FINAL_GUARDIAN_1033
F:NO_STREAMERS
F:RANDOM_TOWNS
@@ -343,6 +382,15 @@ S:BR_CONF
S:CONF
S:FORGET
S:MULTIPLY
+@:15:N:Machine
+@:15:U:s_factory.map
+@:15:D:The clatter of strange machinery surrounds you.
+@:15:F:NO_GENO
+@:15:F:NO_NEW_MONSTER
+@:15:F:SPECIAL
+@:15:F:NO_STAIR
+@:15:F:ASK_LEAVE
+@:15:F:NO_TELEPORT
# The Maze
# Levels 25-37
@@ -384,6 +432,15 @@ M:ORC
M:R_CHAR_O
M:R_CHAR_k
M:R_CHAR_o
+@:11:N:Deathwatch
+@:11:U:s_death.map
+@:11:D:This level looks filled with evilness.
+@:11:F:NO_GENO
+@:11:F:NO_NEW_MONSTER
+@:11:F:SPECIAL
+@:11:F:NO_STAIR
+@:11:F:ASK_LEAVE
+@:11:F:NO_TELEPORT
# Erebor
# levels 60-72
@@ -461,6 +518,16 @@ M:TROLL
R:20:3
M:DEMON
R:10:0
+@:5:N:Orc Town
+@:5:U:s_orc.map
+@:5:D:You hear orc warcries.
+@:5:F:NO_GENO
+@:5:F:NO_NEW_MONSTER
+@:5:F:SPECIAL
+@:5:F:NO_STAIR
+@:5:F:ASK_LEAVE
+@:5:F:NO_TELEPORT
+@:10:B:24
# The tower of Dol Guldur
# Levels 57-70
@@ -607,6 +674,15 @@ F:NO_STREAMERS
F:WATER_RIVER
R:100:1
M:IM_COLD
+@:15:N:Galleon
+@:15:U:s_ship.map
+@:15:D:A ship of antique design lies jammed in the ice here.
+@:15:F:NO_GENO
+@:15:F:NO_NEW_MONSTER
+@:15:F:SPECIAL
+@:15:F:NO_STAIR
+@:15:F:ASK_LEAVE
+@:15:F:NO_TELEPORT
# The Lost Temple of "..player.pgod.."
# Generated in god quest.
diff --git a/lib/edit/k_info.txt b/lib/edit/k_info.txt
index 1f97827b..5e93d95d 100644
--- a/lib/edit/k_info.txt
+++ b/lib/edit/k_info.txt
@@ -1839,22 +1839,6 @@ A:15/1
D:This scroll will try to enchant a piece of armour in your possession, making it more effective
D:in protecting you. Highly enchanted armour is likely not to accept this enchantment, however.
-N:176:Identify
-G:?:d
-I:70:12:0
-W:1:0:5:50
-A:1/1:5/1:10/1:30/1
-D:If you read this scroll, the identity of an item you specify will be laid open to you.
-
-N:177:*Identify*
-G:?:d
-I:70:13:0
-W:30:0:5:1000
-A:30/1:50/2:80/1:100/1
-D:This scroll will allow you to gain insight into an object's special properties.
-D:Only the highly magical objects, like rare rings and amulets or very unusual weapons
-D:and armour possess abilities which warrant the use of this magic.
-
N:178:Rumour
G:?:d
I:70:51:0
@@ -2963,13 +2947,6 @@ W:30:0:50:100
A:30/1
P:0:1d2:0:0:0
-N:313:Identify
-G:_:d
-I:55:14:-1:SPELL=Identify
-W:10:0:50:100
-A:10/1
-P:0:1d2:0:0:0
-
N:314:Sense Hidden
G:_:d
I:55:15:-1:SPELL=Sense Hidden
@@ -3135,64 +3112,6 @@ D:A thick book with solid leather binding. It looks entirely
D:unremarkable, but as you hold it, you feel strangely able
D:to learn the inner workings of things and creatures.
-##### Chests #####
-
-N:338:& Small wooden chest~
-G:~:s
-I:7:1:0
-W:5:0:250:20
-A:5/1
-P:0:2d3:0:0:0
-D:A small wooden box, locked and possibly trapped. You wonder what might be inside.
-
-N:339:& Large wooden chest~
-G:~:s
-I:7:5:0
-W:15:0:500:60
-A:15/1
-P:0:2d5:0:0:0
-D:A large wooden box. It doesn't seem to be locked - why not risk a look inside?
-
-N:340:& Small iron chest~
-G:~:s
-I:7:2:0
-W:25:0:300:100
-A:25/1
-P:0:2d4:0:0:0
-D:A small rectangular container made of wood and reinforced with iron corners and latches.
-
-N:341:& Large iron chest~
-G:~:s
-I:7:6:0
-W:35:0:1000:150
-A:35/1
-P:0:2d6:0:0:0
-D:A big container made of wood, with a heavy iron lock.
-
-N:342:& Small steel chest~
-G:~:s
-I:7:3:0
-W:45:0:500:200
-A:45/1
-P:0:2d4:0:0:0
-D:A small wooden box with strong steel locks and reinforcements.
-
-N:343:& Large steel chest~
-G:~:s
-I:7:7:0
-W:55:0:1000:250
-A:55/1
-P:0:2d6:0:0:0
-D:A nearly indestructible chest of wood and steel. The lock doesn't look impenetrable, but it
-D:might be trapped.
-
-N:344:& Ruined chest~
-G:~:s
-I:7:0:0
-W:0:0:250:0
-A:75/1
-D:A broken, empty chest.
-
##### Various Stuff #####
N:345:& Iron Spike~
@@ -3406,14 +3325,6 @@ A:65/4
P:0:1d1:0:0:0
D:This rod grants you knowledge of your surroundings.
-N:372:Perception
-G:-:d
-I:66:2:20
-W:50:0:15:13000
-A:50/8:100/8
-P:0:1d1:0:0:0
-D:This rod makes you insightful, laying open the identity of your possessions.
-
N:373:Curing
G:-:d
I:66:8:35
@@ -5152,94 +5063,6 @@ A:40/3
D:This parchment contains information about unique
D:artifacts that are rumoured to exist upon Arda.
-N:594:Monstrous Compendium 1
-G:?:o
-I:8:9:0
-W:10:0:5:50
-A:10/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:595:Monstrous Compendium 2
-G:?:o
-I:8:10:0
-W:11:0:5:50
-A:11/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:596:Monstrous Compendium 3
-G:?:o
-I:8:11:0
-W:12:0:5:50
-A:12/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:597:Monstrous Compendium 4
-G:?:o
-I:8:12:0
-W:13:0:5:50
-A:13/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:598:Monstrous Compendium 5
-G:?:o
-I:8:13:0
-W:14:0:5:50
-A:14/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:599:Monstrous Compendium 6
-G:?:o
-I:8:14:0
-W:15:0:5:50
-A:15/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:600:Monstrous Compendium 7
-G:?:o
-I:8:15:0
-W:16:0:5:50
-A:16/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:601:Monstrous Compendium 8
-G:?:o
-I:8:16:0
-W:17:0:5:50
-A:17/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:602:Monstrous Compendium 9
-G:?:o
-I:8:17:0
-W:18:0:5:50
-A:18/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:603:Monstrous Compendium 10
-G:?:o
-I:8:18:0
-W:19:0:5:50
-A:19/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:604:Monstrous Compendium 11
-G:?:o
-I:8:19:0
-W:20:0:5:50
-A:20/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
#### Here come the shape-shifting potions. ####
N:605:& Morphic Oil~ of #
@@ -5327,14 +5150,6 @@ F:RES_FIRE
D:This suit of thick impregnated cloth is worn by the riders of flying steeds,
D:and protects them from extremes of temperatures.
-# The Stone of Lore -- see artifact list
-N:647:& Stone~
-G:~:g
-I:39:106:0
-W:15:0:15:20000
-F:INSTA_ART
-F:SPECIAL_GENE
-
# Here are the boomerangs
N:648:& Small Wooden Boomerang~
diff --git a/lib/edit/p_info.txt b/lib/edit/p_info.txt
index 5cb2e5cd..f00948aa 100644
--- a/lib/edit/p_info.txt
+++ b/lib/edit/p_info.txt
@@ -514,7 +514,7 @@ C:a:O:36:6:1d1
C:a:k:+0:-100:Combat
C:a:k:+0:-100:Weaponmastery
C:a:k:+0:-300:Archery
-C:a:k:-1000:-700:Barehand-combat
+C:a:k:+0:-100:Barehand-combat
C:a:k:+0:-200:Spirituality
C:a:k:+1000:+300:Possession
C:a:k:+0:+200:Corpse-preservation
@@ -631,7 +631,6 @@ C:D:1:Pope
C:S:-1:-3:3:-1:0:2:0:0
C:B:4:35:3
C:P:2:20
-C:Z:detect curses
C:G:GOD_FRIEND
C:E:0:0:0:0:0:0
C:k:+1000:+900:Magic
diff --git a/lib/edit/ra_info.txt b/lib/edit/ra_info.txt
index 6ac58484..85da205b 100644
--- a/lib/edit/ra_info.txt
+++ b/lib/edit/ra_info.txt
@@ -1903,20 +1903,13 @@ C:0:0:0:0
Z:MAGIC MAP
N:511
-X:30:1
-T:39:0:255
-W:20:1:24
-C:0:0:0:0
-Z:DETECT CURSES
-
-N:512
X:25:1
T:39:0:255
W:20:1:17
C:0:0:0:0
Z:DAZZLE
-N:513
+N:512
X:40:1
T:39:0:255
W:20:1:50
diff --git a/lib/edit/s_orc.map b/lib/edit/s_orc.map
index 48913e02..54f1c89a 100644
--- a/lib/edit/s_orc.map
+++ b/lib/edit/s_orc.map
@@ -53,13 +53,8 @@ F:9:1:0:*75:*55
# Random monster (upto 3 levels ood)
F:-:1:0:*38
-# Random object (upto 7 levels ood)
-F:=:1:0:0:*42
-
-### Guaranteed Items
-
-# The stone of lore
-F:1:1:0:0:0:0:15
+# Random object (upto 25 levels ood)
+F:=:1:0:0:*60
### Level Design
D:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -67,7 +62,7 @@ D:Xa.......................ccccccccc.......................aX
D:X.lllllllllllllllllllllllllllllllllllllllllllllllllllllll.X
D:X.l......................ccccccccc.....g.g..............l.X
D:X.l.XXXXXXXXXXXXXXXXXXXXXXXXX.XXXXXXXXXXDXXXXXXXXXXXXXX.l.X
-D:X.l.Xa.......efX1Xfe.......aX.X.aaa.D.gX.XacbdddccjjjaX.l.X
+D:X.l.Xa.......efX=Xfe.......aX.X.aaa.D.gX.XacbdddccjjjaX.l.X
D:X.l.D........efG.Gfe........D.D.bbb.XXXX.XcfbcbcbbjjeeX.l.X
D:X.l.X........efX.Xfe........X.X.bbb.D.gX.XfbbgdcbdbjjjX.l.X
D:X.l.XXXXXX...efG.Gfe...XXXXXX.X.bbb.XXXX.XebdcfbdccejjX.l.X
diff --git a/lib/edit/set_info.txt b/lib/edit/set_info.txt
index c803d79f..26d30d14 100644
--- a/lib/edit/set_info.txt
+++ b/lib/edit/set_info.txt
@@ -85,6 +85,5 @@ F:IM_FIRE
F:SH_ELEC
# The demonhorn of Gothmog
P:183:3:0
-F:AUTO_ID
F:ESP_EVIL
F:ESP_GOOD
diff --git a/lib/edit/st_info.txt b/lib/edit/st_info.txt
index b5ae29cf..e3a8dd23 100644
--- a/lib/edit/st_info.txt
+++ b/lib/edit/st_info.txt
@@ -101,10 +101,8 @@ G:3:w
W:24
N:3:Temple
-I:100:& Nunchaku~
I:100:& Quarterstaff~
I:100:& Mace~
-I:100:& Bo Staff~
I:100:& War Hammer~
I:100:& Lucerne Hammer~
I:100:& Morning Star~
@@ -153,10 +151,6 @@ N:4:Alchemy shop
I:100:Enchant Weapon To-Hit
I:100:Enchant Weapon To-Dam
I:100:Enchant Armour
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
I:100:Light
I:100:Phase Door
I:100:Phase Door
@@ -182,13 +176,6 @@ I:100:Restore Dexterity
#I:100:Restore Constitution
T:100:71:46
I:100:Restore Charisma
-I:100:Identify
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
I:100:Light
#I:100:Restore Strength
T:100:71:42
@@ -220,7 +207,6 @@ I:100:Slow Digestion
T:100:40:3
I:100:Acid Resistance
I:100:Lightning Resistance
-I:100:Searching
I:100:Cure Light Wounds
# Rods
I:25:& Wooden Rod~ of#
@@ -316,8 +302,7 @@ F:RANDOM
W:2
N:13:Library
-I:100:Identify
-A:0:0:14:15:16:2
+A:0:0:0:15:16:2
O:4:4:4:4
G:+:U
W:2
@@ -347,7 +332,7 @@ G:+:s
W:0
N:18:Tower of Magery
-A:0:0:26:27:0:0
+A:0:0:26:0:0:0
O:21:21:21:21
G:+:b
W:0
@@ -389,7 +374,7 @@ G:+:U
W:0
N:25:Wizards Spire
-A:60:0:26:27:0:0
+A:60:0:26:0:0:0
O:54:54:54:54
G:+:U
W:0
@@ -407,8 +392,7 @@ G:+:U
W:0
N:28:Library
-I:100:Identify
-A:0:0:14:15:16:2
+A:0:0:0:15:16:2
O:58:58:58:58
G:+:U
W:2
@@ -443,7 +427,7 @@ G:+:U
W:0
N:33:Star-Dome
-A:0:0:46:47:0:0
+A:0:0:0:47:0:0
O:63:63:63:63
G:+:U
W:0
@@ -573,7 +557,7 @@ T:100:122:256
T:100:123:256
T:100:124:256
T:100:125:256
-A:27:0:1:2:3:4
+A:0:0:1:2:3:4
O:8:9:10:11
G:9:y
F:DEPEND_LEVEL
@@ -598,7 +582,7 @@ T:100:122:256
T:100:123:256
T:100:124:256
T:100:125:256
-A:27:0:1:2:3:4
+A:0:0:1:2:3:4
O:8:9:10:11
G:9:v
F:DEEP_LEVEL
@@ -746,8 +730,7 @@ W:24
## Library quest in Minas Anor
N:60:Library
-I:100:Identify
-A:61:0:14:15:16:2
+A:61:0:0:15:16:2
O:4:4:4:4
G:+:U
W:2
diff --git a/lib/edit/t_bree.txt b/lib/edit/t_bree.txt
index 3d19b888..4d648ea6 100644
--- a/lib/edit/t_bree.txt
+++ b/lib/edit/t_bree.txt
@@ -117,12 +117,7 @@ D:# ^^^^^^^^^^^^^^ .
D:######################################################################################################################################################################################################
-############### Starting positions ###############
+############### Starting position ###############
-# Standard starting position for normal races
-?:[AND [EQU $LEAVING_QUEST 0] [NOT [EQU $RACE Vampire] ] ]
+?:[EQU $LEAVING_QUEST 0]
P:33:131
-
-# Standard starting position for vampires (at the dungeon entrance)
-?:[AND [EQU $LEAVING_QUEST 0] [EQU $RACE Vampire] ]
-P:31:150
diff --git a/lib/edit/t_d_bree.txt b/lib/edit/t_d_bree.txt
index 2112bc4e..b77fa37e 100644
--- a/lib/edit/t_d_bree.txt
+++ b/lib/edit/t_d_bree.txt
@@ -90,12 +90,7 @@ D:# ^^^^^^^^^^^^^^ ADDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD .DDDD
D:######################################################################################################################################################################################################
-############### Starting positions ###############
+############### Starting position ###############
-# Standard starting position for normal races
-?:[AND [EQU $LEAVING_QUEST 0] [NOT [EQU $RACE Vampire] ] ]
+?:[EQU $LEAVING_QUEST 0]
P:33:131
-
-# Standard starting position for vampires (at the dungeon entrance)
-?:[AND [EQU $LEAVING_QUEST 0] [EQU $RACE Vampire] ]
-P:31:150
diff --git a/lib/file/book-10.txt b/lib/file/book-10.txt
deleted file mode 100644
index 51d43c60..00000000
--- a/lib/file/book-10.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Large yellow snake is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Cave spider is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Wild cat is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Smeagol is a unique monster,
-occurring at surface depths.
-He is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Green ooze is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Poltergeist is a common undead monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Metallic blue centipede is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Giant white louse is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Black naga is a common monster,
-occurring at surface depths.
-She is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Spotted mushroom patch is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Silver jelly is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Yellow jelly is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Scruffy looking hobbit is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Giant white ant is a common monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Yellow mold is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Metallic red centipede is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Yellow worm mass is an uncommon animal,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Clear worm mass is an uncommon animal,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Radiation eye is a common monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Cave lizard is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Novice ranger is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has an inkling of magical powers.
-
-The Novice paladin is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has an inkling of magical powers.
-
-The Blue jelly is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Creeping copper coins is an uncommon animal,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant white rat is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Blue worm mass is a common animal,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Large grey snake is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Bullroarer the Hobbit is a unique monster,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Novice mage is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, just a small bit dangerous,
-and has rudimentary magical powers.
-
-The Green naga is a common monster,
-occurring at surface depths.
-She is extremely weak, just a small bit dangerous,
-and has no magical powers.
-
-The Blue ooze is a common monster,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Green glutton ghost is a common undead monster,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Green jelly is a common monster,
-occurring at surface depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Large kobold is a common monster,
-occurring at surface depths.
-It is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Skeleton kobold is a common undead monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Grey icky thing is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Disenchanter eye is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Red worm mass is a common animal,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Copperhead snake is a common animal,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Purple mushroom patch is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, moderately dangerous,
-and has no magical powers.
-
-The Novice priest is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, just a little bit dangerous,
-and has small magical powers.
-
-The Novice warrior is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Novice rogue is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Brown mold is a common monster,
-occurring at surface depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant brown bat is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Novice archer is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has an inkling of magical powers.
-
-The Creeping silver coins is an uncommon animal,
-occurring at surface depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Snaga is a common orc,
-occurring at surface depths.
-He is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Rattlesnake is a common animal,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Cave orc is a common orc,
-occurring at surface depths.
-He is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-11.txt b/lib/file/book-11.txt
deleted file mode 100644
index bd3c0593..00000000
--- a/lib/file/book-11.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Wood spider is a somewhat rare animal,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Manes is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Bloodshot eye is a somewhat rare monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Pink naga is an uncommon monster,
-occurring at surface depths.
-She is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Pink jelly is a common monster,
-occurring at surface depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant pink frog is a common animal,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Green icky thing is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Zombified kobold is a common undead monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Lost soul is an uncommon undead monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Dark elf is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has an inkling of magical powers.
-
-The Night lizard is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Mughash the Kobold Lord is a unique monster,
-occurring at surface depths.
-He is extremely weak, moderately dangerous,
-and has no magical powers.
-
-Wormtongue, Agent of Saruman is a unique monster,
-occurring at surface depths.
-He is very weak, not at all dangerous,
-and has remarkable magical powers.
-
-Lagduf, the Snaga is a unique orc,
-occurring at surface depths.
-He is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Brown yeek is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Novice ranger is a common monster,
-occurring at surface depths.
-He is laughably weak, just a little bit dangerous,
-and has an inkling of magical powers.
-
-The Giant salamander is a common animal,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Green mold is an uncommon monster,
-occurring at surface depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Skeleton orc is a common undead monster,
-occurring at surface depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Novice paladin is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, just a little bit dangerous,
-and has an inkling of magical powers.
-
-The Lemure is a somewhat rare monster,
-occurring at surface depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Hill orc is a common monster,
-occurring at surface depths.
-He is extremely weak, just a small bit dangerous,
-and has no magical powers.
-
-The Bandit is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Yeti is a somewhat rare animal,
-occurring at surface depths.
-It is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Bloodshot icky thing is a somewhat rare monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Giant grey rat is a common animal,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Black harpy is a common animal,
-occurring at surface depths.
-She is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Orc shaman is a common orc,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has rudimentary magical powers.
-
-The Baby blue dragon is an uncommon dragon,
-occurring at surface depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Baby white dragon is an uncommon dragon,
-occurring at surface depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Baby green dragon is an uncommon dragon,
-occurring at surface depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Baby black dragon is an uncommon dragon,
-occurring at surface depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Baby red dragon is an uncommon dragon,
-occurring at surface depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Giant pink ant is an uncommon monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-Brodda, the Easterling is a unique monster,
-occurring at surface depths.
-It is very weak, just a little bit dangerous,
-and has no magical powers.
-
-The King cobra is an uncommon animal,
-occurring at surface depths.
-It is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Giant spider is an uncommon animal,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Dark elven mage is a common monster,
-occurring at very shallow depths.
-He is laughably weak, not at all dangerous,
-and has simple magical powers.
-
-Orfax, Son of Boldor is a unique animal,
-occurring at very shallow depths.
-He is extremely weak, somewhat dangerous,
-and has remarkable magical powers.
-
-The Dark elven warrior is a common monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Clear mushroom patch is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-Grishnakh, the Hill Orc is a unique orc,
-occurring at very shallow depths.
-He is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant white tick is an uncommon animal,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Hairy mold is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Disenchanter mold is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Pseudo dragon is an uncommon monster,
-occurring at very shallow depths.
-It is very weak, not at all dangerous,
-and has simple magical powers.
-
-The Tengu is a common monster,
-occurring at very shallow depths.
-It is extremely weak, just a small bit dangerous,
-and has rudimentary magical powers.
-
-The Creeping gold coins is a somewhat rare animal,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Wolf is a common animal,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Giant fruit fly is a legendary animal,
-occurring at very shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-12.txt b/lib/file/book-12.txt
deleted file mode 100644
index d111d15d..00000000
--- a/lib/file/book-12.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Panther is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Brigand is an uncommon monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Baby multi-hued dragon is an uncommon dragon,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has arcane magical powers.
-
-The Hippogryph is a common monster,
-occurring at very shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Zombified orc is a common undead monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Gnome mage is an uncommon monster,
-occurring at very shallow depths.
-He is laughably weak, not one little bit dangerous,
-and has unremarkable magical powers.
-
-The Black mamba is a somewhat rare animal,
-occurring at very shallow depths.
-It is extremely weak, just a small bit dangerous,
-and has no magical powers.
-
-The White wolf is a common animal,
-occurring at very shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Grape jelly is a somewhat rare monster,
-occurring at very shallow depths.
-It is moderately strong, just a small bit dangerous,
-and has no magical powers.
-
-The Nether worm mass is a somewhat rare animal,
-occurring at very shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Golfimbul, the Hill Orc Chief is a unique orc,
-occurring at very shallow depths.
-He is somewhat weak, moderately dangerous,
-and has no magical powers.
-
-The Master yeek is an uncommon animal,
-occurring at very shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has arcane magical powers.
-
-The Priest is a common monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has unremarkable magical powers.
-
-The Dark elven priest is a common monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has unremarkable magical powers.
-
-The Air spirit is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Skeleton human is a common undead monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Zombified human is a common undead monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Tiger is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Moaning spirit is an uncommon undead monster,
-occurring at very shallow depths.
-It is laughably weak, moderately dangerous,
-and has rudimentary magical powers.
-
-The Swordsman is a common monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Stegocentipede is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Spotted jelly is a somewhat rare monster,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Drider is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, just a little bit dangerous,
-and has rudimentary magical powers.
-
-The Killer brown beetle is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-Boldor, King of the Yeeks is a unique animal,
-occurring at very shallow depths.
-He is very weak, somewhat dangerous,
-and has remarkable magical powers.
-
-The Ogre is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, just a small bit dangerous,
-and has no magical powers.
-
-The Creeping mithril coins is a rare animal,
-occurring at very shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Illusionist is an uncommon monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has arcane magical powers.
-
-The Druid is an uncommon monster,
-occurring at very shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has remarkable magical powers.
-
-The Black orc is an uncommon orc,
-occurring at very shallow depths.
-He is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Ochre jelly is a somewhat rare monster,
-occurring at very shallow depths.
-It is extremely weak, very dangerous,
-and has no magical powers.
-
-The Giant flea is a common monster,
-occurring at very shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Ufthak of Cirith Ungol is a unique orc,
-occurring at very shallow depths.
-He is somewhat weak, moderately dangerous,
-and has no magical powers.
-
-The Giant white dragon fly is a somewhat rare animal,
-occurring at very shallow depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Blue icky thing is a rare monster,
-occurring at very shallow depths.
-It is laughably weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Hill giant is a common monster,
-occurring at very shallow depths.
-It is very weak, not one little bit dangerous,
-and has no magical powers.
-
-The Flesh golem is a common monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Warg is an uncommon animal,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Giant black louse is a common monster,
-occurring at very shallow depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Lurker is a somewhat rare monster,
-occurring at very shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Wererat is an uncommon animal,
-occurring at very shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has simple magical powers.
-
-The Black ogre is an uncommon giant,
-occurring at very shallow depths.
-It is very weak, just a little bit dangerous,
-and has no magical powers.
-
-The Magic mushroom patch is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, not at all dangerous,
-and has arcane magical powers.
-
-The Guardian naga is an uncommon monster,
-occurring at very shallow depths.
-She is somewhat weak, not one little bit dangerous,
-and has no magical powers.
-
-The Light hound is a common monster,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has an inkling of magical powers.
-
-The Dark hound is a common monster,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has an inkling of magical powers.
-
-The Half-orc is a somewhat rare orc,
-occurring at very shallow depths.
-He is very weak, just a small bit dangerous,
-and has no magical powers.
-
-The Giant tarantula is a somewhat rare animal,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Giant clear centipede is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Mirkwood spider is an uncommon animal,
-occurring at very shallow depths.
-It is laughably weak, moderately dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-13.txt b/lib/file/book-13.txt
deleted file mode 100644
index b8a15e3f..00000000
--- a/lib/file/book-13.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Frost giant is a common giant,
-occurring at very shallow depths.
-It is very weak, not at all dangerous,
-and has no magical powers.
-
-The Griffon is a common animal,
-occurring at very shallow depths.
-It is very weak, not one little bit dangerous,
-and has no magical powers.
-
-The Homonculous is a somewhat rare monster,
-occurring at very shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Gnome mage is an uncommon monster,
-occurring at very shallow depths.
-He is laughably weak, just a little bit dangerous,
-and has unremarkable magical powers.
-
-The Clear hound is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Clay golem is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Umber hulk is a common animal,
-occurring at very shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Orc captain is a somewhat rare orc,
-occurring at very shallow depths.
-He is very weak, not one little bit dangerous,
-and has no magical powers.
-
-The Gelatinous cube is a rare monster,
-occurring at very shallow depths.
-It is somewhat weak, hellishly dangerous,
-and has no magical powers.
-
-The Giant green dragon fly is an uncommon animal,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Fire giant is an uncommon giant,
-occurring at very shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Hummerhorn is an extremely rare animal,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-Ulfast, Son of Ulfang is a unique monster,
-occurring at very shallow depths.
-He is somewhat weak, just a little bit dangerous,
-and has no magical powers.
-
-The Quasit is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, somewhat dangerous,
-and has average magical powers.
-
-The Imp is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, moderately dangerous,
-and has average magical powers.
-
-The Forest troll is a common troll,
-occurring at very shallow depths.
-He is very weak, just a little bit dangerous,
-and has no magical powers.
-
-Nar, the Dwarf is a unique monster,
-occurring at very shallow depths.
-He is somewhat strong, moderately dangerous,
-and has simple magical powers.
-
-The 2-headed hydra is an uncommon monster,
-occurring at very shallow depths.
-It is somewhat weak, not one little bit dangerous,
-and has no magical powers.
-
-The Water spirit is a common monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant pink scorpion is a common monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Earth spirit is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Fire spirit is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Fire hound is a common animal,
-occurring at very shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Cold hound is a common animal,
-occurring at very shallow depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Energy hound is a common animal,
-occurring at very shallow depths.
-It is laughably weak, moderately dangerous,
-and has no magical powers.
-
-The Mimic (potion) is a somewhat rare monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has small magical powers.
-
-The Blink dog is an uncommon monster,
-occurring at very shallow depths.
-It is laughably weak, just a little bit dangerous,
-and has rudimentary magical powers.
-
-The Uruk is a common orc,
-occurring at very shallow depths.
-He is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-Shagrat, the Orc Captain is a unique orc,
-occurring at very shallow depths.
-He is moderately strong, somewhat dangerous,
-and has no magical powers.
-
-Gorbag, the Orc Captain is a unique orc,
-occurring at very shallow depths.
-He is moderately strong, somewhat dangerous,
-and has no magical powers.
-
-The Shambling mound is an uncommon monster,
-occurring at very shallow depths.
-It is extremely weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Stone giant is a common monster,
-occurring at very shallow depths.
-It is very weak, not one little bit dangerous,
-and has no magical powers.
-
-The Giant black dragon fly is an uncommon animal,
-occurring at very shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Stone golem is an uncommon monster,
-occurring at very shallow depths.
-It is very weak, moderately dangerous,
-and has no magical powers.
-
-The Red mold is a common monster,
-occurring at very shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant gold dragon fly is an uncommon animal,
-occurring at very shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Bolg, Son of Azog is a unique orc,
-occurring at somewhat shallow depths.
-He is somewhat strong, somewhat dangerous,
-and has no magical powers.
-
-The Phase spider is an uncommon animal,
-occurring at somewhat shallow depths.
-It is laughably weak, moderately dangerous,
-and has rudimentary magical powers.
-
-The 3-headed hydra is an uncommon monster,
-occurring at somewhat shallow depths.
-It is somewhat strong, not one little bit dangerous,
-and has no magical powers.
-
-The Earth hound is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Air hound is a common animal,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Sabre-tooth tiger is an uncommon monster,
-occurring at somewhat shallow depths.
-It is somewhat weak, not one little bit dangerous,
-and has no magical powers.
-
-The Water hound is an uncommon animal,
-occurring at somewhat shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-The Chimera is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, not at all dangerous,
-and has no magical powers.
-
-The Quylthulg is a common monster,
-occurring at somewhat shallow depths.
-It is laughably weak, just a small bit dangerous,
-and has rudimentary magical powers.
-
-The Sasquatch is a somewhat rare animal,
-occurring at somewhat shallow depths.
-It is moderately strong, not one little bit dangerous,
-and has no magical powers.
-
-The Werewolf is a common animal,
-occurring at somewhat shallow depths.
-It is moderately strong, not one little bit dangerous,
-and has no magical powers.
-
-The Dark elven lord is an uncommon monster,
-occurring at somewhat shallow depths.
-He is somewhat weak, not one little bit dangerous,
-and has average magical powers.
-
-The Cloud giant is a common giant,
-occurring at somewhat shallow depths.
-It is somewhat weak, somewhat dangerous,
-and has no magical powers.
-
-Ugluk, the Uruk is a unique orc,
-occurring at somewhat shallow depths.
-He is very strong, somewhat dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-14.txt b/lib/file/book-14.txt
deleted file mode 100644
index b987ea99..00000000
--- a/lib/file/book-14.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-Lugdush, the Uruk is a unique orc,
-occurring at somewhat shallow depths.
-He is extremely strong, moderately dangerous,
-and has no magical powers.
-
-The Blue dragon bat is a common animal,
-occurring at somewhat shallow depths.
-It is laughably weak, not at all dangerous,
-and has an inkling of magical powers.
-
-The Mimic (scroll) is a somewhat rare monster,
-occurring at somewhat shallow depths.
-It is extremely weak, moderately dangerous,
-and has average magical powers.
-
-The Fire vortex is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Water vortex is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Cold vortex is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Energy vortex is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Mummified orc is a common undead monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Killer stag beetle is a common monster,
-occurring at somewhat shallow depths.
-It is very weak, not one little bit dangerous,
-and has no magical powers.
-
-The Iron golem is an uncommon monster,
-occurring at somewhat shallow depths.
-It is unimaginably strong, moderately dangerous,
-and has no magical powers.
-
-The Giant yellow scorpion is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Black ooze is a common monster,
-occurring at somewhat shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Hardened warrior is a common monster,
-occurring at somewhat shallow depths.
-He is very weak, not one little bit dangerous,
-and has no magical powers.
-
-Azog, King of the Uruk-Hai is a unique orc,
-occurring at somewhat shallow depths.
-He is alarmingly strong, moderately dangerous,
-and has no magical powers.
-
-The Master rogue is an uncommon monster,
-occurring at somewhat shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-The Red dragon bat is a common animal,
-occurring at somewhat shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has an inkling of magical powers.
-
-The Killer white beetle is a common monster,
-occurring at somewhat shallow depths.
-It is very weak, not one little bit dangerous,
-and has no magical powers.
-
-The Giant bronze dragon fly is a common animal,
-occurring at very shallow depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Forest wight is a common undead monster,
-occurring at somewhat shallow depths.
-It is extremely weak, just a little bit dangerous,
-and has an inkling of magical powers.
-
-Ibun, Son of Mim is a unique monster,
-occurring at somewhat shallow depths.
-He is alarmingly strong, somewhat dangerous,
-and has small magical powers.
-
-Khim, Son of Mim is a unique monster,
-occurring at somewhat shallow depths.
-He is alarmingly strong, somewhat dangerous,
-and has small magical powers.
-
-The 4-headed hydra is an uncommon monster,
-occurring at somewhat shallow depths.
-It is strong, not one little bit dangerous,
-and has no magical powers.
-
-The Mummified human is a common undead monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has no magical powers.
-
-The Vampire bat is an uncommon undead monster,
-occurring at somewhat shallow depths.
-It is extremely weak, moderately dangerous,
-and has no magical powers.
-
-Sangahyando of Umbar is a unique monster,
-occurring at somewhat shallow depths.
-He is extremely strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-Angamaite of Umbar is a unique monster,
-occurring at somewhat shallow depths.
-He is extremely strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Banshee is an uncommon undead monster,
-occurring at somewhat shallow depths.
-She is laughably weak, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Pukelman is a somewhat rare monster,
-occurring at somewhat shallow depths.
-It is unimaginably strong, moderately dangerous,
-and has small magical powers.
-
-The Dark elven druid is a somewhat rare monster,
-occurring at somewhat shallow depths.
-He is moderately strong, just a little bit dangerous,
-and has unremarkable magical powers.
-
-The Stone troll is a common troll,
-occurring at somewhat shallow depths.
-He is very weak, just a little bit dangerous,
-and has no magical powers.
-
-The Troll priest is a common troll,
-occurring at somewhat shallow depths.
-He is somewhat weak, just a little bit dangerous,
-and has unremarkable magical powers.
-
-The Wereworm is a somewhat rare animal,
-occurring at somewhat shallow depths.
-It is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-The Carrion crawler is an uncommon animal,
-occurring at somewhat shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Killer pink beetle is an uncommon monster,
-occurring at somewhat shallow depths.
-It is very weak, just a small bit dangerous,
-and has no magical powers.
-
-The Giant grey ant is a common monster,
-occurring at somewhat shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has no magical powers.
-
-Ulwarth, Son of Ulfang is a unique monster,
-occurring at somewhat shallow depths.
-He is extremely strong, just a little bit dangerous,
-and has no magical powers.
-
-The Displacer beast is an uncommon monster,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a little bit dangerous,
-and has no magical powers.
-
-The Giant red tick is a common animal,
-occurring at somewhat shallow depths.
-It is extremely weak, just a small bit dangerous,
-and has no magical powers.
-
-The Cave ogre is a common monster,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has no magical powers.
-
-The White wraith is a common undead monster,
-occurring at somewhat shallow depths.
-It is extremely weak, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Monadic Deva is a legendary monster,
-occurring at somewhat shallow depths.
-It is somewhat weak, moderately dangerous,
-and has small magical powers.
-
-Mim, Betrayer of Turin is a unique monster,
-occurring at somewhat shallow depths.
-He is hellishly strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The Killer red beetle is a common animal,
-occurring at somewhat shallow depths.
-It is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Creeping adamantite coins is a rare animal,
-occurring at somewhat shallow depths.
-It is somewhat strong, moderately dangerous,
-and has no magical powers.
-
-The Algroth is a common monster,
-occurring at somewhat shallow depths.
-It is somewhat weak, moderately dangerous,
-and has no magical powers.
-
-The Vibration hound is a somewhat rare animal,
-occurring at somewhat shallow depths.
-It is very weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Nexus hound is a somewhat rare animal,
-occurring at somewhat shallow depths.
-It is very weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Ogre mage is an uncommon giant,
-occurring at somewhat shallow depths.
-It is moderately strong, not one little bit dangerous,
-and has arcane magical powers.
-
-Lokkak, the Ogre Chieftain is a unique giant,
-occurring at somewhat shallow depths.
-He is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-The Vampire is a common undead monster,
-occurring at somewhat shallow depths.
-It is somewhat weak, moderately dangerous,
-and has arcane magical powers.
-
diff --git a/lib/file/book-15.txt b/lib/file/book-15.txt
deleted file mode 100644
index 5f33444b..00000000
--- a/lib/file/book-15.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Gorgimera is an uncommon monster,
-occurring at somewhat shallow depths.
-It is somewhat strong, just a small bit dangerous,
-and has no magical powers.
-
-The Colbran is an uncommon monster,
-occurring at somewhat shallow depths.
-It is unimaginably strong, moderately dangerous,
-and has an inkling of magical powers.
-
-The Spirit naga is an uncommon monster,
-occurring at somewhat shallow depths.
-She is somewhat strong, somewhat dangerous,
-and has unremarkable magical powers.
-
-The 5-headed hydra is an uncommon animal,
-occurring at somewhat shallow depths.
-It is extremely strong, moderately dangerous,
-and has rudimentary magical powers.
-
-The Black knight is a common monster,
-occurring at somewhat shallow depths.
-He is somewhat weak, not one little bit dangerous,
-and has rudimentary magical powers.
-
-Uldor the Accursed is a unique monster,
-occurring at somewhat shallow depths.
-He is unimaginably strong, just a little bit dangerous,
-and has no magical powers.
-
-The Mage is a common monster,
-occurring at somewhat shallow depths.
-He is extremely weak, not one little bit dangerous,
-and has unimaginably powerful magical powers.
-
-The Mind flayer is a common monster,
-occurring at somewhat shallow depths.
-It is very weak, moderately dangerous,
-and has remarkable magical powers.
-
-Draebor, the Imp is a unique monster,
-occurring at somewhat shallow depths.
-It is somewhat strong, very dangerous,
-and has arcane magical powers.
-
-The Basilisk is a somewhat rare animal,
-occurring at somewhat shallow depths.
-It is strong, not at all dangerous,
-and has no magical powers.
-
-The Ice troll is a common troll,
-occurring at somewhat shallow depths.
-He is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant purple worm is a somewhat rare animal,
-occurring at somewhat shallow depths.
-It is somewhat strong, somewhat dangerous,
-and has no magical powers.
-
-The Movanic Deva is a legendary monster,
-occurring at somewhat shallow depths.
-It is moderately strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The Catoblepas is an uncommon animal,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has no magical powers.
-
-The Mimic (ring) is a somewhat rare monster,
-occurring at somewhat shallow depths.
-It is moderately strong, extremely dangerous,
-and has hellishly powerful magical powers.
-
-The Young blue dragon is a common dragon,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Young white dragon is a common dragon,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Young green dragon is a common dragon,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Young bronze dragon is a somewhat rare dragon,
-occurring at somewhat shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Mithril golem is a rare monster,
-occurring at shallow depths.
-It is hellishly strong, moderately dangerous,
-and has no magical powers.
-
-The Shadow drake is an uncommon dragon,
-occurring at shallow depths.
-It is very weak, just a small bit dangerous,
-and has simple magical powers.
-
-The Skeleton troll is a common undead monster,
-occurring at shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Manticore is an uncommon monster,
-occurring at shallow depths.
-It is very weak, not at all dangerous,
-and has an inkling of magical powers.
-
-The Giant blue ant is an uncommon animal,
-occurring at shallow depths.
-It is extremely weak, just a little bit dangerous,
-and has no magical powers.
-
-The Giant army ant is a somewhat rare monster,
-occurring at shallow depths.
-It is extremely weak, just a small bit dangerous,
-and has no magical powers.
-
-The Grave wight is a common undead monster,
-occurring at shallow depths.
-It is extremely weak, just a little bit dangerous,
-and has rudimentary magical powers.
-
-The Killer slicer beetle is an uncommon monster,
-occurring at shallow depths.
-It is very weak, not at all dangerous,
-and has no magical powers.
-
-The Ghost is a common undead monster,
-occurring at shallow depths.
-It is extremely weak, alarmingly dangerous,
-and has an inkling of magical powers.
-
-The Death watch beetle is a somewhat rare monster,
-occurring at shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has no magical powers.
-
-The Ogre shaman is an uncommon giant,
-occurring at shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has advanced magical powers.
-
-The Nexus quylthulg is a common monster,
-occurring at shallow depths.
-It is extremely weak, not at all dangerous,
-and has average magical powers.
-
-Shelob, Spider of Darkness is a unique animal,
-occurring at shallow depths.
-She is hellishly strong, unimaginably dangerous,
-and has very powerful magical powers.
-
-The Ninja is an uncommon monster,
-occurring at shallow depths.
-He is very weak, moderately dangerous,
-and has no magical powers.
-
-The Memory moss is a somewhat rare monster,
-occurring at shallow depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Storm giant is a common giant,
-occurring at shallow depths.
-It is moderately strong, moderately dangerous,
-and has average magical powers.
-
-The Cave troll is a common troll,
-occurring at shallow depths.
-He is somewhat weak, somewhat dangerous,
-and has no magical powers.
-
-The Half-troll is an uncommon troll,
-occurring at shallow depths.
-He is moderately strong, somewhat dangerous,
-and has no magical powers.
-
-The Mystic is a somewhat rare monster,
-occurring at shallow depths.
-He is moderately strong, moderately dangerous,
-and has rudimentary magical powers.
-
-The Barrow wight is a somewhat rare undead monster,
-occurring at shallow depths.
-It is extremely weak, somewhat dangerous,
-and has small magical powers.
-
-The Giant skeleton troll is a common undead monster,
-occurring at shallow depths.
-It is somewhat strong, moderately dangerous,
-and has no magical powers.
-
-The Chaos drake is a somewhat rare dragon,
-occurring at shallow depths.
-It is strong, somewhat dangerous,
-and has remarkable magical powers.
-
-The Law drake is a somewhat rare dragon,
-occurring at shallow depths.
-It is strong, somewhat dangerous,
-and has average magical powers.
-
-The Balance drake is a somewhat rare dragon,
-occurring at shallow depths.
-It is very strong, somewhat dangerous,
-and has hellishly powerful magical powers.
-
-The Ethereal drake is a somewhat rare dragon,
-occurring at shallow depths.
-It is somewhat strong, somewhat dangerous,
-and has unremarkable magical powers.
-
-Bert the Stone Troll is a unique troll,
-occurring at shallow depths.
-He is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-Bill the Stone Troll is a unique troll,
-occurring at shallow depths.
-He is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-Tom the Stone Troll is a unique troll,
-occurring at shallow depths.
-He is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-The Shade is a somewhat rare undead monster,
-occurring at shallow depths.
-It is somewhat weak, moderately dangerous,
-and has small magical powers.
-
-The Spectre is a somewhat rare undead monster,
-occurring at shallow depths.
-It is somewhat weak, moderately dangerous,
-and has small magical powers.
-
-The Water troll is a common troll,
-occurring at shallow depths.
-He is moderately strong, moderately dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-16.txt b/lib/file/book-16.txt
deleted file mode 100644
index d2b36408..00000000
--- a/lib/file/book-16.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Fire elemental is an uncommon monster,
-occurring at shallow depths.
-It is very weak, moderately dangerous,
-and has no magical powers.
-
-The Astral Deva is a legendary monster,
-occurring at shallow depths.
-It is somewhat strong, alarmingly dangerous,
-and has advanced magical powers.
-
-The Water elemental is an uncommon monster,
-occurring at shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Invisible stalker is a somewhat rare monster,
-occurring at shallow depths.
-It is very weak, moderately dangerous,
-and has no magical powers.
-
-The Carrion crawler is an uncommon animal,
-occurring at shallow depths.
-It is very weak, somewhat dangerous,
-and has no magical powers.
-
-The Master thief is an uncommon monster,
-occurring at shallow depths.
-He is very weak, not at all dangerous,
-and has no magical powers.
-
-Ulfang the Black is a unique monster,
-occurring at shallow depths.
-He is unimaginably strong, just a little bit dangerous,
-and has no magical powers.
-
-The Lich is a somewhat rare undead monster,
-occurring at shallow depths.
-It is somewhat weak, very dangerous,
-and has very powerful magical powers.
-
-The Master vampire is a somewhat rare undead monster,
-occurring at shallow depths.
-It is moderately strong, moderately dangerous,
-and has very powerful magical powers.
-
-The Giant grey scorpion is a rare monster,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has no magical powers.
-
-The Earth elemental is an uncommon monster,
-occurring at shallow depths.
-It is somewhat weak, very dangerous,
-and has no magical powers.
-
-The Air elemental is an uncommon monster,
-occurring at shallow depths.
-It is very weak, alarmingly dangerous,
-and has no magical powers.
-
-The Hell hound is a somewhat rare animal,
-occurring at shallow depths.
-It is moderately strong, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Eog golem is a rare monster,
-occurring at shallow depths.
-It is hellishly strong, moderately dangerous,
-and has no magical powers.
-
-The Olog is a common troll,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has no magical powers.
-
-The Dagashi is a rare monster,
-occurring at shallow depths.
-He is somewhat weak, extremely dangerous,
-and has no magical powers.
-
-The Gravity hound is an uncommon animal,
-occurring at shallow depths.
-It is somewhat weak, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Acidic cytoplasm is an extremely rare monster,
-occurring at shallow depths.
-It is moderately strong, hellishly dangerous,
-and has no magical powers.
-
-The Inertia hound is an uncommon animal,
-occurring at shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Impact hound is an uncommon animal,
-occurring at shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has no magical powers.
-
-The Dread is an uncommon undead monster,
-occurring at shallow depths.
-It is somewhat strong, moderately dangerous,
-and has simple magical powers.
-
-The Ooze elemental is a somewhat rare monster,
-occurring at shallow depths.
-It is very weak, hellishly dangerous,
-and has small magical powers.
-
-The Smoke elemental is a somewhat rare monster,
-occurring at shallow depths.
-It is very weak, moderately dangerous,
-and has rudimentary magical powers.
-
-The Young black dragon is a common dragon,
-occurring at shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Mumak is a somewhat rare monster,
-occurring at shallow depths.
-It is alarmingly strong, not one little bit dangerous,
-and has no magical powers.
-
-The Giant red ant is a common animal,
-occurring at shallow depths.
-It is very weak, moderately dangerous,
-and has no magical powers.
-
-The Mature white dragon is a common dragon,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Xorn is an uncommon monster,
-occurring at shallow depths.
-It is very weak, very dangerous,
-and has no magical powers.
-
-The Shadow is a somewhat rare undead monster,
-occurring at shallow depths.
-It is very weak, extremely dangerous,
-and has an inkling of magical powers.
-
-The Phantom is a somewhat rare undead monster,
-occurring at shallow depths.
-It is somewhat strong, extremely dangerous,
-and has an inkling of magical powers.
-
-The Grey wraith is a common undead monster,
-occurring at shallow depths.
-It is very weak, somewhat dangerous,
-and has small magical powers.
-
-The Young multi-hued dragon is a common dragon,
-occurring at shallow depths.
-It is somewhat weak, very dangerous,
-and has very powerful magical powers.
-
-The Colossus is a rare monster,
-occurring at shallow depths.
-It is hellishly strong, extremely dangerous,
-and has no magical powers.
-
-The Young gold dragon is an uncommon dragon,
-occurring at shallow depths.
-It is somewhat weak, not at all dangerous,
-and has an inkling of magical powers.
-
-Rogrog the Black Troll is a unique troll,
-occurring at shallow depths.
-He is hellishly strong, moderately dangerous,
-and has no magical powers.
-
-The Mature blue dragon is a common dragon,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Mature green dragon is a common dragon,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Mature bronze dragon is an uncommon dragon,
-occurring at shallow depths.
-It is somewhat strong, just a small bit dangerous,
-and has rudimentary magical powers.
-
-The Young red dragon is a common dragon,
-occurring at shallow depths.
-It is somewhat weak, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Trapper is a somewhat rare monster,
-occurring at shallow depths.
-It is strong, moderately dangerous,
-and has no magical powers.
-
-The Bodak is an uncommon monster,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has average magical powers.
-
-The Ice elemental is an uncommon monster,
-occurring at shallow depths.
-It is moderately strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The Necromancer is an uncommon monster,
-occurring at shallow depths.
-He is somewhat weak, just a little bit dangerous,
-and has unimaginably powerful magical powers.
-
-Lorgan, Chief of the Easterlings is a unique monster,
-occurring at shallow depths.
-He is hellishly strong, very dangerous,
-and has rudimentary magical powers.
-
-The Demonologist is an uncommon monster,
-occurring at shallow depths.
-He is somewhat weak, not at all dangerous,
-and has unremarkable magical powers.
-
-The Mummified troll is a common undead monster,
-occurring at shallow depths.
-It is very weak, moderately dangerous,
-and has no magical powers.
-
-The Queen Ant is a unique animal,
-occurring at shallow depths.
-She is hellishly strong, moderately dangerous,
-and has rudimentary magical powers.
-
-The Will o' the Wisp is a rare monster,
-occurring at shallow depths.
-It is somewhat weak, hellishly dangerous,
-and has average magical powers.
-
-The Magma elemental is an uncommon monster,
-occurring at shallow depths.
-It is moderately strong, extremely dangerous,
-and has simple magical powers.
-
-The Black pudding is an extremely rare monster,
-occurring at shallow depths.
-It is moderately strong, hellishly dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-17.txt b/lib/file/book-17.txt
deleted file mode 100644
index 18f2b663..00000000
--- a/lib/file/book-17.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Killer blue beetle is an uncommon animal,
-occurring at shallow depths.
-It is somewhat weak, somewhat dangerous,
-and has no magical powers.
-
-The Nexus vortex is a common monster,
-occurring at shallow depths.
-It is somewhat weak, not one little bit dangerous,
-and has no magical powers.
-
-The Plasma vortex is a common monster,
-occurring at shallow depths.
-It is somewhat weak, somewhat dangerous,
-and has no magical powers.
-
-The Mature red dragon is a common dragon,
-occurring at shallow depths.
-It is somewhat strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Mature gold dragon is an uncommon dragon,
-occurring at shallow depths.
-It is strong, just a small bit dangerous,
-and has rudimentary magical powers.
-
-The Crystal drake is an uncommon dragon,
-occurring at shallow depths.
-It is strong, somewhat dangerous,
-and has small magical powers.
-
-The Mature black dragon is a common dragon,
-occurring at shallow depths.
-It is somewhat strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Mature multi-hued dragon is an uncommon dragon,
-occurring at shallow depths.
-It is very strong, extremely dangerous,
-and has extremely powerful magical powers.
-
-The Death knight is a common monster,
-occurring at shallow depths.
-It is very strong, somewhat dangerous,
-and has remarkable magical powers.
-
-Castamir the Usurper is a unique monster,
-occurring at shallow depths.
-He is alarmingly strong, not at all dangerous,
-and has extremely powerful magical powers.
-
-The Time vortex is a rare monster,
-occurring at shallow depths.
-It is somewhat weak, not one little bit dangerous,
-and has no magical powers.
-
-The Shimmering vortex is a rare monster,
-occurring at shallow depths.
-It is extremely weak, not one little bit dangerous,
-and has small magical powers.
-
-The Ancient blue dragon is a common dragon,
-occurring at shallow depths.
-It is very strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Ancient bronze dragon is an uncommon dragon,
-occurring at shallow depths.
-It is extremely strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Beholder is a rare monster,
-occurring at shallow depths.
-It is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Emperor wight is an uncommon undead monster,
-occurring at shallow depths.
-It is moderately strong, somewhat dangerous,
-and has small magical powers.
-
-The Planetar is a legendary monster,
-occurring at shallow depths.
-It is somewhat strong, extremely dangerous,
-and has hellishly powerful magical powers.
-
-Vargo, Tyrant of Fire is a unique monster,
-occurring at shallow depths.
-It is hellishly strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The Black wraith is an uncommon undead monster,
-occurring at shallow depths.
-It is somewhat strong, somewhat dangerous,
-and has small magical powers.
-
-The Erinyes is an uncommon monster,
-occurring at shallow depths.
-She is very weak, moderately dangerous,
-and has an inkling of magical powers.
-
-The Nether wraith is an uncommon undead monster,
-occurring at shallow depths.
-It is somewhat strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The Eldrak is a somewhat rare troll,
-occurring at shallow depths.
-It is extremely strong, somewhat dangerous,
-and has no magical powers.
-
-The Ettin is a somewhat rare troll,
-occurring at shallow depths.
-It is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-Waldern, King of Water is a unique monster,
-occurring at shallow depths.
-It is hellishly strong, somewhat dangerous,
-and has unimaginably powerful magical powers.
-
-Kavlax the Many-Headed is a unique dragon,
-occurring at shallow depths.
-He is hellishly strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-The Ancient white dragon is a common dragon,
-occurring at shallow depths.
-It is very strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Ancient green dragon is a common dragon,
-occurring at shallow depths.
-It is extremely strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The 7-headed hydra is an uncommon animal,
-occurring at shallow depths.
-It is unimaginably strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The Night mare is a somewhat rare undead monster,
-occurring at shallow depths.
-It is hellishly strong, very dangerous,
-and has no magical powers.
-
-The Vampire lord is a somewhat rare undead monster,
-occurring at shallow depths.
-It is hellishly strong, unimaginably dangerous,
-and has very powerful magical powers.
-
-The Ancient black dragon is a common dragon,
-occurring at shallow depths.
-It is extremely strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Disenchanter worm mass is a somewhat rare animal,
-occurring at shallow-to-moderate depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Rotting quylthulg is a common animal,
-occurring at shallow-to-moderate depths.
-It is extremely weak, just a small bit dangerous,
-and has unremarkable magical powers.
-
-The Spirit troll is a somewhat rare troll,
-occurring at shallow-to-moderate depths.
-It is unimaginably strong, very dangerous,
-and has no magical powers.
-
-The Lesser titan is a somewhat rare monster,
-occurring at shallow-to-moderate depths.
-It is unimaginably strong, moderately dangerous,
-and has unremarkable magical powers.
-
-The 9-headed hydra is an uncommon animal,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, just a small bit dangerous,
-and has simple magical powers.
-
-The Enchantress is a rare monster,
-occurring at shallow-to-moderate depths.
-She is somewhat strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Archpriest is an uncommon monster,
-occurring at shallow-to-moderate depths.
-He is somewhat strong, somewhat dangerous,
-and has arcane magical powers.
-
-The Sorcerer is an uncommon monster,
-occurring at shallow-to-moderate depths.
-He is somewhat strong, somewhat dangerous,
-and has hellishly powerful magical powers.
-
-The Xaren is a common monster,
-occurring at shallow-to-moderate depths.
-It is moderately strong, very dangerous,
-and has no magical powers.
-
-The Giant roc is a somewhat rare animal,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has no magical powers.
-
-Uvatha the Horseman is a unique undead monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, extremely dangerous,
-and has no magical powers.
-
-The Minotaur is an uncommon monster,
-occurring at shallow-to-moderate depths.
-It is unimaginably strong, not one little bit dangerous,
-and has no magical powers.
-
-Medusa, the Gorgon is a unique monster,
-occurring at shallow-to-moderate depths.
-She is hellishly strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-The Death drake is an uncommon dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has small magical powers.
-
-The Ancient red dragon is a common dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Ancient gold dragon is an uncommon dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Great crystal drake is an uncommon dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has small magical powers.
-
-The Vrock is an uncommon monster,
-occurring at shallow-to-moderate depths.
-It is moderately strong, moderately dangerous,
-and has no magical powers.
-
-The Death quasit is a somewhat rare monster,
-occurring at shallow-to-moderate depths.
-It is somewhat strong, alarmingly dangerous,
-and has unremarkable magical powers.
-
diff --git a/lib/file/book-18.txt b/lib/file/book-18.txt
deleted file mode 100644
index c36b205f..00000000
--- a/lib/file/book-18.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-Adunaphel the Quiet is a unique undead monster,
-occurring at shallow-to-moderate depths.
-She is hellishly strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-The Dark elven sorceror is an uncommon monster,
-occurring at shallow-to-moderate depths.
-He is extremely strong, just a small bit dangerous,
-and has hellishly powerful magical powers.
-
-The Master lich is an uncommon undead monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, extremely dangerous,
-and has hellishly powerful magical powers.
-
-The Hezrou is a somewhat rare monster,
-occurring at shallow-to-moderate depths.
-It is somewhat strong, moderately dangerous,
-and has rudimentary magical powers.
-
-Akhorahil the Blind is a unique undead monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has hellishly powerful magical powers.
-
-Gorlim, Betrayer of Barahir is a unique monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, hellishly dangerous,
-and has remarkable magical powers.
-
-The Solar is a legendary monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, alarmingly dangerous,
-and has advanced magical powers.
-
-The Glabrezu is an uncommon monster,
-occurring at shallow-to-moderate depths.
-It is strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-Ren the Unclean is a unique undead monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-The Nalfeshnee is an uncommon monster,
-occurring at shallow-to-moderate depths.
-It is very strong, somewhat dangerous,
-and has small magical powers.
-
-The Undead beholder is a rare undead monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Dread is a common undead monster,
-occurring at shallow-to-moderate depths.
-It is somewhat strong, extremely dangerous,
-and has simple magical powers.
-
-The Mumak is an uncommon monster,
-occurring at shallow-to-moderate depths.
-It is alarmingly strong, just a small bit dangerous,
-and has no magical powers.
-
-The Ancient multi-hued dragon is a common dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, alarmingly dangerous,
-and has extremely powerful magical powers.
-
-The Ethereal dragon is an uncommon dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, moderately dangerous,
-and has average magical powers.
-
-Ji Indur Dawndeath is a unique undead monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, moderately dangerous,
-and has very powerful magical powers.
-
-The Marilith is an uncommon monster,
-occurring at shallow-to-moderate depths.
-She is hellishly strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-Quaker, Master of Earth is a unique monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, hellishly dangerous,
-and has rudimentary magical powers.
-
-The Lesser Balrog is a somewhat rare monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, moderately dangerous,
-and has simple magical powers.
-
-Ariel, Queen of Air is a unique monster,
-occurring at shallow-to-moderate depths.
-She is hellishly strong, hellishly dangerous,
-and has average magical powers.
-
-The 11-headed hydra is an uncommon animal,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, just a small bit dangerous,
-and has extremely powerful magical powers.
-
-The Patriarch is an uncommon monster,
-occurring at shallow-to-moderate depths.
-He is extremely strong, somewhat dangerous,
-and has extremely powerful magical powers.
-
-The Dreadmaster is an uncommon undead monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, unimaginably dangerous,
-and has very powerful magical powers.
-
-The Drolem is a somewhat rare dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has small magical powers.
-
-Scatha the Worm is a unique dragon,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has small magical powers.
-
-Dwar, Dog Lord of Waw is a unique undead monster,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-Smaug the Golden is a unique dragon,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has small magical powers.
-
-The Dracolich is an uncommon undead monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, alarmingly dangerous,
-and has simple magical powers.
-
-The Greater titan is a somewhat rare monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, moderately dangerous,
-and has simple magical powers.
-
-The Dracolisk is an uncommon dragon,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has simple magical powers.
-
-The Death mold is a common monster,
-occurring at shallow-to-moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has no magical powers.
-
-Itangast the Fire Drake is a unique dragon,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has small magical powers.
-
-Glaurung, Father of the Dragons is a unique dragon,
-occurring at shallow-to-moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has unremarkable magical powers.
-
-The Master mystic is a somewhat rare monster,
-occurring at moderate depths.
-He is hellishly strong, hellishly dangerous,
-and has small magical powers.
-
-Durin's Bane is a unique monster,
-occurring at moderate depths.
-He is hellishly strong, moderately dangerous,
-and has remarkable magical powers.
-
-The Nightwing is a rare undead monster,
-occurring at moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Nether hound is an uncommon animal,
-occurring at moderate depths.
-It is very strong, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Time hound is a rare animal,
-occurring at moderate depths.
-It is very strong, just a small bit dangerous,
-and has no magical powers.
-
-The Plasma hound is an uncommon animal,
-occurring at moderate depths.
-It is very strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Demonic quylthulg is a common animal,
-occurring at moderate depths.
-It is moderately strong, just a small bit dangerous,
-and has unremarkable magical powers.
-
-The Great storm wyrm is an uncommon dragon,
-occurring at moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-Baphomet the Minotaur Lord is a unique monster,
-occurring at moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has hellishly powerful magical powers.
-
-Harowen the Black Hand is a unique monster,
-occurring at moderate depths.
-He is hellishly strong, moderately dangerous,
-and has no magical powers.
-
-Hoarmurath of Dir is a unique undead monster,
-occurring at moderate depths.
-He is hellishly strong, somewhat dangerous,
-and has hellishly powerful magical powers.
-
-The Grand master mystic is a somewhat rare monster,
-occurring at moderate depths.
-He is hellishly strong, hellishly dangerous,
-and has arcane magical powers.
-
-Khamul the Easterling is a unique undead monster,
-occurring at moderate depths.
-He is hellishly strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-The Ethereal hound is a somewhat rare animal,
-occurring at moderate depths.
-It is unimaginably strong, somewhat dangerous,
-and has an inkling of magical powers.
-
-The Great ice wyrm is an uncommon dragon,
-occurring at moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Phoenix is a unique animal,
-occurring at moderate depths.
-It is hellishly strong, alarmingly dangerous,
-and has hellishly powerful magical powers.
-
-The Nightcrawler is a rare undead monster,
-occurring at moderate depths.
-It is hellishly strong, unimaginably dangerous,
-and has hellishly powerful magical powers.
-
diff --git a/lib/file/book-19.txt b/lib/file/book-19.txt
deleted file mode 100644
index 62ecebc9..00000000
--- a/lib/file/book-19.txt
+++ /dev/null
@@ -1,250 +0,0 @@
-The Hand druj is a rare undead monster,
-occurring at moderate depths.
-It is very strong, somewhat dangerous,
-and has extremely powerful magical powers.
-
-The Eye druj is a rare undead monster,
-occurring at moderate depths.
-It is unimaginably strong, moderately dangerous,
-and has hellishly powerful magical powers.
-
-The Skull druj is a rare undead monster,
-occurring at moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Chaos vortex is a common monster,
-occurring at moderate depths.
-It is very strong, not one little bit dangerous,
-and has no magical powers.
-
-The Aether vortex is an uncommon monster,
-occurring at moderate depths.
-It is strong, unimaginably dangerous,
-and has hellishly powerful magical powers.
-
-The Lernean Hydra is a unique animal,
-occurring at moderate depths.
-It is hellishly strong, alarmingly dangerous,
-and has hellishly powerful magical powers.
-
-Thuringwethil is a unique undead monster,
-occurring at moderate depths.
-She is hellishly strong, alarmingly dangerous,
-and has very powerful magical powers.
-
-The Great hell wyrm is an uncommon dragon,
-occurring at moderate depths.
-It is hellishly strong, somewhat dangerous,
-and has rudimentary magical powers.
-
-The Draconic quylthulg is a somewhat rare animal,
-occurring at moderate depths.
-It is very strong, just a small bit dangerous,
-and has unremarkable magical powers.
-
-Fundin Bluecloak is a unique monster,
-occurring at moderate depths.
-It is hellishly strong, extremely dangerous,
-and has unimaginably powerful magical powers.
-
-Uriel, Angel of Fire is a unique monster,
-occurring at moderate depths.
-He is hellishly strong, alarmingly dangerous,
-and has hellishly powerful magical powers.
-
-Azriel, Angel of Death is a unique monster,
-occurring at moderate depths.
-He is hellishly strong, extremely dangerous,
-and has hellishly powerful magical powers.
-
-Ancalagon the Black is a unique dragon,
-occurring at moderate depths.
-He is hellishly strong, moderately dangerous,
-and has extremely powerful magical powers.
-
-The Nightwalker is a rare undead monster,
-occurring at moderate depths.
-It is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-Gabriel, the Messenger is a unique monster,
-occurring at moderate depths.
-He is hellishly strong, hellishly dangerous,
-and has remarkable magical powers.
-
-Saruman of Many Colours is a unique monster,
-occurring at moderate-to-deep depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Dreadlord is an uncommon undead monster,
-occurring at moderate-to-deep depths.
-It is hellishly strong, unimaginably dangerous,
-and has arcane magical powers.
-
-The Cat Lord is a unique monster,
-occurring at moderate-to-deep depths.
-He is hellishly strong, hellishly dangerous,
-and has an inkling of magical powers.
-
-The Chaos beetle is a rare monster,
-occurring at moderate-to-deep depths.
-It is hellishly strong, not at all dangerous,
-and has rudimentary magical powers.
-
-The Chaos hound is a common animal,
-occurring at moderate-to-deep depths.
-It is hellishly strong, just a small bit dangerous,
-and has an inkling of magical powers.
-
-The Great Wyrm of Chaos is an uncommon dragon,
-occurring at moderate-to-deep depths.
-It is hellishly strong, somewhat dangerous,
-and has very powerful magical powers.
-
-The Great Wyrm of Law is an uncommon dragon,
-occurring at moderate-to-deep depths.
-It is hellishly strong, somewhat dangerous,
-and has very powerful magical powers.
-
-The Great Wyrm of Balance is a rare dragon,
-occurring at moderate-to-deep depths.
-It is hellishly strong, somewhat dangerous,
-and has hellishly powerful magical powers.
-
-Tselakus, the Dreadlord is a unique undead monster,
-occurring at moderate-to-deep depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-Tiamat, Celestial Dragon of Evil is a unique dragon,
-occurring at deep depths.
-She is hellishly strong, unimaginably dangerous,
-and has hellishly powerful magical powers.
-
-The Black reaver is a somewhat rare undead monster,
-occurring at deep depths.
-It is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Master quylthulg is a somewhat rare animal,
-occurring at deep depths.
-It is hellishly strong, just a small bit dangerous,
-and has hellishly powerful magical powers.
-
-The Greater draconic quylthulg is a somewhat rare animal,
-occurring at deep depths.
-It is hellishly strong, just a small bit dangerous,
-and has simple magical powers.
-
-The Greater rotting quylthulg is a somewhat rare animal,
-occurring at deep depths.
-It is hellishly strong, just a small bit dangerous,
-and has simple magical powers.
-
-Vecna, the Emperor Lich is a unique undead monster,
-occurring at deep depths.
-He is hellishly strong, unimaginably dangerous,
-and has hellishly powerful magical powers.
-
-Omarax the Eye Tyrant is a unique monster,
-occurring at deep depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-Ungoliant, the Unlight is a unique animal,
-occurring at deep depths.
-She is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Aether hound is an uncommon animal,
-occurring at deep depths.
-It is hellishly strong, very dangerous,
-and has hellishly powerful magical powers.
-
-The Mouth of Sauron is a unique monster,
-occurring at deep depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Emperor Quylthulg is a unique animal,
-occurring at deep depths.
-It is hellishly strong, just a little bit dangerous,
-and has unimaginably powerful magical powers.
-
-Qlzqqlzuup, the Lord of Flesh is a unique animal,
-occurring at deep depths.
-It is hellishly strong, just a little bit dangerous,
-and has hellishly powerful magical powers.
-
-Murazor, the Witch-King of Angmar is a unique undead monster,
-occurring at very deep depths.
-He is hellishly strong, extremely dangerous,
-and has hellishly powerful magical powers.
-
-Pazuzu, Lord of Air is a unique monster,
-occurring at very deep depths.
-He is hellishly strong, hellishly dangerous,
-and has advanced magical powers.
-
-The Hell hound is a rare animal,
-occurring at very deep depths.
-It is somewhat strong, moderately dangerous,
-and has an inkling of magical powers.
-
-Cantoras, the Skeletal Lord is a unique undead monster,
-occurring at very deep depths.
-He is hellishly strong, unimaginably dangerous,
-and has hellishly powerful magical powers.
-
-The Tarrasque is a unique monster,
-occurring at very deep depths.
-It is hellishly strong, somewhat dangerous,
-and has average magical powers.
-
-Lungorthin, the Balrog of White Fire is a unique monster,
-occurring at very deep depths.
-He is hellishly strong, extremely dangerous,
-and has advanced magical powers.
-
-Draugluin, Sire of All Werewolves is a unique animal,
-occurring at very deep depths.
-He is hellishly strong, moderately dangerous,
-and has simple magical powers.
-
-Feagwath the Undead Sorceror is a unique undead monster,
-occurring at extremely deep depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-Carcharoth, the Jaws of Thirst is a unique animal,
-occurring at extremely deep depths.
-He is hellishly strong, moderately dangerous,
-and has advanced magical powers.
-
-Cerberus, Guardian of Hades is a unique animal,
-occurring at extremely deep depths.
-It is hellishly strong, moderately dangerous,
-and has very powerful magical powers.
-
-Gothmog, the High Captain of Balrogs is a unique monster,
-occurring at extremely deep depths.
-He is hellishly strong, unimaginably dangerous,
-and has advanced magical powers.
-
-Sauron, the Sorcerer is a unique monster,
-occurring at extremely deep depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-Morgoth, Lord of Darkness is a unique monster,
-occurring at bottomless depths.
-He is hellishly strong, hellishly dangerous,
-and has hellishly powerful magical powers.
-
-The Haughty noble is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
diff --git a/lib/file/book-9.txt b/lib/file/book-9.txt
deleted file mode 100644
index 2c37a3aa..00000000
--- a/lib/file/book-9.txt
+++ /dev/null
@@ -1,240 +0,0 @@
-The Filthy street urchin is an uncommon monster,
-occurring at surface depths.
-He is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Scrawny cat is a somewhat rare animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Scruffy little dog is a somewhat rare animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Farmer Maggot is a unique monster,
-occurring at surface depths.
-He is somewhat weak, somewhat dangerous,
-and has no magical powers.
-
-The Blubbering idiot is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Boil-covered wretch is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Village idiot is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Pitiful looking beggar is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Mangy looking leper is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Squint eyed rogue is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Singing, happy drunk is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Aimless looking merchant is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Mean looking mercenary is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Town Guardsman is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Grey mold is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Grey mushroom patch is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant yellow centipede is a common monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Giant white centipede is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The White icky thing is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Clear icky thing is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Giant white mouse is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Large brown snake is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Large white snake is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Small kobold is a common monster,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Kobold is a common monster,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The White worm mass is a common animal,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Floating eye is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Rock lizard is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Jackal is a common animal,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Soldier ant is a common monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has no magical powers.
-
-The Fruit bat is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Shrieker mushroom patch is a common monster,
-occurring at surface depths.
-It is laughably weak, not at all dangerous,
-and has an inkling of magical powers.
-
-The Blubbering icky thing is a common monster,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The Metallic green centipede is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Novice warrior is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Novice rogue is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Novice priest is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has small magical powers.
-
-The Novice mage is a common monster,
-occurring at surface depths.
-He is laughably weak, not one little bit dangerous,
-and has rudimentary magical powers.
-
-The Yellow mushroom patch is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The White jelly is a common monster,
-occurring at surface depths.
-It is laughably weak, somewhat dangerous,
-and has no magical powers.
-
-The Giant green frog is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Giant black ant is a common monster,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Salamander is a common animal,
-occurring at surface depths.
-It is laughably weak, just a little bit dangerous,
-and has no magical powers.
-
-The White harpy is a common animal,
-occurring at surface depths.
-She is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-The Blue yeek is a common animal,
-occurring at surface depths.
-It is laughably weak, not one little bit dangerous,
-and has no magical powers.
-
-Grip, Farmer Maggot's dog is a unique animal,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-Fang, Farmer Maggot's dog is a unique animal,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
-The Green worm mass is a common animal,
-occurring at surface depths.
-It is laughably weak, just a small bit dangerous,
-and has no magical powers.
-
diff --git a/lib/help/debug.txt b/lib/help/debug.txt
index 8aea13ee..afe71920 100644
--- a/lib/help/debug.txt
+++ b/lib/help/debug.txt
@@ -17,13 +17,13 @@ will not be scored if you use debug commands.
*****debug.txt*5[c Create object] *****debug.txt*6[C Create artifact]
*****debug.txt*7[d Detect all] *****debug.txt*8[D Teleport to the wilderness]
*****debug.txt*9[e Edit character attributes] *****debug.txt*10[E Change grid's mana]
- *****debug.txt*11[f *IDENTIFY*] *****debug.txt*12[F Features]
+ f (unused) *****debug.txt*12[F Features]
*****debug.txt*13[g Create good item] G (unused)
*****debug.txt*15[h Change life rating] *****debug.txt*16[H Hostile monster creation]
- *****debug.txt*17[i Identify] I (unused)
+ i (unused) I (unused)
*****debug.txt*19[j Jump to other level] J (unused)
*****debug.txt*21[k Check attributes] K (unused)
- *****debug.txt*23[l Learn about objects] L (unused)
+ l (unused) L (unused)
*****debug.txt*25[m Magic Mapping] *****debug.txt*26[M Gain corruption]
*****debug.txt*27[n Summon named monster] *****debug.txt*28[N Summon _friendly_ named monster]
*****debug.txt*29[o Edit object attributes] O (unused)
@@ -118,9 +118,6 @@ maximal legal value.
Alter how much mana a grid has.
Use the "Command count", aka 0, to specify the amount of mana
that you want.
-~~~~~11
-[[[[[G*IDENTIFY* (f)]
- Like a Scroll of *Identify*.
~~~~~12
[[[[[GFeatures (F)]
Use the "Command count", aka 0, to specify a number from
@@ -135,9 +132,6 @@ maximal legal value.
~~~~~16
[[[[[GHostile monster creation (H)]
Summons a Pack of Creatures of the same kind.
-~~~~~17
-[[[[[GIdentify (i)]
- Like a Scroll of Identify.
~~~~~19
[[[[[GJump to other level (j)]
Jump to other dungeon level. This does not work in the
@@ -145,9 +139,6 @@ maximal legal value.
~~~~~21
[[[[[GCheck attributes (k)]
Displays your characters attributes.
-~~~~~23
-[[[[[GLearn about objects (l)]
- Make you know about all objects. Not sure how this works.
~~~~~25
[[[[[GMagic Mapping (m)]
Like a Scroll of Magic mapping.
diff --git a/lib/help/g_eru.txt b/lib/help/g_eru.txt
index 113875b3..f7e0406f 100644
--- a/lib/help/g_eru.txt
+++ b/lib/help/g_eru.txt
@@ -34,7 +34,7 @@ in asking for his help without offending him!
There is a special book called the "Holy Tome of Eru Iluvatar" which
contains instructions for the procedure for each of the prayers Eru will
-grant. There are four prayers all told, which are:
+grant. There are three prayers all told, which are:
1. [[[[[BSee the Music] (Level 1)
Allows you to 'see' the Great Music from which the world originates,
allowing you to see unseen things, and can be cast while blind.
@@ -46,11 +46,7 @@ grant. There are four prayers all told, which are:
allowing you to understand the meaning of things.
At spell level 14 it allows you to identify all your pack.
At spell level 30 it allows you to identify all items on the level.
-3. [[[[[BKnow the Music] (Level 30)
- Allows you to understand the Great Music from which the world originates,
- allowing you to know the full abilities of things.
- At spell level 10 it allows you to *identify* all your pack.
-4. [[[[[BLay of Protection] (Level 35)
+3. [[[[[BLay of Protection] (Level 35)
Creates a circle of safety around you.
Each of these spells can be increased in level both by improving your Prayer
diff --git a/lib/help/m_divin.txt b/lib/help/m_divin.txt
index e6490df8..ee480b10 100644
--- a/lib/help/m_divin.txt
+++ b/lib/help/m_divin.txt
@@ -21,17 +21,8 @@ There are six spells available for the divination school. These Spells are:
2. [[[[[sSense Hidden] (school level 5)
Detects the traps in a certain radius around you.
At spell level 15 it allows you to sense invisible monsters for a while.
-3. [[[[[sIdentify] (school level 8)
- Asks for an object and identifies it.
- At spell level 17 it identifies all objects in the inventory.
- At spell level 27 it identifies all objects in the inventory and in a
- radius on the floor.
-4. [[[[[sReveal Ways] (school level 9)
+3. [[[[[sReveal Ways] (school level 9)
Detects the doors/stairs/ways in a certain radius around you.
-5. [[[[[sVision] (school level 15)
+4. [[[[[sVision] (school level 15)
Detects the layout of the surrounding area.
At spell level 25 it maps and lights the whole level.
-6. [[[[[sGreater Identify] (school level 35)
- Asks for an object and fully identifies it, providing the full list of
- powers (as with a scroll of *Identify*).
- Cast at yourself, it will reveal your powers (Self Knowledge).
diff --git a/lib/help/macrofaq.txt b/lib/help/macrofaq.txt
index a82074c1..7488165e 100644
--- a/lib/help/macrofaq.txt
+++ b/lib/help/macrofaq.txt
@@ -1784,13 +1784,7 @@ AND - logical AND
IOR - inclusive OR
EQU - (string) equals
NOT - logical negation
-LEQ - (string) less than or equal to
-GEQ - (string) greater than or equal to
[,] - group expressions
-$CLASS - current class
-$GRAF - 3-letter graphics abbr in "graf-***.prf" (old, new)
-$PLAYER - current player name
-$RACE - current race
$SYS - 3-letter system abbr in "pref-***.prf" (ami, mac, win,...)
0 - false
@@ -1801,10 +1795,10 @@ encountered until the next conditional pref line are skipped.
This isn't an actual command. It only works in pref files.
-The variables $CLASS, $GRAF, $PLAYER, $RACE, $PLAYER, $SYS and the
-string values they take on are case sensitive. The values also can't
-contain spaces. These constraints on the values hold when they are
-used in a pref file, but might not when used as pref filenames.
+The variable $SYS and the string value it may take on are case
+sensitive. The values also can't contain spaces. These constraints on
+the values hold when they are used in a pref file, but might not when
+used as pref filenames.
This can be "turned back on" using the pref line "?:1", which is
generally the last line in a file which contains conditional macros,
diff --git a/lib/help/wishing.txt b/lib/help/wishing.txt
index d16f5ae9..29fcab24 100644
--- a/lib/help/wishing.txt
+++ b/lib/help/wishing.txt
@@ -10,11 +10,12 @@ Due to the powerful nature of wishes, there are some rules that govern
what is able to be wished for. These rules are as follows:
1. You cannot wish for a wish, or any other item which would grant more
wishes.
-2. A wish will always generate *one* object. So, never put a number, "a"
+2. A wish will always generate *one* object. The name must be typed EXACTLY
+ as it would appear as an item (case insensitive). So, never put a number, "a"
or "an" in front of the object you are wishing for.
3. It is not possible to wish for the magical +'s to the object (i.e. you
- cannot wish for "gloves of slaying (+10,+10)", but you can wish for
- "gloves of slaying").
+ cannot wish for "set of leather gloves of slaying (+10,+10)", but you can wish for
+ "set of leather gloves of slaying").
4. You cannot wish for artifacts, but you *can* wish for excellent (ego)
items.
5. You can wish for monsters and ego monsters (e.g. "cave orc", "rogue cave
diff --git a/lib/mods/theme/CMakeLists.txt b/lib/mods/theme/CMakeLists.txt
index f1160786..eb729375 100644
--- a/lib/mods/theme/CMakeLists.txt
+++ b/lib/mods/theme/CMakeLists.txt
@@ -1,7 +1,6 @@
INSTALL(DIRECTORY
apex
data
- dngn
edit
file
help
diff --git a/lib/mods/theme/dngn/dun1.14 b/lib/mods/theme/dngn/dun1.14
deleted file mode 100644
index 6421e80b..00000000
--- a/lib/mods/theme/dngn/dun1.14
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Heart of the Earth
-B:10
diff --git a/lib/mods/theme/dngn/dun1.22 b/lib/mods/theme/dngn/dun1.22
deleted file mode 100644
index cbf78046..00000000
--- a/lib/mods/theme/dngn/dun1.22
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to a trail left by a purposeful dwarf
-B:40 \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun10.0 b/lib/mods/theme/dngn/dun10.0
deleted file mode 100644
index b89ce05e..00000000
--- a/lib/mods/theme/dngn/dun10.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is Mirkwood(1), on level 14
-A:1
-L:14
diff --git a/lib/mods/theme/dngn/dun11.20 b/lib/mods/theme/dngn/dun11.20
deleted file mode 100644
index 9cc611d3..00000000
--- a/lib/mods/theme/dngn/dun11.20
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Nether Realm
-B:6
diff --git a/lib/mods/theme/dngn/dun11.22 b/lib/mods/theme/dngn/dun11.22
deleted file mode 100644
index 149e2c33..00000000
--- a/lib/mods/theme/dngn/dun11.22
+++ /dev/null
@@ -1,2 +0,0 @@
-#I'm downright evil
-F:NO_GENO |
diff --git a/lib/mods/theme/dngn/dun17.15 b/lib/mods/theme/dngn/dun17.15
deleted file mode 100644
index d08bf5e7..00000000
--- a/lib/mods/theme/dngn/dun17.15
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Machine
-U:s_factory.map
-D:The clatter of strange machinery surrounds you.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/mods/theme/dngn/dun18.0 b/lib/mods/theme/dngn/dun18.0
deleted file mode 100644
index da1b6c27..00000000
--- a/lib/mods/theme/dngn/dun18.0
+++ /dev/null
@@ -1,2 +0,0 @@
-# The level is SAVED in the playername.mz? file
-#S:mz0
diff --git a/lib/mods/theme/dngn/dun18.1 b/lib/mods/theme/dngn/dun18.1
deleted file mode 100644
index 70f27718..00000000
--- a/lib/mods/theme/dngn/dun18.1
+++ /dev/null
@@ -1,2 +0,0 @@
-# The level is SAVED in the playername.mz? file
-#S:mz1
diff --git a/lib/mods/theme/dngn/dun19.11 b/lib/mods/theme/dngn/dun19.11
deleted file mode 100644
index 7fba690d..00000000
--- a/lib/mods/theme/dngn/dun19.11
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Deathwatch
-U:s_death.map
-D:This level looks filled with evilness.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/mods/theme/dngn/dun2.31 b/lib/mods/theme/dngn/dun2.31
deleted file mode 100644
index dd8669a5..00000000
--- a/lib/mods/theme/dngn/dun2.31
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Mount Doom
-B:5
diff --git a/lib/mods/theme/dngn/dun20.1 b/lib/mods/theme/dngn/dun20.1
deleted file mode 100644
index 61bc6a65..00000000
--- a/lib/mods/theme/dngn/dun20.1
+++ /dev/null
@@ -1,5 +0,0 @@
-U:s_smaug.map
-N:Lower Halls
-D:You can just make out a malevolent red glow at the end of the corridor.
-F:DESC
-F:NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR | ASK_LEAVE \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun22.10 b/lib/mods/theme/dngn/dun22.10
deleted file mode 100644
index e7eb116e..00000000
--- a/lib/mods/theme/dngn/dun22.10
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to the Small Water Cave
-B:24
diff --git a/lib/mods/theme/dngn/dun22.20 b/lib/mods/theme/dngn/dun22.20
deleted file mode 100644
index a04a2788..00000000
--- a/lib/mods/theme/dngn/dun22.20
+++ /dev/null
@@ -1,5 +0,0 @@
-N:The Bridge
-U:s_bridge.map
-D:You hear the beating of drums in the Deep.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun22.5 b/lib/mods/theme/dngn/dun22.5
deleted file mode 100644
index 11d8e51f..00000000
--- a/lib/mods/theme/dngn/dun22.5
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Orc Town
-U:s_orc.map
-D:You hear orc warcries.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/mods/theme/dngn/dun24.0 b/lib/mods/theme/dngn/dun24.0
deleted file mode 100644
index bbb93f85..00000000
--- a/lib/mods/theme/dngn/dun24.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is the Moria(22), on level 10
-A:22
-L:10
diff --git a/lib/mods/theme/dngn/dun29.15 b/lib/mods/theme/dngn/dun29.15
deleted file mode 100644
index 4df873b5..00000000
--- a/lib/mods/theme/dngn/dun29.15
+++ /dev/null
@@ -1,6 +0,0 @@
-N:Galleon
-U:s_ship.map
-D:A ship of antique design lies jammed in the ice here.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
-
diff --git a/lib/mods/theme/dngn/dun3.18 b/lib/mods/theme/dngn/dun3.18
deleted file mode 100644
index 84c0a74a..00000000
--- a/lib/mods/theme/dngn/dun3.18
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Dim Gates
-U:s_gates.map
-D:Visions of death fill your mind.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/mods/theme/dngn/dun3.28 b/lib/mods/theme/dngn/dun3.28
deleted file mode 100644
index 0acd4193..00000000
--- a/lib/mods/theme/dngn/dun3.28
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Nameless
-U:s_name.map
-D:You sense a powerful artifact here.
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/mods/theme/dngn/dun3.3 b/lib/mods/theme/dngn/dun3.3
deleted file mode 100644
index 710ef5f8..00000000
--- a/lib/mods/theme/dngn/dun3.3
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Crypt
-U:s_crypt.map
-D:Looks like a forgotten crypt...
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT
diff --git a/lib/mods/theme/dngn/dun36.5 b/lib/mods/theme/dngn/dun36.5
deleted file mode 100644
index 9fddd4dd..00000000
--- a/lib/mods/theme/dngn/dun36.5
+++ /dev/null
@@ -1,5 +0,0 @@
-N:Orthanc
-U:s_orthanc.map
-D:#BAnd here you shall stay, foolish adventurer, and die quickly. For I am Saruman the Wise, Saruman the Ring-maker, Saruman of Many Colours!#w
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun39.0 b/lib/mods/theme/dngn/dun39.0
deleted file mode 100644
index 57fa485e..00000000
--- a/lib/mods/theme/dngn/dun39.0
+++ /dev/null
@@ -1,9 +0,0 @@
-# Father branch is Barrow-Downs(4), on level 10
-A:4
-L:9
-
-N:Bilbo's trail
-U:s_bilbo.map
-D:#yYou hear someone shout, "I am in a frightful hurry, but Gandalf told me to leave this map for you! Find it, then seek Thorin in Mirkwood!"#w
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun4.9 b/lib/mods/theme/dngn/dun4.9
deleted file mode 100644
index e09273d6..00000000
--- a/lib/mods/theme/dngn/dun4.9
+++ /dev/null
@@ -1,2 +0,0 @@
-# On this level there is a stairway leading to a trail left by a fleeing hobbit
-B:39 \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun40.0 b/lib/mods/theme/dngn/dun40.0
deleted file mode 100644
index 0cd769c4..00000000
--- a/lib/mods/theme/dngn/dun40.0
+++ /dev/null
@@ -1,9 +0,0 @@
-# Father branch is Mirkwood(1), on level 33
-A:1
-L:22
-
-N:Thorin's trail
-U:s_thorin.map
-D:#yYou hear someone shout, "My mad kinsmen have taken the key to the Lonely Mountain! Get the key, then find that fool hobbit and my map! If you haven't already."#w
-F:DESC | NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:ASK_LEAVE | NO_TELEPORT \ No newline at end of file
diff --git a/lib/mods/theme/dngn/dun5.0 b/lib/mods/theme/dngn/dun5.0
deleted file mode 100644
index 48a7bea6..00000000
--- a/lib/mods/theme/dngn/dun5.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is the Mordor, on level 32
-A:2
-L:31
diff --git a/lib/mods/theme/dngn/dun5.14 b/lib/mods/theme/dngn/dun5.14
deleted file mode 100644
index 3d7a3080..00000000
--- a/lib/mods/theme/dngn/dun5.14
+++ /dev/null
@@ -1,14 +0,0 @@
-# The level is SAVED in the playername.mdm file
-S:mdm
-
-# Use the map in s_doom.map file
-U:s_doom.map
-
-# Use Mt Doom as level name
-N:Mt Doom
-
-D:You finally reach the top of Mount Doom, here must lie the Great Fire.
-F:DESC
-F:NO_GENO | NO_NEW_MONSTER | SPECIAL | NO_STAIR
-F:NO_TELEPORT
-
diff --git a/lib/mods/theme/dngn/dun6.0 b/lib/mods/theme/dngn/dun6.0
deleted file mode 100644
index c750ea67..00000000
--- a/lib/mods/theme/dngn/dun6.0
+++ /dev/null
@@ -1,3 +0,0 @@
-# Father branch is Void(11), on level 20
-A:11
-L:20
diff --git a/lib/mods/theme/edit/a_info.txt b/lib/mods/theme/edit/a_info.txt
index 5d2e4bdf..b416a069 100644
--- a/lib/mods/theme/edit/a_info.txt
+++ b/lib/mods/theme/edit/a_info.txt
@@ -58,7 +58,6 @@ F:LITE3
F:SEE_INVIS
F:SPEED
a:MAP_LIGHT
-Z:detect curses
D:The shining Star of the West, a famed heirloom of Elendil's house.
D:A white diamond set as a star in a silver fillet to be bound at the
D:forehead.
@@ -412,17 +411,13 @@ N:15:of Orthanc
I:39:106:0
W:15:12:15:20000
P:0:1d1:0:0:0
-F:ACTIVATE
-F:EASY_USE
F:INSTA_ART
F:LITE1
F:SPECIAL_GENE
-a:STONE_LORE
-D:The key to the tower of Saruman, which fills your mind
-D:with images of knowledge and dreadful understanding. It
-D:is not a regular key - it is a perfectly round stone
-D:that is meant to fit into a hole. It can be used to
-D:light your way in the dungeon as well.
+D:The key to the tower of Saruman. It is not a regular
+D:key - it is a perfectly round stone that is meant
+D:to fit into a hole. It can be used to light your
+D:way in the dungeon as well.
# The Multi-Hued Dragon Scale Mail 'Lothronfaun'
@@ -2808,7 +2803,7 @@ F:SLAY_EVIL
F:SPELL_CONTAIN
F:WIELD_CAST
F:WIS
-a:ID_PLAIN
+a:DETECT_ALL
D:The radiant golden staff of an Istari of legend, this wizard's companion
D:grants keen sight and the knowledge of many hidden things.
@@ -3690,23 +3685,6 @@ D:Crafted of purest ice and held solid by powerful spells, this icy axe
D:delivers a chill of death to its victims.
-# The Iron Helm of Knowledge
-
-N:160:of Knowledge
-I:32:5:-6
-W:20:5:75:100000
-P:6:1d3:0:0:20
-F:ACTIVATE
-F:AUTO_ID
-F:HIDE_TYPE
-F:LITE1
-F:LUCK
-F:SPECIAL_GENE
-a:KNOWLEDGE
-D:This helm, designed by Petty-Dwarves ages ago to act as the brain of a
-D:long lost project, is made of finest glass. Its light banishes all secrets,
-D:and makes audible whispers from the deceased.
-
# The Broken Sword 'Narsil'
N:164:'Narsil'
@@ -4553,7 +4531,6 @@ F:SEE_INVIS
F:WATER_BREATH
F:WIS
a:PALANTIR
-Z:detect curses
D:This holy lamp once belonged to a seeress who warned Ar-Pharazon of
D:the dire fate Numenor would suffer for daring to break the ban against
D:mortals' entering the Blessed Realms alive. The king had the seeress
diff --git a/lib/mods/theme/edit/ba_info.txt b/lib/mods/theme/edit/ba_info.txt
index c8c7f9c5..2e853040 100644
--- a/lib/mods/theme/edit/ba_info.txt
+++ b/lib/mods/theme/edit/ba_info.txt
@@ -69,10 +69,6 @@ N:13:Game rules
C:0:0:0
I:13:0:r
-N:14:Research item
-C:1400:1300:1200
-I:1:0:a
-
N:15:Town history
C:0:0:0
I:2:0:h
@@ -109,10 +105,6 @@ N:26:Recharge item
C:350:300:75
I:25:0:r
-N:27:Identify possessions
-C:900:800:100
-I:26:0:i
-
N:28:Healing prayer
C:600:400:0
I:28:0:h
@@ -162,16 +154,6 @@ N:43:View fate
C:500:500:500
I:42:0:v
-#for The Mirror
-N:44:Research item
-C:1500:1500:1500
-I:1:0:a
-
-#for Star-Dome
-N:46:Identify possessions
-C:1200:1000:250
-I:26:0:i
-
#for Star-Dome
N:47:Recharge item
C:1200:1000:150
diff --git a/lib/mods/theme/edit/d_info.txt b/lib/mods/theme/edit/d_info.txt
index 0f8680af..5266090a 100644
--- a/lib/mods/theme/edit/d_info.txt
+++ b/lib/mods/theme/edit/d_info.txt
@@ -56,6 +56,8 @@ F:NO_DESTROY
F:NO_DOORS
F:PRINCIPAL
R:100:0
+@:14:B:10
+@:22:B:40
N:2:Barad-Dur
D:BDr:a door to the tower of Barad-Dur.
@@ -72,6 +74,7 @@ F:NO_RECALL
F:NO_STREAMERS
F:PRINCIPAL
R:100:0
+@:31:B:5
N:3:Angband
D:Ang:an entrance to the Pits of Angband.
@@ -87,6 +90,33 @@ F:NO_EASY_MOVE
F:NO_RECALL
F:PRINCIPAL
R:100:0
+@:3:N:Crypt
+@:3:U:s_crypt.map
+@:3:D:Looks like a forgotten crypt...
+@:3:F:NO_GENO
+@:3:F:NO_NEW_MONSTER
+@:3:F:SPECIAL
+@:3:F:NO_STAIR
+@:3:F:ASK_LEAVE
+@:3:F:NO_TELEPORT
+@:18:N:Dim Gates
+@:18:U:s_gates.map
+@:18:D:Visions of death fill your mind.
+@:18:F:NO_GENO
+@:18:F:NO_NEW_MONSTER
+@:18:F:SPECIAL
+@:18:F:NO_STAIR
+@:18:F:ASK_LEAVE
+@:18:F:NO_TELEPORT
+@:28:N:Nameless
+@:28:U:s_name.map
+@:28:D:You sense a powerful artifact here.
+@:28:F:NO_GENO
+@:28:F:NO_NEW_MONSTER
+@:28:F:SPECIAL
+@:28:F:NO_STAIR
+@:28:F:ASK_LEAVE
+@:28:F:NO_TELEPORT
N:4:Barrow-Downs
D:BDw:a way to the Barrow-Downs.
@@ -103,6 +133,7 @@ F:PRINCIPAL
R:25:1
M:UNDEAD
R:75:0
+@:9:B:39
# The Additional dungeons
@@ -123,6 +154,15 @@ F:NO_RECALL
F:NO_STREAMERS
R:100:1
M:IM_FIRE
+@:14:N:Mt Doom
+@:14:S:mdm
+@:14:U:s_doom.map
+@:14:D:You finally reach the top of Mount Doom, here must lie the Great Fire.
+@:14:F:NO_GENO
+@:14:F:NO_NEW_MONSTER
+@:14:F:SPECIAL
+@:14:F:NO_STAIR
+@:14:F:NO_TELEPORT
# Nether Realm
# Levels 666-696 (!!!)
@@ -274,6 +314,8 @@ M:DRAGON
M:NONLIVING
M:SPIRIT
M:UNDEAD
+@:20:B:6
+@:22:F:NO_GENO
# TEST dungeon
N:12:Test
@@ -312,7 +354,7 @@ M:UNDEAD
# The Illusory Castle
# levels 35-52
-# Guarded by The Glass Golem guarding The Helm of Knowledge
+# Guarded by The Glass Golem
N:17:Illusory Castle
D:Ill:an entrance to the Illusory Castle.
W:35:52:10:24:100
@@ -321,7 +363,6 @@ A:56:50:189:50:56:0:57:58
O:50:10:20:20
E:6d2:6:CONFUSION
F:FILL_METHOD_1
-F:FINAL_ARTIFACT_160
F:FINAL_GUARDIAN_1033
F:NO_STREAMERS
F:RANDOM_TOWNS
@@ -344,6 +385,15 @@ S:BR_CONF
S:CONF
S:FORGET
S:MULTIPLY
+@:15:N:Machine
+@:15:U:s_factory.map
+@:15:D:The clatter of strange machinery surrounds you.
+@:15:F:NO_GENO
+@:15:F:NO_NEW_MONSTER
+@:15:F:SPECIAL
+@:15:F:NO_STAIR
+@:15:F:ASK_LEAVE
+@:15:F:NO_TELEPORT
# The Maze
# Levels 25-37
@@ -386,6 +436,15 @@ R:50:3
M:ORC
M:R_CHAR_O
M:R_CHAR_o
+@:11:N:Deathwatch
+@:11:U:s_death.map
+@:11:D:This level looks filled with evilness.
+@:11:F:NO_GENO
+@:11:F:NO_NEW_MONSTER
+@:11:F:SPECIAL
+@:11:F:NO_STAIR
+@:11:F:ASK_LEAVE
+@:11:F:NO_TELEPORT
# Erebor
# levels 60-72
@@ -412,6 +471,14 @@ M:R_CHAR_D
R:30:1
M:DRAGON
M:R_CHAR_d
+@:1:N:Lower Halls
+@:1:U:s_smaug.map
+@:1:D:You can just make out a malevolent red glow at the end of the corridor.
+@:1:F:NO_GENO
+@:1:F:NO_NEW_MONSTER
+@:1:F:SPECIAL
+@:1:F:NO_STAIR
+@:1:F:ASK_LEAVE
# The Old Forest
# levels 13-25
@@ -463,6 +530,25 @@ M:TROLL
R:20:3
M:DEMON
R:10:0
+@:5:N:Orc Town
+@:5:U:s_orc.map
+@:5:D:You hear orc warcries.
+@:5:F:NO_GENO
+@:5:F:NO_NEW_MONSTER
+@:5:F:SPECIAL
+@:5:F:NO_STAIR
+@:5:F:ASK_LEAVE
+@:5:F:NO_TELEPORT
+@:10:B:24
+@:20:N:The Bridge
+@:20:U:s_bridge.map
+@:20:D:You hear the beating of drums in the Deep.
+@:20:F:NO_GENO
+@:20:F:NO_NEW_MONSTER
+@:20:F:SPECIAL
+@:20:F:NO_STAIR
+@:20:F:ASK_LEAVE
+@:20:F:NO_TELEPORT
# The tower of Dol Guldur
# Levels 57-70
@@ -609,6 +695,15 @@ F:NO_STREAMERS
F:WATER_RIVER
R:100:1
M:IM_COLD
+@:15:N:Galleon
+@:15:U:s_ship.map
+@:15:D:A ship of antique design lies jammed in the ice here.
+@:15:F:NO_GENO
+@:15:F:NO_NEW_MONSTER
+@:15:F:SPECIAL
+@:15:F:NO_STAIR
+@:15:F:ASK_LEAVE
+@:15:F:NO_TELEPORT
# The Lost Temple of "..player.pgod.."
# Generated in god quest.
@@ -797,6 +892,15 @@ R:50:3
M:ORC
M:R_CHAR_O
M:R_CHAR_o
+@:5:N:Orthanc
+@:5:U:s_orthanc.map
+@:5:D:#BAnd here you shall stay, foolish adventurer, and die quickly. For I am Saruman the Wise, Saruman the Ring-maker, Saruman of Many Colours!#w
+@:5:F:NO_GENO
+@:5:F:NO_NEW_MONSTER
+@:5:F:SPECIAL
+@:5:F:NO_STAIR
+@:5:F:ASK_LEAVE
+@:5:F:NO_TELEPORT
# Tol Eressea - of course you never actually set foot on Tol Eressea ;)
# levels 40-45
@@ -857,6 +961,15 @@ F:FLAT
R:25:1
M:UNDEAD
R:75:0
+@:0:N:Bilbo's trail
+@:0:U:s_bilbo.map
+@:0:D:#yYou hear someone shout, "I am in a frightful hurry, but Gandalf told me to leave this map for you! Find it, then seek Thorin in Mirkwood!"#w
+@:0:F:NO_GENO
+@:0:F:NO_NEW_MONSTER
+@:0:F:SPECIAL
+@:0:F:NO_STAIR
+@:0:F:ASK_LEAVE
+@:0:F:NO_TELEPORT
# Thorin's trail in Mirkwood
# just one special level that later becomes a different one, sans princess.
@@ -871,6 +984,15 @@ F:FLAT
F:NO_DESTROY
F:NO_DOORS
R:100:0
+@:0:N:Thorin's trail
+@:0:U:s_thorin.map
+@:0:D:#yYou hear someone shout, "My mad kinsmen have taken the key to the Lonely Mountain! Get the key, then find that fool hobbit and my map! If you haven't already."#w
+@:0:F:NO_GENO
+@:0:F:NO_NEW_MONSTER
+@:0:F:SPECIAL
+@:0:F:NO_STAIR
+@:0:F:ASK_LEAVE
+@:0:F:NO_TELEPORT
# N:<index>:<name>
# D:<3 letter short name>:<long name>
diff --git a/lib/mods/theme/edit/k_info.txt b/lib/mods/theme/edit/k_info.txt
index 6cfe4dee..302759f2 100644
--- a/lib/mods/theme/edit/k_info.txt
+++ b/lib/mods/theme/edit/k_info.txt
@@ -1771,22 +1771,6 @@ A:15/1
D:This scroll will try to enchant a piece of armour in your possession, making it more effective
D:in protecting you. Highly enchanted armour is likely not to accept this enchantment, however.
-N:176:Identify
-G:?:d
-I:70:12:0
-W:1:0:5:50
-A:1/1:5/1:10/1:30/1
-D:If you read this scroll, the identity of an item you specify will be laid open to you.
-
-N:177:*Identify*
-G:?:d
-I:70:13:0
-W:30:0:5:1000
-A:30/1:50/2:80/1:100/1
-D:This scroll will allow you to gain insight into an object's special properties.
-D:Only the highly magical objects, like rare rings and amulets or very unusual weapons
-D:and armour possess abilities which warrant the use of this magic.
-
N:178:Rumour
G:?:d
I:70:51:0
@@ -2895,13 +2879,6 @@ W:30:0:50:100
A:30/1
P:0:1d2:0:0:0
-N:313:Identify
-G:_:d
-I:55:14:-1:SPELL=Identify
-W:10:0:50:100
-A:10/1
-P:0:1d2:0:0:0
-
N:314:Sense Hidden
G:_:d
I:55:15:-1:SPELL=Sense Hidden
@@ -3067,65 +3044,6 @@ D:A thick book with solid leather binding. It looks entirely
D:unremarkable, but as you hold it, you feel strangely able
D:to learn the inner workings of things and creatures.
-##### Chests #####
-
-N:338:& Small wooden chest~
-G:~:s
-I:7:1:0
-W:5:0:250:20
-A:5/1
-P:0:2d3:0:0:0
-D:A small wooden box, locked and possibly trapped.
-
-N:339:& Large wooden chest~
-G:~:s
-I:7:5:0
-W:15:0:500:60
-A:15/1
-P:0:2d5:0:0:0
-D:A large wooden box, locked and possibly trapped
-
-N:340:& Small iron chest~
-G:~:s
-I:7:2:0
-W:25:0:300:100
-A:25/1
-P:0:2d4:0:0:0
-D:A small rectangular container made of wood and reinforced with iron corners and latches.
-D:It is locked and possibly trapped.
-
-N:341:& Large iron chest~
-G:~:s
-I:7:6:0
-W:35:0:1000:150
-A:35/1
-P:0:2d6:0:0:0
-D:A large container made of wood, with a heavy iron lock, and probably a trap.
-
-N:342:& Small steel chest~
-G:~:s
-I:7:3:0
-W:45:0:500:200
-A:45/1
-P:0:2d4:0:0:0
-D:A small wooden box with strong steel locks and reinforcements. It's likely to be trapped.
-
-N:343:& Large steel chest~
-G:~:s
-I:7:7:0
-W:55:0:1000:250
-A:55/1
-P:0:2d6:0:0:0
-D:A nearly indestructible chest of wood and steel. The lock doesn't look impenetrable, but it
-D:might be trapped.
-
-N:344:& Ruined chest~
-G:~:s
-I:7:0:0
-W:0:0:250:0
-A:75/1
-D:A broken, empty chest.
-
##### Various Stuff #####
N:345:& Iron Spike~
@@ -3417,18 +3335,6 @@ F:IGNORE_ELEC
F:IGNORE_FIRE
D:This rod grants you knowledge of your surroundings.
-N:372:Perception
-G:-:d
-I:66:2:20
-W:50:0:15:13000
-A:50/8:100/8
-P:0:1d1:0:0:0
-F:IGNORE_ACID
-F:IGNORE_COLD
-F:IGNORE_ELEC
-F:IGNORE_FIRE
-D:This rod makes you insightful, laying open the identity of your possessions.
-
N:373:Curing
G:-:d
I:66:8:35
@@ -5167,94 +5073,6 @@ A:40/3
D:This parchment contains information about unique
D:artifacts that are rumoured to exist upon Arda.
-N:594:Monstrous Compendium 1
-G:?:o
-I:8:9:0
-W:10:0:5:100
-A:10/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:595:Monstrous Compendium 2
-G:?:o
-I:8:10:0
-W:11:0:5:200
-A:11/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:596:Monstrous Compendium 3
-G:?:o
-I:8:11:0
-W:12:0:5:300
-A:12/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:597:Monstrous Compendium 4
-G:?:o
-I:8:12:0
-W:13:0:5:400
-A:13/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:598:Monstrous Compendium 5
-G:?:o
-I:8:13:0
-W:14:0:5:500
-A:14/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:599:Monstrous Compendium 6
-G:?:o
-I:8:14:0
-W:15:0:5:600
-A:15/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:600:Monstrous Compendium 7
-G:?:o
-I:8:15:0
-W:16:0:5:700
-A:16/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:601:Monstrous Compendium 8
-G:?:o
-I:8:16:0
-W:17:0:5:800
-A:17/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:602:Monstrous Compendium 9
-G:?:o
-I:8:17:0
-W:18:0:5:900
-A:18/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:603:Monstrous Compendium 10
-G:?:o
-I:8:18:0
-W:19:0:5:1000
-A:19/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
-N:604:Monstrous Compendium 11
-G:?:o
-I:8:19:0
-W:20:0:5:1200
-A:20/2
-D:This parchment contains a small part of the collected
-D:lore concerning monsters inhabiting Arda.
-
#### Here come the shape-shifting potions. ####
N:605:& Morphic Oil~ of #
diff --git a/lib/mods/theme/edit/p_info.txt b/lib/mods/theme/edit/p_info.txt
index f8a3e25e..a78258d2 100644
--- a/lib/mods/theme/edit/p_info.txt
+++ b/lib/mods/theme/edit/p_info.txt
@@ -607,7 +607,7 @@ C:a:O:36:6:1d1
C:a:k:+0:-100:Combat
C:a:k:+0:-100:Weaponmastery
C:a:k:+0:-300:Archery
-C:a:k:-1000:-700:Barehand-combat
+C:a:k:+0:-100:Barehand-combat
C:a:k:+0:-200:Spirituality
C:a:k:+1000:+300:Possession
C:a:k:+0:+200:Corpse-preservation
@@ -806,7 +806,6 @@ C:D:1:Pope
C:S:-1:-3:3:-1:0:2:0:0
C:B:4:35:3
C:P:2:20
-C:Z:detect curses
C:G:GOD_FRIEND
C:E:0:0:0:0:0:0
C:k:+1000:+900:Magic
diff --git a/lib/mods/theme/edit/ra_info.txt b/lib/mods/theme/edit/ra_info.txt
index 5add55b4..99a675f0 100644
--- a/lib/mods/theme/edit/ra_info.txt
+++ b/lib/mods/theme/edit/ra_info.txt
@@ -1903,20 +1903,13 @@ C:0:0:0:0
Z:magic map
N:511
-X:30:1
-T:39:0:255
-W:20:1:24
-C:0:0:0:0
-Z:detect curses
-
-N:512
X:25:1
T:39:0:255
W:20:1:17
C:0:0:0:0
Z:dazzle
-N:513
+N:512
X:40:1
T:39:0:255
W:20:1:50
@@ -1924,7 +1917,7 @@ C:0:0:0:0
Z:detect doors and traps
# Magestaves can get % to life - Theme
-N:514
+N:513
X:10:1
T:6:0:255
W:10:1:45
@@ -1932,7 +1925,7 @@ C:-40:-40:0:3
F:LIFE
# Magestaves, armour, lights and jewelry can get ability to store a spell - Theme
-N:515
+N:514
X:10:1
T:6:0:255
T:30:0:255
@@ -1953,7 +1946,7 @@ F:SPELL_CONTAIN
F:WIELD_CAST
# High-level soft and hard armour and DSM can get nether immunity - Theme, adapted from FuryMod
-N:516
+N:515
X:50:1
T:36:11:255
T:37:15:255
@@ -1963,7 +1956,7 @@ C:0:0:0:0
F:IM_NETHER
# Light weapons (no broken ones) can gain sentience - Theme, adapted from FuryMod
-N:517
+N:516
X:20:1
T:21:1:3
T:22:2:4
diff --git a/lib/mods/theme/edit/set_info.txt b/lib/mods/theme/edit/set_info.txt
index 182618d4..a0c696e9 100644
--- a/lib/mods/theme/edit/set_info.txt
+++ b/lib/mods/theme/edit/set_info.txt
@@ -82,7 +82,6 @@ F:IM_FIRE
F:SH_ELEC
# The demonhorn of Gothmog
P:183:3:0
-F:AUTO_ID
F:ESP_EVIL
F:ESP_GOOD
@@ -174,7 +173,6 @@ F:RES_POIS
F:RES_SOUND
# The Palantir of Orthanc
P:202:3:0
-F:AUTO_ID
# Heirlooms of the House of Elendil - set suggested by Massimiliano Marangio in the forums
@@ -254,8 +252,6 @@ F:RES_NETHER
F:SLAY_DEMON
# The Mithril Helm of Gil-Galad
P:26:3:0
-#Why *shouldn't* warrior-types get a chance for AUTO_ID without penalties to luck before they kill Morgy?
-F:AUTO_ID
# Dwarven Heritage
# http://wiki.t-o-m-e.net/IdeaArchive_2fNew_20Item_20Set_3a_20Heritage_20of_20Khazad
@@ -293,8 +289,6 @@ F:SPEED
F:SUST_DEX
# The Quarterstaff of Thranduil
P:74:3:0
-# What can I say. I love archers. :P
-F:AUTO_ID
# Gimli's Gear (Gimli's shield, boots and axe)
diff --git a/lib/mods/theme/edit/st_info.txt b/lib/mods/theme/edit/st_info.txt
index 88303fff..17da3e7c 100644
--- a/lib/mods/theme/edit/st_info.txt
+++ b/lib/mods/theme/edit/st_info.txt
@@ -151,10 +151,6 @@ N:4:Alchemy shop
I:100:Enchant Weapon To-Hit
I:100:Enchant Weapon To-Dam
I:100:Enchant Armour
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
I:100:Light
I:100:Phase Door
I:100:Phase Door
@@ -180,13 +176,6 @@ I:100:Restore Dexterity
#I:100:Restore Constitution
T:100:71:46
I:100:Restore Charisma
-I:100:Identify
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
-I:100:*Identify*
I:100:Light
#I:100:Restore Strength
T:100:71:42
@@ -214,7 +203,6 @@ I:100:Protection
I:100:Charisma
I:100:Slow Digestion
T:100:40:7
-I:100:Searching
I:100:Cure Light Wounds
# Rods
I:25:& Wooden Rod~ of#
@@ -313,11 +301,6 @@ F:RANDOM
W:2
N:13:Library
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
# starting parchment
T:40:8:20
# Khuzdul
@@ -334,7 +317,7 @@ T:15:8:107
T:10:8:103
# Advanced Sindarin
T:5:8:104
-A:2:3:14:15:16:27
+A:2:3:0:15:16:0
O:86:87:88:89
G:+:U
W:2
@@ -353,28 +336,6 @@ G:+:s
W:0
N:16:Beastmaster Shanty
-# Monstrous Compendium 1
-T:100:8:9
-# Monstrous Compendium 2
-T:100:8:10
-# Monstrous Compendium 3
-T:95:8:11
-# Monstrous Compendium 4
-T:90:8:12
-# Monstrous Compendium 5
-T:85:8:13
-# Monstrous Compendium 6
-T:80:8:14
-# Monstrous Compendium 7
-T:75:8:15
-# Monstrous Compendium 8
-T:70:8:16
-# Monstrous Compendium 9
-T:65:8:17
-# Monstrous Compendium 10
-T:60:8:18
-# Monstrous Compendium 11
-T:55:8:19
A:0:2:21:22:3:0
O:94:95:96:97
G:+:g
@@ -387,7 +348,7 @@ G:+:s
W:0
N:18:Tower of Magery
-A:0:0:26:27:0:0
+A:0:0:26:0:0:0
O:102:103:104:105
G:+:b
W:0
@@ -425,7 +386,7 @@ G:+:U
W:0
N:23:The Mirror
-A:0:0:44:15:16:43
+A:0:0:15:16:43:0
O:51:51:51:51
G:+:U
W:0
@@ -437,7 +398,7 @@ G:+:U
W:0
N:25:Wizards Spire
-A:60:0:26:27:0:0
+A:60:0:26:0:0:0
O:54:54:54:54
G:+:U
W:0
@@ -463,7 +424,6 @@ G:+:U
W:0
N:28:Library
-I:100:Identify
# starting parchment
T:40:8:20
# Khuzdul
@@ -480,7 +440,7 @@ T:15:8:107
T:10:8:103
# Advanced Sindarin
T:5:8:104
-A:0:0:14:15:16:2
+A:0:0:0:15:16:2
O:58:58:58:58
G:+:U
W:12
@@ -523,7 +483,7 @@ G:+:U
W:0
N:33:Star-Dome
-A:0:0:46:47:0:0
+A:0:0:0:47:0:0
O:63:63:63:63
G:+:U
W:0
@@ -677,7 +637,7 @@ T:100:122:256
T:100:123:256
T:100:124:256
T:100:125:256
-A:27:0:1:2:3:4
+A:0:0:1:2:3:4
O:150:151:152:153
G:9:y
F:DEPEND_LEVEL
@@ -702,7 +662,7 @@ T:100:122:256
T:100:123:256
T:100:124:256
T:100:125:256
-A:27:0:1:2:3:4
+A:0:0:1:2:3:4
O:150:151:152:153
G:9:v
F:DEEP_LEVEL
@@ -850,12 +810,6 @@ W:24
## Library quest in Minas Anor
N:60:Library
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
-I:100:Identify
# starting parchment
T:40:8:20
# Khuzdul
@@ -872,7 +826,7 @@ T:15:8:107
T:10:8:103
# Advanced Sindarin
T:5:8:104
-A:61:0:14:15:16:2
+A:61:0:0:15:16:2
O:210:210:210:210
G:+:U
W:12
@@ -914,8 +868,8 @@ W:24
# Music store
N:64:Music Store
-I:20:& Horn~
-I:20:& Drum~
+I:20:& Horn~
+I:20:& Drum~
I:20:& Harp~
A:0:0:1:2:3:4
O:194:195:196:197
diff --git a/lib/mods/theme/edit/t_bree.txt b/lib/mods/theme/edit/t_bree.txt
index c6b50340..6be8671a 100644
--- a/lib/mods/theme/edit/t_bree.txt
+++ b/lib/mods/theme/edit/t_bree.txt
@@ -126,12 +126,7 @@ D:# ^^^^^^^^^^^^^^ .
D:######################################################################################################################################################################################################
-############### Starting positions ###############
+############### Starting position ###############
-# Standard starting position for normal races
-?:[AND [EQU $LEAVING_QUEST 0] [NOT [EQU $RACE Vampire] ] ]
+?:[EQU $LEAVING_QUEST 0]
P:33:131
-
-# Standard starting position for vampires (at the dungeon entrance)
-?:[AND [EQU $LEAVING_QUEST 0] [EQU $RACE Vampire] ]
-P:31:150
diff --git a/lib/mods/theme/edit/t_d_bree.txt b/lib/mods/theme/edit/t_d_bree.txt
index 92fde41f..f9212b49 100644
--- a/lib/mods/theme/edit/t_d_bree.txt
+++ b/lib/mods/theme/edit/t_d_bree.txt
@@ -80,12 +80,7 @@ D:# ^^^^^^^^^^^^^^ HDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD .DDDD
D:######################################################################################################################################################################################################
-############### Starting positions ###############
+############### Starting position ###############
-# Standard starting position for normal races
-?:[AND [EQU $LEAVING_QUEST 0] [NOT [EQU $RACE Vampire] ] ]
+?:[EQU $LEAVING_QUEST 0]
P:33:131
-
-# Standard starting position for vampires (at the dungeon entrance)
-?:[AND [EQU $LEAVING_QUEST 0] [EQU $RACE Vampire] ]
-P:31:150
diff --git a/lib/mods/theme/file/book-10.txt b/lib/mods/theme/file/book-10.txt
deleted file mode 100644
index 995c2453..00000000
--- a/lib/mods/theme/file/book-10.txt
+++ /dev/null
@@ -1,75 +0,0 @@
- ------------------------
- | Monstrous Compendium 2 |
- | Mostly never-moving |
- ------------------------
-
- *** Floating eyes (e) ***
-
-Strange disembodied eyes, floating around the dungeon. Some
-of them are comparatively harmless (such as the [[[[[oFloating eyes],
-[[[[[RRadiation eyes], [[[[[rBloodshot eyes], and [[[[[vDisenchanter eyes]),
-others moderately dangerous (such as the [[[[[DEvil eyes], [[[[[sGauths],
-[[[[[gGas spores], and [[[[[BSpectators]), yet others extremely deadly -
-these include the [[[[[UBeholders], [[[[[uUndead beholders], [[[[[bEyes of the]
-[[[[[bdeep], and the [[[[[yBeholder hive-mothers]. Whatever you do, do
-not get too close to them
-
-
- *** Jellies (j) ***
-
-You will sometimes encounter large quavering piles of flesh
-just lying around the dungeon or making their way along the
-walls. They all have different defense mechanisms, which with
-time an adventurer will learn to recognise by looking at their
-colour. Among the less dangerous types are [[[[[wWhite jellies], [[[[[rRed]
-[[[[[rjellies], [[[[[bBlue jellies], [[[[[vGrape jellies], [[[[[gGreen jellies], [[[[[WSilver]
-[[[[[Wjellies], [[[[[yYellow jellies], [[[[[oSpotted jellies], and [[[[[uRot jellies].
-Considerably more dangerous are the [[[[[DUndead masses] and [[[[[UOchre]
-[[[[[Ujellies], as well as [[[[[DBlack puddings]. Among the moving jellies,
-watch out for [[[[[gGreen oozes], [[[[[bBlue oozes], [[[[[DBlack oozes], [[[[[GGelatinous]
-[[[[[Gcubes], [[[[[RGibbering mouthers], and [[[[[BAcidic cytoplasms].
-
- *** Molds (m) ***
-
-Molds are strange growths on the dungeon floor which have
-developed defense mechanisms to deal with anyone who tries
-to disturb them. They come in many varieties and prefer
-different habitats, and some of them can be quite dangerous
-because they have rudimentary mastery of the elements. The
-most common varieties of mold are the [[[[[sGrey mold], the [[[[[rRed]
-[[[[[rmold], the [[[[[oHairy mold], the [[[[[gGreen mold], the [[[[[uBrown mold],
-the [[[[[yYellow mold], the [[[[[wWhite mold], and the [[[[[WSilver mold].
-More rare are [[[[[vDisenchanter molds], [[[[[bShimmering molds], [[[[[RPink]
-[[[[[Rmolds], [[[[[GTree molds], and [[[[[BBlue molds]. A very rare and dire
-creature is the [[[[[DDeath mold] - unwary adventurers beware! The
-[[[[[UAdventurer molds] are friendly towards their fellows, but
-not very strong.
-
- *** Mushroom patches (,) ***
-
-You'd think it safe to eat them - you'd be wrong. Mushroom
-patches are masters of disguise and can cause quite a bit
-of damage to unwary adventurers. Fortunately, most of them
-are extremely weak and can be destroyed quickly if you can
-just get close enough. The commonly found varieties include
-the [[[[[sgrey], [[[[[Bclear], [[[[[vpurple], [[[[[ospotted], [[[[[yyellow], [[[[[Rshrieker], [[[[[Ddark],
-[[[[[wwhite], [[[[[ubrown], [[[[[Wsilver], and [[[[[Ggreen] mushroom patches. More rare
-are [[[[[gshambling mounds], [[[[[Bmagic mushroom patches], [[[[[rblood sprouts],
-and [[[[[bmemory mosses].
-
- *** Quylthulgs (Q) ***
-
-Strange pulsing mounds of flesh that looks utterly harmless.
-As with any other monster, however, looks are very deceiving
-when it comes to the [[[[[yQuylthulgs]. They are expert at asking
-for other creatures' help, as weall as conveyance magic. The
-only friendly type is the [[[[[wAdventurer quylthulg] - these have
-many friends among their own kin. The [[[[[vNexus quylthulg] is
-unmatched in conveyance magic; you will have trouble getting
-close to it. The other quylthulgs usually prefer to call for
-aid, and you can tell what kind of creatures are likely to
-come to its call, usually. There are [[[[[DSpider], [[[[[sCanine], [[[[[bAquatic],
-[[[[[uRotting], [[[[[gDraconic], [[[[[rDemonic], [[[[[UGreater rotting], [[[[[Ggreater]
-[[[[[GDraconic], [[[[[RGreater demonic], and [[[[[BMaster quylthulgs].
-
-
diff --git a/lib/mods/theme/file/book-11.txt b/lib/mods/theme/file/book-11.txt
deleted file mode 100644
index 5d211818..00000000
--- a/lib/mods/theme/file/book-11.txt
+++ /dev/null
@@ -1,51 +0,0 @@
- ------------------------
- | Monstrous Compendium 3 |
- | Insects |
- ------------------------
-
- *** Ants (a) ***
-
-Ants are worker six-legged insects, and adventurers will
-encounter many different kinds of these on their travels.
-The [[[[[uSoldier ants] and [[[[[oGiant army ants] are just your
-garden-variety ants, and there are also [[[[[UTermites], which
-breed very quickly, and [[[[[BAquatic ants], which have adapted
-to living underwater. The majority of ants, however, come
-from different families, with rudimentary mastery of the
-elements - they vary from [[[[[wwhite], [[[[[rred], [[[[[sgrey], [[[[[Wsilver],
-[[[[[Dblack], and [[[[[yyellow] to [[[[[bblue], [[[[[Rfire], [[[[[gtree], and
-[[[[[Ggreen].
-
- *** Flying insects (I) ***
-
-There are many different kinds of flying insects in Middle-
-earth - some, like [[[[[BButterflies], are harmless, others are
-only slightly dangerous (like [[[[[WMoths], [[[[[uInsect swarms], and
-[[[[[sGiant fleas]). Yet others are serious nuisances due to their
-explosive breeding, among them are [[[[[gNeekerbreekers], [[[[[GGiant]
-[[[[[Gfruit flies], [[[[[DGiant black midges] and [[[[[wGiant white midges].
-Adventurers should be wary of [[[[[yHummerhorns], [[[[[oKiller bees],
-[[[[[rGiant fireflies], and [[[[[UFlies of Mordor].
-
- *** Dragonflies (F) ***
-
-Large insects with dazzling wings, the dragonflies inhabit
-many different areas on Middle-earth. Among them are giant
-[[[[[Baquatic], [[[[[ygold], [[[[[sblack], [[[[[Ubronze], [[[[[Ggreen], [[[[[wwhite], [[[[[oswamp], [[[[[rred],
-[[[[[gforest], [[[[[bblue], [[[[[ubrown], [[[[[Wsilver], [[[[[vviolet], and [[[[[Rpink] ones -
-all with rudimentary command of some of the elements. The
-[[[[[DDeath dragonflies] are worth watching out for.
-
- *** Spiders (S) ***
-
-Ugly eight-legged creatures, the spiders tend to travel in
-packs, and are thus to be reckoned with. The weaker species
-include the [[[[[BPhase spiders], [[[[[DCave spiders], [[[[[WGiant spiders], and
-[[[[[UWood spiders] - these are only dangerous to very inexperienced
-adventurers. The [[[[[RGiant fire ticks], uGiant brown ticks], [[[[[oGiant]
-[[[[[otarantulas], [[[[[wGiant white ticks], [[[[[sGiant grey scorpions], [[[[[rGiant]
-[[[[[rred scorpions], and [[[[[yGiant yellow scorpions] are more dangerous
-than their smaller cousins. The most dangerous of all spiders
-are the aquatic [[[[[gMurk dwellers], the [[[[[rAraneas], the [[[[[bDriders], the
-dreadful [[[[[GMirkwood spiders], and the powerful [[[[[vElder araneas].
-
diff --git a/lib/mods/theme/file/book-12.txt b/lib/mods/theme/file/book-12.txt
deleted file mode 100644
index 07b5267d..00000000
--- a/lib/mods/theme/file/book-12.txt
+++ /dev/null
@@ -1,68 +0,0 @@
- ------------------------
- | Monstrous Compendium 4 |
- | Animals |
- ------------------------
-
-
- *** Cattle (c) ***
-
-Mostly domesticated four-legged beasts of burden, these
-animals will not bother you unless you bother them first.
-In fact, [[[[[wSheep], [[[[[uCows], [[[[[sHorses], [[[[[WMearas], [[[[[yPonies], [[[[[DOxen],
-[[[[[rKine of Araw], and [[[[[UDeer] will tend to ignore adventurers
-completely. [[[[[oBoars], however, are a different matter. They
-have strong legs and fierce tusks, which they will use
-against anyone who stumbles into their territory.
-
- *** Canines (C) ***
-
-Four-legged animals with shaggy fur. Most of them are not
-very dangerous - in fact, the [[[[[sScruffy little dogs] will
-not do much except growl, and [[[[[yJackals] can be deadly against
-very weak adventurers, but will not hold their own against
-even moderately experienced ones. [[[[[oFoxes], [[[[[uWolves], [[[[[wWhite]
-[[[[[wwolves], and [[[[[BBlink dogs] can be a nuisance, but not overmuch.
-The evil [[[[[gWolf chieftains], [[[[[DWerewolves], [[[[[DWargs], [[[[[RHellhounds],
-and [[[[[rGreater Hellhounds], however, are very dangerous.
-
- *** Felines (f) ***
-
-Lithe, four-legged animals with sleek fur and sharp claws.
-The [[[[[WScrawny cat] lives in the town and tends to walk by
-itself. The [[[[[UWild cats], [[[[[gTree cats], and [[[[[bNight cats] are all
-quite menacing, but only dangerous in packs. The powerful
-[[[[[DPanthers], [[[[[oTigers], [[[[[wSnow tigers], and [[[[[ySabre-tooth tigers]
-are not to be toyed with. The [[[[[uLeopards] and [[[[[RLions] are the
-strongest of all the feline monsters.
-
- *** Quadrupeds (q) ***
-
-Four-legged creatures of varying breeds, these monsters
-are all quite large and fierce - their bulk alone is
-enough to intimidate you. The weakest are the [[[[[yApes], who
-make a lot of noise but aren't very dangerous. The [[[[[WOld]
-[[[[[Wbears] just want everyone to leave them alone. There are
-many other different kinds of bears, among them the
-[[[[[uCave bears], [[[[[rWar bears], [[[[[UGrizzly bears], [[[[[wPolar bears],
-[[[[[bBlue bears], [[[[[RFire bears], [[[[[BAquatic bears], and [[[[[DWerebears].
-The [[[[[sMumakil] are gigantic elephantine forms, stomping all
-over the dungeon and waving their tusks threateningly. The
-[[[[[GNight mares] are fearsome skeletal horses with glowing eyes.
-The [[[[[gCatoblepas] are strange ox-like forms with huge heads but
-thin, weak necks. The [[[[[oRust monsters] are weird, small animals
-that look perpetually hungry.
-
- *** Birds (B) ***
-
-There are many different types of birds on Middle-earth,
-and the [[[[[RChaffinches], [[[[[WSparrows], [[[[[BNightingales], [[[[[UThrushes],
-[[[[[WRavens], [[[[[oGulls], [[[[[rEagles], and [[[[[rGreat eagles] will not harm
-anyone who does not harm them first. The [[[[[wSwans] hold a very
-special place with the Valar, and woe be to anyone who
-knowingly harms a Swan. However, not all birds are harmless.
-The [[[[[RKirinki] can wake up entire towns with their shrill cry,
-The [[[[[sCrows] and [[[[[DCrebain] are ever hungry for carrion, as are
-[[[[[GGorcrows]. The [[[[[uHunting hawks] seek prey without regard for
-friend or foe. The [[[[[DWinged Horrors] are not quite birds, they
-are Great Eagles corrupted by Morgoth to serve his ends.
-
diff --git a/lib/mods/theme/file/book-13.txt b/lib/mods/theme/file/book-13.txt
deleted file mode 100644
index faa7071b..00000000
--- a/lib/mods/theme/file/book-13.txt
+++ /dev/null
@@ -1,54 +0,0 @@
- ------------------------
- | Monstrous Compendium 5 |
- | Fliers and Crawlers |
- ------------------------
-
-
- *** Bats (b) ***
-
-Small flying creatures with webbed wings and sharp teeth.
-The [[[[[ofruit bats] are the weakest of them all. Other kinds
-include [[[[[Utan], [[[[[ubrown], [[[[[wsnow], [[[[[sgrey], [[[[[Wsilver], [[[[[yyellow], [[[[[Ggreen],
-[[[[[rred dragon], [[[[[bblue dragon], and [[[[[vdisenchanter bats]. The most
-dangerous of this race the [[[[[BMongbats], [[[[[dVampire bats], [[[[[gBats]
-[[[[[gof Gorgoroth], and [[[[[RDoombats].
-
- *** Rodents (R) ***
-
-Small chittering creatures with quick feet and sharp teeth.
-The [[[[[Uwild rabbits] are utterly harmless unless angered, as
-are [[[[[oSquirrels]. The various giant mice ([[[[[wwhite], [[[[[Bsilver], [[[[[rred],
-[[[[[bblue], and [[[[[yyellow]) and rats ([[[[[Wwhite], [[[[[sgrey], [[[[[Rpink], and [[[[[Gtree])
-are somewhat dangerous, as they tend to run in large packs.
-The [[[[[urock moles], [[[[[Dwererats], and [[[[[gsquirrels of Mirkwood] are
-among the more dangerous rodents.
-
-
- *** Snakes (J) ***
-
-Fast and stealthy creatures that slither along the floor. The
-[[[[[Ueels] are harmless, except when angered. The large [[[[[bblue], [[[[[Wsilver],
-[[[[[vpurple], [[[[[Rred], [[[[[sgrey], [[[[[yyellow], [[[[[ubrown], and [[[[[wwhite] snakes are
-somewhat dangerous. The [[[[[rRattlesnakes], [[[[[oCopperhead] snakes,
-[[[[[DBlack mambas], and [[[[[gKing cobras] are quite dangerous and fierce.
-The aquatic [[[[[BElectric eels] and [[[[[GLimlugs] (sea serpents) are
-among the most dangerous of their kind.
-
- *** Beetles (K) ***
-
-Very large insects with tough carapaces. Most of them are not
-too dangerous. They come in the following varieties: [[[[[wwhite],
-[[[[[ubrown], [[[[[rred], [[[[[sgray], [[[[[oorange], [[[[[bblue], [[[[[Wsilver], [[[[[Ggreen], [[[[[Utree],
-[[[[[Rfire], [[[[[gstag], [[[[[Baquatic], [[[[[yslicer], [[[[[viridescent], and [[[[[Ddeath watch].
-
-
- *** Reptiles (R) ***
-
-The majority of reptiles found on Middle-earth are not very
-dangerous - these include the [[[[[ynewts], [[[[[ucave lizards], [[[[[Urock lizards],
-[[[[[bnight lizards], [[[[[Bblue lizards], [[[[[oswamp lizards], [[[[[rgiant pink frogs],
-[[[[[ggiant green frogs], [[[[[wsnow-frogs], and [[[[[Wgiant silver frogs]. The
-[[[[[Rgiant salamanders] and [[[[[Ggiant turtles] should be approached
-with caution, while the [[[[[sbasilisks] and [[[[[Dgreater basilisks] are
-extremely dangerous and should not be toyed with!
-
diff --git a/lib/mods/theme/file/book-14.txt b/lib/mods/theme/file/book-14.txt
deleted file mode 100644
index eb79aa38..00000000
--- a/lib/mods/theme/file/book-14.txt
+++ /dev/null
@@ -1,55 +0,0 @@
- ------------------------
- | Monstrous Compendium 6 |
- | Morgoth's minions |
- ------------------------
-
- *** Orcs (o) ***
-
-Squat, swarthy creatures rumoured to have been Elves once.
-The [[[[[Usnotlings] and [[[[[osnaga] are the lowest form of Orc, weak
-but dangerous in packs. There are different breeds of Orc,
-depending on their dwelling-place: [[[[[uHill orcs], [[[[[GCave orcs],
-and [[[[[Dblack orcs]. The [[[[[sHalf-orcs] are a cross-breed of Orcs
-and humans. The [[[[[BUruk-hai] are a stronger breed, they can
-bear the light of the sun. The [[[[[wElite] uruks are the most
-dangerous kind of Orc there is.
-
- *** Ogres (O) ***
-
-Monstrous and destructive creatures of legend and folklore.
-The [[[[[wOgrillon] is a cross-breed of an Orc and an Ogre, and
-the [[[[[oHalf-ogre] is a cross between an Ogre and a human. The
-garden-variety [[[[[UOgres] are more common than their [[[[[gForest]-
-dwelling, [[[[[sMountain]-dwelling, and [[[[[uCave]-dwelling cousins.
-The [[[[[DBlack ogres] shy away from the sun, the [[[[[BMerrows] live
-in or near water. There are some [[[[[yRebel ogres] who have
-turned against their plundering fellows and will try to aid
-adventurers.
-
- *** Giants (P) ***
-
-Enormous humanoids with powerful muscles, aligned with evil.
-There are [[[[[WStone giants], [[[[[BStorm giants], [[[[[rFire giants], [[[[[wFrost]
-[[[[[wgiants], and [[[[[UHill giants] - while very large and dangerous,
-they pale in comparison to the much stronger [[[[[uCyclops], [[[[[bCloud]
-[[[[[bgiants], and the terrifying [[[[[sRock giants]. The [[[[[yLesser titans]
-and [[[[[oGreater titans] are in a class of their own, their power
-and magical abilities unmatched by any. The [[[[[RRebel giants] are
-those who have broken with the forces of Darkness.
-
- *** Trolls (T) ***
-
-Lumbering evil creatures originated in mockery of the Ents.
-The [[[[[UHalf-trolls] are bizarre crosses between trolls and Men.
-The [[[[[uCave-trolls], [[[[[wSnow-trolls], [[[[[sHill trolls], [[[[[gForest trolls],
-[[[[[BWater trolls], and [[[[[WStone trolls] are dangerous and usually
-move in large groups. Even more dangerous are the [[[[[oAlgroths],
-the [[[[[yOlog-hai], and the [[[[[BScrags]. The [[[[[RWar trolls], [[[[[rEldraks], and
-[[[[[bEttins] can only be described as killing machines.
-
- *** Yeeks (y) ***
-
-Small humanoid figures whose origin lies outside Middle-earth.
-There are [[[[[Bblue], [[[[[ubrown], [[[[[Ddark], [[[[[wwhite], [[[[[sgray], and [[[[[yyellow]
-Yeeks. The [[[[[gmaster yeeks] are somewhat proficient at magic, and
-[[[[[Uadventurer yeeks] will try to help you. \ No newline at end of file
diff --git a/lib/mods/theme/file/book-15.txt b/lib/mods/theme/file/book-15.txt
deleted file mode 100644
index 21983f48..00000000
--- a/lib/mods/theme/file/book-15.txt
+++ /dev/null
@@ -1,68 +0,0 @@
- ------------------------
- | Monstrous Compendium 7 |
- | Dragons and Worms |
- ------------------------
-
- *** Worms (w) ***
-
-Large slimy masses of worms crawl all around dungeons.
-There are [[[[[Bclear], [[[[[rred], [[[[[bblue], [[[[[ggreen], [[[[[wwhite], [[[[[yyellow],
-[[[[[Dnether], and [[[[[vdisenchanter] worm masses. Additionally,
-there are [[[[[Ugiant slugs] and [[[[[ugiant leeches] which are more
-dangerous than the worm masses. The [[[[[vpurple worms] and
-[[[[[ysandworms] are even more dangerous, and then there are
-the [[[[[uwereworms], huge wormlike shapes dripping acid.
-
- *** Dragon worms (w) ***
-
-These will eventually grow into dragons, unless killed.
-There are [[[[[Rred], [[[[[Bblue], [[[[[Ggreen], [[[[[Wwhite], [[[[[sblack], [[[[[ygold],
-[[[[[ubronze], and [[[[[vmulti-hued ones].
-
- *** Hatchling dragons (d) ***
-
-The [[[[[opseudo-dragon] is a small relative of the dragon that
-inhabits dark caves. The hatchling dragons are newly-born,
-still soft, with eyes unaccustomed to light and scales
-shimmering with a hint of colour: [[[[[rred], [[[[[bblue], [[[[[ggreen],
-[[[[[wwhite], [[[[[sblack], [[[[[Ubronze], [[[[[ygold], and [[[[[vmulti-hued]. There are
-also the aquatic [[[[[WHatchling dragon turtles].
-
-
- *** Young dragons (d) ***
-
-The young dragons sport still-tender scales, coloured more
-brightly than those of the Hatchling dragons: [[[[[rred], [[[[[bblue],
-[[[[[ggreen], [[[[[wwhite], [[[[[sblack], [[[[[Ubronze], [[[[[ygold], and [[[[[vmulti-hued].
-The [[[[[Wyoung dragon turtles] live in or near water.
-
- *** Drakes (d) ***
-
-These dragons are already mature, and their scales are very
-brightly covered, according to the elements each dragon
-draws its power from. There are [[[[[rFire-drakes], [[[[[bBlue drakes],
-[[[[[gGreen drakes], [[[[[wCold-drakes], [[[[[sBlack drakes], [[[[[UBronze drakes],
-[[[[[yGolden drakes], [[[[[vMulti-hued drakes], [[[[[vBalance drakes], [[[[[vLaw]
-[[[[[vdrakes], [[[[[vChaos drakes], [[[[[uCrystal drakes], [[[[[oEthereal drakes],
-[[[[[GShadow drakes], and [[[[[sMature dragon turtles].
-
-
- *** Ancient dragons (D) ***
-
-These dragons are very old, cunning, and powerful. They are
-considerably larger than the drakes, and they too draw their
-colouring from their elements: [[[[[rred], [[[[[bblue], [[[[[ggreen], [[[[[wwhite],
-[[[[[sblack], [[[[[Ubronze], [[[[[ygold], and [[[[[vmulti-hued]. In addition, there
-are the [[[[[GDeath drakes], [[[[[UGreat crystal drakes], [[[[[oAncient ethereal]
-[[[[[odrakes], [[[[[BSky drakes], and [[[[[WAncient dragon turtles].
-
- *** Greater dragons (D) ***
-
-The mightiest and most powerful of dragonkind, these beasts
-are older than time itself. Their very names instill fear into
-your very soul: the [[[[[rGreat Worm of Fire], the [[[[[bGreat Storm Worm],
-the [[[[[gGreat Swamp Worm], the [[[[[wGreat Ice Worm], the [[[[[sGreat Bile Worm],
-the [[[[[UGreat Worm of Perplexity], the [[[[[yGreat Worm of Thunder],
-the [[[[[vGreat Worm of Many Colours], the [[[[[GFastitocalon], the [[[[[vGreat]
-[[[[[vWorm of Balance], the [[[[[RDracolisk], the [[[[[vGreat Worm of Chaos], the
-[[[[[GDracolich], the [[[[[BGreat Worm of Law], and the [[[[[vGreat Wyrm of Power].
diff --git a/lib/mods/theme/file/book-16.txt b/lib/mods/theme/file/book-16.txt
deleted file mode 100644
index e19b7b0b..00000000
--- a/lib/mods/theme/file/book-16.txt
+++ /dev/null
@@ -1,43 +0,0 @@
- -------------------------
- | Monstrous Compendium 8 |
- | Depth dwellers, hybrids |
- -------------------------
-
- *** Nagas (n) ***
-
-Giant snake-like figures with a woman's torso. There are
-[[[[[ggreen], [[[[[Rred], [[[[[Dblack], [[[[[Bwater], [[[[[oswamp], [[[[[ubrown], [[[[[Wsilver],
-[[[[[vnight], [[[[[Gtree], [[[[[sdark], [[[[[bocean], [[[[[yguardian], and [[[[[wspirit nagas].
-The [[[[[Uadventurer nagas] are friendly to their fellows.
-
- *** Hydras (M) ***
-
-Strange reptilian creatures with several heads, guarding
-treasure hoards. There are [[[[[u2-headed], [[[[[o3-headed], [[[[[y4-headed],
-[[[[[g5-headed], [[[[[w6-headed], [[[[[G7-headed], [[[[[s8-headed], [[[[[r9-headed],
-[[[[[b10-headed], [[[[[R11-headed], [[[[[W12-headed], [[[[[v13-headed], [[[[[B14-headed],
-[[[[[U15-headed], as well as [[[[[DKiller hydras].
-
- *** Hybrids (H) ***
-
-These creatures are all crosses between two (or sometimes
-more) different beings. The [[[[[wWhite harpies], [[[[[DBlack harpies],
-and [[[[[oOwlbears] are not very dangerous. The [[[[[UHippogryphs],
-[[[[[uGriffons], [[[[[RGorgimaerae], [[[[[BBehemoths], [[[[[rChimaerae], [[[[[yManticores],
-and [[[[[GSphinxes] are more dangerous and deadly. The [[[[[bGorgons],
-[[[[[WHeadless], [[[[[gSwamp things], and [[[[[vJabberwocks] are the deadliest.
-
- *** Depth dwellers (~) ***
-
-These creatures inhabit the oceans, lakes, and seas of Arda.
-Along with the [[[[[BSand mites], [[[[[BBox jellyfish], [[[[[GBarracudas], and
-[[[[[RPiranhas] there are [[[[[yStargazers], [[[[[gOctopi], [[[[[WGlobefish], [[[[[sPikes],
-[[[[[sSwordfish], and [[[[[sFlounders]. More dangerous are [[[[[rGiant crayfish],
-[[[[[RGiant piranhas], and [[[[[gGiant squid]. Among the larger depth-
-dwellers, there are the [[[[[WHammerhead sharks], [[[[[oTiger sharks],
-[[[[[wWhite sharks], [[[[[oSeahorses], and [[[[[gGiant octopi]. The largest and
-more dangerous creatures include the [[[[[DWhales], [[[[[UElder stargazers],
-[[[[[wGreat white sharks], [[[[[uUndead stargazers], [[[[[GLesser Krakens],
-[[[[[wKiller whales], and [[[[[GGreater Krakens]. The most dangerous ocean
-dweller is the [[[[[vLeviathan].
-
diff --git a/lib/mods/theme/file/book-17.txt b/lib/mods/theme/file/book-17.txt
deleted file mode 100644
index 13aa439f..00000000
--- a/lib/mods/theme/file/book-17.txt
+++ /dev/null
@@ -1,47 +0,0 @@
- ------------------------
- | Monstrous Compendium 9 |
- | Undead Creatures |
- ------------------------
-
- *** Mewlips (i) ***
-
-Mewlips are evil cannibal spirits from the marshlands.
-They come in different varieties: [[[[[wclear], [[[[[sgray], [[[[[oorange],
-[[[[[rbloodshot], [[[[[ggreen], [[[[[bblue], [[[[[ubrown], [[[[[Wstone], [[[[[yyellow], [[[[[Rpink],
-[[[[[Gtree], [[[[[Bair], [[[[[Uplague], and [[[[[Ddeath].
-
-
- *** Golems (g) ***
-
-Massive animated statues made from different materials.
-There are [[[[[obronze], [[[[[wbone], [[[[[ueog], [[[[[Bmithril], [[[[[siron], [[[[[baquatic],
-[[[[[Wstone], [[[[[Uclay], [[[[[Rflesh], and [[[[[ffire golems], in addition to the
-more cunning [[[[[ycolbrans], [[[[[DPukelmen], [[[[[gdrolems], [[[[[Gcolossus], and
-[[[[[ssilent watchers].
-
- *** Skeletons (s) ***
-
-There are skeletal forms of just about any monster that once
-inhabited Middle-earth. Some such forms, however, have never
-been alive in the first place - they are horrible abominations
-animated by powerful wizards. Among them are the [[[[[wice skeletons],
-[[[[[sflying skulls], [[[[[Dcrypt creeps], [[[[[yhand druj], [[[[[oskull druj], and
-[[[[[reye druj].
-
- *** Zombies (z) ***
-
-Zombie forms of all living creatures may appear in the dungeons.
-However, some zombie-like undead from before the First Age do
-exist: [[[[[Ughouls], [[[[[ygreater mummies], [[[[[Dghoulkings], [[[[[ughasts], and
-[[[[[Rrotting corpses].
-
- *** Vampires (V) ***
-
-There are vampire forms of just about any race - [[[[[Whuman], [[[[[Gelf], [[[[[Dorc],
-[[[[[wyeek], [[[[[oogre], [[[[[utroll], [[[[[Rdwarf], and [[[[[Bgnome]. The [[[[[sOriental vampires]
-come from beyond the land of Rhun. There are [[[[[bVampire lords], [[[[[rElder]
-[[[[[rvampires], and [[[[[gMaster vampires]. The [[[[[UAdventurer vampires] are those
-who have denounced the way of the Dark and attempt to follow a path
-of Light as best they can.
-
-
diff --git a/lib/mods/theme/file/book-18.txt b/lib/mods/theme/file/book-18.txt
deleted file mode 100644
index 36cbee04..00000000
--- a/lib/mods/theme/file/book-18.txt
+++ /dev/null
@@ -1,55 +0,0 @@
- --------------------------
- | Monstrous Compendium 10 |
- | Demons and other Horrors |
- --------------------------
-
- *** Minor Demons (u) ***
-
-These demons (roeg) are corrupted forms of natural creatures.
-The individual types of demons are as follows: [[[[[bLimrog] (fish),
-[[[[[UCaborrog] (frog), [[[[[DLygrog] (snake), [[[[[oDraugrog] (wolf), [[[[[rHurog] (dog),
-[[[[[sSarnrog] (stone), [[[[[gNarrog] (rat), [[[[[yAewrog] (bird), [[[[[BRawrog] (lion),
-and [[[[[RAdanrog] (human).
-
- *** Major Demons (u) ***
-
-The major demons are of two kinds - the spider demons, spawn of
-Ungoliant, and the Balroeg, corrupted Maiar. The spider demons
-are as follows: [[[[[gUngorrog] (power spider demon), [[[[[WHelcungol] (ice),
-[[[[[rNaurungol] (fire), [[[[[sMornungol] (black), and [[[[[BFaunungol] (cloud).
-There are also the [[[[[BGaurroeg] (water demons), [[[[[oMorgulroeg] (magic
-demons), [[[[[uDagorrog] (war demons), [[[[[ySererrog] (blood demons), and
-the [[[[[UMenelroeg] (sky demons). The Balroeg can be [[[[[RRed], [[[[[DBlack],
-[[[[[wWhite], and [[[[[bBlue] - commanded by [[[[[GBalrog Captains] and [[[[[vGreater]
-[[[[[vBalroeg].
-
- *** Greater Undead (G) ***
-
-The ghosts are incorporeal beings with awesome magical powers.
-Some of them aren't very impressive, like the [[[[[gGreen glutton]
-[[[[[gghost] and the [[[[[sPoltergeist]. Others are deadlier - [[[[[wGhosts],
-[[[[[BPhantom beasts], [[[[[BDrowned souls], [[[[[BPhantom warriors], the [[[[[DShadows],
-[[[[[DPossessors], [[[[[DShades], and [[[[[USpectres]. The friendly [[[[[WSpirits] will
-try to help adventurers. The [[[[[bBanshee], [[[[[GSpirit troll], [[[[[vPhantom],
-[[[[[uHeadless ghost], and [[[[[uMoaning spirit] are all to be reckoned with.
-In a class of their own are the [[[[[oDreads], [[[[[rDreadlords], and the
-[[[[[yDreadmasters].
-
- *** Liches (L) ***
-
-Yet another kind of powerful undead. Many things can take the form
-of a lich, but the [[[[[oLich], [[[[[GCrypt thing], [[[[[WIron lich], [[[[[rMaster lich],
-[[[[[uMonastic lich], [[[[[UDemilich], [[[[[BArchlich], [[[[[DBlack reaver], and [[[[[sLesser]
-[[[[[sblack reaver] all deserve special mention.
-
-
- *** Wraiths (W) ***
-
-Wraiths are incorporeal beings frequently found in graveyards and
-at the sites of unavenged murders. There are [[[[[wWhite wraiths], [[[[[sGrey]
-[[[[[swraiths], [[[[[WSilver wraiths], [[[[[GNether wraiths], and [[[[[DBlack wraiths].
-The [[[[[UAdventurer wraiths] will try to help you. Fierce and magical
-are the many wights: [[[[[BBarrow wights], [[[[[gForest wights], [[[[[bGrave wights],
-[[[[[oSwamp wights], and [[[[[rEmperor wights]. The most dangerous among the
-wraith beings are the [[[[[uRevenant], [[[[[DNightwalker], [[[[[DNightcrawler], and
-[[[[[DNightwing]. \ No newline at end of file
diff --git a/lib/mods/theme/file/book-19.txt b/lib/mods/theme/file/book-19.txt
deleted file mode 100644
index a36285f0..00000000
--- a/lib/mods/theme/file/book-19.txt
+++ /dev/null
@@ -1,47 +0,0 @@
- -------------------------
- | Monstrous Compendium 11 |
- | Elemental creatures |
- -------------------------
-
- *** Vortices (v) ***
-
-These strange creatures are like localised tornadoes,
-carrying with them the various elements: [[[[[rfire], [[[[[benergy],
-[[[[[ggas], [[[[[wcold], [[[[[sacid], [[[[[ushards], [[[[[vnexus], [[[[[ymana], [[[[[Uconfusion],
-[[[[[Wslowness], [[[[[vchaos], [[[[[Gnether], [[[[[Rplasma], and [[[[[Btime]. Among
-these, the nastiest by far are the [[[[[vstorms of unmagic],
-as well as [[[[[oshimmering], [[[[[Ddeath], and [[[[[vaether] vortices.
-
- *** Spirits (E) ***
-
-These are the spirits contained in various elements, they
-are weaker than the proper elementals. There are [[[[[rFire]
-[[[[[rspirits], [[[[[bWater spirits], [[[[[uEarth spirits], and [[[[[BAir spirits]
-alongside [[[[[WWill'o the wisps] and [[[[[yInvisible stalkers].
-
- *** Elementals (E) ***
-
-Towering masses of raw elements, twisting and shaking all
-in their wake: [[[[[rfire], [[[[[bwater], [[[[[uearth], [[[[[Bair], [[[[[wice], [[[[[omagma],
-[[[[[Uconfusion], [[[[[Ddark], [[[[[Rsmoke], [[[[[gooze], [[[[[sslowness], [[[[[Gtime], and
-[[[[[vchaos].
-
- *** Hulking figures (X, Y) ***
-
-These are strange hulking shapes that puzzle anyone who
-comes across them. They include the [[[[[sXaren], the [[[[[uXorn],
-[[[[[UUmber hulk], [[[[[DDeath hulk], [[[[[wWhite hulk], [[[[[oOrange hulk], [[[[[rFire]
-[[[[[rhulk], [[[[[gForest hulk], [[[[[bNight hulk], [[[[[WSilver hulk], [[[[[vChaos hulk],
-[[[[[yYellow hulk], [[[[[RRed hulk], [[[[[GGreen hulk], and [[[[[Bblue hulk]. The
-[[[[[sSasquatch] and [[[[[wYeti] resemble humans, but they are still
-quite strange.
-
- *** Zephyr Hounds (Z) ***
-
-They are dog-like figures wreathed in the elements. They
-tend to move in packs, and are among the most vicious of
-all dungeon dwellers. The hounds may be: [[[[[Bclear], [[[[[rfire],
-[[[[[benergy], [[[[[gair], [[[[[wcold], [[[[[sacid], [[[[[vmulti-hued], [[[[[Ddark], [[[[[olight],
-[[[[[uearth], [[[[[Baquatic], [[[[[vnexus], [[[[[rwater], [[[[[Rplasma], [[[[[yvibration],
-[[[[[vchaos], [[[[[Gnether], [[[[[uimpact], [[[[[Winertia], [[[[[Ugravity], [[[[[Gethereal],
-[[[[[Btime], and [[[[[vaether]. \ No newline at end of file
diff --git a/lib/mods/theme/file/book-9.txt b/lib/mods/theme/file/book-9.txt
deleted file mode 100644
index 878d4b74..00000000
--- a/lib/mods/theme/file/book-9.txt
+++ /dev/null
@@ -1,99 +0,0 @@
- ------------------------
- | Monstrous Compendium 1 |
- | Humanoids |
- ------------------------
-
- *** Townsfolk (t) ***
-
-These are the monsters you will find in the various towns all across
-Middle-earth. Most of them are neutral to the player, though those who
-are not neutral are quite harmless, unless you take them on before you
-are strong enough. The townsfolk include [[[[[oAimless-looking merchants],
-[[[[[UPitiful-looking beggars], [[[[[ySinging, happy drunks], [[[[[uMangy-looking lepers],
-[[[[[GVillage idiots], [[[[[WBlubbering idiots], [[[[[RBoil-covered wretches], [[[[[gWoodsmen],
-[[[[[wSanctimonious-looking preachers], [[[[[vWeary-looking travellers],
-[[[[[DFilthy street urchins], [[[[[rMean-looking mercenaries],
-[[[[[bAgents of the black market], and [[[[[BBattle-scarred veterans].
-
- *** Humans (p) ***
-
-These are the various humans inhabiting Middle-earth, from all trades
-and professions, of varying degrees of experience. The novices and
-apprentices are just what their titles imply: new to the craft and thus
-easier to deal with than more advanced masters. Depending on the
-player's race, some of these may be neutral or even coaligned. The
-trades include [[[[[brogues], [[[[[uwarriors], [[[[[rmages], [[[[[omystics], [[[[[Rsorcerers], [[[[[Wrangers],
-[[[[[Gdruids], [[[[[wpaladins], [[[[[ymindcrafters], and [[[[[gpriests].
-
-These also include various subraces of humans from different parts of
-Middle-earth, including the moderately dangerous [[[[[Ueasterlings], [[[[[rVariags],
-[[[[[UCorsairs of Umbar], [[[[[uHaradrim], [[[[[sWainriders], and [[[[[gDunlendings], the very
-dangerous [[[[[DBlack Numenoreans] and [[[[[DOathbreakers], as well as the friendly
-(yet deadly when roused) [[[[[BWavelords].
-
-
- *** Elves and Halflings (h) ***
-
-The Halflings are a shy race, so there are not that many of them - only
-the [[[[[sScruffy-looking hobbits] and [[[[[UHalfling slingers]. Very stealthy and
-good shots, Halflings. They make excellent burglars.
-
-The [[[[[BMermaids] are an enigma, some argue that they are simply drowned
-Elven maidens, others say they're half-human, half-fish. Whatever they
-are, they are quite dangerous to the unwary adventurer. Another odd
-race are the [[[[[yMind flayers], whose mind powers are legendary and ability
-to deprive others of their sanity unmatched.
-
-The majority of Elven monsters an adventurer will encounter in the
-dungeons will be Dark Elves, all good at a particular profession, and
-much better at these professions than their human counterparts. There
-are simple [[[[[DDark elves] who live by their wits and a bit of magic, and
-then there are [[[[[vDark elven warlocks], [[[[[RDark elven sorcerers], [[[[[GDark elven]
-[[[[[Gdruids], [[[[[gDark elven priests], [[[[[uDark elven warriors], and [[[[[rDark elven]
-[[[[[rmages], all commanded by [[[[[DDark elven lords].
-
-Not all Elves you meet will be hostile and expert at the Dark arts,
-however, among them the [[[[[bAquatic elven warriors], [[[[[WElven archers],
-[[[[[wHigh-elven rangers], and [[[[[oAquatic elven mages].
-
- *** Dwarves (k) ***
-
-A hardy and stout race, the Dwarves make formidable opponents to any
-adventurer who encounters them. They, too, practice a variety of trades,
-though their spectrum is not as wide-ranging as that of humans or elves.
-The [[[[[DDark dwarven lords] rule over the [[[[[gDark dwarven priests], [[[[[uDark dwarven]
-[[[[[uwarriors], and [[[[[wDark dwarven smiths].
-
-The Dwarves do not trust magic, but a subrace of them - the Petty-dwarves
-- do practice it, you will see both plain [[[[[sPetty-dwarves] and [[[[[RPetty-dwarf]
-[[[[[Rmages].
-
-Some adventurers who know the correct incantation will be able to summon
-[[[[[Udwarven warriors] to their aid.
-
- *** Gnomes, leprawns, and their kin (l) ***
-
-The gnomes are a less-well-known race on Middle-earth; they are related
-to the Petty-dwarves, but they are not nearly as stout as Dwarves. The
-gnomes are quite cunning and smart, but not very strong. Their [[[[[sgnome lords]
-command the [[[[[ugnome warriors], [[[[[bgnome rogues], [[[[[rgnome priests], [[[[[Rgnome mages],
-[[[[[wgnome paladins], and [[[[[ognome mystics].
-
-A race closely related to gnomes are the leprawns - they are even smaller
-than gnomes, and much weaker. However, leprawns breed very quickly and an
-unwary adventurer might be overrun if he is not careful! The [[[[[vmalicious]
-[[[[[vleprawns] are a nuisance, the [[[[[Wwizard leprawns] are a dangerous nuisance,
-and one is not advised to underestimate the [[[[[Ddeath leprawns].
-
-There also exist [[[[[Gcheerful leprawns] and [[[[[Uadventurer gnomes], who have broken
-with the traditions of their races, and might agree to help other adventurers.
-
-A strange race from the depths are the [[[[[glizard men] with their [[[[[rlizard kings] -
-they are quite strong and command powerful magic. These creatures prefer to
-live in swamps and shallow water areas, however, so you will not encounter
-them in the dungeons often.
-
-
-
-
-
diff --git a/lib/mods/theme/help/debug.txt b/lib/mods/theme/help/debug.txt
index 8aea13ee..afe71920 100644
--- a/lib/mods/theme/help/debug.txt
+++ b/lib/mods/theme/help/debug.txt
@@ -17,13 +17,13 @@ will not be scored if you use debug commands.
*****debug.txt*5[c Create object] *****debug.txt*6[C Create artifact]
*****debug.txt*7[d Detect all] *****debug.txt*8[D Teleport to the wilderness]
*****debug.txt*9[e Edit character attributes] *****debug.txt*10[E Change grid's mana]
- *****debug.txt*11[f *IDENTIFY*] *****debug.txt*12[F Features]
+ f (unused) *****debug.txt*12[F Features]
*****debug.txt*13[g Create good item] G (unused)
*****debug.txt*15[h Change life rating] *****debug.txt*16[H Hostile monster creation]
- *****debug.txt*17[i Identify] I (unused)
+ i (unused) I (unused)
*****debug.txt*19[j Jump to other level] J (unused)
*****debug.txt*21[k Check attributes] K (unused)
- *****debug.txt*23[l Learn about objects] L (unused)
+ l (unused) L (unused)
*****debug.txt*25[m Magic Mapping] *****debug.txt*26[M Gain corruption]
*****debug.txt*27[n Summon named monster] *****debug.txt*28[N Summon _friendly_ named monster]
*****debug.txt*29[o Edit object attributes] O (unused)
@@ -118,9 +118,6 @@ maximal legal value.
Alter how much mana a grid has.
Use the "Command count", aka 0, to specify the amount of mana
that you want.
-~~~~~11
-[[[[[G*IDENTIFY* (f)]
- Like a Scroll of *Identify*.
~~~~~12
[[[[[GFeatures (F)]
Use the "Command count", aka 0, to specify a number from
@@ -135,9 +132,6 @@ maximal legal value.
~~~~~16
[[[[[GHostile monster creation (H)]
Summons a Pack of Creatures of the same kind.
-~~~~~17
-[[[[[GIdentify (i)]
- Like a Scroll of Identify.
~~~~~19
[[[[[GJump to other level (j)]
Jump to other dungeon level. This does not work in the
@@ -145,9 +139,6 @@ maximal legal value.
~~~~~21
[[[[[GCheck attributes (k)]
Displays your characters attributes.
-~~~~~23
-[[[[[GLearn about objects (l)]
- Make you know about all objects. Not sure how this works.
~~~~~25
[[[[[GMagic Mapping (m)]
Like a Scroll of Magic mapping.
diff --git a/lib/mods/theme/help/g_eru.txt b/lib/mods/theme/help/g_eru.txt
index 113875b3..f7e0406f 100644
--- a/lib/mods/theme/help/g_eru.txt
+++ b/lib/mods/theme/help/g_eru.txt
@@ -34,7 +34,7 @@ in asking for his help without offending him!
There is a special book called the "Holy Tome of Eru Iluvatar" which
contains instructions for the procedure for each of the prayers Eru will
-grant. There are four prayers all told, which are:
+grant. There are three prayers all told, which are:
1. [[[[[BSee the Music] (Level 1)
Allows you to 'see' the Great Music from which the world originates,
allowing you to see unseen things, and can be cast while blind.
@@ -46,11 +46,7 @@ grant. There are four prayers all told, which are:
allowing you to understand the meaning of things.
At spell level 14 it allows you to identify all your pack.
At spell level 30 it allows you to identify all items on the level.
-3. [[[[[BKnow the Music] (Level 30)
- Allows you to understand the Great Music from which the world originates,
- allowing you to know the full abilities of things.
- At spell level 10 it allows you to *identify* all your pack.
-4. [[[[[BLay of Protection] (Level 35)
+3. [[[[[BLay of Protection] (Level 35)
Creates a circle of safety around you.
Each of these spells can be increased in level both by improving your Prayer
diff --git a/lib/mods/theme/help/m_divin.txt b/lib/mods/theme/help/m_divin.txt
index e03bd334..ee7eec62 100644
--- a/lib/mods/theme/help/m_divin.txt
+++ b/lib/mods/theme/help/m_divin.txt
@@ -22,17 +22,8 @@ There are six spells available for the divination school. These Spells are:
2. [[[[[sSense Hidden] (school level 5)
Detects the traps in a certain radius around you.
At spell level 15 it allows you to sense invisible monsters for a while.
-3. [[[[[sIdentify] (school level 8)
- Asks for an object and identifies it.
- At spell level 17 it identifies all objects in the inventory.
- At spell level 27 it identifies all objects in the inventory and in a
- radius on the floor.
-4. [[[[[sReveal Ways] (school level 9)
+3. [[[[[sReveal Ways] (school level 9)
Detects the doors/stairs/ways in a certain radius around you.
-5. [[[[[sVision] (school level 15)
+4. [[[[[sVision] (school level 15)
Detects the layout of the surrounding area.
At spell level 25 it maps and lights the whole level.
-6. [[[[[sGreater Identify] (school level 35)
- Asks for an object and fully identifies it, providing the full list of
- powers (as with a scroll of *Identify*).
- Cast at yourself, it will reveal your powers (Self Knowledge).
diff --git a/lib/mods/theme/help/macrofaq.txt b/lib/mods/theme/help/macrofaq.txt
index d285194c..624f35f9 100644
--- a/lib/mods/theme/help/macrofaq.txt
+++ b/lib/mods/theme/help/macrofaq.txt
@@ -1788,13 +1788,7 @@ AND - logical AND
IOR - inclusive OR
EQU - (string) equals
NOT - logical negation
-LEQ - (string) less than or equal to
-GEQ - (string) greater than or equal to
[,] - group expressions
-$CLASS - current class
-$GRAF - 3-letter graphics abbr in "graf-***.prf" (old, new)
-$PLAYER - current player name
-$RACE - current race
$SYS - 3-letter system abbr in "pref-***.prf" (ami, mac, win,...)
0 - false
@@ -1805,10 +1799,10 @@ encountered until the next conditional pref line are skipped.
This isn't an actual command. It only works in pref files.
-The variables $CLASS, $GRAF, $PLAYER, $RACE, $PLAYER, $SYS and the
-string values they take on are case sensitive. The values also can't
-contain spaces. These constraints on the values hold when they are
-used in a pref file, but might not when used as pref filenames.
+The variable $SYS and the string value it may take on are case
+sensitive. The values also can't contain spaces. These constraints on
+the values hold when they are used in a pref file, but might not when
+used as pref filenames.
This can be "turned back on" using the pref line "?:1", which is
generally the last line in a file which contains conditional macros,
diff --git a/lib/mods/theme/help/wishing.txt b/lib/mods/theme/help/wishing.txt
index d16f5ae9..29fcab24 100644
--- a/lib/mods/theme/help/wishing.txt
+++ b/lib/mods/theme/help/wishing.txt
@@ -10,11 +10,12 @@ Due to the powerful nature of wishes, there are some rules that govern
what is able to be wished for. These rules are as follows:
1. You cannot wish for a wish, or any other item which would grant more
wishes.
-2. A wish will always generate *one* object. So, never put a number, "a"
+2. A wish will always generate *one* object. The name must be typed EXACTLY
+ as it would appear as an item (case insensitive). So, never put a number, "a"
or "an" in front of the object you are wishing for.
3. It is not possible to wish for the magical +'s to the object (i.e. you
- cannot wish for "gloves of slaying (+10,+10)", but you can wish for
- "gloves of slaying").
+ cannot wish for "set of leather gloves of slaying (+10,+10)", but you can wish for
+ "set of leather gloves of slaying").
4. You cannot wish for artifacts, but you *can* wish for excellent (ego)
items.
5. You can wish for monsters and ego monsters (e.g. "cave orc", "rogue cave
diff --git a/lib/mods/theme/pref/xtra-xxx.prf b/lib/mods/theme/pref/xtra-xxx.prf
deleted file mode 100644
index 0c6186de..00000000
--- a/lib/mods/theme/pref/xtra-xxx.prf
+++ /dev/null
@@ -1,137 +0,0 @@
-# File: xtra-xxx.prf
-
-#
-# This file defines special attr/char mappings for use in "graphics" mode
-#
-# See "lib/help/command.txt" and "src/files.c" for more information.
-#
-
-
-##### Remap the player icon #####
-
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Human] ]
-R:0:0x8C/0x80
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x81
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Elf] ]
-R:0:0x8C/0x82
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Hobbit] ]
-R:0:0x8C/0x83
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Gnome] ]
-R:0:0x8C/0x84
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Dwarf] ]
-R:0:0x8C/0x85
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Orc] ]
-R:0:0x8C/0x86
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Troll] ]
-R:0:0x8C/0x87
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Dunadan] ]
-R:0:0x8C/0x88
-?:[AND [EQU $CLASS Warrior] [EQU $RACE High-Elf] ]
-R:0:0x8C/0x89
-
-?:[AND [EQU $CLASS Mage] [EQU $RACE Human] ]
-R:0:0x8C/0x8A
-?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x8B
-?:[AND [EQU $CLASS Mage] [EQU $RACE Elf] ]
-R:0:0x8C/0x8C
-?:[AND [EQU $CLASS Mage] [EQU $RACE Hobbit] ]
-R:0:0x8C/0x8D
-?:[AND [EQU $CLASS Mage] [EQU $RACE Gnome] ]
-R:0:0x8C/0x8E
-?:[AND [EQU $CLASS Mage] [EQU $RACE Dwarf] ]
-R:0:0x8C/0x8F
-?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Orc] ]
-R:0:0x8C/0x90
-?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Troll] ]
-R:0:0x8C/0x91
-?:[AND [EQU $CLASS Mage] [EQU $RACE Dunadan] ]
-R:0:0x8C/0x92
-?:[AND [EQU $CLASS Mage] [EQU $RACE High-Elf] ]
-R:0:0x8C/0x93
-
-?:[AND [EQU $CLASS Priest] [EQU $RACE Human] ]
-R:0:0x8C/0x94
-?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x95
-?:[AND [EQU $CLASS Priest] [EQU $RACE Elf] ]
-R:0:0x8C/0x96
-?:[AND [EQU $CLASS Priest] [EQU $RACE Hobbit] ]
-R:0:0x8C/0x97
-?:[AND [EQU $CLASS Priest] [EQU $RACE Gnome] ]
-R:0:0x8C/0x98
-?:[AND [EQU $CLASS Priest] [EQU $RACE Dwarf] ]
-R:0:0x8C/0x99
-?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Orc] ]
-R:0:0x8C/0x9A
-?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Troll] ]
-R:0:0x8C/0x9B
-?:[AND [EQU $CLASS Priest] [EQU $RACE Dunadan] ]
-R:0:0x8C/0x9C
-?:[AND [EQU $CLASS Priest] [EQU $RACE High-Elf] ]
-R:0:0x8C/0x9D
-
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Human] ]
-R:0:0x8C/0x9E
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x9F
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Elf] ]
-R:0:0x8D/0x80
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Hobbit] ]
-R:0:0x8D/0x81
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Gnome] ]
-R:0:0x8D/0x82
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Dwarf] ]
-R:0:0x8D/0x83
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Orc] ]
-R:0:0x8D/0x84
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Troll] ]
-R:0:0x8D/0x85
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Dunadan] ]
-R:0:0x8D/0x86
-?:[AND [EQU $CLASS Rogue] [EQU $RACE High-Elf] ]
-R:0:0x8D/0x87
-
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Human] ]
-R:0:0x8D/0x88
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Elf] ]
-R:0:0x8D/0x89
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Elf] ]
-R:0:0x8D/0x8A
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Hobbit] ]
-R:0:0x8D/0x8B
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Gnome] ]
-R:0:0x8D/0x8C
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Dwarf] ]
-R:0:0x8D/0x8D
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Orc] ]
-R:0:0x8D/0x8E
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Troll] ]
-R:0:0x8D/0x8F
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Dunadan] ]
-R:0:0x8D/0x90
-?:[AND [EQU $CLASS Ranger] [EQU $RACE High-Elf] ]
-R:0:0x8D/0x91
-
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Human] ]
-R:0:0x8D/0x92
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Elf] ]
-R:0:0x8D/0x93
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Elf] ]
-R:0:0x8D/0x94
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Hobbit] ]
-R:0:0x8D/0x95
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Gnome] ]
-R:0:0x8D/0x96
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Dwarf] ]
-R:0:0x8D/0x97
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Orc] ]
-R:0:0x8D/0x98
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Troll] ]
-R:0:0x8D/0x99
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Dunadan] ]
-R:0:0x8D/0x9A
-?:[AND [EQU $CLASS Paladin] [EQU $RACE High-Elf] ]
-R:0:0x8D/0x9B
-
diff --git a/lib/pref/pref.prf b/lib/pref/pref.prf
index 310e5b8a..e41fb85e 100644
--- a/lib/pref/pref.prf
+++ b/lib/pref/pref.prf
@@ -246,6 +246,10 @@ C:1:)
A:$
C:1:S
+# Destroy floor item
+A:k--
+C:0:X
+
### Extended macros ###
diff --git a/lib/pref/xtra-xxx.prf b/lib/pref/xtra-xxx.prf
deleted file mode 100644
index 0c6186de..00000000
--- a/lib/pref/xtra-xxx.prf
+++ /dev/null
@@ -1,137 +0,0 @@
-# File: xtra-xxx.prf
-
-#
-# This file defines special attr/char mappings for use in "graphics" mode
-#
-# See "lib/help/command.txt" and "src/files.c" for more information.
-#
-
-
-##### Remap the player icon #####
-
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Human] ]
-R:0:0x8C/0x80
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x81
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Elf] ]
-R:0:0x8C/0x82
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Hobbit] ]
-R:0:0x8C/0x83
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Gnome] ]
-R:0:0x8C/0x84
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Dwarf] ]
-R:0:0x8C/0x85
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Orc] ]
-R:0:0x8C/0x86
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Half-Troll] ]
-R:0:0x8C/0x87
-?:[AND [EQU $CLASS Warrior] [EQU $RACE Dunadan] ]
-R:0:0x8C/0x88
-?:[AND [EQU $CLASS Warrior] [EQU $RACE High-Elf] ]
-R:0:0x8C/0x89
-
-?:[AND [EQU $CLASS Mage] [EQU $RACE Human] ]
-R:0:0x8C/0x8A
-?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x8B
-?:[AND [EQU $CLASS Mage] [EQU $RACE Elf] ]
-R:0:0x8C/0x8C
-?:[AND [EQU $CLASS Mage] [EQU $RACE Hobbit] ]
-R:0:0x8C/0x8D
-?:[AND [EQU $CLASS Mage] [EQU $RACE Gnome] ]
-R:0:0x8C/0x8E
-?:[AND [EQU $CLASS Mage] [EQU $RACE Dwarf] ]
-R:0:0x8C/0x8F
-?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Orc] ]
-R:0:0x8C/0x90
-?:[AND [EQU $CLASS Mage] [EQU $RACE Half-Troll] ]
-R:0:0x8C/0x91
-?:[AND [EQU $CLASS Mage] [EQU $RACE Dunadan] ]
-R:0:0x8C/0x92
-?:[AND [EQU $CLASS Mage] [EQU $RACE High-Elf] ]
-R:0:0x8C/0x93
-
-?:[AND [EQU $CLASS Priest] [EQU $RACE Human] ]
-R:0:0x8C/0x94
-?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x95
-?:[AND [EQU $CLASS Priest] [EQU $RACE Elf] ]
-R:0:0x8C/0x96
-?:[AND [EQU $CLASS Priest] [EQU $RACE Hobbit] ]
-R:0:0x8C/0x97
-?:[AND [EQU $CLASS Priest] [EQU $RACE Gnome] ]
-R:0:0x8C/0x98
-?:[AND [EQU $CLASS Priest] [EQU $RACE Dwarf] ]
-R:0:0x8C/0x99
-?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Orc] ]
-R:0:0x8C/0x9A
-?:[AND [EQU $CLASS Priest] [EQU $RACE Half-Troll] ]
-R:0:0x8C/0x9B
-?:[AND [EQU $CLASS Priest] [EQU $RACE Dunadan] ]
-R:0:0x8C/0x9C
-?:[AND [EQU $CLASS Priest] [EQU $RACE High-Elf] ]
-R:0:0x8C/0x9D
-
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Human] ]
-R:0:0x8C/0x9E
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Elf] ]
-R:0:0x8C/0x9F
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Elf] ]
-R:0:0x8D/0x80
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Hobbit] ]
-R:0:0x8D/0x81
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Gnome] ]
-R:0:0x8D/0x82
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Dwarf] ]
-R:0:0x8D/0x83
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Orc] ]
-R:0:0x8D/0x84
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Half-Troll] ]
-R:0:0x8D/0x85
-?:[AND [EQU $CLASS Rogue] [EQU $RACE Dunadan] ]
-R:0:0x8D/0x86
-?:[AND [EQU $CLASS Rogue] [EQU $RACE High-Elf] ]
-R:0:0x8D/0x87
-
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Human] ]
-R:0:0x8D/0x88
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Elf] ]
-R:0:0x8D/0x89
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Elf] ]
-R:0:0x8D/0x8A
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Hobbit] ]
-R:0:0x8D/0x8B
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Gnome] ]
-R:0:0x8D/0x8C
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Dwarf] ]
-R:0:0x8D/0x8D
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Orc] ]
-R:0:0x8D/0x8E
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Half-Troll] ]
-R:0:0x8D/0x8F
-?:[AND [EQU $CLASS Ranger] [EQU $RACE Dunadan] ]
-R:0:0x8D/0x90
-?:[AND [EQU $CLASS Ranger] [EQU $RACE High-Elf] ]
-R:0:0x8D/0x91
-
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Human] ]
-R:0:0x8D/0x92
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Elf] ]
-R:0:0x8D/0x93
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Elf] ]
-R:0:0x8D/0x94
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Hobbit] ]
-R:0:0x8D/0x95
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Gnome] ]
-R:0:0x8D/0x96
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Dwarf] ]
-R:0:0x8D/0x97
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Orc] ]
-R:0:0x8D/0x98
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Half-Troll] ]
-R:0:0x8D/0x99
-?:[AND [EQU $CLASS Paladin] [EQU $RACE Dunadan] ]
-R:0:0x8D/0x9A
-?:[AND [EQU $CLASS Paladin] [EQU $RACE High-Elf] ]
-R:0:0x8D/0x9B
-
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 30ceb76c..6c9ca9d6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,9 +1,10 @@
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../vendor/bandit)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../vendor/fmt)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../vendor/pcg-cpp/include)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../vendor/jsoncons)
+INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/bandit)
+INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/fmt)
+INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/pcg-cpp/include)
+INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/jsoncons)
+INCLUDE_DIRECTORIES(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/CppQuickCheck/include)
# Add subdirectories
ADD_SUBDIRECTORY (squelch)
@@ -25,7 +26,10 @@ SET(SRCS_COMMON
dice.cc
dungeon.cc
files.cc
+ frontend.cc
+ format_ext.cc
game.cc
+ game_edit_data.cc
gen_evol.cc
gen_maze.cc
generate.cc
@@ -36,6 +40,8 @@ SET(SRCS_COMMON
init1.cc
init2.cc
joke.cc
+ key_queue.cc
+ level_data.cc
level_marker.cc
levels.cc
loadsave.cc
@@ -59,6 +65,7 @@ SET(SRCS_COMMON
options.cc
player_type.cc
powers.cc
+ program_args.cc
q_betwen.cc
q_bounty.cc
q_dragons.cc
@@ -108,14 +115,18 @@ SET(SRCS_COMMON
seed.cc
xtra1.cc
xtra2.cc
- z-form.c
+ z-form.cc
z-rand.cc
- z-term.c
- z-util.c
+ z-term.cc
+ z-util.cc
)
# Sources (TEST)
SET(SRCS_TESTS
+ # CppQuickCheck
+ ${CMAKE_CURRENT_SOURCE_DIR}/../vendor/CppQuickCheck/src/Arbitrary.cpp
+ # Own code
+ ../tests/arbitrary/boost_optional.cc
../tests/get_level_device.cc
../tests/harness.cc
../tests/lua_get_level.cc
@@ -132,7 +143,6 @@ ADD_LIBRARY(game_main
# Need a few additional source files for Windows.
IF(WIN32)
- SET(SRCS ${SRCS} main-win.c)
# Resource files require a little workaround.
IF(MINGW)
# Workaround for resource compilation for mingw on CMake.
@@ -146,7 +156,7 @@ IF(WIN32)
SET(SRCS ${SRCS} angband.rc)
ENDIF(MINGW)
# Executable for Win32
- ADD_EXECUTABLE(tome-win WIN32 main-win.c)
+ ADD_EXECUTABLE(tome-win WIN32 main-win.cc)
TARGET_LINK_LIBRARIES(tome-win game squelch ${LIBS} winmm wsock32)
INSTALL(TARGETS tome-win RUNTIME DESTINATION bin)
ENDIF(WIN32)
@@ -154,28 +164,21 @@ ENDIF(WIN32)
# tome executables
IF(X11_FOUND)
INCLUDE_DIRECTORIES(${X11_INCLUDE_DIR})
- ADD_EXECUTABLE(tome-x11 main-x11.c)
+ ADD_EXECUTABLE(tome-x11 main-x11.cc)
TARGET_LINK_LIBRARIES(tome-x11 game_main game squelch ${LIBS} ${X11_LIBRARIES})
INSTALL(TARGETS tome-x11 RUNTIME DESTINATION bin)
ENDIF()
-IF(SDL_FOUND AND SDLIMAGE_FOUND AND SDLTTF_FOUND)
- INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR})
- ADD_EXECUTABLE(tome-sdl main-sdl.c)
- TARGET_LINK_LIBRARIES(tome-sdl game_main game squelch ${LIBS} ${SDLIMAGE_LIBRARY} ${SDLTTF_LIBRARY} ${SDL_LIBRARY} m)
- INSTALL(TARGETS tome-sdl RUNTIME DESTINATION bin)
-ENDIF()
-
IF(CURSES_FOUND)
INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
- ADD_EXECUTABLE(tome-gcu main-gcu.c)
+ ADD_EXECUTABLE(tome-gcu main-gcu.cc)
TARGET_LINK_LIBRARIES(tome-gcu game_main game squelch ${LIBS} ${CURSES_LIBRARIES})
INSTALL(TARGETS tome-gcu RUNTIME DESTINATION bin)
ENDIF()
IF(GTK2_FOUND)
INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
- ADD_EXECUTABLE(tome-gtk2 main-gtk2.c)
+ ADD_EXECUTABLE(tome-gtk2 main-gtk2.cc)
TARGET_LINK_LIBRARIES(tome-gtk2 game_main game squelch ${LIBS} ${GTK2_LIBRARIES})
INSTALL(TARGETS tome-gtk2 RUNTIME DESTINATION bin)
ENDIF()
diff --git a/src/ability_type.hpp b/src/ability_type.hpp
index 0ec596ba..61e6bc2c 100644
--- a/src/ability_type.hpp
+++ b/src/ability_type.hpp
@@ -3,7 +3,7 @@
#include <string>
#include <vector>
-#include "h-basic.h"
+#include "h-basic.hpp"
/**
* Abilities.
diff --git a/src/activation.hpp b/src/activation.hpp
index adb9d8bc..aec359a8 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
/**
* Activation descriptor.
diff --git a/src/alloc.hpp b/src/alloc.hpp
index 1d4ce815..1b0ede47 100644
--- a/src/alloc.hpp
+++ b/src/alloc.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
#include "alloc_entry.hpp"
#include <vector>
diff --git a/src/alloc_entry.hpp b/src/alloc_entry.hpp
index 5e0e547f..fd24597e 100644
--- a/src/alloc_entry.hpp
+++ b/src/alloc_entry.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
/**
* An entry for the object/monster allocation functions
diff --git a/src/angband.h b/src/angband.h
deleted file mode 100644
index 5fbc94e5..00000000
--- a/src/angband.h
+++ /dev/null
@@ -1,94 +0,0 @@
-#pragma once
-
-/*
- * Copyright (c) 1989 James E. Wilson
- *
- * This software may be copied and distributed for educational, research, and
- * not for profit purposes provided that this copyright and statement are
- * included in all such copies.
- */
-
-/*
- * C++ guard.
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * First, include the low-level includes. Be sure to edit "h-config.h"
- * to reflect any hardware, operating system, or compiler nuances.
- */
-#include "h-basic.h"
-
-
-/*
- * Then, include the header files for the low-level code
- */
-#include "z-util.h"
-#include "z-form.h"
-#include "z-term.h"
-
-
-/*
- * Include the "Angband" configuration header
- */
-#include "config.h"
-
-
-/*
- * Now, include the defines and the types
- */
-#include "defines.h"
-
-/***** Some copyright messages follow below *****/
-
-/*
- * Note that these copyright messages apply to an ancient version
- * of Angband, as in, from pre-2.4.frog-knows days, and thus the
- * reference to "5.0" is rather misleading...
- */
-
-/*
- * UNIX ANGBAND Version 5.0
- */
-
-
-/* Original copyright message follows. */
-
-/*
- * ANGBAND Version 4.8 COPYRIGHT (c) Robert Alan Koeneke
- *
- * I lovingly dedicate this game to hackers and adventurers
- * everywhere...
- *
- * Designer and Programmer:
- * Robert Alan Koeneke
- * University of Oklahoma
- *
- * Assistant Programmer:
- * Jimmey Wayne Todd
- * University of Oklahoma
- *
- * Assistant Programmer:
- * Gary D. McAdoo
- * University of Oklahoma
- *
- * UNIX Port:
- * James E. Wilson
- * UC Berkeley
- * wilson@ernie.Berkeley.EDU
- * ucbvax!ucbernie!wilson
- */
-
-
-/*
- * ANGBAND may be copied and modified freely as long as the above
- * credits are retained. No one who-so-ever may sell or market
- * this software in any form without the expressed written consent
- * of the author Robert Alan Koeneke.
- */
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
diff --git a/src/artifact_type.hpp b/src/artifact_type.hpp
index 9f866aa7..df5d30c1 100644
--- a/src/artifact_type.hpp
+++ b/src/artifact_type.hpp
@@ -1,8 +1,10 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
#include "object_flag_set.hpp"
+#include <boost/optional.hpp>
+
/**
* Artifact descriptor.
*
@@ -43,7 +45,7 @@ struct artifact_type
byte cur_num = 0; /* Number created (0 or 1) */
- s16b power = 0; /* Power granted, if any */
+ boost::optional<int> power; /* Power granted, if any */
s16b set = 0; /* Which set does it belong it, if any? */
diff --git a/src/between_exit.hpp b/src/between_exit.hpp
index 7ea686d7..45c5ad3a 100644
--- a/src/between_exit.hpp
+++ b/src/between_exit.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
/**
* Surface-level void gates descriptor.
@@ -8,9 +8,9 @@
struct between_exit
{
s16b corresp; /* Corresponding between gate */
- bool_ dungeon; /* Do we exit in a dungeon or in the wild ? */
- s16b wild_x, wild_y; /* Wilderness spot to land onto */
+ s16b wild_x; /* Wilderness spot to land onto */
+ s16b wild_y; /* Wilderness spot to land onto */
s16b px, py; /* Location of the map */
s16b d_idx; /* Dungeon to land onto */
diff --git a/src/birth.cc b/src/birth.cc
index f677e6e1..c29f7eed 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -14,7 +14,6 @@
#include "cmd5.hpp"
#include "dungeon_flag.hpp"
#include "dungeon_info_type.hpp"
-#include "files.h"
#include "files.hpp"
#include "game.hpp"
#include "gods.hpp"
@@ -48,20 +47,24 @@
#include "tables.hpp"
#include "town_type.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
#include "wilderness_map.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
+#include "z-util.hpp"
#include <algorithm>
+#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem.hpp>
+#include <fcntl.h>
#include <fmt/format.h>
#include <numeric>
#include <string>
+using boost::algorithm::equals;
+
/*
* How often the autoroller will update the display and pause
* to check for user interuptions.
@@ -149,7 +152,7 @@ static std::string create_random_name()
}
-void print_desc_aux(cptr txt, int y, int xx)
+void print_desc_aux(const char *txt, int y, int xx)
{
int i = -1, x = xx;
@@ -168,7 +171,7 @@ void print_desc_aux(cptr txt, int y, int xx)
}
}
-void print_desc(cptr txt)
+void print_desc(const char *txt)
{
print_desc_aux(txt, 12, 1);
}
@@ -207,7 +210,7 @@ static void save_prev_data()
/*
* Load the previous data
*/
-static void load_prev_data(bool_ save)
+static void load_prev_data(bool save)
{
auto &previous_char = game->previous_char;
birther temp;
@@ -265,7 +268,7 @@ static void load_prev_data(bool_ save)
*
* The "p_ptr->maximize" code is important -BEN-
*/
-static int adjust_stat(int value, int amount, int auto_roll)
+static int adjust_stat(int value, int amount)
{
int i;
@@ -330,7 +333,7 @@ static void get_stats()
/* Roll and verify some stats */
- while (TRUE)
+ while (true)
{
/* Roll some dice */
for (j = i = 0; i < 18; i++)
@@ -484,7 +487,7 @@ static errr init_randart()
ra.name_full = get_line("rart_f.txt", ANGBAND_DIR_FILE, buf, i);
ra.attr = randint(15);
ra.activation = rand_int(MAX_T_ACT);
- ra.generated = FALSE;
+ ra.generated = false;
ra.cost = cost;
// Push
@@ -630,16 +633,11 @@ static void player_wipe()
}
/* Reset the "objects" */
- for (auto &k_ref: k_info)
+ for (auto &k_entry: k_info)
{
- /* Reset "tried" */
- k_ref.tried = FALSE;
-
- /* Reset "aware" */
- k_ref.aware = FALSE;
-
- /* Reset "artifact" */
- k_ref.artifact = 0;
+ auto k_ptr = k_entry.second;
+ k_ptr->aware = false;
+ k_ptr->artifact = false;
}
@@ -661,7 +659,7 @@ static void player_wipe()
r_ptr->r_pkills = 0;
/* Clear saved flag */
- r_ptr->on_saved = FALSE;
+ r_ptr->on_saved = false;
}
@@ -673,30 +671,30 @@ static void player_wipe()
/* Assume no winning game */
total_winner = 0;
- has_won = FALSE;
+ has_won = false;
/* Assume no cheating */
noscore = 0;
- wizard = 0;
+ wizard = false;
/* Clear the fate */
for (std::size_t i = 0; i < MAX_FATES; i++)
{
fates[i].fate = 0;
}
- p_ptr->no_mortal = FALSE;
+ p_ptr->no_mortal = false;
/* Player don't have the black breath from the beginning !*/
- p_ptr->black_breath = FALSE;
+ p_ptr->black_breath = false;
/* Default pet command settings */
p_ptr->pet_follow_distance = 6;
- p_ptr->pet_open_doors = FALSE;
- p_ptr->pet_pickup_items = FALSE;
+ p_ptr->pet_open_doors = false;
+ p_ptr->pet_pickup_items = false;
/* Body changing initialisation */
p_ptr->body_monster = 0;
- p_ptr->disembodied = FALSE;
+ p_ptr->disembodied = false;
/* Wipe xtra hp */
p_ptr->hp_mod = 0;
@@ -719,18 +717,15 @@ static void player_wipe()
inscription_known = false;
}
- /* Reset wild_mode to FALSE */
- p_ptr->wild_mode = FALSE;
- p_ptr->old_wild_mode = FALSE;
+ /* Reset wild_mode to false */
+ p_ptr->wild_mode = false;
+ p_ptr->old_wild_mode = false;
/* Initialize allow_one_death */
p_ptr->allow_one_death = 0;
/* Wipe the power list */
- for (std::size_t i = 0; i < POWER_MAX; i++)
- {
- p_ptr->powers_mod[i] = 0;
- }
+ p_ptr->powers_mod.clear();
/* No companions killed */
p_ptr->companion_killed = 0;
@@ -762,12 +757,9 @@ static void outfit_obj(object_proto const *proto)
}
/* These objects are "storebought" */
- q_ptr->ident |= IDENT_MENTAL;
q_ptr->number = damroll(proto->dd, proto->ds);
- object_aware(q_ptr);
- object_known(q_ptr);
- inven_carry(q_ptr, FALSE);
+ inven_carry(q_ptr, false);
}
@@ -789,23 +781,27 @@ static void player_outfit_object(int qty, int tval, int sval)
object_type *q_ptr = &forge;
object_prep(q_ptr, lookup_kind(tval, sval));
q_ptr->number = qty;
- object_aware(q_ptr);
- object_known(q_ptr);
- inven_carry(q_ptr, FALSE);
+ inven_carry(q_ptr, false);
}
/*
* Give player a spell book.
*/
-static void player_outfit_spellbook(cptr spell_name)
+static void player_outfit_spellbook(const char *spell_name)
{
- object_type forge;
- object_type *q_ptr = &forge;
- object_prep(q_ptr, lookup_kind(TV_BOOK, 255));
- q_ptr->pval = find_spell(spell_name);
- q_ptr->ident |= IDENT_MENTAL | IDENT_KNOWN;
- inven_carry(q_ptr, FALSE);
+ if (auto spell_idx = find_spell(spell_name))
+ {
+ object_type forge;
+ object_type *q_ptr = &forge;
+ object_prep(q_ptr, lookup_kind(TV_BOOK, 255));
+ q_ptr->pval = *spell_idx;
+ inven_carry(q_ptr, false);
+ }
+ else
+ {
+ quit_fmt("Couldn't find spell '%s'\n");
+ }
}
@@ -817,7 +813,7 @@ static void player_outfit_spellbook(cptr spell_name)
static void player_outfit()
{
// Shorthand names for convenience
- cptr class_name = spp_ptr->title;
+ const char *class_name = spp_ptr->title;
auto const &subrace_name = rmp_ptr->title;
/*
@@ -834,51 +830,51 @@ static void player_outfit()
*/
if (game_module_idx == MODULE_TOME)
{
- if (streq(class_name, "Ranger"))
+ if (equals(class_name, "Ranger"))
{
player_outfit_spellbook("Phase Door");
}
}
- if (streq(class_name, "Geomancer"))
+ if (equals(class_name, "Geomancer"))
{
player_outfit_spellbook("Geyser");
}
- if (streq(class_name, "Priest(Eru)"))
+ if (equals(class_name, "Priest(Eru)"))
{
player_outfit_spellbook("See the Music");
}
- if (streq(class_name, "Priest(Manwe)"))
+ if (equals(class_name, "Priest(Manwe)"))
{
player_outfit_spellbook("Manwe's Blessing");
}
- if (streq(class_name, "Druid"))
+ if (equals(class_name, "Druid"))
{
player_outfit_spellbook("Charm Animal");
}
- if (streq(class_name, "Dark-Priest"))
+ if (equals(class_name, "Dark-Priest"))
{
player_outfit_spellbook("Curse");
}
- if (streq(class_name, "Paladin"))
+ if (equals(class_name, "Paladin"))
{
player_outfit_spellbook("Divine Aim");
}
if (game_module_idx == MODULE_THEME)
{
/* Priests */
- if (streq(class_name, "Stonewright"))
+ if (equals(class_name, "Stonewright"))
{
player_outfit_spellbook("Firebrand");
}
- if (streq(class_name, "Priest(Varda)"))
+ if (equals(class_name, "Priest(Varda)"))
{
player_outfit_spellbook("Light of Valinor");
}
- if (streq(class_name, "Priest(Ulmo)"))
+ if (equals(class_name, "Priest(Ulmo)"))
{
player_outfit_spellbook("Song of Belegaer");
}
- if (streq(class_name, "Priest(Mandos)"))
+ if (equals(class_name, "Priest(Mandos)"))
{
player_outfit_spellbook("Tears of Luthien");
}
@@ -920,36 +916,32 @@ static void player_outfit()
}
/* Peace-mages */
- if (streq(class_name, "Peace-mage"))
+ if (equals(class_name, "Peace-mage"))
{
player_outfit_spellbook("Phase Door");
}
/* Wainriders */
- if (streq(class_name, "Wainrider"))
+ if (equals(class_name, "Wainrider"))
{
player_outfit_spellbook("Curse");
}
}
- if (streq(class_name, "Mimic"))
+ if (equals(class_name, "Mimic"))
{
object_type forge;
object_type *q_ptr = &forge;
object_prep(q_ptr, lookup_kind(TV_CLOAK, SV_MIMIC_CLOAK));
q_ptr->pval2 = resolve_mimic_name("Mouse");
- q_ptr->ident |= IDENT_MENTAL | IDENT_KNOWN;
- inven_carry(q_ptr, FALSE);
+ inven_carry(q_ptr, false);
}
if (game_module_idx == MODULE_THEME)
{
/* Give everyone a scroll of WoR. */
player_outfit_object(1, TV_SCROLL, SV_SCROLL_WORD_OF_RECALL);
-
- /* Identify everything in pack. */
- identify_pack_fully();
}
if (rmp_ptr->title == "Vampire")
@@ -975,9 +967,7 @@ static void player_outfit()
object_prep(q_ptr, lookup_kind(TV_LITE, SV_LITE_TORCH));
q_ptr->number = (byte)rand_range(3, 7);
q_ptr->timeout = rand_range(3, 7) * 500;
- object_aware(q_ptr);
- object_known(q_ptr);
- inven_carry(q_ptr, FALSE);
+ inven_carry(q_ptr, false);
}
/* Outfit the player with starting items */
@@ -1001,7 +991,7 @@ static void dump_classes(std::vector<u16b> const &classes, int sel, u32b *restri
for (int n = 0; n < n_max; n++)
{
- cptr mod = "";
+ const char *mod = "";
char p2 = ')', p1 = ' ';
/* Analyze */
@@ -1240,7 +1230,7 @@ static int dump_gods(int sel, int *choice, int max)
{
int i, j;
char buf[80];
- cptr str;
+ const char *str;
/* Clean up */
clear_from(12);
@@ -1277,10 +1267,17 @@ static int dump_gods(int sel, int *choice, int max)
{
/* Display the first four lines of the god description */
for (j = 0; j < 4; j++)
- if (strcmp(g_ptr->desc[j], ""))
+ {
+ if (!equals(g_ptr->desc[j], ""))
+ {
print_desc_aux(g_ptr->desc[j], 12 + j, 1);
+ }
+ }
+ }
+ else
+ {
+ print_desc("You can begin as an atheist and still convert to a god later.");
}
- else print_desc("You can begin as an atheist and still convert to a god later.");
c_put_str(TERM_L_BLUE, buf, 20 + (i / 4), 1 + 20 * (i % 4));
}
@@ -1293,11 +1290,9 @@ static int dump_gods(int sel, int *choice, int max)
return (max);
}
+static bool do_quick_start = false;
-/* Ask questions */
-static bool_ do_quick_start = FALSE;
-
-static bool_ player_birth_aux_ask()
+static bool player_birth_aux_ask()
{
auto &class_info = game->edit_data.class_info;
auto const &race_info = game->edit_data.race_info;
@@ -1350,20 +1345,20 @@ static bool_ player_birth_aux_ask()
if (game->previous_char.quick_ok)
{
/* Choose */
- while (1)
+ while (true)
{
put_str("Use same character as last time (y/n)? ", 20, 2);
c = inkey();
if (c == 'Q') quit(NULL);
- else if (c == 'S') return (FALSE);
+ else if (c == 'S') return false;
else if ((c == 'y') || (c == 'Y'))
{
- do_quick_start = TRUE;
+ do_quick_start = true;
break;
}
else
{
- do_quick_start = FALSE;
+ do_quick_start = false;
break;
}
}
@@ -1399,7 +1394,7 @@ static bool_ player_birth_aux_ask()
n = dump_races(sel);
/* Choose */
- while (1)
+ while (true)
{
strnfmt(buf, 200, "Choose a race (%c-%c), * for a random choice, = for options, 8/2/4/6 for movement: ",
I2A(0), I2A(race_info.size() - 1));
@@ -1407,7 +1402,7 @@ static bool_ player_birth_aux_ask()
c = inkey();
if (c == 'Q') quit(NULL);
- if (c == 'S') return (FALSE);
+ if (c == 'S') return false;
if (c == '*')
{
k = rand_int(race_info.size());
@@ -1422,7 +1417,7 @@ static bool_ player_birth_aux_ask()
else if (c == '=')
{
screen_save();
- do_cmd_options_aux(6, "Startup Options", FALSE);
+ do_cmd_options_aux(6, "Startup Options", false);
screen_load();
}
else if (c == '2')
@@ -1528,14 +1523,14 @@ static bool_ player_birth_aux_ask()
n = dump_rmods(sel, racem, max_racem);
/* Choose */
- while (1)
+ while (true)
{
strnfmt(buf, 200, "Choose a race modifier (%c-%c), * for a random choice, = for options: ",
I2A(0), I2A(max_racem - 1));
put_str(buf, 17, 2);
c = inkey();
if (c == 'Q') quit(NULL);
- if (c == 'S') return (FALSE);
+ if (c == 'S') return false;
if (c == '*')
{
// Which choices are legal?
@@ -1565,7 +1560,7 @@ static bool_ player_birth_aux_ask()
else if (c == '=')
{
screen_save();
- do_cmd_options_aux(6, "Startup Options", FALSE);
+ do_cmd_options_aux(6, "Startup Options", false);
screen_load();
}
else if (c == '2')
@@ -1663,13 +1658,13 @@ static bool_ player_birth_aux_ask()
dump_classes(class_types, sel, restrictions);
/* Get a class */
- while (1)
+ while (true)
{
strnfmt(buf, 200, "Choose a class (%c-%c), * for random, = for options, 8/2/4 for up/down/back: ", I2A(0), (n <= 25) ? I2A(n - 1) : I2D(n - 26-1));
put_str(buf, 15, 2);
c = inkey();
if (c == 'Q') quit(NULL);
- if (c == 'S') return (FALSE);
+ if (c == 'S') return false;
if (c == '*')
{
k = randint(n) - 1;
@@ -1684,7 +1679,7 @@ static bool_ player_birth_aux_ask()
else if (c == '=')
{
screen_save();
- do_cmd_options_aux(6, "Startup Options", FALSE);
+ do_cmd_options_aux(6, "Startup Options", false);
screen_load();
}
else if (c == '2')
@@ -1741,13 +1736,13 @@ static bool_ player_birth_aux_ask()
dump_specs(sel);
/* Get a class */
- while (1)
+ while (true)
{
strnfmt(buf, 200, "Choose a class specialisation (%c-%c), * for random, = for options, 8/2/4/6 for up/down/left/right: ", I2A(0), (n <= 25) ? I2A(n - 1) : I2D(n - 26-1));
put_str(buf, 15, 2);
c = inkey();
if (c == 'Q') quit(NULL);
- if (c == 'S') return (FALSE);
+ if (c == 'S') return false;
if (c == '*')
{
k = randint(n) - 1;
@@ -1762,7 +1757,7 @@ static bool_ player_birth_aux_ask()
else if (c == '=')
{
screen_save();
- do_cmd_options_aux(6, "Startup Options", FALSE);
+ do_cmd_options_aux(6, "Startup Options", false);
screen_load();
}
else if (c == '2')
@@ -1850,7 +1845,7 @@ static bool_ player_birth_aux_ask()
n = dump_gods(sel, choice, max);
/* Choose */
- while (1)
+ while (true)
{
strnfmt(buf, 200, "Choose a god (%c-%c), * for a random choice, "
"= for options, 8/2/4/6 for movement: ",
@@ -1861,7 +1856,7 @@ static bool_ player_birth_aux_ask()
if (c == 'Q') quit(NULL);
if (c == 'S')
{
- return (FALSE);
+ return false;
}
if (c == '*')
{
@@ -1881,7 +1876,7 @@ static bool_ player_birth_aux_ask()
else if (c == '=')
{
screen_save();
- do_cmd_options_aux(6, "Startup Options", FALSE);
+ do_cmd_options_aux(6, "Startup Options", false);
screen_load();
}
else if (c == '2')
@@ -1946,13 +1941,13 @@ static bool_ player_birth_aux_ask()
if (get_check("Do you want to modify the options"))
{
screen_save();
- do_cmd_options_aux(6, "Startup Options", FALSE);
+ do_cmd_options_aux(6, "Startup Options", false);
screen_load();
}
}
/* Is the player an "astral" being? */
- p_ptr->astral = (race_flags_p(PR_ASTRAL)) ? TRUE : FALSE;
+ p_ptr->astral = race_flags_p(PR_ASTRAL);
/*
* A note by pelpel. (remove this please)
@@ -2001,13 +1996,13 @@ static bool_ player_birth_aux_ask()
"If you do not want any optional quests, enter 0.");
/* Ask the number of additional quests */
- while (TRUE)
+ while (true)
{
put_str(format("Number of quests? (0-%u) ",
MAX_RANDOM_QUEST - 1), 20, 2);
/* Get a the number of additional quest */
- while (TRUE)
+ while (true)
{
/* Move the cursor */
put_str("", 20, 27);
@@ -2038,7 +2033,7 @@ static bool_ player_birth_aux_ask()
}
/* Set the quest monster hook */
- get_mon_num_hook = monster_quest;
+ get_monster_hook = monster_quest;
/* Prepare allocation table */
get_mon_num_prep();
@@ -2075,7 +2070,7 @@ static bool_ player_birth_aux_ask()
quest_random_init_hook();
/* Ok */
- return (TRUE);
+ return true;
}
@@ -2104,7 +2099,7 @@ static const int birth_stat_costs[(18-10) + 1] =
*
* Taken from V 2.9.0
*/
-static bool_ player_birth_aux_point()
+static bool player_birth_aux_point()
{
int i;
@@ -2139,7 +2134,7 @@ static bool_ player_birth_aux_point()
p_ptr->luck_max = p_ptr->luck_base;
/* Interact */
- while (1)
+ while (true)
{
/* Reset cost */
cost = 0;
@@ -2214,7 +2209,7 @@ static bool_ player_birth_aux_point()
if (ch == 'Q') quit(NULL);
/* Start over */
- if (ch == 'S') return (FALSE);
+ if (ch == 'S') return false;
/* Done */
if (ch == ESCAPE) break;
@@ -2246,19 +2241,17 @@ static bool_ player_birth_aux_point()
/* Done */
- return (TRUE);
+ return true;
}
/*
* Use the autoroller or not to generate a char
*/
-static bool_ player_birth_aux_auto()
+static bool player_birth_aux_auto()
{
int i, j, m, v;
- bool_ flag = FALSE;
-
- bool_ prev = FALSE;
+ bool prev = false;
char c;
@@ -2299,7 +2292,7 @@ static bool_ player_birth_aux_auto()
j = rp_ptr->ps.adj[i] + rmp_ptr->ps.adj[i] + cp_ptr->ps.adj[i];
/* Obtain the "maximal" stat */
- m = adjust_stat(17, j, TRUE);
+ m = adjust_stat(17, j);
/* Save the maximum */
@@ -2321,7 +2314,7 @@ static bool_ player_birth_aux_auto()
for (i = 0; i < 6; i++)
{
/* Get a minimum stat */
- while (TRUE)
+ while (true)
{
char *s;
@@ -2372,7 +2365,7 @@ static bool_ player_birth_aux_auto()
}
/* Roll */
- while (TRUE)
+ while (true)
{
/* Feedback */
if (options->autoroll)
@@ -2417,7 +2410,7 @@ static bool_ player_birth_aux_auto()
/* Auto-roll */
while (options->autoroll)
{
- bool_ accept = TRUE;
+ bool accept = true;
/* Get a new character */
get_stats();
@@ -2440,7 +2433,7 @@ static bool_ player_birth_aux_auto()
/* This stat is not okay */
else
{
- accept = FALSE;
+ accept = false;
}
}
@@ -2448,7 +2441,7 @@ static bool_ player_birth_aux_auto()
if (accept) break;
/* Take note every 25 rolls */
- flag = (!(auto_round % AUTOROLLER_STEP));
+ bool flag = (!(auto_round % AUTOROLLER_STEP));
/* Update display occasionally */
if (flag || (auto_round < last_round + 100))
@@ -2480,7 +2473,7 @@ static bool_ player_birth_aux_auto()
get_money();
/* Input loop */
- while (TRUE)
+ while (true)
{
/* Calculate the bonuses and hitpoints */
p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_BODY);
@@ -2512,7 +2505,7 @@ static bool_ player_birth_aux_auto()
if (c == 'Q') quit(NULL);
/* Start over */
- if (c == 'S') return (FALSE);
+ if (c == 'S') return false;
/* Escape accepts the roll */
if (c == ESCAPE) break;
@@ -2523,7 +2516,7 @@ static bool_ player_birth_aux_auto()
/* Previous character */
if (prev && (c == 'p'))
{
- load_prev_data(TRUE);
+ load_prev_data(true);
continue;
}
@@ -2545,13 +2538,13 @@ static bool_ player_birth_aux_auto()
save_prev_data();
/* Note that a previous roll exists */
- prev = TRUE;
+ prev = true;
}
/* Clear prompt */
clear_from(23);
- return (TRUE);
+ return true;
}
@@ -2562,7 +2555,7 @@ static bool_ player_birth_aux_auto()
* from continuously rolling up characters, which can be VERY
* expensive CPU wise. And it cuts down on player stupidity.
*/
-static bool_ player_birth_aux()
+static bool player_birth_aux()
{
auto const &s_descriptors = game->edit_data.s_descriptors;
auto &s_info = game->s_info;
@@ -2570,7 +2563,10 @@ static bool_ player_birth_aux()
char c;
/* Ask */
- if (!player_birth_aux_ask()) return (FALSE);
+ if (!player_birth_aux_ask())
+ {
+ return false;
+ }
for (std::size_t i = 1; i < s_descriptors.size(); i++)
{
@@ -2606,7 +2602,7 @@ static bool_ player_birth_aux()
if (do_quick_start)
{
- load_prev_data(FALSE);
+ load_prev_data(false);
/* Roll for base hitpoints */
get_extra();
@@ -2628,12 +2624,12 @@ static bool_ player_birth_aux()
/* Point based */
if (options->point_based)
{
- if (!player_birth_aux_point()) return FALSE;
+ if (!player_birth_aux_point()) return false;
}
/* Auto-roll */
else
{
- if (!player_birth_aux_auto()) return FALSE;
+ if (!player_birth_aux_auto()) return false;
}
/*** Finish up ***/
@@ -2649,18 +2645,24 @@ static bool_ player_birth_aux()
c = inkey();
/* Quit */
- if (c == 'Q') quit(NULL);
+ if (c == 'Q')
+ {
+ quit(NULL);
+ }
/* Start over */
- if (c == 'S') return (FALSE);
+ if (c == 'S')
+ {
+ return false;
+ }
}
/* Save this for the next character */
- game->previous_char.quick_ok = TRUE;
+ game->previous_char.quick_ok = true;
save_prev_data();
/* Accept */
- return (TRUE);
+ return true;
}
@@ -2697,7 +2699,7 @@ void player_birth()
std::size_t rtown = TOWN_RANDOM;
/* Create a new character */
- while (1)
+ while (true)
{
/* Wipe the player */
player_wipe();
@@ -2710,7 +2712,7 @@ void player_birth()
p_ptr->skill_points = 0;
p_ptr->skill_last_level = 1;
- recalc_skills(FALSE);
+ recalc_skills(false);
/* grab level 1 abilities */
p_ptr->abilities.clear();
@@ -2720,7 +2722,7 @@ void player_birth()
{
byte i = p_ptr->pgod;
p_ptr->pgod = 0;
- follow_god(i, TRUE);
+ follow_god(i, true);
}
/* Select the default melee type */
@@ -2761,9 +2763,9 @@ void player_birth()
d_ptr->t_idx[num] = rtown;
rtown++;
- while (TRUE)
+ while (true)
{
- bool_ ok = TRUE;
+ bool ok = true;
lev = rand_range(d_ptr->mindepth, d_ptr->maxdepth - 1);
@@ -2772,12 +2774,15 @@ void player_birth()
{
if (d_ptr->t_level[j] == lev)
{
- ok = FALSE;
+ ok = false;
}
}
/* Ok found one */
- if (ok) break;
+ if (ok)
+ {
+ break;
+ }
}
d_ptr->t_level[num] = lev;
@@ -2802,7 +2807,7 @@ void player_birth()
for (std::size_t i = 1; i < max_towns; i++)
{
/* Not destroyed ! yet .. ;) */
- town_info[i].destroyed = FALSE;
+ town_info[i].destroyed = false;
/* Ignore non-existent towns */
if (!(town_info[i].flags & (TOWN_REAL))) continue;
@@ -2826,7 +2831,7 @@ void player_birth()
auto &w = wilderness(x, y);
w.seed = seed_t::system();
w.entrance = 0;
- w.known = FALSE;
+ w.known = false;
}
}
}
@@ -2837,7 +2842,7 @@ void player_birth()
static char savefile_module[46][80];
static char savefile_names[46][30];
static char savefile_desc[46][80];
-static bool_ savefile_alive[46];
+static bool savefile_alive[46];
static int savefile_idx[46];
/*
@@ -2863,10 +2868,6 @@ int load_savefile_names()
if (!fff) return (0);
- /* Save the current 'player_base' */
- player_base_save = game->player_base;
-
-
/*
* Parse, use '@' intead of ':' as a separator because it cannot exists
* in savefiles
@@ -2908,8 +2909,7 @@ int load_savefile_names()
savefile_module[max][4] = '\0';
}
- if (buf[i] == '0') savefile_alive[max] = FALSE;
- else if (buf[i] == '1') savefile_alive[max] = TRUE;
+ savefile_alive[max] = (buf[i] == '1');
i++;
start = i;
@@ -2923,11 +2923,10 @@ int load_savefile_names()
strcpy(savefile_desc[max], buf + i);
/* Build platform-dependent savefile name */
- game->player_base = savefile_names[max];
- process_player_name(TRUE);
+ auto player_base = process_player_name(savefile_names[max]);
/* Try to open the savefile */
- fd = fd_open(savefile, O_RDONLY);
+ fd = fd_open(name_file_save(player_base).c_str(), O_RDONLY);
/* Still existing ? */
if (fd >= 0)
@@ -2939,10 +2938,6 @@ int load_savefile_names()
my_fclose(fff);
- /* Restore the values of 'player_base' and 'savefile' */
- game->player_base = player_base_save;
- process_player_name(TRUE);
-
return (max);
}
@@ -2981,9 +2976,13 @@ void save_savefile_names()
for (i = 0; i < max; i++)
{
- if (!strcmp(savefile_names[i], game->player_base.c_str())) continue;
+ if (equals(savefile_names[i], game->player_base.c_str()))
+ {
+ continue;
+ }
+
fprintf(fff, "%s@%c%s@%s\n", savefile_module[i],
- (savefile_alive[i]) ? '1' : '0', savefile_names[i], savefile_desc[i]);
+ savefile_alive[i] ? '1' : '0', savefile_names[i], savefile_desc[i]);
}
my_fclose(fff);
@@ -3037,9 +3036,9 @@ static void dump_savefiles(int sel, int max)
/* Asks for new game or load game */
-bool_ no_begin_screen = FALSE;
+bool no_begin_screen = false;
-bool_ begin_screen()
+bool begin_screen()
{
int m, k, sel, max;
@@ -3063,7 +3062,7 @@ savefile_try_again:
max = m + 2;
if (max > 2) sel = 2;
- while (TRUE)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -3114,19 +3113,11 @@ savefile_try_again:
{
if (!get_check(format("Really delete '%s'?", savefile_names[savefile_idx[sel - 2]]))) continue;
- /* Save current 'player_base' */
- std::string player_base_save = game->player_base;
-
/* Build platform-dependent save file name */
- game->player_base = savefile_names[savefile_idx[sel - 2]];
- process_player_name(TRUE);
+ auto player_base = process_player_name(savefile_names[savefile_idx[sel - 2]]);
/* Remove the savefile */
- fd_kill(savefile);
-
- /* Restore 'player_base' and 'savefile' */
- game->player_base = player_base_save;
- process_player_name(TRUE);
+ fd_kill(name_file_save(player_base).c_str());
/* Reload, gods I hate using goto .. */
goto savefile_try_again;
@@ -3144,15 +3135,19 @@ savefile_try_again:
prt("Enter the name of the savefile that will hold this character: ", 23, 0);
/* Ask the user for a string */
- if (!askfor_aux(&game->player_base, 15)) continue;
+ auto tmp = game->player_base;
+ if (!askfor_aux(&tmp, 15))
+ {
+ continue;
+ }
/* Process the player name */
- process_player_name(TRUE);
+ set_player_base(tmp);
// If the savefile already exists, we do *NOT* want to
- // create a new game, so we'll need to return FALSE for
+ // create a new game, so we'll need to return false for
// that.
- if (boost::filesystem::exists(savefile))
+ if (boost::filesystem::exists(name_file_save()))
{
// Show a message so user doesn't get confused.
msg_print(NULL);
@@ -3170,12 +3165,12 @@ savefile_try_again:
prt("", 0, 0);
// Load character
- return FALSE;
+ return false;
}
else
{
// Start new game
- return TRUE;
+ return true;
}
}
if (k == 'b')
@@ -3184,12 +3179,16 @@ savefile_try_again:
prt("Enter the name of a savefile: ", 23, 0);
/* Ask the user for a string */
- if (!askfor_aux(&game->player_base, 15)) continue;
+ auto tmp = game->player_base;
+ if (!askfor_aux(&tmp, 15))
+ {
+ continue;
+ }
/* Process the player name */
- process_player_name(TRUE);
+ set_player_base(tmp);
- return (FALSE);
+ return false;
}
else
{
@@ -3200,15 +3199,13 @@ savefile_try_again:
if ((x < 2) || (x >= max)) continue;
- game->player_base = savefile_names[savefile_idx[x - 2]];
-
/* Process the player name */
- process_player_name(TRUE);
+ set_player_base(savefile_names[savefile_idx[x - 2]]);
- return (FALSE);
+ return false;
}
}
/* Shouldnt happen */
- return (FALSE);
+ return false;
}
diff --git a/src/birth.hpp b/src/birth.hpp
index 82bdfcf6..6dbf1155 100644
--- a/src/birth.hpp
+++ b/src/birth.hpp
@@ -1,11 +1,9 @@
#pragma once
-#include "h-basic.h"
-
-void print_desc_aux(cptr txt, int y, int x);
+void print_desc_aux(const char *txt, int y, int x);
void save_savefile_names();
-bool_ begin_screen();
+bool begin_screen();
void player_birth();
void roll_player_hp();
-extern bool_ no_begin_screen;
+extern bool no_begin_screen;
diff --git a/src/birther.hpp b/src/birther.hpp
index 0c28b513..85773e5e 100644
--- a/src/birther.hpp
+++ b/src/birther.hpp
@@ -1,29 +1,28 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
-#include <string>
-#include <vector>
+#include <array>
/**
* Player information during the birth process.
*/
struct birther
{
- s16b race;
- s16b rmod;
- s16b pclass;
- s16b spec;
+ s16b race = 0;
+ s16b rmod = 0;
+ s16b pclass = 0;
+ s16b spec = 0;
- byte quests;
+ byte quests = 0;
- byte god;
- s32b grace;
+ byte god = 0;
+ s32b grace = 0;
- s32b au;
+ s32b au = 0;
- s16b stat[6];
- s16b luck;
+ std::array<s16b, 6> stat { };
+ s16b luck = 0;
- bool_ quick_ok;
+ bool quick_ok = false;
};
diff --git a/src/bldg.cc b/src/bldg.cc
index 9b3750a6..00105881 100644
--- a/src/bldg.cc
+++ b/src/bldg.cc
@@ -13,6 +13,8 @@
* Heavily modified for ToME by DarkGod
*/
+#include "bldg.hpp"
+
#include "cave_type.hpp"
#include "cmd3.hpp"
#include "files.hpp"
@@ -39,11 +41,12 @@
#include "store_type.hpp"
#include "tables.hpp"
#include "util.hpp"
-#include "util.h"
#include "variable.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
+#include "z-term.hpp"
/* remember building location */
static int building_loc = 0;
@@ -52,7 +55,7 @@ static int building_loc = 0;
/*
* A helper function for is_state
*/
-static bool_ is_state_aux(store_type const *s_ptr, int state)
+static bool is_state_aux(store_type const *s_ptr, int state)
{
auto const &ow_info = game->edit_data.ow_info;
@@ -61,30 +64,30 @@ static bool_ is_state_aux(store_type const *s_ptr, int state)
/* Check race */
if (ow_ptr->races[state][p_ptr->prace / 32] & (1 << p_ptr->prace))
{
- return (TRUE);
+ return true;
}
/* Check class */
if (ow_ptr->classes[state][p_ptr->prace / 32] & (1 << p_ptr->pclass))
{
- return (TRUE);
+ return true;
}
/* All failed */
- return (FALSE);
+ return false;
}
/*
* Test if the state accords with the player
*/
-bool_ is_state(store_type const *s_ptr, int state)
+bool is_state(store_type const *s_ptr, int state)
{
if (state == STORE_NORMAL)
{
- if (is_state_aux(s_ptr, STORE_LIKED)) return (FALSE);
- if (is_state_aux(s_ptr, STORE_HATED)) return (FALSE);
- return (TRUE);
+ if (is_state_aux(s_ptr, STORE_LIKED)) return false;
+ if (is_state_aux(s_ptr, STORE_HATED)) return false;
+ return true;
}
else
@@ -308,7 +311,7 @@ static void display_fruit(int row, int col, int fruit)
/*
* gamble_comm
*/
-static bool_ gamble_comm(int cmd)
+static void gamble_comm(int cmd)
{
int roll1, roll2, roll3, choice, odds, win;
@@ -324,7 +327,7 @@ static bool_ gamble_comm(int cmd)
char out_val[160], tmp_str[80], again;
- cptr p;
+ const char *p;
screen_save();
@@ -358,8 +361,9 @@ static bool_ gamble_comm(int cmd)
{
msg_print("Hey! You don't have the gold - get out of here!");
msg_print(NULL);
+
screen_load();
- return (FALSE);
+ return;
}
else if (wager > maxbet)
{
@@ -373,7 +377,7 @@ static bool_ gamble_comm(int cmd)
wager = 1;
}
msg_print(NULL);
- win = FALSE;
+ win = false;
odds = 0;
oldgold = p_ptr->au;
@@ -391,7 +395,7 @@ static bool_ gamble_comm(int cmd)
{
c_put_str(TERM_GREEN, "In Between", 5, 2);
odds = 3;
- win = FALSE;
+ win = false;
roll1 = randint(10);
roll2 = randint(10);
choice = randint(10);
@@ -402,7 +406,7 @@ static bool_ gamble_comm(int cmd)
prt(tmp_str, 11, 14);
if (((choice > roll1) && (choice < roll2)) ||
((choice < roll1) && (choice > roll2)))
- win = TRUE;
+ win = true;
break;
}
@@ -419,9 +423,9 @@ static bool_ gamble_comm(int cmd)
roll2, roll3);
prt(tmp_str, 7, 5);
if ((roll3 == 7) || (roll3 == 11))
- win = TRUE;
+ win = true;
else if ((roll3 == 2) || (roll3 == 3) || (roll3 == 12))
- win = FALSE;
+ win = false;
else
{
do
@@ -436,11 +440,11 @@ static bool_ gamble_comm(int cmd)
roll1, roll2, roll3);
prt(tmp_str, 8, 5);
if (roll3 == choice)
- win = TRUE;
+ win = true;
else if (roll3 == 7)
- win = FALSE;
+ win = false;
}
- while ((win != TRUE) && (win != FALSE));
+ while ((win != true) && (win != false));
}
break;
@@ -449,7 +453,7 @@ static bool_ gamble_comm(int cmd)
case BACT_DICE_SLOTS: /* The Dice Slots */
{
c_put_str(TERM_GREEN, "Dice Slots", 5, 2);
- win = FALSE;
+ win = false;
roll1 = randint(6);
roll2 = randint(6);
choice = randint(6);
@@ -464,7 +468,7 @@ static bool_ gamble_comm(int cmd)
display_fruit(8, 21, choice - 1);
if ((roll1 == roll2) && (roll2 == choice))
{
- win = TRUE;
+ win = true;
if (roll1 == 1)
odds = 4;
else if (roll1 == 2)
@@ -474,7 +478,7 @@ static bool_ gamble_comm(int cmd)
}
else if ((roll1 == 6) && (roll2 == 6))
{
- win = TRUE;
+ win = true;
odds = choice + 1;
}
@@ -498,16 +502,14 @@ static bool_ gamble_comm(int cmd)
strnfmt(tmp_str, 80, "Current Gold: %9ld", p_ptr->au);
prt(tmp_str, 22, 2);
prt("Again(Y/N)?", 18, 37);
- move_cursor(18, 49);
+ Term_gotoxy(49, 18);
again = inkey();
if (wager > p_ptr->au)
{
msg_print("Hey! You don't have the gold - get out of here!");
msg_print(NULL);
screen_load();
- return (FALSE);
- /* strnfmt(tmp_str, 80, "Current Wager: %9ld",wager);
- prt(tmp_str, 17, 2); */
+ return;
}
}
while ((again == 'y') || (again == 'Y'));
@@ -521,8 +523,6 @@ static bool_ gamble_comm(int cmd)
}
screen_load();
-
- return (TRUE);
}
@@ -535,13 +535,10 @@ static bool_ gamble_comm(int cmd)
* ghost code does become a reality again. Does help to avoid filthy urchins.
* Resting at night is also a quick way to restock stores -KMW-
*/
-static bool_ inn_comm(int cmd)
+static bool inn_comm(int cmd)
{
- bool_ vampire;
-
-
- /* Extract race info */
- vampire = ((race_flags_p(PR_VAMPIRE)) || (p_ptr->mimic_form == resolve_mimic_name("Vampire")));
+ /* Is the player a vampire? */
+ auto const vampire = ((race_flags_p(PR_VAMPIRE)) || (p_ptr->mimic_form == resolve_mimic_name("Vampire")));
switch (cmd)
{
@@ -565,17 +562,15 @@ static bool_ inn_comm(int cmd)
*/
case BACT_REST: /* Rest for the night */
{
- bool_ nighttime;
-
/* Extract the current time */
- nighttime = ((bst(HOUR, turn) < 6) || (bst(HOUR, turn) >= 18));
+ bool const nighttime = ((bst(HOUR, turn) < 6) || (bst(HOUR, turn) >= 18));
/* Normal races rest at night */
if (!vampire && !nighttime)
{
msg_print("The rooms are available only at night.");
msg_print(NULL);
- return (FALSE);
+ return false;
}
/* Vampires rest during daytime */
@@ -583,7 +578,7 @@ static bool_ inn_comm(int cmd)
{
msg_print("The rooms are available only during daylight for your kind.");
msg_print(NULL);
- return (FALSE);
+ return false;
}
/* Must cure HP draining status first */
@@ -592,7 +587,7 @@ static bool_ inn_comm(int cmd)
msg_print("You need a healer, not a room.");
msg_print(NULL);
msg_print("Sorry, but I don't want anyone dying in here.");
- return (FALSE);
+ return false;
}
/* Let the time pass XXX XXX XXX */
@@ -627,7 +622,7 @@ static bool_ inn_comm(int cmd)
else msg_print("You awake refreshed for the new day.");
/* Dungeon stuff */
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
p_ptr->oldpx = p_ptr->px;
p_ptr->oldpy = p_ptr->py;
@@ -646,7 +641,7 @@ static bool_ inn_comm(int cmd)
}
}
- return (TRUE);
+ return true;
}
@@ -675,7 +670,7 @@ static void get_questinfo(int questnum)
/*
* Request a quest from the Lord.
*/
-static bool_ castle_quest(int y, int x)
+static bool castle_quest(int y, int x)
{
int plot = 0;
@@ -691,7 +686,7 @@ static bool_ castle_quest(int y, int x)
if ((!plot) || (plots[plot] == QUEST_NULL))
{
put_str("I don't have a quest for you at the moment.", 8, 0);
- return FALSE;
+ return false;
}
q_ptr = &quest[plots[plot]];
@@ -705,7 +700,7 @@ static bool_ castle_quest(int y, int x)
struct hook_quest_finish_in in = { plots[plot] };
process_hooks_new(HOOK_QUEST_FINISH, &in, NULL);
- return (TRUE);
+ return true;
}
/* Quest is still unfinished */
@@ -715,7 +710,7 @@ static bool_ castle_quest(int y, int x)
put_str("Use CTRL-Q to check the status of your quest.", 9, 0);
put_str("Return when you have completed your quest.", 12, 0);
- return (FALSE);
+ return false;
}
/* Failed quest */
else if (q_ptr->status == QUEST_STATUS_FAILED)
@@ -726,7 +721,7 @@ static bool_ castle_quest(int y, int x)
hook_quest_fail_in in = { plots[plot] };
process_hooks_new(HOOK_QUEST_FAIL, &in, NULL);
- return (FALSE);
+ return false;
}
/* No quest yet */
else if (q_ptr->status == QUEST_STATUS_UNTAKEN)
@@ -734,7 +729,7 @@ static bool_ castle_quest(int y, int x)
struct hook_init_quest_in in = { plots[plot] };
if (process_hooks_new(HOOK_INIT_QUEST, &in, NULL))
{
- return (FALSE);
+ return false;
}
q_ptr->status = QUEST_STATUS_TAKEN;
@@ -745,10 +740,10 @@ static bool_ castle_quest(int y, int x)
/* Add the hooks */
quest[plots[plot]].init();
- return (TRUE);
+ return true;
}
- return FALSE;
+ return false;
}
/*
@@ -873,7 +868,7 @@ static void list_weapon(object_type *o_ptr, int row, int col)
char tmp_str[80];
- object_desc(o_name, o_ptr, TRUE, 0);
+ object_desc(o_name, o_ptr, true, 0);
c_put_str(TERM_YELLOW, o_name, row, col);
strnfmt(tmp_str, 80, "To Hit: %d To Damage: %d", o_ptr->to_h, o_ptr->to_d);
put_str(tmp_str, row + 1, col);
@@ -902,7 +897,7 @@ static bool item_tester_hook_melee_weapon(object_type const *o_ptr)
/*
* compare_weapons -KMW-
*/
-static bool_ compare_weapons()
+static bool compare_weapons()
{
int item, i;
@@ -928,7 +923,7 @@ static bool_ compare_weapons()
item_tester_hook_melee_weapon))
{
object_wipe(orig_ptr);
- return (FALSE);
+ return false;
}
/* Get the item (in the pack) */
@@ -944,7 +939,7 @@ static bool_ compare_weapons()
item_tester_hook_melee_weapon))
{
object_wipe(orig_ptr);
- return (FALSE);
+ return false;
}
/* Get the item (in the pack) */
@@ -954,7 +949,7 @@ static bool_ compare_weapons()
i_ptr = &p_ptr->inventory[INVEN_WIELD];
object_copy(i_ptr, o1_ptr);
- calc_bonuses(TRUE);
+ calc_bonuses(true);
list_weapon(o1_ptr, i, 2);
compare_weapon_aux1(o1_ptr, 2, i + 8);
@@ -964,20 +959,20 @@ static bool_ compare_weapons()
object_copy(i_ptr, orig_ptr);
else
object_copy(i_ptr, o2_ptr);
- calc_bonuses(TRUE);
+ calc_bonuses(true);
list_weapon(o2_ptr, i, 40);
compare_weapon_aux1(o2_ptr, 40, i + 8);
i_ptr = &p_ptr->inventory[INVEN_WIELD];
object_copy(i_ptr, orig_ptr);
- calc_bonuses(TRUE);
+ calc_bonuses(true);
object_wipe(orig_ptr);
put_str("(Only highest damage applies per monster. Special damage not cumulative)", 20, 0);
- return (TRUE);
+ return true;
}
@@ -986,7 +981,7 @@ static bool_ compare_weapons()
* sharpen arrows, repair armor, repair weapon
* -KMW-
*/
-static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac)
+static bool fix_item(int istart, int iend, int ispecific, bool iac)
{
int i;
@@ -998,7 +993,7 @@ static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac)
char out_val[80], tmp_str[80];
- bool_ repaired = FALSE;
+ bool repaired = false;
clear_bldg(5, 18);
strnfmt(tmp_str, 80, " Based on your skill, we can improve up to +%d", maxenchant);
@@ -1016,9 +1011,9 @@ static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac)
if (o_ptr->tval)
{
- object_desc(tmp_str, o_ptr, FALSE, 1);
+ object_desc(tmp_str, o_ptr, false, 1);
- if ((o_ptr->name1 && (o_ptr->ident & 0x08)))
+ if (o_ptr->name1 && o_ptr->identified)
strnfmt(out_val, 80, "%-40s: beyond our skills!", tmp_str);
else if (o_ptr->name1)
strnfmt(out_val, 80, "%-40s: in fine condition", tmp_str);
@@ -1032,7 +1027,7 @@ static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac)
{
o_ptr->to_a++;
strnfmt(out_val, 80, "%-40s: polished -> (%d)", tmp_str, o_ptr->to_a);
- repaired = TRUE;
+ repaired = true;
}
else if ((!iac) && ((o_ptr->to_h <= -3) || (o_ptr->to_d <= -3)))
{
@@ -1048,7 +1043,7 @@ static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac)
o_ptr->to_d++;
strnfmt(out_val, 80, "%-40s: sharpened -> (%d,%d)", tmp_str,
o_ptr->to_h, o_ptr->to_d);
- repaired = TRUE;
+ repaired = true;
}
else
strnfmt(out_val, 80, "%-40s: in fine condition", tmp_str);
@@ -1073,33 +1068,22 @@ static bool_ fix_item(int istart, int iend, int ispecific, bool_ iac)
}
clear_bldg(5, 18);
- return (repaired);
+ return repaired;
}
/*
- * Research Item
- */
-static bool_ research_item()
-{
- clear_bldg(5, 18);
- return (identify_fully());
-}
-
-
-
-/*
* Execute a building command
*/
-bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_ptr)
+bool bldg_process_command(const store_type *s_ptr, store_action_type const *ba_ptr)
{
int bact = ba_ptr->action;
int bcost;
- bool_ paid = FALSE;
+ bool paid = false;
- bool_ recreate = FALSE;
+ bool recreate = false;
if (is_state(s_ptr, STORE_LIKED))
@@ -1121,7 +1105,7 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
{
msg_print("You have no right to choose that!");
msg_print(NULL);
- return FALSE;
+ return false;
}
/* check gold */
@@ -1129,17 +1113,11 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
{
msg_print("You do not have the gold!");
msg_print(NULL);
- return FALSE;
+ return false;
}
switch (bact)
{
- case BACT_RESEARCH_ITEM:
- {
- paid = research_item();
- break;
- }
-
case BACT_TOWN_HISTORY:
{
town_history();
@@ -1154,8 +1132,9 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
case BACT_QUEST1:
{
- int y = 1, x = 1;
- bool_ ok = FALSE;
+ int y = 1;
+ int x = 1;
+ bool ok = false;
while ((x < cur_wid - 1) && !ok)
{
@@ -1166,7 +1145,7 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
if (bact - BACT_QUEST1 + FEAT_QUEST1 == cave[y][x].feat)
{
/* Stop the loop */
- ok = TRUE;
+ ok = true;
}
y++;
}
@@ -1176,7 +1155,6 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
if (ok)
{
recreate = castle_quest(y - 1, x - 1);
- ;
}
else
{
@@ -1216,30 +1194,23 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
case BACT_ENCHANT_WEAPON:
{
- paid = fix_item(INVEN_WIELD, INVEN_WIELD, 0, FALSE);
+ paid = fix_item(INVEN_WIELD, INVEN_WIELD, 0, false);
break;
}
case BACT_ENCHANT_ARMOR:
{
- paid = fix_item(INVEN_BODY, INVEN_FEET, 0, TRUE);
+ paid = fix_item(INVEN_BODY, INVEN_FEET, 0, true);
break;
}
/* needs work */
case BACT_RECHARGE:
{
- if (recharge(80)) paid = TRUE;
- break;
- }
-
- /* needs work */
- case BACT_IDENTS:
- {
- identify_pack();
- msg_print("Your possessions have been identified.");
- msg_print(NULL);
- paid = TRUE;
+ if (recharge(80))
+ {
+ paid = true;
+ }
break;
}
@@ -1255,9 +1226,10 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
if (p_ptr->black_breath)
{
msg_print("The hold of the Black Breath on you is broken!");
- p_ptr->black_breath = FALSE;
+ p_ptr->black_breath = false;
}
- paid = TRUE;
+
+ paid = true;
break;
}
@@ -1270,31 +1242,32 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
set_confused(0);
set_cut(0);
set_stun(0);
- paid = TRUE;
+
+ paid = true;
break;
}
/* needs work */
case BACT_RESTORE:
{
- if (do_res_stat(A_STR, TRUE)) paid = TRUE;
- if (do_res_stat(A_INT, TRUE)) paid = TRUE;
- if (do_res_stat(A_WIS, TRUE)) paid = TRUE;
- if (do_res_stat(A_DEX, TRUE)) paid = TRUE;
- if (do_res_stat(A_CON, TRUE)) paid = TRUE;
- if (do_res_stat(A_CHR, TRUE)) paid = TRUE;
+ if (do_res_stat(A_STR, true)) paid = true;
+ if (do_res_stat(A_INT, true)) paid = true;
+ if (do_res_stat(A_WIS, true)) paid = true;
+ if (do_res_stat(A_DEX, true)) paid = true;
+ if (do_res_stat(A_CON, true)) paid = true;
+ if (do_res_stat(A_CHR, true)) paid = true;
break;
}
case BACT_ENCHANT_ARROWS:
{
- paid = fix_item(0, INVEN_WIELD, TV_ARROW, FALSE);
+ paid = fix_item(0, INVEN_WIELD, TV_ARROW, false);
break;
}
case BACT_ENCHANT_BOW:
{
- paid = fix_item(INVEN_BOW, INVEN_BOW, TV_BOW, FALSE);
+ paid = fix_item(INVEN_BOW, INVEN_BOW, TV_BOW, false);
break;
}
@@ -1302,17 +1275,19 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
{
p_ptr->word_recall = 1;
msg_print("The air about you becomes charged...");
- paid = TRUE;
+
+ paid = true;
break;
}
case BACT_TELEPORT_LEVEL:
{
- if (reset_recall(FALSE))
+ if (reset_recall(false))
{
p_ptr->word_recall = 1;
msg_print("The air about you becomes charged...");
- paid = TRUE;
+
+ paid = true;
}
break;
}
@@ -1320,31 +1295,33 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
case BACT_MIMIC_NORMAL:
{
set_mimic(0, 0, 0);
- paid = TRUE;
+ paid = true;
break;
}
case BACT_DIVINATION:
{
- int i, count = 0;
- bool_ something = FALSE;
+ bool found = false;
- while (count < 1000)
+ for (int count = 0; count < 1000; count++)
{
- count++;
- i = rand_int(MAX_FATES);
+ int i = rand_int(MAX_FATES);
if (!fates[i].fate) continue;
if (fates[i].know) continue;
msg_print("You know a little more of your fate.");
- fates[i].know = TRUE;
- something = TRUE;
+ fates[i].know = true;
+
+ found = true;
break;
}
- if (!something) msg_print("Well, you have no fate, but I'll keep your money anyway!");
+ if (!found)
+ {
+ msg_print("Well, you have no fate, but I'll keep your money anyway!");
+ }
- paid = TRUE;
+ paid = true;
break;
}
@@ -1418,7 +1395,7 @@ bool_ bldg_process_command(const store_type *s_ptr, store_action_type const *ba_
store_prt_gold();
}
- return (recreate);
+ return recreate;
}
@@ -1442,7 +1419,7 @@ void enter_quest()
p_ptr->inside_quest = cave[p_ptr->py][p_ptr->px].special;
dun_level = 1;
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
p_ptr->oldpx = p_ptr->px;
p_ptr->oldpy = p_ptr->py;
}
diff --git a/src/bldg.hpp b/src/bldg.hpp
index 3b3412fa..095cfda8 100644
--- a/src/bldg.hpp
+++ b/src/bldg.hpp
@@ -1,10 +1,9 @@
#pragma once
-#include "h-basic.h"
#include "store_action_type_fwd.hpp"
#include "store_type_fwd.hpp"
-bool_ bldg_process_command(store_type const *s_ptr, store_action_type const *action);
+bool bldg_process_command(store_type const *s_ptr, store_action_type const *action);
void show_building(store_type const *s_ptr);
-bool_ is_state(store_type const *s_ptr, int state);
+bool is_state(store_type const *s_ptr, int state);
void enter_quest();
diff --git a/src/cave.cc b/src/cave.cc
index cad1506e..e50d7980 100644
--- a/src/cave.cc
+++ b/src/cave.cc
@@ -1,6 +1,7 @@
#include "cave.hpp"
#include "cave_type.hpp"
+#include "config.hpp"
#include "dungeon_flag.hpp"
#include "feature_flag.hpp"
#include "feature_type.hpp"
@@ -21,10 +22,10 @@
#include "store_info_type.hpp"
#include "tables.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
+#include "z-util.hpp"
#include <cassert>
#include <vector>
@@ -64,10 +65,10 @@ int distance(int y1, int x1, int y2, int x2)
/*
- * Returns TRUE if a grid is considered to be a wall for the purpose
+ * Returns true if a grid is considered to be a wall for the purpose
* of magic mapping / clairvoyance
*/
-static bool_ is_wall(cave_type *c_ptr)
+static bool is_wall(cave_type *c_ptr)
{
auto const &f_info = game->edit_data.f_info;
@@ -77,22 +78,37 @@ static bool_ is_wall(cave_type *c_ptr)
: c_ptr->feat;
/* Paranoia */
- if (feat >= f_info.size()) return FALSE;
+ if (feat >= f_info.size())
+ {
+ return false;
+ }
/* Vanilla floors and doors aren't considered to be walls */
- if (feat < FEAT_SECRET) return FALSE;
+ if (feat < FEAT_SECRET)
+ {
+ return false;
+ }
/* Exception #1: a glass wall is a wall but doesn't prevent LOS */
- if (feat == FEAT_GLASS_WALL) return FALSE;
+ if (feat == FEAT_GLASS_WALL)
+ {
+ return false;
+ }
/* Exception #2: an illusion wall is not a wall but obstructs view */
- if (feat == FEAT_ILLUS_WALL) return TRUE;
+ if (feat == FEAT_ILLUS_WALL)
+ {
+ return true;
+ }
/* Exception #3: a small tree is a floor but obstructs view */
- if (feat == FEAT_SMALL_TREES) return TRUE;
+ if (feat == FEAT_SMALL_TREES)
+ {
+ return true;
+ }
/* Normal cases: use the WALL flag in f_info.txt */
- return (f_info[feat].flags & FF_WALL) ? TRUE : FALSE;
+ return !!(f_info[feat].flags & FF_WALL);
}
@@ -100,10 +116,10 @@ static bool_ is_wall(cave_type *c_ptr)
* A simple, fast, integer-based line-of-sight algorithm. By Joseph Hall,
* 4116 Brewster Drive, Raleigh NC 27606. Email to jnh@ecemwl.ncsu.edu.
*
- * Returns TRUE if a line of sight can be traced from (x1,y1) to (x2,y2).
+ * Returns true if a line of sight can be traced from (x1,y1) to (x2,y2).
*
* The LOS begins at the center of the tile (x1,y1) and ends at the center of
- * the tile (x2,y2). If los() is to return TRUE, all of the tiles this line
+ * the tile (x2,y2). If los() is to return true, all of the tiles this line
* passes through must be floor tiles, except for (x1,y1) and (x2,y2).
*
* We assume that the "mathematical corner" of a non-floor tile does not
@@ -131,7 +147,7 @@ static bool_ is_wall(cave_type *c_ptr)
*
* Use the "update_view()" function to determine player line-of-sight.
*/
-bool_ los(int y1, int x1, int y2, int x2)
+bool los(int y1, int x1, int y2, int x2)
{
/* Delta */
int dx, dy;
@@ -165,11 +181,14 @@ bool_ los(int y1, int x1, int y2, int x2)
/* Handle adjacent (or identical) grids */
- if ((ax < 2) && (ay < 2)) return (TRUE);
+ if ((ax < 2) && (ay < 2))
+ {
+ return true;
+ }
/* Paranoia -- require "safe" origin */
- /* if (!in_bounds(y1, x1)) return (FALSE); */
+ /* if (!in_bounds(y1, x1)) return false; */
/* Directly South/North */
@@ -180,7 +199,10 @@ bool_ los(int y1, int x1, int y2, int x2)
{
for (ty = y1 + 1; ty < y2; ty++)
{
- if (!cave_sight_bold(ty, x1)) return (FALSE);
+ if (!cave_sight_bold(ty, x1))
+ {
+ return false;
+ }
}
}
@@ -189,12 +211,15 @@ bool_ los(int y1, int x1, int y2, int x2)
{
for (ty = y1 - 1; ty > y2; ty--)
{
- if (!cave_sight_bold(ty, x1)) return (FALSE);
+ if (!cave_sight_bold(ty, x1))
+ {
+ return false;
+ }
}
}
/* Assume los */
- return (TRUE);
+ return true;
}
/* Directly East/West */
@@ -205,7 +230,10 @@ bool_ los(int y1, int x1, int y2, int x2)
{
for (tx = x1 + 1; tx < x2; tx++)
{
- if (!cave_sight_bold(y1, tx)) return (FALSE);
+ if (!cave_sight_bold(y1, tx))
+ {
+ return false;
+ }
}
}
@@ -214,12 +242,15 @@ bool_ los(int y1, int x1, int y2, int x2)
{
for (tx = x1 - 1; tx > x2; tx--)
{
- if (!cave_sight_bold(y1, tx)) return (FALSE);
+ if (!cave_sight_bold(y1, tx))
+ {
+ return false;
+ }
}
}
/* Assume los */
- return (TRUE);
+ return true;
}
@@ -228,21 +259,25 @@ bool_ los(int y1, int x1, int y2, int x2)
sy = (dy < 0) ? -1 : 1;
- /* Vertical "knights" */
+ /* Knight's moves */
if (ax == 1)
{
if (ay == 2)
{
- if (cave_sight_bold(y1 + sy, x1)) return (TRUE);
+ if (cave_sight_bold(y1 + sy, x1))
+ {
+ return true;
+ }
}
}
-
- /* Horizontal "knights" */
else if (ay == 1)
{
if (ax == 2)
{
- if (cave_sight_bold(y1, x1 + sx)) return (TRUE);
+ if (cave_sight_bold(y1, x1 + sx))
+ {
+ return true;
+ }
}
}
@@ -278,7 +313,10 @@ bool_ los(int y1, int x1, int y2, int x2)
/* the LOS exactly meets the corner of a tile. */
while (x2 - tx)
{
- if (!cave_sight_bold(ty, tx)) return (FALSE);
+ if (!cave_sight_bold(ty, tx))
+ {
+ return false;
+ }
qy += m;
@@ -289,7 +327,10 @@ bool_ los(int y1, int x1, int y2, int x2)
else if (qy > f2)
{
ty += sy;
- if (!cave_sight_bold(ty, tx)) return (FALSE);
+ if (!cave_sight_bold(ty, tx))
+ {
+ return false;
+ }
qy -= f1;
tx += sx;
}
@@ -325,7 +366,10 @@ bool_ los(int y1, int x1, int y2, int x2)
/* the LOS exactly meets the corner of a tile. */
while (y2 - ty)
{
- if (!cave_sight_bold(ty, tx)) return (FALSE);
+ if (!cave_sight_bold(ty, tx))
+ {
+ return false;
+ }
qx += m;
@@ -336,7 +380,10 @@ bool_ los(int y1, int x1, int y2, int x2)
else if (qx > f2)
{
tx += sx;
- if (!cave_sight_bold(ty, tx)) return (FALSE);
+ if (!cave_sight_bold(ty, tx))
+ {
+ return false;
+ }
qx -= f1;
ty += sy;
}
@@ -350,7 +397,7 @@ bool_ los(int y1, int x1, int y2, int x2)
}
/* Assume los */
- return (TRUE);
+ return true;
}
@@ -358,7 +405,7 @@ bool_ los(int y1, int x1, int y2, int x2)
/*
* Returns true if the player's grid is dark
*/
-bool_ no_lite()
+bool no_lite()
{
return (!player_can_see_bold(p_ptr->py, p_ptr->px));
}
@@ -370,12 +417,15 @@ bool_ no_lite()
*
* Used by destruction spells, and for placing stairs, etc.
*/
-bool_ cave_valid_bold(int y, int x)
+bool cave_valid_bold(int y, int x)
{
cave_type const *c_ptr = &cave[y][x];
/* Forbid perma-grids */
- if (cave_perma_grid(c_ptr)) return (FALSE);
+ if (cave_perma_grid(c_ptr))
+ {
+ return false;
+ }
/* Check objects */
for (auto const o_idx: c_ptr->o_idxs)
@@ -386,12 +436,12 @@ bool_ cave_valid_bold(int y, int x)
/* Forbid artifact grids */
if (artifact_p(o_ptr))
{
- return (FALSE);
+ return false;
}
}
/* Accept */
- return (TRUE);
+ return true;
}
@@ -438,31 +488,10 @@ static void image_object(byte *ap, char *cp)
{
auto const &k_info = game->edit_data.k_info;
- // Cached state which keeps a list of the "live" object_kind entries.
- static std::vector<size_t> *instance = nullptr;
-
- // First-time initialization
- if (!instance)
- {
- // Create the list of "live" indexes
- instance = new std::vector<size_t>();
- // Filter all the "live" entries
- for (size_t i = 0; i < k_info.size(); i++)
- {
- if (k_info[i].name)
- {
- instance->push_back(i);
- }
- }
- }
-
- // Sanity check
- assert(instance != nullptr);
-
// Select an object kind at random
- int n = rand_int(instance->size());
- *cp = k_info[(*instance)[n]].x_char;
- *ap = k_info[(*instance)[n]].x_attr;
+ auto const &k_ptr = uniform_element(k_info)->second;
+ *cp = k_ptr->x_char;
+ *ap = k_ptr->x_attr;
}
@@ -592,7 +621,7 @@ static byte multi_hued_attr(std::shared_ptr<monster_race> r_ptr)
/* Check breaths */
for (std::size_t i = 0; i < monster_spell_flag_set::nbits; i++)
{
- bool_ stored = FALSE;
+ bool stored = false;
/* Don't have that breath */
if (!(r_ptr->spells.bit(i))) continue;
@@ -622,7 +651,7 @@ static byte multi_hued_attr(std::shared_ptr<monster_race> r_ptr)
for (std::size_t j = 0; j < stored_colors; j++)
{
/* Already stored */
- if (allowed_attrs[j] == first_color) stored = TRUE;
+ if (allowed_attrs[j] == first_color) stored = true;
}
if (!stored)
{
@@ -847,25 +876,21 @@ static byte darker_attrs[16] =
};
-static void map_info(int y, int x, byte *ap, char *cp)
+static void map_info_layer1(
+ cave_type const *c_ptr,
+ bool apply_effects,
+ std::tuple<char, byte> feature_fn(feature_type const *),
+ std::tuple<char, byte> store_fn(store_info_type const *),
+ char *cp,
+ byte *ap)
{
auto const &st_info = game->edit_data.st_info;
- auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
- auto const &k_info = game->edit_data.k_info;
+ auto const &lasting_effects = game->lasting_effects;
+ char c;
byte a;
- byte c;
-
- /**** Preparation ****/
-
- /* Access the grid */
- cave_type *c_ptr = &cave[y][x];
-
-
- /* Cache some frequently used values */
-
/* Grid info */
auto info = c_ptr->info;
@@ -878,9 +903,6 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* Access floor */
auto f_ptr = &f_info[feat];
-
- /**** Layer 1 -- Terrain feature ****/
-
/* Only memorised or visible grids are displayed */
if (info & (CAVE_MARK | CAVE_SEEN))
{
@@ -889,18 +911,14 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* 'Sane' terrain features */
if (feat != FEAT_SHOP)
{
- /* Normal char */
- c = f_ptr->x_char;
-
- /* Normal attr */
- a = f_ptr->x_attr;
+ std::tie(c, a) = feature_fn(f_ptr);
}
/* Mega-Hack 1 -- Building don't conform to f_info */
else
{
- c = st_info[c_ptr->special].x_char;
- a = st_info[c_ptr->special].x_attr;
+ std::tie(c, a) =
+ store_fn(&st_info[c_ptr->special]);
}
/* Mega-Hack 2 -- stair to dungeon branch are purple */
@@ -910,12 +928,12 @@ static void map_info(int y, int x, byte *ap, char *cp)
}
/**** Step 2 -- Apply special random effects ****/
- if (!options->avoid_other && !options->avoid_shimmer)
+ if (apply_effects)
{
/* Special terrain effect */
- if (c_ptr->effect)
+ if (auto effect_idx = c_ptr->maybe_effect)
{
- a = spell_color(effects[c_ptr->effect].type);
+ a = spell_color(lasting_effects[*effect_idx].type);
}
/* Multi-hued attr */
@@ -941,7 +959,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* view_special_lite: lighting effects for boring features */
if (options->view_special_lite &&
- ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
+ ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
{
if (!p_ptr->wild_mode)
{
@@ -981,7 +999,7 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* view_granite_lite: lighting effects for walls and doors */
else if (options->view_granite_lite &&
- (f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
+ (f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
{
if (!p_ptr->wild_mode)
{
@@ -1017,13 +1035,8 @@ static void map_info(int y, int x, byte *ap, char *cp)
else
{
/* Access darkness */
- f_ptr = &f_info[FEAT_NONE];
-
- /* Normal attr */
- a = f_ptr->x_attr;
-
- /* Normal char */
- c = f_ptr->x_char;
+ std::tie(c, a) =
+ feature_fn(&f_info[FEAT_NONE]);
}
/*
@@ -1040,10 +1053,15 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* Save the info */
*ap = a;
*cp = c;
+}
- /**** Layer 2 -- Objects ****/
-
+static void map_info_layer2(
+ cave_type const *c_ptr,
+ std::tuple<char, byte> object_fn(object_type const *),
+ char *cp,
+ byte *ap)
+{
for (auto const o_idx: c_ptr->o_idxs)
{
/* Acquire object */
@@ -1052,33 +1070,42 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* Memorized objects */
if (o_ptr->marked)
{
- /* Normal char */
- *cp = object_char(o_ptr);
-
- /* Normal attr */
- *ap = object_attr(o_ptr);
+ /* Normal char + attr */
+ std::tie(*cp, *ap) = object_fn(o_ptr);
/* Multi-hued attr */
- if (!options->avoid_other && (k_info[o_ptr->k_idx].flags & TR_ATTR_MULTI))
+ if (!options->avoid_other && (o_ptr->k_ptr->flags & TR_ATTR_MULTI))
{
*ap = get_shimmer_color();
}
/* Hack -- hallucination */
- if (p_ptr->image) image_object(ap, cp);
+ if (p_ptr->image)
+ {
+ image_object(ap, cp);
+ }
/* Done */
break;
}
}
+}
- /**** Layer 3 -- Handle monsters ****/
+static void map_info_layer3(
+ cave_type const *c_ptr,
+ std::tuple<char, byte> object_fn(object_type const *),
+ std::tuple<char, byte> race_fn(std::shared_ptr<monster_race const>),
+ char *cp,
+ byte *ap)
+{
+ char c;
+ byte a;
if (c_ptr->m_idx)
{
monster_type *m_ptr = &m_list[c_ptr->m_idx];
- auto const r_ptr = m_ptr->race();
+ auto r_ptr = m_ptr->race();
if (r_ptr->flags & RF_MIMIC)
{
@@ -1089,13 +1116,11 @@ static void map_info(int y, int x, byte *ap, char *cp)
if (o_ptr->marked)
{
/* Normal char */
- *cp = object_char(o_ptr);
-
- /* Normal attr */
- *ap = object_attr(o_ptr);
+ std::tie(*cp, *ap) =
+ object_fn(o_ptr);
/* Multi-hued attr */
- if (!options->avoid_other && (k_info[o_ptr->k_idx].flags & TR_ATTR_MULTI))
+ if (!options->avoid_other && o_ptr->k_ptr && (o_ptr->k_ptr->flags & TR_ATTR_MULTI))
{
*ap = get_shimmer_color();
}
@@ -1110,8 +1135,8 @@ static void map_info(int y, int x, byte *ap, char *cp)
if (m_ptr->ml)
{
/* Desired attr/char */
- c = r_ptr->x_char;
- a = r_ptr->x_attr;
+ std::tie(c, a) =
+ race_fn(r_ptr);
/* Ignore weird codes */
if (options->avoid_other)
@@ -1195,28 +1220,38 @@ static void map_info(int y, int x, byte *ap, char *cp)
}
}
}
+}
+
+
+static void map_info_layer4(
+ int y,
+ int x,
+ std::tuple<char, byte> race_fn(monster_race const *),
+ bool player_char_health,
+ char *cp,
+ byte *ap)
+{
+ auto const &r_info = game->edit_data.r_info;
+
+ char c;
+ byte a;
- /* Handle "player" */
if ((y == p_ptr->py) && (x == p_ptr->px) &&
- (!p_ptr->invis || p_ptr->see_inv))
+ (!p_ptr->invis || p_ptr->see_inv))
{
auto r_ptr = &r_info[p_ptr->body_monster];
- /* Get the "player" attr */
+ /* Get the "player" char + attr */
+ std::tie(c, a) =
+ race_fn(r_ptr);
+
if (!options->avoid_other && (r_ptr->flags & RF_ATTR_MULTI))
{
a = get_shimmer_color();
}
- else
- {
- a = r_ptr->x_attr;
- }
-
- /* Get the "player" char */
- c = r_ptr->x_char;
/* Show player health char instead? */
- if (options->player_char_health)
+ if (player_char_health)
{
int percent = p_ptr->chp * 10 / p_ptr->mhp;
@@ -1230,385 +1265,112 @@ static void map_info(int y, int x, byte *ap, char *cp)
/* Save the info */
*ap = a;
*cp = c;
-
}
}
-/*
- * Special version of map_info, for use by HTML converter
- * to obtain pure-ASCII image of dungeon map
- */
-void map_info_default(int y, int x, byte *ap, char *cp)
+static void map_info(int y, int x, byte *ap, char *cp)
{
- auto const &st_info = game->edit_data.st_info;
- auto const &r_info = game->edit_data.r_info;
- auto const &f_info = game->edit_data.f_info;
- auto const &k_info = game->edit_data.k_info;
-
- byte a;
-
- byte c;
-
- /* Shorthand */
- auto const avoid_other = options->avoid_other;
+ auto c_ptr = &cave[y][x];
- /**** Preparation ****/
-
- /* Access the grid */
- auto const c_ptr = &cave[y][x];
-
-
- /* Cache some frequently used values */
-
- /* Grid info */
- auto info = c_ptr->info;
-
- /* Feature code */
- auto const feat = c_ptr->mimic
- ? c_ptr->mimic
- : f_info[c_ptr->feat].mimic;
-
- /* Access floor */
- feature_type const *f_ptr = &f_info[feat];
-
-
- /**** Layer 1 -- Terrain feature ****/
-
- /* Only memorised or visible grids are displayed */
- if (info & (CAVE_MARK | CAVE_SEEN))
+ auto feature_fn = [](auto f_ptr)
{
- /**** Step 1 -- Retrieve base attr/char ****/
-
- /* 'Sane' terrain features */
- if (feat != FEAT_SHOP)
- {
- /* Default char */
- c = f_ptr->d_char;
-
- /* Default attr */
- a = f_ptr->d_attr;
- }
-
- /* Mega-Hack 1 -- Building don't conform to f_info */
- else
- {
- c = st_info[c_ptr->special].d_char;
- a = st_info[c_ptr->special].d_attr;
- }
-
- /* Mega-Hack 2 -- stair to dungeon branch are purple */
- if (c_ptr->special &&
- ((feat == FEAT_MORE) || (feat == FEAT_LESS)))
- {
- a = TERM_VIOLET;
- }
-
- /**** Step 2 -- Apply special random effects ****/
- if (!avoid_other)
- {
- /* Special terrain effect */
- if (c_ptr->effect)
- {
- a = spell_color(effects[c_ptr->effect].type);
- }
-
- /* Multi-hued attr */
- else if (f_ptr->flags & FF_ATTR_MULTI)
- {
- a = f_ptr->shimmer[rand_int(7)];
- }
- }
-
-
- /*
- * Step 3
- *
- * Special lighting effects, if specified and applicable
- * This will never happen for
- * - any grids in the overhead map
- * - (graphics modes) terrain features without corresponding
- * "darker" tiles.
- *
- * All the if's here are flag checks, so changed order shouldn't
- * affect performance a lot, I hope...
- */
-
- /* view_special_lite: lighting effects for boring features */
- if (options->view_special_lite &&
- ((f_ptr->flags & (FF_FLOOR | FF_REMEMBER)) == FF_FLOOR))
- {
- if (!p_ptr->wild_mode)
- {
- /* Handle "seen" grids */
- if (info & (CAVE_SEEN))
- {
- /* Only lit by "torch" light */
- if (options->view_yellow_lite && !(info & (CAVE_GLOW)))
- {
- /* Use "yellow" */
- a = TERM_YELLOW;
- }
- }
-
- /* Handle "blind" */
- else if (p_ptr->blind)
- {
- /* Use darker colour */
- a = darker_attrs[a & 0xF];
- }
-
- /* Handle "dark" grids */
- else if (!(info & (CAVE_GLOW)))
- {
- /* Use darkest colour */
- a = TERM_L_DARK;
- }
-
- /* "Out-of-sight" glowing grids -- handle "view_bright_lite" */
- else if (options->view_bright_lite)
- {
- /* Use darker colour */
- a = dark_attrs[a & 0xF];
- }
- }
- }
-
- /* view_granite_lite: lighting effects for walls and doors */
- else if (options->view_granite_lite &&
- (f_ptr->flags & (FF_NO_VISION | FF_DOOR)))
- {
- if (!p_ptr->wild_mode)
- {
- /* Handle "seen" grids */
- if (info & (CAVE_SEEN))
- {
- /* Do nothing */
- }
-
- /* Handle "blind" */
- else if (p_ptr->blind)
- {
- /* Use darker colour */
- a = darker_attrs[a & 0xF];
- }
-
- /* Handle "view_bright_lite" */
- else if (options->view_bright_lite)
- {
- /* Use darker colour */
- a = dark_attrs[a & 0xF];
- }
- }
- }
- }
+ return std::make_tuple(
+ f_ptr->x_char,
+ f_ptr->x_attr);
+ };
- /* Unknown grids */
- else
+ auto store_fn = [](auto st_ptr)
{
- /* Access darkness */
- f_ptr = &f_info[FEAT_NONE];
-
- /* Default attr */
- a = f_ptr->d_attr;
-
- /* Default char */
- c = f_ptr->d_char;
- }
+ return std::make_tuple(
+ st_ptr->x_char,
+ st_ptr->x_attr);
+ };
- /*
- * Hack -- rare random hallucination
- * Because we cannot be sure which is outer dungeon walls,
- * the check for 'feat' has been removed
- */
- if (p_ptr->image && (rand_int(256) == 0))
+ auto object_fn = [](auto o_ptr)
{
- /* Hallucinate */
- image_random(ap, cp);
- }
-
- /* Save the info */
- *ap = a;
- *cp = c;
-
-
- /**** Layer 2 -- Objects ****/
+ return std::make_tuple(
+ object_char(o_ptr),
+ object_attr(o_ptr));
+ };
- for (auto const this_o_idx: c_ptr->o_idxs)
+ auto race_fn = [](auto r_ptr)
{
- /* Acquire object */
- object_type *o_ptr = &o_list[this_o_idx];
-
- /* Memorized objects */
- if (o_ptr->marked)
- {
- /* Normal char */
- *cp = object_char_default(o_ptr);
+ return std::make_tuple(
+ r_ptr->x_char,
+ r_ptr->x_attr);
+ };
- /* Normal attr */
- *ap = object_attr_default(o_ptr);
+ // Layer 1: Terrain
+ map_info_layer1(
+ c_ptr, !options->avoid_other && !options->avoid_shimmer,
+ feature_fn, store_fn, cp, ap);
- /* Multi-hued attr */
- if (!avoid_other && (k_info[o_ptr->k_idx].flags & TR_ATTR_MULTI))
- {
- *ap = get_shimmer_color();
- }
+ // Layer 2: Objects
+ map_info_layer2(c_ptr, object_fn, cp, ap);
- /* Hack -- hallucination */
- if (p_ptr->image) image_object(ap, cp);
+ // Layer 3: Monsters
+ map_info_layer3(
+ c_ptr, object_fn, race_fn, cp, ap);
- /* Done */
- break;
- }
- }
+ // Layer 4: Player
+ map_info_layer4(
+ y, x, race_fn, options->player_char_health, cp, ap);
+}
- /**** Layer 3 -- Handle monsters ****/
+/*
+ * Special version of map_info, for use by HTML converter
+ * to obtain pure-ASCII image of dungeon map
+ */
+void map_info_default(int y, int x, byte *ap, char *cp)
+{
+ auto c_ptr = &cave[y][x];
- if (c_ptr->m_idx)
+ auto feature_fn = [](auto f_ptr)
{
- monster_type *m_ptr = &m_list[c_ptr->m_idx];
- auto const r_ptr = m_ptr->race();
-
- if (r_ptr->flags & RF_MIMIC)
- {
- /* Acquire object being mimicked */
- object_type *o_ptr = &o_list[m_ptr->mimic_o_idx()];
-
- /* Memorized objects */
- if (o_ptr->marked)
- {
- /* Normal char */
- *cp = object_char_default(o_ptr);
-
- /* Normal attr */
- *ap = object_attr_default(o_ptr);
-
- /* Multi-hued attr */
- if (!avoid_other && (k_info[o_ptr->k_idx].flags & TR_ATTR_MULTI))
- {
- *ap = get_shimmer_color();
- }
-
- /* Hack -- hallucination */
- if (p_ptr->image) image_object(ap, cp);
- }
- }
- else
- {
- /* Visible monster */
- if (m_ptr->ml)
- {
- /* Default attr/char */
- c = r_ptr->d_char;
- a = r_ptr->d_attr;
-
- /* Ignore weird codes */
- if (avoid_other)
- {
- /* Use char */
- *cp = c;
-
- /* Use attr */
- *ap = a;
- }
-
- /* Multi-hued monster */
- else if (r_ptr->flags & RF_ATTR_MULTI)
- {
- /* Is it a shapechanger? */
- if (r_ptr->flags & RF_SHAPECHANGER)
- {
- image_random(ap, cp);
- }
- else
- *cp = c;
-
- /* Multi-hued attr */
- if (r_ptr->flags & RF_ATTR_ANY)
- {
- *ap = randint(15);
- }
- else
- {
- *ap = multi_hued_attr(r_ptr);
- }
- }
-
- /* Normal monster (not "clear" in any way) */
- else if (!(r_ptr->flags & (RF_ATTR_CLEAR | RF_CHAR_CLEAR)))
- {
- /* Use char */
- *cp = c;
-
- /* Use attr */
- *ap = a;
- }
-
- /* Hack -- Bizarre grid under monster */
- else if ((*ap & 0x80) || (*cp & 0x80))
- {
- /* Use char */
- *cp = c;
-
- /* Use attr */
- *ap = a;
- }
-
- /* Normal */
- else
- {
- /* Normal (non-clear char) monster */
- if (!(r_ptr->flags & RF_CHAR_CLEAR))
- {
- /* Normal char */
- *cp = c;
- }
-
- /* Normal (non-clear attr) monster */
- else if (!(r_ptr->flags & RF_ATTR_CLEAR))
- {
- /* Normal attr */
- *ap = a;
- }
- }
+ return std::make_tuple(
+ f_ptr->d_char,
+ f_ptr->d_attr);
+ };
- /* Hack -- hallucination */
- if (p_ptr->image)
- {
- /* Hallucinatory monster */
- image_monster(ap, cp);
- }
- }
- }
- }
+ auto store_fn = [](auto st_ptr)
+ {
+ return std::make_tuple(
+ st_ptr->d_char,
+ st_ptr->d_attr);
+ };
+ auto object_fn = [](auto o_ptr)
+ {
+ return std::make_tuple(
+ object_char_default(o_ptr),
+ object_attr_default(o_ptr));
+ };
- /* Handle "player" */
- if ((y == p_ptr->py) && (x == p_ptr->px) &&
- (!p_ptr->invis ||
- (p_ptr->invis && p_ptr->see_inv)))
+ auto race_fn = [](auto r_ptr)
{
- auto r_ptr = &r_info[p_ptr->body_monster];
+ return std::make_tuple(
+ r_ptr->d_char,
+ r_ptr->d_attr);
+ };
- /* Get the "player" attr */
- if (!avoid_other && (r_ptr->flags & RF_ATTR_MULTI))
- {
- a = get_shimmer_color();
- }
- else
- {
- a = r_ptr->d_attr;
- }
+ // Layer 1: Terrain
+ map_info_layer1(
+ c_ptr, !options->avoid_other,
+ feature_fn, store_fn, cp, ap);
- /* Get the "player" char */
- c = r_ptr->d_char;
+ // Layer 2: Objects
+ map_info_layer2(
+ c_ptr, object_fn, cp, ap);
- /* Save the info */
- *ap = a;
- *cp = c;
+ // Layer 3: Monsters
+ map_info_layer3(
+ c_ptr, object_fn, race_fn, cp, ap);
- }
+ // Layer 4: Player */
+ map_info_layer4(
+ y, x, race_fn, false, cp, ap);
}
@@ -1709,7 +1471,7 @@ void note_spot(int y, int x)
object_type *o_ptr = &o_list[this_o_idx];
/* Memorize objects */
- o_ptr->marked = TRUE;
+ o_ptr->marked = true;
}
if (c_ptr->m_idx)
@@ -1720,7 +1482,7 @@ void note_spot(int y, int x)
if (r_ptr->flags & RF_MIMIC)
{
object_type *o_ptr = &o_list[m_ptr->mimic_o_idx()];
- o_ptr->marked = TRUE;
+ o_ptr->marked = true;
}
}
@@ -1783,38 +1545,30 @@ void lite_spot(int y, int x)
*/
void prt_map()
{
- int x, y;
-
- int v;
-
/* Access the cursor state */
- Term_get_cursor(&v);
-
- /* Hide the cursor */
- Term_set_cursor(0);
+ Term_with_saved_cursor_visbility([] {
+ /* Hide the cursor */
+ Term_hide_cursor();
- /* Dump the map */
- for (y = panel_row_min; y <= panel_row_max; y++)
- {
- /* Scan the columns of row "y" */
- for (x = panel_col_min; x <= panel_col_max; x++)
+ /* Dump the map */
+ for (int y = panel_row_min; y <= panel_row_max; y++)
{
- byte a;
- char c;
+ for (int x = panel_col_min; x <= panel_col_max; x++)
+ {
+ byte a;
+ char c;
- /* Determine what is there */
- map_info(y, x, &a, &c);
+ /* Determine what is there */
+ map_info(y, x, &a, &c);
- /* Efficiency -- Redraw that grid of the map */
- Term_queue_char(panel_col_of(x), y - panel_row_prt, a, c);
+ /* Efficiency -- Redraw that grid of the map */
+ Term_queue_char(panel_col_of(x), y - panel_row_prt, a, c);
+ }
}
- }
-
- /* Display player */
- lite_spot(p_ptr->py, p_ptr->px);
- /* Restore the cursor */
- Term_set_cursor(v);
+ /* Display player */
+ lite_spot(p_ptr->py, p_ptr->px);
+ });
}
@@ -1917,7 +1671,7 @@ static byte priority(byte a, char c)
int i, p0, p1;
/* Scan the table */
- for (i = 0; TRUE; i++)
+ for (i = 0; true; i++)
{
/* Priority level */
p1 = priority_table[i][1];
@@ -1990,8 +1744,8 @@ void display_map(int *cy, int *cx)
auto const old_view_granite_lite = options->view_granite_lite;
/* Disable lighting effects */
- options->view_special_lite = FALSE;
- options->view_granite_lite = FALSE;
+ options->view_special_lite = false;
+ options->view_granite_lite = false;
/* Set up initial maps */
@@ -2106,11 +1860,8 @@ void do_cmd_view_map()
/* Retrive current screen size */
Term_get_size(&wid, &hgt);
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Note */
prt("Please wait...", 0, 0);
@@ -2128,16 +1879,13 @@ void do_cmd_view_map()
put_str("Hit any key to continue", hgt - 1, (wid - COL_MAP) / 2);
/* Hilite the player */
- move_cursor(cy, cx);
+ Term_gotoxy(cx, cy);
/* Get any key */
inkey();
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -3485,7 +3233,7 @@ void update_mon_lite()
cave_type *c_ptr;
u16b info;
- bool_ invis;
+ bool invis;
s16b fast_lite_n = lite_n;
s16b fast_temp_n;
@@ -3649,7 +3397,7 @@ void update_mon_lite()
if (player_has_los_bold(y, x) && c_ptr->m_idx)
{
/* Hide the monster */
- update_mon(c_ptr->m_idx, FALSE);
+ update_mon(c_ptr->m_idx, false);
}
else
{
@@ -3687,7 +3435,7 @@ void update_mon_lite()
if (c_ptr->m_idx)
{
/* Show it */
- update_mon(c_ptr->m_idx, FALSE);
+ update_mon(c_ptr->m_idx, false);
}
else
{
@@ -3930,13 +3678,13 @@ void wiz_lite()
object_type *o_ptr = &o_list[i];
/* Skip dead objects */
- if (!o_ptr->k_idx) continue;
+ if (!o_ptr->k_ptr) continue;
/* Skip held objects */
if (o_ptr->held_m_idx) continue;
/* Memorize */
- o_ptr->marked = TRUE;
+ o_ptr->marked = true;
}
/* Scan all normal grids */
@@ -3955,7 +3703,7 @@ void wiz_lite()
if (r_ptr->flags & RF_MIMIC)
{
object_type *o_ptr = &o_list[m_ptr->mimic_o_idx()];
- o_ptr->marked = TRUE;
+ o_ptr->marked = true;
}
}
@@ -4041,13 +3789,13 @@ void wiz_dark()
object_type *o_ptr = &o_list[i];
/* Skip dead objects */
- if (!o_ptr->k_idx) continue;
+ if (!o_ptr->k_ptr) continue;
/* Skip held objects */
if (o_ptr->held_m_idx) continue;
/* Forget the object */
- o_ptr->marked = FALSE;
+ o_ptr->marked = false;
}
/* Fully update the visuals */
@@ -4202,15 +3950,14 @@ void mmove2(int *y, int *x, int y1, int x1, int y2, int x2)
*
* This is slightly (but significantly) different from "los(y1,x1,y2,x2)".
*/
-bool_ projectable(int y1, int x1, int y2, int x2)
+bool projectable(int y1, int x1, int y2, int x2)
{
- int dist, y, x;
-
/* Start at the initial location */
- y = y1, x = x1;
+ int y = y1;
+ int x = x1;
/* See "project()" */
- for (dist = 0; dist <= MAX_RANGE; dist++)
+ for (int dist = 0; dist <= MAX_RANGE; dist++)
{
/* Check for arrival at "final target" */
/*
@@ -4219,18 +3966,23 @@ bool_ projectable(int y1, int x1, int y2, int x2)
* lets monsters shoot a the player if s/he is
* visible but in a wall
*/
- if ((x == x2) && (y == y2)) return (TRUE);
+ if ((x == x2) && (y == y2))
+ {
+ return true;
+ }
/* Never pass through walls */
- if (dist && (!cave_sight_bold(y, x) || !cave_floor_bold(y, x))) break;
+ if (dist && (!cave_sight_bold(y, x) || !cave_floor_bold(y, x)))
+ {
+ break;
+ }
/* Calculate the new location */
mmove2(&y, &x, y1, x1, y2, x2);
}
-
/* Assume obstruction */
- return (FALSE);
+ return false;
}
@@ -4406,6 +4158,8 @@ void disturb_on_other()
*/
static int random_quest_number()
{
+ auto const &dungeon_flags = game->dungeon_flags;
+
if ((dun_level >= 1) && (dun_level < MAX_RANDOM_QUEST) &&
(dungeon_flags & DF_PRINCIPAL) &&
(random_quests[dun_level].type) &&
@@ -4439,33 +4193,30 @@ int is_quest(int level)
}
-/*
- * handle spell effects
+/**
+ * Create a new lasting effect.
*/
-int effect_pop()
+boost::optional<s16b> new_effect(int type, int dam, int time, int cy, int cx, int rad, s32b flags)
{
- int i;
+ auto &lasting_effects = game->lasting_effects;
- for (i = 1; i < MAX_EFFECTS; i++)
- if (!effects[i].time)
- return i;
- return -1;
-}
-
-int new_effect(int type, int dam, int time, int cy, int cx, int rad, s32b flags)
-{
- int i;
-
- if ((i = effect_pop()) == -1) return -1;
+ // Limit to 128 effects at most.
+ if (lasting_effects.size() >= 128)
+ {
+ return boost::none;
+ }
- effects[i].type = type;
- effects[i].dam = dam;
- effects[i].time = time;
- effects[i].flags = flags;
- effects[i].cx = cx;
- effects[i].cy = cy;
- effects[i].rad = rad;
- return i;
+ effect_type effect;
+ effect.type = type;
+ effect.dam = dam;
+ effect.time = time;
+ effect.flags = flags;
+ effect.cx = cx;
+ effect.cy = cy;
+ effect.rad = rad;
+
+ lasting_effects.push_back(effect);
+ return lasting_effects.size() - 1;
}
/**
diff --git a/src/cave.hpp b/src/cave.hpp
index ce1631a1..48ec829a 100644
--- a/src/cave.hpp
+++ b/src/cave.hpp
@@ -1,13 +1,15 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
#include "cave_type_fwd.hpp"
#include "object_type_fwd.hpp"
+#include <boost/optional.hpp>
+
int distance(int y1, int x1, int y2, int x2);
-bool_ los(int y1, int x1, int y2, int x2);
-bool_ cave_valid_bold(int y, int x);
-bool_ no_lite();
+bool los(int y1, int x1, int y2, int x2);
+bool cave_valid_bold(int y, int x);
+bool no_lite();
void map_info_default(int y, int x, byte *ap, char *cp);
void move_cursor_relative(int row, int col);
void print_rel(char c, byte a, int y, int x);
@@ -31,7 +33,7 @@ void place_floor(int y, int x);
void place_floor_convert_glass(int y, int x);
void place_filler(int y, int x);
void mmove2(int *y, int *x, int y1, int x1, int y2, int x2);
-bool_ projectable(int y1, int x1, int y2, int x2);
+bool projectable(int y1, int x1, int y2, int x2);
void scatter(int *yp, int *xp, int y, int x, int d);
void health_track(int m_idx);
void monster_race_track(int r_idx, int ego);
@@ -40,7 +42,7 @@ void disturb();
void disturb_on_state();
void disturb_on_other();
int is_quest(int level);
-int new_effect(int type, int dam, int time, int cy, int cx, int rad, s32b flags);
+boost::optional<s16b> new_effect(int type, int dam, int time, int cy, int cx, int rad, s32b flags);
bool cave_floor_bold(int y, int x);
bool cave_floor_grid(cave_type const *c);
bool cave_plain_floor_bold(int y, int x);
diff --git a/src/cave_type.hpp b/src/cave_type.hpp
index 08e6002f..3f630ee1 100644
--- a/src/cave_type.hpp
+++ b/src/cave_type.hpp
@@ -1,7 +1,8 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
+#include <boost/optional.hpp>
#include <cassert>
#include <vector>
@@ -50,7 +51,7 @@ struct cave_type
byte cost = 0; /* Hack -- cost of flowing */
byte when = 0; /* Hack -- when cost was computed */
- s16b effect = 0; /* The lasting effects */
+ boost::optional<s16b> maybe_effect { }; /* The lasting effects */
/**
* @brief wipe the object's state
diff --git a/src/cli_comm.hpp b/src/cli_comm.hpp
index 6ae53edc..c83c5a95 100644
--- a/src/cli_comm.hpp
+++ b/src/cli_comm.hpp
@@ -1,13 +1,13 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
/**
* A structure for CLI commands.
*/
struct cli_comm
{
- cptr comm; /* Extended name of the command. */
- cptr descrip; /* Description of the command. */
+ const char *comm; /* Extended name of the command. */
+ const char *descrip; /* Description of the command. */
s16b key; /* Key to convert command to. */
};
diff --git a/src/cmd1.cc b/src/cmd1.cc
index 13edf0ff..8256f8fd 100644
--- a/src/cmd1.cc
+++ b/src/cmd1.cc
@@ -16,6 +16,7 @@
#include "feature_flag.hpp"
#include "feature_type.hpp"
#include "files.hpp"
+#include "format_ext.hpp"
#include "game.hpp"
#include "gods.hpp"
#include "hooks.hpp"
@@ -42,14 +43,17 @@
#include "spells3.hpp"
#include "tables.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
#include "wild.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
+#include <boost/algorithm/string/predicate.hpp>
+
+using boost::algorithm::equals;
+
#define MAX_VAMPIRIC_DRAIN 100
@@ -57,28 +61,31 @@
* Determine if the player "hits" a monster (normal combat).
* Note -- Always miss 5%, always hit 5%, otherwise random.
*/
-bool_ test_hit_fire(int chance, int ac, int vis)
+bool test_hit_fire(int chance, int ac, int vis)
{
- int k;
-
-
/* Percentile dice */
- k = rand_int(100);
+ int const k = rand_int(100);
/* Hack -- Instant miss or hit */
if (k < 10) return (k < 5);
/* Never hit */
- if (chance <= 0) return (FALSE);
+ if (chance <= 0)
+ {
+ return false;
+ }
/* Invisible monsters are harder to hit */
if (!vis) chance = (chance + 1) / 2;
/* Power competes against armor */
- if (rand_int(chance + luck( -10, 10)) < (ac * 3 / 4)) return (FALSE);
+ if (rand_int(chance + luck( -10, 10)) < (ac * 3 / 4))
+ {
+ return false;
+ }
/* Assume hit */
- return (TRUE);
+ return true;
}
@@ -88,28 +95,31 @@ bool_ test_hit_fire(int chance, int ac, int vis)
*
* Note -- Always miss 5%, always hit 5%, otherwise random.
*/
-bool_ test_hit_norm(int chance, int ac, int vis)
+bool test_hit_norm(int chance, int ac, int vis)
{
- int k;
-
-
/* Percentile dice */
- k = rand_int(100);
+ int const k = rand_int(100);
/* Hack -- Instant miss or hit */
if (k < 10) return (k < 5);
/* Wimpy attack never hits */
- if (chance <= 0) return (FALSE);
+ if (chance <= 0)
+ {
+ return false;
+ }
/* Penalize invisible targets */
if (!vis) chance = (chance + 1) / 2;
/* Power must defeat armor */
- if (rand_int(chance + luck( -10, 10)) < (ac * 3 / 4)) return (FALSE);
+ if (rand_int(chance + luck( -10, 10)) < (ac * 3 / 4))
+ {
+ return false;
+ }
/* Assume hit */
- return (TRUE);
+ return true;
}
@@ -159,11 +169,11 @@ s16b critical_shot(int weight, int plus, int dam, int skill)
*
* Factor in weapon weight, total plusses, player level.
*/
-s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit)
+s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool *done_crit)
{
int i, k, num = randint(5000);
- *done_crit = FALSE;
+ *done_crit = false;
/* Extract "blow" power */
i = (weight + ((p_ptr->to_h + plus) * 5) +
@@ -181,7 +191,7 @@ s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_c
set_tim_deadly(p_ptr->tim_deadly - 1);
msg_print("It was a *GREAT* hit!");
dam = 3 * dam + 20;
- *done_crit = TRUE;
+ *done_crit = true;
}
/* Chance */
@@ -218,7 +228,7 @@ s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_c
msg_print("It was a *SUPERB* hit!");
dam = ((7 * dam) / 2) + 25;
}
- *done_crit = TRUE;
+ *done_crit = true;
}
return (dam);
@@ -504,8 +514,7 @@ static void touch_zap_player(monster_type *m_ptr)
* Carried monster can attack too.
* Based on monst_attack_monst.
*/
-static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
- int x, int y)
+static void carried_monster_attack(s16b m_idx, int x, int y)
{
auto const &r_info = game->edit_data.r_info;
@@ -519,7 +528,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
char temp[80];
- bool_ blinked = FALSE, touched = FALSE;
+ bool blinked = false, touched = false;
byte y_saver = t_ptr->fy;
@@ -527,7 +536,10 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
/* Get the carried monster */
auto o_ptr = &p_ptr->inventory[INVEN_CARRY];
- if (!o_ptr->k_idx) return;
+ if (!o_ptr->k_ptr)
+ {
+ return;
+ }
/* Get monster race of the symbiote */
auto r_ptr = &r_info[o_ptr->pval];
@@ -545,7 +557,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
monster_desc(t_name, t_ptr, 0);
/* Assume no blink */
- blinked = FALSE;
+ blinked = false;
if (!t_ptr->ml)
{
@@ -558,7 +570,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
int power = 0;
int damage = 0;
- cptr act = NULL;
+ const char *act = NULL;
/* Extract the attack infomation */
int effect = r_ptr->blow[ap_cnt].effect;
@@ -593,49 +605,49 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_HIT:
{
act = "hits %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_TOUCH:
{
act = "touches %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_PUNCH:
{
act = "punches %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_KICK:
{
act = "kicks %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CLAW:
{
act = "claws %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_BITE:
{
act = "bites %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_STING:
{
act = "stings %s.";
- touched = TRUE;
+ touched = true;
break;
}
@@ -648,84 +660,84 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_BUTT:
{
act = "butts %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CRUSH:
{
act = "crushes %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_ENGULF:
{
act = "engulfs %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CHARGE:
{
act = "charges %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CRAWL:
{
act = "crawls on %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_DROOL:
{
act = "drools on %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_SPIT:
{
act = "spits on %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_GAZE:
{
act = "gazes at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_WAIL:
{
act = "wails at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_SPORE:
{
act = "releases spores at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_XXX4:
{
act = "projects XXX4's at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_BEG:
{
act = "begs %s for money.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -733,7 +745,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_INSULT:
{
act = "insults %s.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -741,7 +753,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_MOAN:
{
act = "moans at %s.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -749,7 +761,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_SHOW:
{
act = "sings to %s.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -814,7 +826,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBE_EAT_GOLD:
{
pt = damage = 0;
- if (randint(2) == 1) blinked = TRUE;
+ if (randint(2) == 1) blinked = true;
break;
}
@@ -927,7 +939,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
if (t_ptr->ml)
{
- blinked = FALSE;
+ blinked = false;
msg_format("You are suddenly very hot!");
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
@@ -942,7 +954,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
if (t_ptr->ml)
{
- blinked = FALSE;
+ blinked = false;
msg_format("You get zapped!");
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
@@ -997,8 +1009,7 @@ static void carried_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
* Carried monster can attack too.
* Based on monst_attack_monst.
*/
-static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
- int x, int y)
+static void incarnate_monster_attack(s16b m_idx, int x, int y)
{
auto const &r_info = game->edit_data.r_info;
@@ -1014,7 +1025,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
char temp[80];
- bool_ blinked = FALSE, touched = FALSE;
+ bool blinked = false, touched = false;
byte y_saver = t_ptr->fy;
@@ -1038,7 +1049,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
monster_desc(t_name, t_ptr, 0);
/* Assume no blink */
- blinked = FALSE;
+ blinked = false;
if (!t_ptr->ml)
{
@@ -1046,13 +1057,12 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
}
/* Scan through all four blows */
- for (ap_cnt = 0; ap_cnt < (p_ptr->num_blow > 4) ? 4 : p_ptr->num_blow;
- ap_cnt++)
+ for (ap_cnt = 0; ap_cnt < std::min<int>(p_ptr->num_blow, 4); ap_cnt++)
{
int power = 0;
int damage = 0;
- cptr act = NULL;
+ const char *act = NULL;
/* Extract the attack infomation */
int effect = r_ptr->blow[ap_cnt].effect;
@@ -1087,49 +1097,49 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_HIT:
{
act = "hit %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_TOUCH:
{
act = "touch %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_PUNCH:
{
act = "punch %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_KICK:
{
act = "kick %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CLAW:
{
act = "claw %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_BITE:
{
act = "bite %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_STING:
{
act = "sting %s.";
- touched = TRUE;
+ touched = true;
break;
}
@@ -1142,84 +1152,84 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_BUTT:
{
act = "butt %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CRUSH:
{
act = "crush %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_ENGULF:
{
act = "engulf %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CHARGE:
{
act = "charge %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_CRAWL:
{
act = "crawl on %s.";
- touched = TRUE;
+ touched = true;
break;
}
case RBM_DROOL:
{
act = "drool on %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_SPIT:
{
act = "spit on %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_GAZE:
{
act = "gaze at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_WAIL:
{
act = "wail at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_SPORE:
{
act = "release spores at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_XXX4:
{
act = "project XXX4's at %s.";
- touched = FALSE;
+ touched = false;
break;
}
case RBM_BEG:
{
act = "beg %s for money.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -1227,7 +1237,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_INSULT:
{
act = "insult %s.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -1235,7 +1245,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_MOAN:
{
act = "moan at %s.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -1243,7 +1253,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBM_SHOW:
{
act = "sing to %s.";
- touched = FALSE;
+ touched = false;
t_ptr->csleep = 0;
break;
}
@@ -1305,7 +1315,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
case RBE_EAT_GOLD:
{
pt = damage = 0;
- if (randint(2) == 1) blinked = TRUE;
+ if (randint(2) == 1) blinked = true;
break;
}
@@ -1417,7 +1427,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
if (t_ptr->ml)
{
- blinked = FALSE;
+ blinked = false;
msg_format("You are suddenly very hot!");
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
@@ -1432,7 +1442,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
{
if (t_ptr->ml)
{
- blinked = FALSE;
+ blinked = false;
msg_format("You get zapped!");
}
project(m_idx, 0, p_ptr->py, p_ptr->px,
@@ -1493,7 +1503,7 @@ static void incarnate_monster_attack(s16b m_idx, bool_ *fear, bool_ *mdeath,
static void flavored_attack(int percent, char *output)
{
int insanity = (p_ptr->msane - p_ptr->csane) * 100 / p_ptr->msane;
- bool_ insane = (rand_int(100) < insanity);
+ bool insane = (rand_int(100) < insanity);
if (percent < 5)
{
@@ -1614,7 +1624,7 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
martial_arts *blow_table = ma_blows;
int resist_stun = 0;
int max = MAX_MA;
- bool_ desc = FALSE;
+ bool desc = false;
int plev = p_ptr->lev;
if ((!p_ptr->body_monster) && (p_ptr->mimic_form == resolve_mimic_name("Bear")) &&
@@ -1686,14 +1696,14 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
}
else if (!desc) msg_format(ma_ptr->desc, m_name);
- desc = TRUE;
+ desc = true;
}
if (ma_ptr->effect & MA_FULL_SLOW)
{
special_effect = MA_SLOW;
if (!desc) msg_format(ma_ptr->desc, m_name);
- desc = TRUE;
+ desc = true;
}
if (ma_ptr->effect & MA_SLOW)
{
@@ -1706,7 +1716,7 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
}
else if (!desc) msg_format(ma_ptr->desc, m_name);
- desc = TRUE;
+ desc = true;
}
if (ma_ptr->effect & MA_STUN)
{
@@ -1716,7 +1726,7 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
}
if (!desc) msg_format(ma_ptr->desc, m_name);
- desc = TRUE;
+ desc = true;
}
if (ma_ptr->effect & MA_WOUND)
{
@@ -1725,10 +1735,10 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
*special |= SPEC_CUT;
}
if (!desc) msg_format(ma_ptr->desc, m_name);
- desc = TRUE;
+ desc = true;
}
- bool_ done_crit;
+ bool done_crit;
*k = critical_norm(plev * (randint(10)), ma_ptr->min_level, *k, -1, &done_crit);
if ((special_effect & MA_KNEE) && ((*k + p_ptr->to_d) < m_ptr->hp))
@@ -1769,13 +1779,13 @@ static void py_attack_hand(int *k, monster_type *m_ptr, s32b *special)
static void do_nazgul(int *k, int *num, int num_blow, int weap, std::shared_ptr<monster_race> r_ptr,
object_type *o_ptr)
{
- bool_ allow_shatter = TRUE;
+ bool allow_shatter = true;
/* Extract mundane-ness of the current weapon */
auto const f = object_flags(o_ptr);
/* It should be Slay Evil, Slay Undead, or *Slay Undead* */
- bool_ const mundane =
+ bool const mundane =
!(f & TR_SLAY_EVIL) &&
!(f & TR_SLAY_UNDEAD) &&
!(f & TR_KILL_UNDEAD);
@@ -1783,7 +1793,7 @@ static void do_nazgul(int *k, int *num, int num_blow, int weap, std::shared_ptr<
/* Some blades can resist shattering */
if (f & TR_RES_MORGUL)
{
- allow_shatter = FALSE;
+ allow_shatter = false;
}
/* Mega Hack -- Hitting Nazgul is REALY dangerous (ideas from Akhronath) */
@@ -1850,7 +1860,7 @@ static void do_nazgul(int *k, int *num, int num_blow, int weap, std::shared_ptr<
msg_print("Your foe calls upon your soul!");
msg_print
("You feel the Black Breath slowly draining you of life...");
- p_ptr->black_breath = TRUE;
+ p_ptr->black_breath = true;
}
}
}
@@ -1874,23 +1884,23 @@ void py_attack(int y, int x, int max_blow)
monster_type *m_ptr = &m_list[c_ptr->m_idx];
- bool_ fear = FALSE;
+ bool fear = false;
- bool_ mdeath = FALSE;
+ bool mdeath = false;
- bool_ backstab = FALSE;
+ bool backstab = false;
- bool_ vorpal_cut = FALSE;
+ bool vorpal_cut = false;
int chaos_effect = 0;
- bool_ stab_fleeing = FALSE;
+ bool stab_fleeing = false;
- bool_ do_quake = FALSE;
+ bool do_quake = false;
- bool_ done_crit = FALSE;
+ bool done_crit = false;
- bool_ drain_msg = TRUE;
+ bool drain_msg = true;
int drain_result = 0, drain_heal = 0;
@@ -1912,11 +1922,11 @@ void py_attack(int y, int x, int max_blow)
if ((m_ptr->csleep) && (m_ptr->ml))
{
/* Can't backstab creatures that we can't see, right? */
- backstab = TRUE;
+ backstab = true;
}
else if ((m_ptr->monfear) && (m_ptr->ml))
{
- stab_fleeing = TRUE;
+ stab_fleeing = true;
}
}
@@ -1979,7 +1989,7 @@ void py_attack(int y, int x, int max_blow)
(!r_info[p_ptr->body_monster].body_parts[BODY_WEAPON]) &&
!(p_ptr->melee_style == SKILL_HAND))
{
- incarnate_monster_attack(c_ptr->m_idx, &fear, &mdeath, y, x);
+ incarnate_monster_attack(c_ptr->m_idx, y, x);
}
/* Otherwise use your weapon(s) */
else
@@ -2070,9 +2080,9 @@ void py_attack(int y, int x, int max_blow)
}
if ((flags & TR_VORPAL) && (randint(6) == 1))
- vorpal_cut = TRUE;
+ vorpal_cut = true;
else
- vorpal_cut = FALSE;
+ vorpal_cut = false;
/* Should we attack with hands or not ? */
if (p_ptr->melee_style != SKILL_MASTERY)
@@ -2080,7 +2090,7 @@ void py_attack(int y, int x, int max_blow)
py_attack_hand(&k, m_ptr, &special);
}
/* Handle normal weapon */
- else if (o_ptr->k_idx)
+ else if (o_ptr->k_ptr)
{
k = damroll(o_ptr->dd, o_ptr->ds);
k = tot_dam_aux(o_ptr, k, m_ptr, &special);
@@ -2100,7 +2110,7 @@ void py_attack(int y, int x, int max_blow)
if ((p_ptr->impact && ((k > 50) || randint(7) == 1))
|| (chaos_effect == 2))
{
- do_quake = TRUE;
+ do_quake = true;
}
k = critical_norm(o_ptr->weight, o_ptr->to_h, k, o_ptr->tval, &done_crit);
@@ -2159,7 +2169,7 @@ void py_attack(int y, int x, int max_blow)
project(0, p_ptr->tim_project_rad, y, x, p_ptr->tim_project_dam, p_ptr->tim_project_gf, p_ptr->tim_project_flag | PROJECT_JUMP);
if (!c_ptr->m_idx)
{
- mdeath = TRUE;
+ mdeath = true;
break;
}
}
@@ -2190,7 +2200,7 @@ void py_attack(int y, int x, int max_blow)
{
msg_format("Oh no! Your weapon clones %^s!",
m_name);
- multiply_monster(c_ptr->m_idx, FALSE, TRUE);
+ multiply_monster(c_ptr->m_idx, false, true);
}
/* Apply the player damage bonuses */
@@ -2223,7 +2233,7 @@ void py_attack(int y, int x, int max_blow)
monster_race_desc(buf, m_ptr->r_idx, m_ptr->ego);
- backstab = FALSE;
+ backstab = false;
msg_format
("You cruelly stab the helpless, sleeping %s!",
@@ -2258,7 +2268,7 @@ void py_attack(int y, int x, int max_blow)
{
energy_use = energy_use * num / num_blow;
}
- mdeath = TRUE;
+ mdeath = true;
break;
}
@@ -2309,7 +2319,7 @@ void py_attack(int y, int x, int max_blow)
msg_format
("Your weapon drains life from %s!",
m_name);
- drain_msg = FALSE;
+ drain_msg = false;
}
hp_player(drain_heal);
@@ -2324,7 +2334,7 @@ void py_attack(int y, int x, int max_blow)
/* Cancel glowing hands */
if (p_ptr->confusing)
{
- p_ptr->confusing = FALSE;
+ p_ptr->confusing = false;
msg_print("Your hands stop glowing.");
}
@@ -2374,7 +2384,7 @@ void py_attack(int y, int x, int max_blow)
/* Hack -- Get new race */
r_ptr = m_ptr->race();
- fear = FALSE;
+ fear = false;
}
else
{
@@ -2391,7 +2401,7 @@ void py_attack(int y, int x, int max_blow)
/* Player misses */
else
{
- backstab = FALSE; /* Clumsy! */
+ backstab = false; /* Clumsy! */
/* Message */
msg_format("You miss %s.", m_name);
@@ -2407,7 +2417,9 @@ void py_attack(int y, int x, int max_blow)
/* Carried monster can attack too */
if ((!mdeath) && m_list[c_ptr->m_idx].hp)
- carried_monster_attack(c_ptr->m_idx, &fear, &mdeath, y, x);
+ {
+ carried_monster_attack(c_ptr->m_idx, y, x);
+ }
/* Hack -- delay fear messages */
if (fear && m_ptr->ml)
@@ -2427,27 +2439,16 @@ void py_attack(int y, int x, int max_blow)
-bool_ player_can_enter(byte feature)
+bool player_can_enter(byte feature)
{
auto const &r_info = game->edit_data.r_info;
auto const &f_info = game->edit_data.f_info;
- bool_ pass_wall;
-
- bool_ only_wall = FALSE;
-
-
/* Player can not walk through "walls" unless in Shadow Form */
- if (p_ptr->wraith_form || (race_flags_p(PR_SEMI_WRAITH)))
- pass_wall = TRUE;
- else
- pass_wall = FALSE;
+ auto const pass_wall = (p_ptr->wraith_form || (race_flags_p(PR_SEMI_WRAITH)));
/* Wall mimicry force the player to stay in walls */
- if (p_ptr->mimic_extra & CLASS_WALL)
- {
- only_wall = TRUE;
- }
+ auto const only_wall = (p_ptr->mimic_extra & CLASS_WALL);
/* Don't let the player kill himself with one keystroke */
if (p_ptr->wild_mode)
@@ -2457,7 +2458,9 @@ bool_ player_can_enter(byte feature)
int wt = weight_limit() / 2;
if ((calc_total_weight() >= wt) && !(p_ptr->ffall))
- return (FALSE);
+ {
+ return false;
+ }
}
else if (feature == FEAT_SHAL_LAVA ||
feature == FEAT_DEEP_LAVA)
@@ -2466,7 +2469,9 @@ bool_ player_can_enter(byte feature)
p_ptr->immune_fire ||
p_ptr->oppose_fire ||
p_ptr->ffall))
- return (FALSE);
+ {
+ return false;
+ }
}
}
@@ -2477,44 +2482,60 @@ bool_ player_can_enter(byte feature)
p_ptr->has_ability(AB_TREE_WALK) ||
(p_ptr->mimic_form == resolve_mimic_name("Ent")) ||
((p_ptr->grace >= 9000) && praying_to(GOD_YAVANNA)))
- return (TRUE);
+ {
+ return true;
+ }
}
if ((p_ptr->climb) && (f_info[feature].flags & FF_CAN_CLIMB))
- return (TRUE);
+ {
+ return true;
+ }
if ((p_ptr->fly) &&
((f_info[feature].flags & FF_CAN_FLY) ||
(f_info[feature].flags & FF_CAN_LEVITATE)))
- return (TRUE);
+ {
+ return true;
+ }
else if (only_wall && (f_info[feature].flags & FF_FLOOR))
- return (FALSE);
+ {
+ return false;
+ }
else if ((p_ptr->ffall) &&
(f_info[feature].flags & FF_CAN_LEVITATE))
- return (TRUE);
+ {
+ return true;
+ }
else if ((pass_wall || only_wall) &&
(f_info[feature].flags & FF_CAN_PASS))
- return (TRUE);
+ {
+ return true;
+ }
else if (f_info[feature].flags & FF_NO_WALK)
- return (FALSE);
+ {
+ return false;
+ }
else if ((f_info[feature].flags & FF_WEB) &&
((!(r_info[p_ptr->body_monster].flags & RF_SPIDER)) && (p_ptr->mimic_form != resolve_mimic_name("Spider"))))
- return (FALSE);
+ {
+ return false;
+ }
- return (TRUE);
+ return true;
}
/*
* easy_open_door --
*
* If there is a jammed/closed/locked door at the given location,
- * then attempt to unlock/open it. Return TRUE if an attempt was
- * made (successful or not), otherwise return FALSE.
+ * then attempt to unlock/open it. Return true if an attempt was
+ * made (successful or not), otherwise return false.
*
* The code here should be nearly identical to that in
* do_cmd_open_test() and do_cmd_open_aux().
*/
-static bool_ easy_open_door(int y, int x)
+static bool easy_open_door(int y, int x)
{
auto const &r_info = game->edit_data.r_info;
@@ -2529,14 +2550,14 @@ static bool_ easy_open_door(int y, int x)
{
msg_print("You cannot open doors.");
- return (FALSE);
+ return false;
}
/* Must be a closed door */
if (!((c_ptr->feat >= FEAT_DOOR_HEAD) && (c_ptr->feat <= FEAT_DOOR_TAIL)))
{
/* Nope */
- return (FALSE);
+ return false;
}
/* Jammed door */
@@ -2603,7 +2624,7 @@ static bool_ easy_open_door(int y, int x)
}
/* Result */
- return (TRUE);
+ return true;
}
/*
@@ -2631,7 +2652,7 @@ void move_player_aux(int dir, int do_pickup, int run)
char m_name[80];
- bool_ oktomove = TRUE;
+ bool oktomove = true;
/* Hack - random movement */
@@ -2706,7 +2727,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_x--;
p_ptr->oldpy = cur_hgt - 2;
p_ptr->oldpx = cur_wid - 2;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if ((y == 0) && (x == MAX_WID - 1))
@@ -2715,7 +2736,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_x++;
p_ptr->oldpy = cur_hgt - 2;
p_ptr->oldpx = 1;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if ((y == MAX_HGT - 1) && (x == 0))
@@ -2724,7 +2745,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_x--;
p_ptr->oldpy = 1;
p_ptr->oldpx = cur_wid - 2;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if ((y == MAX_HGT - 1) && (x == MAX_WID - 1))
@@ -2733,7 +2754,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_x++;
p_ptr->oldpy = 1;
p_ptr->oldpx = 1;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (y == 0)
@@ -2741,7 +2762,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_y--;
p_ptr->oldpy = cur_hgt - 2;
p_ptr->oldpx = x;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (y == cur_hgt - 1)
@@ -2749,7 +2770,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_y++;
p_ptr->oldpy = 1;
p_ptr->oldpx = x;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (x == 0)
@@ -2757,7 +2778,7 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_x--;
p_ptr->oldpx = cur_wid - 2;
p_ptr->oldpy = y;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (x == cur_wid - 1)
@@ -2765,10 +2786,10 @@ void move_player_aux(int dir, int do_pickup, int run)
p_ptr->wilderness_x++;
p_ptr->oldpx = 1;
p_ptr->oldpy = y;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
return;
}
@@ -2784,7 +2805,7 @@ void move_player_aux(int dir, int do_pickup, int run)
if (p_ptr->dripping_tread > 0)
{
- geomancy_random_floor(y, x, FALSE);
+ geomancy_random_floor(y, x, false);
p_ptr->dripping_tread -= 1;
if (p_ptr->dripping_tread == 0)
{
@@ -2833,13 +2854,13 @@ void move_player_aux(int dir, int do_pickup, int run)
m_ptr->fx = p_ptr->px;
cave[p_ptr->py][p_ptr->px].m_idx = c_ptr->m_idx;
c_ptr->m_idx = 0;
- update_mon(cave[p_ptr->py][p_ptr->px].m_idx, TRUE);
+ update_mon(cave[p_ptr->py][p_ptr->px].m_idx, true);
}
else
{
msg_format("%^s is in your way!", m_name);
energy_use = 0;
- oktomove = FALSE;
+ oktomove = false;
}
/* now continue on to 'movement' */
@@ -2847,7 +2868,7 @@ void move_player_aux(int dir, int do_pickup, int run)
else
{
py_attack(y, x, -1);
- oktomove = FALSE;
+ oktomove = false;
}
}
@@ -2855,20 +2876,20 @@ void move_player_aux(int dir, int do_pickup, int run)
{
msg_print("You can't cross the chasm.");
running = 0;
- oktomove = FALSE;
+ oktomove = false;
}
/* Player can't enter ? soo bad for him/her ... */
else if (!player_can_enter(c_ptr->feat))
{
- oktomove = FALSE;
+ oktomove = false;
/* Disturb the player */
disturb();
if (p_ptr->prob_travel)
{
- if (passwall(tmp, TRUE)) return;
+ if (passwall(tmp, true)) return;
}
/* Notice things in the dark */
@@ -3018,13 +3039,17 @@ void move_player_aux(int dir, int do_pickup, int run)
else if (cave[y][x].feat >= FEAT_ALTAR_HEAD &&
cave[y][x].feat <= FEAT_ALTAR_TAIL)
{
- cptr name = f_info[cave[y][x].feat].name;
- cptr pref = (is_a_vowel(name[0])) ? "an" : "a";
+ auto msg = fmt::format(
+ "You see {}.",
+ singular_prefix(f_info[cave[y][x].feat].name));
- msg_format("You see %s %s.", pref, name);
+ msg_print(msg);
/* Flush message while running */
- if (running) msg_print(NULL);
+ if (running)
+ {
+ msg_print(nullptr);
+ }
}
/* Execute the inscription */
@@ -3051,7 +3076,7 @@ void move_player_aux(int dir, int do_pickup, int run)
reveal_wilderness_around_player(p_ptr->py, p_ptr->px, 0, WILDERNESS_SEE_RADIUS);
/* Walking the wild isnt meaningfull */
- p_ptr->did_nothing = TRUE;
+ p_ptr->did_nothing = true;
}
}
@@ -3076,26 +3101,26 @@ static int see_obstacle_grid(cave_type *c_ptr)
case FEAT_DEEP_WATER:
case FEAT_ICE:
{
- if (p_ptr->ffall || p_ptr->fly) return (FALSE);
+ if (p_ptr->ffall || p_ptr->fly) return false;
}
/* Require immunity */
case FEAT_DEEP_LAVA:
case FEAT_SHAL_LAVA:
{
- if (p_ptr->invuln || p_ptr->immune_fire) return (FALSE);
+ if (p_ptr->invuln || p_ptr->immune_fire) return false;
}
}
/* "Safe" floor grids aren't obstacles */
- if (f_info[c_ptr->feat].flags & FF_CAN_RUN) return (FALSE);
+ if (f_info[c_ptr->feat].flags & FF_CAN_RUN) return false;
/* Must be known to the player */
- if (!(c_ptr->info & (CAVE_MARK))) return (FALSE);
+ if (!(c_ptr->info & (CAVE_MARK))) return false;
/* Default */
- return (TRUE);
+ return true;
}
@@ -3109,7 +3134,7 @@ static int see_obstacle(int dir, int y, int x)
x += ddx[dir];
/* Illegal grids are not known walls */
- if (!in_bounds2(y, x)) return (FALSE);
+ if (!in_bounds2(y, x)) return false;
/* Analyse the grid */
return (see_obstacle_grid(&cave[y][x]));
@@ -3126,19 +3151,19 @@ static int see_nothing(int dir, int y, int x)
x += ddx[dir];
/* Illegal grids are unknown */
- if (!in_bounds2(y, x)) return (TRUE);
+ if (!in_bounds2(y, x)) return true;
/* Memorized grids are always known */
- if (cave[y][x].info & (CAVE_MARK)) return (FALSE);
+ if (cave[y][x].info & (CAVE_MARK)) return false;
/* Non-floor grids are unknown */
- if (!cave_floor_bold(y, x)) return (TRUE);
+ if (!cave_floor_bold(y, x)) return true;
/* Viewable door/wall grids are known */
- if (player_can_see_bold(y, x)) return (FALSE);
+ if (player_can_see_bold(y, x)) return false;
/* Default */
- return (TRUE);
+ return true;
}
@@ -3299,13 +3324,13 @@ static byte find_prevdir;
/*
* We are looking for open area
*/
-static bool_ find_openarea;
+static bool find_openarea;
/*
* We are looking for a break
*/
-static bool_ find_breakright;
-static bool_ find_breakleft;
+static bool find_breakright;
+static bool find_breakleft;
@@ -3337,14 +3362,14 @@ static void run_init(int dir)
find_prevdir = dir;
/* Assume looking for open area */
- find_openarea = TRUE;
+ find_openarea = true;
/* Assume not looking for breaks */
- find_breakright = find_breakleft = FALSE;
+ find_breakright = find_breakleft = false;
/* Assume no nearby walls */
- deepleft = deepright = FALSE;
- shortright = shortleft = FALSE;
+ deepleft = deepright = false;
+ shortright = shortleft = false;
/* Find the destination grid */
row = p_ptr->py + ddy[dir];
@@ -3356,32 +3381,32 @@ static void run_init(int dir)
/* Check for walls */
if (see_obstacle(cycle[i + 1], p_ptr->py, p_ptr->px))
{
- find_breakleft = TRUE;
- shortleft = TRUE;
+ find_breakleft = true;
+ shortleft = true;
}
else if (see_obstacle(cycle[i + 1], row, col))
{
- find_breakleft = TRUE;
- deepleft = TRUE;
+ find_breakleft = true;
+ deepleft = true;
}
/* Check for walls */
if (see_obstacle(cycle[i - 1], p_ptr->py, p_ptr->px))
{
- find_breakright = TRUE;
- shortright = TRUE;
+ find_breakright = true;
+ shortright = true;
}
else if (see_obstacle(cycle[i - 1], row, col))
{
- find_breakright = TRUE;
- deepright = TRUE;
+ find_breakright = true;
+ deepright = true;
}
/* Looking for a break */
if (find_breakleft && find_breakright)
{
/* Not looking for open area */
- find_openarea = FALSE;
+ find_openarea = false;
/* Hack -- allow angled corridor entry */
if (dir & 0x01)
@@ -3415,9 +3440,9 @@ static void run_init(int dir)
/*
* Update the current "run" path
*
- * Return TRUE if the running should be stopped
+ * Return true if the running should be stopped
*/
-static bool_ run_test()
+static bool run_test()
{
auto const &f_info = game->edit_data.f_info;
@@ -3457,7 +3482,7 @@ static bool_ run_test()
monster_type *m_ptr = &m_list[c_ptr->m_idx];
/* Visible monster */
- if (m_ptr->ml) return (TRUE);
+ if (m_ptr->ml) return true;
}
/* Visible objects abort running */
@@ -3467,17 +3492,17 @@ static bool_ run_test()
object_type * o_ptr = &o_list[o_idx];
/* Visible object */
- if (o_ptr->marked) return (TRUE);
+ if (o_ptr->marked) return true;
}
/* Assume unknown */
- inv = TRUE;
+ inv = true;
/* Check memorized grids */
if (c_ptr->info & (CAVE_MARK))
{
- bool_ notice = TRUE;
+ bool notice = true;
/*
* Examine the terrain -- conditional disturbance
@@ -3489,7 +3514,7 @@ static bool_ run_test()
case FEAT_SHAL_LAVA:
{
/* Ignore */
- if (p_ptr->invuln || p_ptr->immune_fire) notice = FALSE;
+ if (p_ptr->invuln || p_ptr->immune_fire) notice = false;
/* Done */
break;
@@ -3499,7 +3524,7 @@ static bool_ run_test()
case FEAT_ICE:
{
/* Ignore */
- if (p_ptr->ffall || p_ptr->fly) notice = FALSE;
+ if (p_ptr->ffall || p_ptr->fly) notice = false;
/* Done */
break;
@@ -3510,7 +3535,7 @@ static bool_ run_test()
case FEAT_BROKEN:
{
/* Option -- ignore */
- if (options->find_ignore_doors) notice = FALSE;
+ if (options->find_ignore_doors) notice = false;
/* Done */
break;
@@ -3536,7 +3561,7 @@ static bool_ run_test()
case FEAT_BETWEEN2:
{
/* Option -- ignore */
- if (options->find_ignore_stairs) notice = FALSE;
+ if (options->find_ignore_stairs) notice = false;
/* Done */
break;
@@ -3546,14 +3571,14 @@ static bool_ run_test()
/* Check the "don't notice running" flag */
if (f_info[c_ptr->feat].flags & FF_DONT_NOTICE_RUNNING)
{
- notice = FALSE;
+ notice = false;
}
/* Interesting feature */
- if (notice) return (TRUE);
+ if (notice) return true;
/* The grid is "visible" */
- inv = FALSE;
+ inv = false;
}
/* Analyze unknown grids and floors */
@@ -3574,13 +3599,13 @@ static bool_ run_test()
/* Three new directions. Stop running. */
else if (option2)
{
- return (TRUE);
+ return true;
}
/* Two non-adjacent new directions. Stop running. */
else if (option != cycle[chome[prev_dir] + i - 1])
{
- return (TRUE);
+ return true;
}
/* Two new (adjacent) directions (case 1) */
@@ -3607,13 +3632,13 @@ static bool_ run_test()
if (i < 0)
{
/* Break to the right */
- find_breakright = TRUE;
+ find_breakright = true;
}
else if (i > 0)
{
/* Break to the left */
- find_breakleft = TRUE;
+ find_breakleft = true;
}
}
}
@@ -3640,7 +3665,7 @@ static bool_ run_test()
/* Looking to break right */
if (find_breakright)
{
- return (TRUE);
+ return true;
}
}
@@ -3650,7 +3675,7 @@ static bool_ run_test()
/* Looking to break left */
if (find_breakleft)
{
- return (TRUE);
+ return true;
}
}
}
@@ -3672,7 +3697,7 @@ static bool_ run_test()
/* Looking to break left */
if (find_breakleft)
{
- return (TRUE);
+ return true;
}
}
@@ -3682,7 +3707,7 @@ static bool_ run_test()
/* Looking to break right */
if (find_breakright)
{
- return (TRUE);
+ return true;
}
}
}
@@ -3695,7 +3720,7 @@ static bool_ run_test()
/* No options */
if (!option)
{
- return (TRUE);
+ return true;
}
/* One option */
@@ -3742,7 +3767,7 @@ static bool_ run_test()
/* STOP: we are next to an intersection or a room */
else
{
- return (TRUE);
+ return true;
}
}
@@ -3767,12 +3792,12 @@ static bool_ run_test()
/* About to hit a known wall, stop */
if (see_obstacle(find_current, p_ptr->py, p_ptr->px))
{
- return (TRUE);
+ return true;
}
/* Failure */
- return (FALSE);
+ return false;
}
@@ -3847,7 +3872,7 @@ void do_cmd_pet()
char power_desc[36][80];
- bool_ flag;
+ bool flag;
int ask;
@@ -3857,7 +3882,7 @@ void do_cmd_pet()
int pets = 0, pet_ctr = 0;
- bool_ all_pets = FALSE;
+ bool all_pets = false;
monster_type *m_ptr;
@@ -3924,7 +3949,7 @@ void do_cmd_pet()
}
/* Nothing chosen yet */
- flag = FALSE;
+ flag = false;
/* Build a prompt (accept all spells) */
if (num <= 26)
@@ -3942,7 +3967,7 @@ void do_cmd_pet()
}
/* Save the screen */
- character_icky = TRUE;
+ character_icky = true;
Term_save();
/* Show the list */
@@ -3993,7 +4018,7 @@ void do_cmd_pet()
}
else
{
- ask = FALSE; /* Can't uppercase digits */
+ ask = false; /* Can't uppercase digits */
i = choice - '0' + 26;
}
@@ -4018,12 +4043,12 @@ void do_cmd_pet()
}
/* Stop the loop */
- flag = TRUE;
+ flag = true;
}
/* Restore the screen */
Term_load();
- character_icky = FALSE;
+ character_icky = false;
/* Abort if needed */
if (!flag)
@@ -4094,7 +4119,7 @@ void do_cmd_pet()
{
int Dismissed = 0;
- if (get_check("Dismiss all pets? ")) all_pets = TRUE;
+ if (get_check("Dismiss all pets? ")) all_pets = true;
/* Process the monsters (backwards) */
for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
@@ -4105,13 +4130,13 @@ void do_cmd_pet()
if ((!(r_ptr->flags & RF_NO_DEATH)) && ((m_ptr->status == MSTATUS_PET) || (m_ptr->status == MSTATUS_FRIEND))) /* Get rid of it! */
{
- bool_ checked = FALSE;
+ bool checked = false;
char command;
- bool_ delete_this = FALSE;
+ bool delete_this = false;
if (all_pets)
{
- delete_this = TRUE;
+ delete_this = true;
}
else
{
@@ -4124,19 +4149,19 @@ void do_cmd_pet()
if (!get_com(check_friend, &command))
{
/* get out of loop */
- checked = TRUE;
+ checked = true;
pet_ctr = 0;
}
else switch (command)
{
case 'Y':
case 'y':
- delete_this = TRUE;
- checked = TRUE;
+ delete_this = true;
+ checked = true;
break;
case 'n':
case 'N':
- checked = TRUE;
+ checked = true;
break;
default:
bell();
@@ -4161,7 +4186,7 @@ void do_cmd_pet()
{
int Dismissed = 0;
- if (get_check("Dismiss all companions? ")) all_pets = TRUE;
+ if (get_check("Dismiss all companions? ")) all_pets = true;
/* Process the monsters (backwards) */
for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
@@ -4172,10 +4197,10 @@ void do_cmd_pet()
if ((!(r_ptr->flags & RF_NO_DEATH)) && ((m_ptr->status == MSTATUS_COMPANION))) /* Get rid of it! */
{
- bool_ delete_this = FALSE;
+ bool delete_this = false;
if (all_pets)
- delete_this = TRUE;
+ delete_this = true;
else
{
char friend_name[80], check_friend[80];
@@ -4183,7 +4208,7 @@ void do_cmd_pet()
strnfmt(check_friend, 80, "Dismiss %s? ", friend_name);
if (get_check(check_friend))
- delete_this = TRUE;
+ delete_this = true;
}
if (delete_this)
@@ -4285,38 +4310,32 @@ void do_cmd_integrate_body()
floor_item_optimize(0 - item);
msg_print("Your spirit is incarnated in your new body.");
- p_ptr->wraith_form = FALSE;
- p_ptr->disembodied = FALSE;
+ p_ptr->wraith_form = false;
+ p_ptr->disembodied = false;
do_cmd_redraw();
}
/*
* Leave a body
*/
-bool_ do_cmd_leave_body(bool_ drop_body)
+void do_cmd_leave_body(bool drop_body)
{
auto const &r_info = game->edit_data.r_info;
- object_type *o_ptr, forge;
-
- auto r_ptr = &r_info[p_ptr->body_monster];
-
- int i;
-
-
if (p_ptr->disembodied)
{
msg_print("You are already disembodied.");
- return FALSE;
+ return;
}
- for (i = INVEN_WIELD; i < INVEN_TOTAL; i++)
+ for (int i = INVEN_WIELD; i < INVEN_TOTAL; i++)
{
- if (p_ptr->body_parts[i - INVEN_WIELD] && p_ptr->inventory[i].k_idx &&
- cursed_p(&p_ptr->inventory[i]))
+ if (p_ptr->body_parts[i - INVEN_WIELD] &&
+ p_ptr->inventory[i].k_ptr &&
+ cursed_p(&p_ptr->inventory[i]))
{
msg_print("A cursed object is preventing you from leaving your body.");
- return FALSE;
+ return;
}
}
@@ -4324,7 +4343,10 @@ bool_ do_cmd_leave_body(bool_ drop_body)
{
if (magik(25 + get_skill_scale(SKILL_POSSESSION, 25) + get_skill(SKILL_PRESERVATION)))
{
- o_ptr = &forge;
+ auto r_ptr = &r_info[p_ptr->body_monster];
+
+ object_type forge;
+ auto o_ptr = &forge;
object_prep(o_ptr, lookup_kind(TV_CORPSE, SV_CORPSE_CORPSE));
o_ptr->number = 1;
o_ptr->pval = 0;
@@ -4333,7 +4355,6 @@ bool_ do_cmd_leave_body(bool_ drop_body)
o_ptr->weight = (r_ptr->weight + rand_int(r_ptr->weight) / 10) + 1;
object_aware(o_ptr);
object_known(o_ptr);
- o_ptr->ident |= IDENT_STOREB;
/* Unique corpses are unique */
if (r_ptr->flags & RF_UNIQUE)
@@ -4349,24 +4370,24 @@ bool_ do_cmd_leave_body(bool_ drop_body)
}
msg_print("Your spirit leaves your body.");
- p_ptr->disembodied = TRUE;
+ p_ptr->disembodied = true;
/* Turn into a lost soul(just for the picture) */
p_ptr->body_monster = test_monster_name("Lost soul");
do_cmd_redraw();
-
- return (TRUE);
}
-bool_ execute_inscription(byte i, byte y, byte x)
+bool execute_inscription(byte i, byte y, byte x)
{
cave_type *c_ptr = &cave[y][x];
/* Not enough mana in the current grid */
- if (c_ptr->mana < inscription_info[i].mana) return (TRUE);
-
+ if (c_ptr->mana < inscription_info[i].mana)
+ {
+ return true;
+ }
/* Reduce the grid mana -- note: it can't be restored */
c_ptr->mana -= inscription_info[i].mana;
@@ -4402,9 +4423,7 @@ bool_ execute_inscription(byte i, byte y, byte x)
case INSCRIP_PROTECTION:
{
- return (FALSE);
-
- break;
+ return false;
}
case INSCRIP_DWARF_SUMMON:
@@ -4413,7 +4432,7 @@ bool_ execute_inscription(byte i, byte y, byte x)
scatter(&yy, &xx, y, x, 3);
place_monster_one(yy, xx, test_monster_name("Dwarven Warrior"),
- 0, FALSE, MSTATUS_FRIEND);
+ 0, false, MSTATUS_FRIEND);
break;
}
@@ -4454,19 +4473,19 @@ bool_ execute_inscription(byte i, byte y, byte x)
/* Scan all objects in the grid */
for (auto const this_o_idx: object_idxs)
{
- bool_ plural = FALSE;
+ bool plural = false;
char o_name[80];
/* Acquire object */
object_type * o_ptr = &o_list[this_o_idx];
- if (o_ptr->number > 1) plural = TRUE;
+ if (o_ptr->number > 1) plural = true;
/* Effect "observed" */
if (o_ptr->marked)
{
- object_desc(o_name, o_ptr, FALSE, 0);
+ object_desc(o_name, o_ptr, false, 0);
}
/* Artifacts get to resist */
@@ -4506,7 +4525,7 @@ bool_ execute_inscription(byte i, byte y, byte x)
}
}
- return (TRUE);
+ return true;
}
@@ -4528,7 +4547,7 @@ void do_cmd_engrave()
for (i = 0; i < MAX_INSCRIPTIONS; i++)
{
- if (!strcmp(inscription_info[i].text, buf))
+ if (equals(inscription_info[i].text, buf))
{
if (p_ptr->inscriptions[i])
{
diff --git a/src/cmd1.hpp b/src/cmd1.hpp
index 19b40ebf..263cad38 100644
--- a/src/cmd1.hpp
+++ b/src/cmd1.hpp
@@ -1,25 +1,25 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
#include "monster_type_fwd.hpp"
#include "object_type_fwd.hpp"
void attack_special(monster_type *m_ptr, s32b special, int dam);
-bool_ test_hit_fire(int chance, int ac, int vis);
-bool_ test_hit_norm(int chance, int ac, int vis);
+bool test_hit_fire(int chance, int ac, int vis);
+bool test_hit_norm(int chance, int ac, int vis);
s16b critical_shot(int weight, int plus, int dam, int skill);
-s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool_ *done_crit);
+s16b critical_norm(int weight, int plus, int dam, int weapon_tval, bool *done_crit);
s16b tot_dam_aux(object_type *o_ptr, int tdam, monster_type *m_ptr, s32b *special);
void search();
void carry(int pickup);
void py_attack(int y, int x, int max_blow);
-bool_ player_can_enter(byte feature);
+bool player_can_enter(byte feature);
void move_player(int dir, int do_pickup);
void move_player_aux(int dir, int do_pickup, int run);
void run_step(int dir);
void do_cmd_pet();
void do_cmd_integrate_body();
-bool_ do_cmd_leave_body(bool_ drop_body);
-bool_ execute_inscription(byte i, byte y, byte x);
+void do_cmd_leave_body(bool drop_body);
+bool execute_inscription(byte i, byte y, byte x);
void do_cmd_engrave();
void do_spin();
diff --git a/src/cmd2.cc b/src/cmd2.cc
index a348c221..c57fcb2e 100644
--- a/src/cmd2.cc
+++ b/src/cmd2.cc
@@ -12,6 +12,7 @@
#include "cave.hpp"
#include "cave_type.hpp"
#include "cmd1.hpp"
+#include "cmd5.hpp"
#include "dungeon_info_type.hpp"
#include "dungeon_flag.hpp"
#include "feature_flag.hpp"
@@ -45,16 +46,17 @@
#include "stats.hpp"
#include "tables.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
#include "wilderness_map.hpp"
#include "wilderness_type_info.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
+#include "z-term.hpp"
#include <chrono>
+#include <fmt/format.h>
#include <thread>
using std::this_thread::sleep_for;
@@ -65,23 +67,23 @@ void do_cmd_immovable_special();
/*
* Try to bash an altar
*/
-static bool_ do_cmd_bash_altar(int y, int x)
+static bool do_cmd_bash_altar(int y, int x)
{
msg_print("Are you mad? You want to anger the gods?");
- return (FALSE);
+ return false;
}
/*
* Try to bash a fountain
*/
-static bool_ do_cmd_bash_fountain(int y, int x)
+static bool do_cmd_bash_fountain(int y, int x)
{
auto const &r_info = game->edit_data.r_info;
int bash, temp;
- bool_ more = TRUE;
+ bool more = true;
auto r_ptr = &r_info[p_ptr->body_monster];
@@ -90,7 +92,7 @@ static bool_ do_cmd_bash_fountain(int y, int x)
{
msg_print("You cannot do that.");
- return (FALSE);
+ return false;
}
/* Take a turn */
@@ -118,7 +120,7 @@ static bool_ do_cmd_bash_fountain(int y, int x)
fire_ball(GF_WATER, 5, damroll(6, 8), 2);
cave_set_feat(y, x, FEAT_DEEP_WATER);
- more = FALSE;
+ more = false;
}
return (more);
@@ -127,10 +129,10 @@ static bool_ do_cmd_bash_fountain(int y, int x)
/*
* Stair hooks
*/
-static bool_ stair_hooks(stairs_direction direction)
+static bool stair_hooks(stairs_direction direction)
{
hook_stair_in in = { direction };
- hook_stair_out out = { TRUE }; /* Allow by default */
+ hook_stair_out out = { true }; /* Allow by default */
process_hooks_new(HOOK_STAIR, &in, &out);
return (!out.allow);
}
@@ -165,8 +167,9 @@ static bool ask_leave()
void do_cmd_go_up()
{
auto const &d_info = game->edit_data.d_info;
+ auto const &dungeon_flags = game->dungeon_flags;
- bool_ go_up = FALSE, go_up_many = FALSE, prob_traveling = FALSE;
+ bool go_up = false, go_up_many = false, prob_traveling = false;
cave_type *c_ptr;
@@ -189,7 +192,7 @@ void do_cmd_go_up()
{
if (!dun_level)
{
- go_up = TRUE;
+ go_up = true;
}
else if (dungeon_flags & DF_ASK_LEAVE)
{
@@ -197,7 +200,7 @@ void do_cmd_go_up()
}
else if (ask_leave())
{
- go_up = TRUE;
+ go_up = true;
}
}
@@ -206,7 +209,7 @@ void do_cmd_go_up()
{
if (dun_level == 1)
{
- go_up = TRUE;
+ go_up = true;
}
else if (dungeon_flags & DF_ASK_LEAVE)
{
@@ -214,7 +217,7 @@ void do_cmd_go_up()
}
else if (ask_leave())
{
- go_up_many = TRUE;
+ go_up_many = true;
}
}
@@ -231,7 +234,7 @@ void do_cmd_go_up()
dun_level = 0;
p_ptr->oldpx = 0;
p_ptr->oldpy = 0;
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
return;
}
@@ -248,11 +251,11 @@ void do_cmd_go_up()
return;
}
- prob_traveling = TRUE;
+ prob_traveling = true;
if (ask_leave())
{
- go_up = TRUE;
+ go_up = true;
}
}
else
@@ -284,9 +287,9 @@ void do_cmd_go_up()
/* Create a way back */
if (go_up_many)
- create_down_shaft = TRUE;
+ create_down_shaft = true;
else
- create_down_stair = TRUE;
+ create_down_stair = true;
/* New depth */
if (go_up)
@@ -306,15 +309,15 @@ void do_cmd_go_up()
}
/* Leaving */
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
}
}
/*
- * Returns TRUE if we are in the Between...
+ * Returns true if we are in the Between...
*/
-static bool_ between_effect()
+static bool between_effect()
{
byte bx, by;
@@ -333,26 +336,26 @@ static bool_ between_effect()
/* To avoid being teleported back */
energy_use = 100;
- return (TRUE);
+ return true;
}
else if (cave[p_ptr->py][p_ptr->px].feat == FEAT_BETWEEN2)
{
between_exit *be_ptr = &between_exits[cave[p_ptr->py][p_ptr->px].special];
- p_ptr->wild_mode = FALSE;
+ p_ptr->wild_mode = false;
p_ptr->wilderness_x = be_ptr->wild_x;
p_ptr->wilderness_y = be_ptr->wild_y;
p_ptr->oldpx = p_ptr->px = be_ptr->px;
p_ptr->oldpy = p_ptr->py = be_ptr->py;
dungeon_type = be_ptr->d_idx;
dun_level = be_ptr->level;
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
- return (TRUE);
+ return true;
}
else
- return (FALSE);
+ return false;
}
/*
@@ -361,10 +364,11 @@ static bool_ between_effect()
void do_cmd_go_down()
{
auto const &d_info = game->edit_data.d_info;
+ auto const &dungeon_flags = game->dungeon_flags;
cave_type *c_ptr;
- bool_ go_down = FALSE, go_down_many = FALSE, prob_traveling = FALSE;
+ bool go_down = false, go_down_many = false, prob_traveling = false;
char i;
@@ -402,7 +406,7 @@ void do_cmd_go_down()
{
if (!dun_level)
{
- go_down = TRUE;
+ go_down = true;
/* Save old player position */
p_ptr->oldpx = p_ptr->px;
@@ -412,7 +416,7 @@ void do_cmd_go_down()
{
if (ask_leave())
{
- go_down_many = TRUE;
+ go_down_many = true;
}
}
}
@@ -426,7 +430,7 @@ void do_cmd_go_down()
}
if (!dun_level)
{
- go_down = TRUE;
+ go_down = true;
/* Save old player position */
p_ptr->oldpx = p_ptr->px;
@@ -436,7 +440,7 @@ void do_cmd_go_down()
{
if (ask_leave())
{
- go_down = TRUE;
+ go_down = true;
}
}
}
@@ -461,11 +465,11 @@ void do_cmd_go_down()
return;
}
- prob_traveling = TRUE;
+ prob_traveling = true;
if (ask_leave())
{
- go_down = TRUE;
+ go_down = true;
}
}
@@ -551,221 +555,23 @@ void do_cmd_go_down()
}
/* Leaving */
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
}
}
/*
- * Determine if a grid contains a chest
+ * Return true if the given grid is an open door
*/
-static s16b chest_check(int y, int x)
-{
- cave_type *c_ptr = &cave[y][x];
-
- /* Scan all objects in the grid */
- for (auto const this_o_idx: c_ptr->o_idxs)
- {
- object_type * o_ptr;
-
- /* Acquire object */
- o_ptr = &o_list[this_o_idx];
-
- /* Skip unknown chests XXX XXX */
- /* if (!o_ptr->marked) continue; */
-
- /* Check for chest */
- if (o_ptr->tval == TV_CHEST) return (this_o_idx);
- }
-
- /* No chest */
- return (0);
-}
-
-
-/*
- * Allocates objects upon opening a chest -BEN-
- *
- * Disperse treasures from the given chest, centered at (x,y).
- *
- * Small chests often contain "gold", while Large chests always contain
- * items. Wooden chests contain 2 items, Iron chests contain 4 items,
- * and Steel chests contain 6 items. The "value" of the items in a
- * chest is based on the "power" of the chest, which is in turn based
- * on the level on which the chest is generated.
- */
-static void chest_death(int y, int x, s16b o_idx)
-{
- auto const &d_info = game->edit_data.d_info;
-
- int number;
-
- bool_ small;
-
- object_type forge;
- object_type *q_ptr;
-
- object_type *o_ptr = &o_list[o_idx];
-
-
- /* Small chests often hold "gold" */
- small = (o_ptr->sval < SV_CHEST_MIN_LARGE);
-
- /* Determine how much to drop (see above) */
- number = (o_ptr->sval % SV_CHEST_MIN_LARGE) * 2;
-
- /* Zero pval means empty chest */
- if (!o_ptr->pval) number = 0;
-
- /* Opening a chest */
- opening_chest = TRUE;
-
- /* Determine the "value" of the items */
- object_level = ABS(o_ptr->pval) + 10;
-
- /* Drop some objects (non-chests) */
- for (; number > 0; --number)
- {
- /* Get local object */
- q_ptr = &forge;
-
- /* Wipe the object */
- object_wipe(q_ptr);
-
- /* Small chests often drop gold */
- if (small && (rand_int(100) < 75))
- {
- /* Make some gold */
- if (!make_gold(q_ptr)) continue;
- }
-
- /* Otherwise drop an item */
- else
- {
- /* Make an object */
- if (!make_object(q_ptr, FALSE, FALSE, d_info[dungeon_type].objs))
- continue;
- }
-
- /* Drop it in the dungeon */
- drop_near(q_ptr, -1, y, x);
- }
-
- /* Reset the object level */
- object_level = dun_level;
-
- /* No longer opening a chest */
- opening_chest = FALSE;
-
- /* Empty */
- o_ptr->pval = 0;
- o_ptr->pval2 = 0;
-
- /* Known */
- object_known(o_ptr);
-}
-
-
-/*
- * Attempt to open the given chest at the given location
- *
- * Assume there is no monster blocking the destination
- *
- * Returns TRUE if repeated commands may continue
- */
-static bool_ do_cmd_open_chest(int y, int x, s16b o_idx)
-{
- auto const &r_info = game->edit_data.r_info;
-
- int i, j;
-
- bool_ flag = TRUE;
-
- bool_ more = FALSE;
-
- object_type *o_ptr = &o_list[o_idx];
-
- auto r_ptr = &r_info[p_ptr->body_monster];
-
-
- if ((p_ptr->body_monster != 0) && !(r_ptr->flags & RF_OPEN_DOOR))
- {
- msg_print("You cannot open chests.");
-
- return (FALSE);
- }
-
- /* Take a turn */
- energy_use = 100;
-
- /* Attempt to unlock it */
- if (o_ptr->pval > 0)
- {
- /* Assume locked, and thus not open */
- flag = FALSE;
-
- /* Get the "disarm" factor */
- i = 100;
-
- /* Penalize some conditions */
- if (p_ptr->blind || no_lite()) i = i / 10;
- if (p_ptr->confused || p_ptr->image) i = i / 10;
-
- /* Extract the difficulty */
- j = i - o_ptr->pval;
-
- /* Always have a small chance of success */
- if (j < 2) j = 2;
-
- /* Success -- May still have traps */
- if (rand_int(100) < j)
- {
- msg_print("You have picked the lock.");
- gain_exp(1);
- flag = TRUE;
- }
-
- /* Failure -- Keep trying */
- else
- {
- /* We may continue repeating */
- more = TRUE;
-
- flush_on_failure();
-
- msg_print("You failed to pick the lock.");
- }
- }
-
- /* Allowed to open */
- if (flag)
- {
- /* Let the Chest drop items */
- chest_death(y, x, o_idx);
- }
-
- /* Result */
- return (more);
-}
-
-
-/*
- * Original code by TNB, improvement for Angband 2.9.3 by rr9
- * Slightly modified for ToME because of its trap implementation
- */
-
-/*
- * Return TRUE if the given grid is an open door
- */
-static bool_ is_open(cave_type *c_ptr)
+static bool is_open(cave_type *c_ptr)
{
return (c_ptr->feat == FEAT_OPEN);
}
/*
- * Return TRUE if the given grid is a closed door
+ * Return true if the given grid is a closed door
*/
-static bool_ is_closed(cave_type *c_ptr)
+static bool is_closed(cave_type *c_ptr)
{
byte feat;
@@ -779,8 +585,8 @@ static bool_ is_closed(cave_type *c_ptr)
* Return the number of doors/traps around (or under)
* the character using the filter function 'test'
*/
-static int count_feats(int *y, int *x, bool_ (*test) (cave_type *c_ptr),
- bool_ under)
+static int count_feats(int *y, int *x, bool (*test) (cave_type *c_ptr),
+ bool under)
{
int d;
@@ -826,50 +632,6 @@ static int count_feats(int *y, int *x, bool_ (*test) (cave_type *c_ptr),
/*
- * Return the number of chests around (or under) the character.
- * If requested, count only trapped chests.
- */
-static int count_chests(int *y, int *x, bool_ trapped)
-{
- int d, count, o_idx;
-
- object_type *o_ptr;
-
-
- /* Count how many matches */
- count = 0;
-
- /* Check around (and under) the character */
- for (d = 0; d < 9; d++)
- {
-
- /* Extract adjacent (legal) location */
- int yy = p_ptr->py + ddy_ddd[d];
- int xx = p_ptr->px + ddx_ddd[d];
-
- /* No (visible) chest is there */
- if ((o_idx = chest_check(yy, xx)) == 0) continue;
-
- /* Grab the object */
- o_ptr = &o_list[o_idx];
-
- /* Already open */
- if (o_ptr->pval == 0) continue;
-
- /* OK */
- ++count;
-
- /* Remember the location. Only useful if only one match */
- *y = yy;
- *x = xx;
- }
-
- /* All done */
- return (count);
-}
-
-
-/*
* Convert an adjacent location to a direction.
*/
static int coords_to_dir(int y, int x)
@@ -900,9 +662,9 @@ static int coords_to_dir(int y, int x)
*
* Assume there is no monster blocking the destination
*
- * Returns TRUE if repeated commands may continue
+ * Returns true if repeated commands may continue
*/
-static bool_ do_cmd_open_aux(int y, int x, int dir)
+static bool do_cmd_open_aux(int y, int x)
{
auto const &r_info = game->edit_data.r_info;
@@ -910,7 +672,7 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
auto r_ptr = &r_info[p_ptr->body_monster];
@@ -919,7 +681,7 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
{
msg_print("You cannot open doors.");
- return (FALSE);
+ return false;
}
/* Take a turn */
@@ -980,7 +742,7 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
msg_print("You failed to pick the lock.");
/* We may keep trying */
- more = TRUE;
+ more = true;
}
}
@@ -999,6 +761,26 @@ static bool_ do_cmd_open_aux(int y, int x, int dir)
}
+/*
+ * Change a command "argument" to a number of repitions
+ */
+static void allow_repeat_command()
+{
+ // If there's a command argument, we set the number
+ // of repetitions instead.
+ if (command_arg)
+ {
+ /* Set repeat count */
+ command_rep = command_arg - 1;
+
+ /* Redraw the state */
+ p_ptr->redraw |= (PR_FRAME);
+
+ /* Cancel the arg */
+ command_arg = 0;
+ }
+}
+
/*
* Open a closed/locked/jammed door or a closed/locked chest.
@@ -1011,11 +793,9 @@ void do_cmd_open()
int y, x, dir;
- s16b o_idx;
-
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
auto r_ptr = &r_info[p_ptr->body_monster];
@@ -1029,16 +809,11 @@ void do_cmd_open()
/* Pick a direction if there's an obvious target */
{
- int num_doors, num_chests;
-
/* Count closed doors (locked or jammed) */
- num_doors = count_feats(&y, &x, is_closed, FALSE);
-
- /* Count chests (locked) */
- num_chests = count_chests(&y, &x, FALSE);
+ const int num_doors = count_feats(&y, &x, is_closed, false);
/* There is nothing the player can open */
- if ((num_doors + num_chests) == 0)
+ if (num_doors == 0)
{
/* Message */
msg_print("You see nothing there to open.");
@@ -1048,24 +823,14 @@ void do_cmd_open()
}
/* Set direction if there is only one target */
- else if ((num_doors + num_chests) == 1)
+ else if (num_doors == 1)
{
command_dir = coords_to_dir(y, x);
}
}
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
+ allow_repeat_command();
/* Get a "repeated" direction */
if (get_rep_dir(&dir))
@@ -1077,12 +842,9 @@ void do_cmd_open()
/* Get requested grid */
c_ptr = &cave[y][x];
- /* Check for chest */
- o_idx = chest_check(y, x);
-
/* Nothing useful */
if (!((c_ptr->feat >= FEAT_DOOR_HEAD) &&
- (c_ptr->feat <= FEAT_DOOR_TAIL)) && !o_idx)
+ (c_ptr->feat <= FEAT_DOOR_TAIL)))
{
/* Message */
msg_print("You see nothing there to open.");
@@ -1101,18 +863,11 @@ void do_cmd_open()
py_attack(y, x, -1);
}
- /* Handle chests */
- else if (o_idx)
- {
- /* Open the chest */
- more = do_cmd_open_chest(y, x, o_idx);
- }
-
/* Handle doors */
else
{
/* Open the door */
- more = do_cmd_open_aux(y, x, dir);
+ more = do_cmd_open_aux(y, x);
}
}
@@ -1129,15 +884,15 @@ void do_cmd_open()
*
* Assume there is no monster blocking the destination
*
- * Returns TRUE if repeated commands may continue
+ * Returns true if repeated commands may continue
*/
-static bool_ do_cmd_close_aux(int y, int x, int dir)
+static bool do_cmd_close_aux(int y, int x)
{
auto const &r_info = game->edit_data.r_info;
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
auto r_ptr = &r_info[p_ptr->body_monster];
@@ -1146,7 +901,7 @@ static bool_ do_cmd_close_aux(int y, int x, int dir)
{
msg_print("You cannot close doors.");
- return (FALSE);
+ return false;
}
/* Take a turn */
@@ -1186,7 +941,7 @@ void do_cmd_close()
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
/* Pick a direction if there's an obvious choice */
@@ -1194,7 +949,7 @@ void do_cmd_close()
int num_doors;
/* Count open doors */
- num_doors = count_feats(&y, &x, is_open, FALSE);
+ num_doors = count_feats(&y, &x, is_open, false);
/* There are no doors the player can close */
if (num_doors == 0)
@@ -1214,17 +969,7 @@ void do_cmd_close()
}
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
+ allow_repeat_command();
/* Get a "repeated" direction */
if (get_rep_dir(&dir))
@@ -1260,7 +1005,7 @@ void do_cmd_close()
else
{
/* Close the door */
- more = do_cmd_close_aux(y, x, dir);
+ more = do_cmd_close_aux(y, x);
}
}
@@ -1272,7 +1017,7 @@ void do_cmd_close()
/*
* Determine if a given grid may be "tunneled"
*/
-static bool_ do_cmd_tunnel_test(int y, int x)
+static bool do_cmd_tunnel_test(int y, int x)
{
auto const &f_info = game->edit_data.f_info;
@@ -1283,7 +1028,7 @@ static bool_ do_cmd_tunnel_test(int y, int x)
msg_print("You see nothing there.");
/* Nope */
- return (FALSE);
+ return false;
}
/* Must be a wall/door/etc */
@@ -1293,7 +1038,7 @@ static bool_ do_cmd_tunnel_test(int y, int x)
msg_print("You see nothing there to tunnel.");
/* Nope */
- return (FALSE);
+ return false;
}
/* Must be tunnelable */
@@ -1303,11 +1048,11 @@ static bool_ do_cmd_tunnel_test(int y, int x)
msg_print(f_info[cave[y][x].feat].tunnel);
/* Nope */
- return (FALSE);
+ return false;
}
/* Okay */
- return (TRUE);
+ return true;
}
@@ -1321,13 +1066,13 @@ static bool_ do_cmd_tunnel_test(int y, int x)
* This will, however, produce grids which are NOT illuminated
* (or darkened) along with the rest of the room.
*/
-static bool_ twall(int y, int x, byte feat)
+static bool twall(int y, int x, byte feat)
{
cave_type *c_ptr = &cave[y][x];
/* Paranoia -- Require a wall or door or some such */
- if (cave_floor_bold(y, x)) return (FALSE);
+ if (cave_floor_bold(y, x)) return false;
/* Forget the wall */
c_ptr->info &= ~(CAVE_MARK);
@@ -1339,7 +1084,7 @@ static bool_ twall(int y, int x, byte feat)
p_ptr->update |= (PU_VIEW | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
/* Result */
- return (TRUE);
+ return true;
}
@@ -1352,9 +1097,9 @@ static bool_ twall(int y, int x, byte feat)
*
* Assumes that no monster is blocking the destination
*
- * Returns TRUE if repeated commands may continue
+ * Returns true if repeated commands may continue
*/
-static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
+static bool do_cmd_tunnel_aux(int y, int x)
{
auto const &d_info = game->edit_data.d_info;
auto const &f_info = game->edit_data.f_info;
@@ -1364,23 +1109,23 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
auto f_ptr = &f_info[c_ptr->feat];
- bool_ more = FALSE;
+ bool more = false;
/* Must be have something to dig with (except for sandwalls) */
if ((c_ptr->feat < FEAT_SANDWALL) || (c_ptr->feat > FEAT_SANDWALL_K))
{
- if (!p_ptr->inventory[INVEN_TOOL].k_idx ||
- (p_ptr->inventory[INVEN_TOOL].tval != TV_DIGGING))
+ auto o_ptr = &p_ptr->inventory[INVEN_TOOL];
+ if (!o_ptr->k_ptr || (o_ptr->tval != TV_DIGGING))
{
msg_print("You need to have a shovel or pick in your tool slot.");
- return (FALSE);
+ return false;
}
}
/* Verify legality */
- if (!do_cmd_tunnel_test(y, x)) return (FALSE);
+ if (!do_cmd_tunnel_test(y, x)) return false;
/* Take a turn */
energy_use = 100;
@@ -1409,7 +1154,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
{
/* We may continue chopping */
msg_print(f_ptr->tunnel);
- more = TRUE;
+ more = true;
}
}
@@ -1431,7 +1176,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
{
/* We may continue tunelling */
msg_print(f_ptr->tunnel);
- more = TRUE;
+ more = true;
}
}
@@ -1442,24 +1187,24 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
((c_ptr->feat >= FEAT_SANDWALL) &&
(c_ptr->feat <= FEAT_SANDWALL_K)))
{
- bool_ okay = FALSE;
- bool_ gold = FALSE;
- bool_ hard = FALSE;
- bool_ soft = FALSE;
+ bool okay = false;
+ bool gold = false;
+ bool hard = false;
+ bool soft = false;
/* Found gold */
if ((c_ptr->feat >= FEAT_MAGMA_H) &&
- (c_ptr->feat <= FEAT_QUARTZ_K)) gold = TRUE;
+ (c_ptr->feat <= FEAT_QUARTZ_K)) gold = true;
if ((c_ptr->feat == FEAT_SANDWALL_H) ||
(c_ptr->feat == FEAT_SANDWALL_K))
{
- gold = TRUE;
- soft = TRUE;
+ gold = true;
+ soft = true;
}
else
/* Extract "quartz" flag XXX XXX XXX */
- if ((c_ptr->feat - FEAT_MAGMA) & 0x01) hard = TRUE;
+ if ((c_ptr->feat - FEAT_MAGMA) & 0x01) hard = true;
/* Quartz */
if (hard)
@@ -1511,7 +1256,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
{
/* Message, continue digging */
msg_print(f_ptr->tunnel);
- more = TRUE;
+ more = true;
}
}
@@ -1531,7 +1276,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
if (rand_int(100) < 10)
{
/* Create a simple object */
- place_object(y, x, FALSE, FALSE, OBJ_FOUND_RUBBLE);
+ place_object(y, x, false, false, OBJ_FOUND_RUBBLE);
/* Observe new object */
if (player_can_see_bold(y, x))
@@ -1545,7 +1290,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
{
/* Message, keep digging */
msg_print(f_ptr->tunnel);
- more = TRUE;
+ more = true;
}
}
@@ -1573,7 +1318,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
/* We may continue tunelling */
msg_print(f_info[feat].tunnel);
- more = TRUE;
+ more = true;
}
}
@@ -1593,7 +1338,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
{
/* We may continue tunelling */
msg_print(f_ptr->tunnel);
- more = TRUE;
+ more = true;
}
}
@@ -1602,7 +1347,7 @@ static bool_ do_cmd_tunnel_aux(int y, int x, int dir)
if (p_ptr->skill_dig < skill_req)
{
msg_print("You fail to make even the slightest of progress.");
- more = FALSE;
+ more = false;
}
else if (p_ptr->skill_dig < skill_req_1pct)
{
@@ -1637,23 +1382,13 @@ void do_cmd_tunnel()
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
if (p_ptr->wild_mode) return;
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
+ allow_repeat_command();
/* Get a direction to tunnel, or Abort */
if (get_rep_dir(&dir))
@@ -1689,7 +1424,7 @@ void do_cmd_tunnel()
else
{
/* Tunnel through walls */
- more = do_cmd_tunnel_aux(y, x, dir);
+ more = do_cmd_tunnel_aux(y, x);
}
}
@@ -1704,9 +1439,9 @@ void do_cmd_tunnel()
*
* Assume there is no monster blocking the destination
*
- * Returns TRUE if repeated commands may continue
+ * Returns true if repeated commands may continue
*/
-static bool_ do_cmd_bash_aux(int y, int x, int dir)
+static bool do_cmd_bash_aux(int y, int x, int dir)
{
auto const &r_info = game->edit_data.r_info;
@@ -1714,7 +1449,7 @@ static bool_ do_cmd_bash_aux(int y, int x, int dir)
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
auto r_ptr = &r_info[p_ptr->body_monster];
@@ -1723,7 +1458,7 @@ static bool_ do_cmd_bash_aux(int y, int x, int dir)
{
msg_print("You cannot do that.");
- return (FALSE);
+ return false;
}
/* Take a turn */
@@ -1781,7 +1516,7 @@ static bool_ do_cmd_bash_aux(int y, int x, int dir)
msg_print("The door holds firm.");
/* Allow repeated bashing */
- more = TRUE;
+ more = true;
}
/* High dexterity yields coolness */
@@ -1821,7 +1556,7 @@ void do_cmd_bash()
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
auto r_ptr = &r_info[p_ptr->body_monster];
@@ -1834,17 +1569,7 @@ void do_cmd_bash()
}
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
+ allow_repeat_command();
/* Get a "repeated" direction */
if (get_rep_dir(&dir))
@@ -1920,21 +1645,11 @@ void do_cmd_alter()
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
+ allow_repeat_command();
/* Get a direction */
if (get_rep_dir(&dir))
@@ -1961,14 +1676,14 @@ void do_cmd_alter()
(c_ptr->feat <= FEAT_DOOR_TAIL))
{
/* Tunnel */
- more = do_cmd_open_aux(y, x, dir);
+ more = do_cmd_open_aux(y, x);
}
/* Tunnel through walls */
else if (f_info[c_ptr->feat].flags & FF_TUNNELABLE)
{
/* Tunnel */
- more = do_cmd_tunnel_aux(y, x, dir);
+ more = do_cmd_tunnel_aux(y, x);
}
/* Oops */
@@ -1989,7 +1704,7 @@ void do_cmd_alter()
*
* XXX XXX XXX Let user choose a pile of spikes, perhaps?
*/
-static bool_ get_spike(int *ip)
+static bool get_spike(int *ip)
{
int i;
@@ -1999,8 +1714,10 @@ static bool_ get_spike(int *ip)
{
object_type *o_ptr = &p_ptr->inventory[i];
- /* Skip non-objects */
- if (!o_ptr->k_idx) continue;
+ if (!o_ptr->k_ptr)
+ {
+ continue;
+ }
/* Check the "tval" code */
if (o_ptr->tval == TV_SPIKE)
@@ -2009,12 +1726,12 @@ static bool_ get_spike(int *ip)
(*ip) = i;
/* Success */
- return (TRUE);
+ return true;
}
}
/* Oops */
- return (FALSE);
+ return false;
}
@@ -2097,21 +1814,11 @@ static void do_cmd_walk_jump(int pickup)
int dir;
- bool_ more = FALSE;
+ bool more = false;
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
+ allow_repeat_command();
/* Get a "repeated" direction */
if (get_rep_dir(&dir))
@@ -2123,7 +1830,7 @@ static void do_cmd_walk_jump(int pickup)
move_player(dir, pickup);
/* Allow more walking */
- more = TRUE;
+ more = true;
}
/* Hack -- In small scale wilderness it takes MUCH more time to move */
@@ -2141,7 +1848,7 @@ static void do_cmd_walk_jump(int pickup)
change_wild_mode();
/* HACk -- set the encouter flag for the wilderness generation */
- generate_encounter = TRUE;
+ generate_encounter = true;
p_ptr->oldpx = MAX_WID / 2;
p_ptr->oldpy = MAX_HGT / 2;
@@ -2163,7 +1870,7 @@ static void do_cmd_unwalk()
cave_type *c_ptr;
- bool_ more = FALSE;
+ bool more = false;
if (!get_rep_dir(&dir)) return;
@@ -2183,18 +1890,7 @@ static void do_cmd_unwalk()
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
-
+ allow_repeat_command();
/* Attack monsters */
if (c_ptr->m_idx > 0)
@@ -2217,7 +1913,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_x--;
p_ptr->oldpy = cur_hgt - 2;
p_ptr->oldpx = cur_wid - 2;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if ((y == 0) && (x == MAX_WID - 1))
@@ -2226,7 +1922,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_x++;
p_ptr->oldpy = cur_hgt - 2;
p_ptr->oldpx = 1;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if ((y == MAX_HGT - 1) && (x == 0))
@@ -2235,7 +1931,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_x--;
p_ptr->oldpy = 1;
p_ptr->oldpx = cur_wid - 2;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if ((y == MAX_HGT - 1) && (x == MAX_WID - 1))
@@ -2244,7 +1940,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_x++;
p_ptr->oldpy = 1;
p_ptr->oldpx = 1;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (y == 0)
@@ -2252,7 +1948,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_y--;
p_ptr->oldpy = cur_hgt - 2;
p_ptr->oldpx = x;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (y == cur_hgt - 1)
@@ -2260,7 +1956,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_y++;
p_ptr->oldpy = 1;
p_ptr->oldpx = x;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (x == 0)
@@ -2268,7 +1964,7 @@ static void do_cmd_unwalk()
p_ptr->wilderness_x--;
p_ptr->oldpx = cur_wid - 2;
p_ptr->oldpy = y;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
else if (x == cur_wid - 1)
@@ -2276,10 +1972,10 @@ static void do_cmd_unwalk()
p_ptr->wilderness_x++;
p_ptr->oldpx = 1;
p_ptr->oldpy = y;
- ambush_flag = FALSE;
+ ambush_flag = false;
}
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
return;
}
@@ -2296,7 +1992,7 @@ static void do_cmd_unwalk()
((feat >= FEAT_LESS) && (feat <= FEAT_MORE)))
{
move_player(dir, options->always_pickup);
- more = FALSE;
+ more = false;
}
/* Hack -- Ignore wilderness mofe. */
@@ -2396,18 +2092,7 @@ void do_cmd_stay(int pickup)
/* Allow repeated command */
- if (command_arg)
- {
- /* Set repeat count */
- command_rep = command_arg - 1;
-
- /* Redraw the state */
- p_ptr->redraw |= (PR_FRAME);
-
- /* Cancel the arg */
- command_arg = 0;
- }
-
+ allow_repeat_command();
/* Take a turn */
energy_use = 100;
@@ -2441,8 +2126,9 @@ void do_cmd_rest()
flush_on_failure();
/* Tell the player why */
- msg_print(format("Resting on a %s is too dangerous!",
- f_info[cave[p_ptr->py][p_ptr->px].feat].name));
+ msg_print(fmt::format(
+ "Resting on a {} is too dangerous!",
+ f_info[cave[p_ptr->py][p_ptr->px].feat].name));
/* Done */
return;
@@ -2464,7 +2150,7 @@ void do_cmd_rest()
/* Prompt for time if needed */
if (command_arg <= 0)
{
- cptr p = "Rest (0-9999, '*' for HP/SP, '&' as needed): ";
+ const char *p = "Rest (0-9999, '*' for HP/SP, '&' as needed): ";
char out_val[80];
@@ -2683,7 +2369,7 @@ void do_cmd_fire()
object_type *j_ptr;
- bool_ hit_body = FALSE;
+ bool hit_body = false;
byte missile_attr;
@@ -2717,7 +2403,7 @@ void do_cmd_fire()
item = INVEN_AMMO;
/* If nothing correct try to choose from the backpack */
- if ((p_ptr->tval_ammo != o_ptr->tval) || (!o_ptr->k_idx))
+ if ((p_ptr->tval_ammo != o_ptr->tval) || (!o_ptr->k_ptr))
{
/* Get an item */
if (!get_item(&item,
@@ -2762,7 +2448,7 @@ void do_cmd_fire()
/* Describe the object */
- object_desc(o_name, q_ptr, FALSE, 3);
+ object_desc(o_name, q_ptr, false, 3);
/* Find the color and symbol for the object for throwing */
missile_attr = object_attr(q_ptr);
@@ -2831,7 +2517,7 @@ void do_cmd_fire()
handle_stuff();
oldtdam = tdam;
- while (TRUE)
+ while (true)
{
/* Reset after a piercing shot */
tdam = oldtdam;
@@ -2890,15 +2576,15 @@ void do_cmd_fire()
visible = m_ptr->ml;
/* Note the collision */
- hit_body = TRUE;
+ hit_body = true;
/* Did we hit it (penalize range) */
if (test_hit_fire(chance - cur_dis, m_ptr->ac, m_ptr->ml))
{
- bool_ fear = FALSE;
+ bool fear = false;
/* Assume a default death */
- cptr note_dies = " dies.";
+ const char *note_dies = " dies.";
/* Some monsters get "destroyed" */
if ((r_ptr->flags & RF_DEMON) ||
@@ -3046,7 +2732,7 @@ void do_cmd_fire()
(magik(45 + get_skill(SKILL_ARCHERY))))
{
num_pierce--;
- hit_body = FALSE;
+ hit_body = false;
/* If target isn't reached, continue moving to target */
if ( !((tx < x && x < bx) || (bx < x && x < tx)) &&
@@ -3092,8 +2778,6 @@ void do_cmd_fire()
*/
void do_cmd_throw()
{
- auto const &k_info = game->edit_data.k_info;
-
int dir;
s32b special = 0;
@@ -3113,9 +2797,9 @@ void do_cmd_throw()
object_type *q_ptr;
- bool_ hit_body = FALSE;
+ bool hit_body = false;
- bool_ hit_wall = FALSE;
+ bool hit_wall = false;
byte missile_attr;
@@ -3194,7 +2878,7 @@ void do_cmd_throw()
inc_stack_size(item, -1);
/* Description */
- object_desc(o_name, q_ptr, FALSE, 3);
+ object_desc(o_name, q_ptr, false, 3);
/* Find the color and symbol for the object for throwing */
missile_attr = object_attr(q_ptr);
@@ -3258,7 +2942,7 @@ void do_cmd_throw()
/* Stopped by walls/doors */
if (!cave_floor_bold(ny, nx))
{
- hit_wall = TRUE;
+ hit_wall = true;
break;
}
@@ -3302,15 +2986,15 @@ void do_cmd_throw()
visible = m_ptr->ml;
/* Note the collision */
- hit_body = TRUE;
+ hit_body = true;
/* Did we hit it (penalize range) */
if (test_hit_fire(chance - cur_dis, m_ptr->ac, m_ptr->ml))
{
- bool_ fear = FALSE;
+ bool fear = false;
/* Assume a default death */
- cptr note_dies = " dies.";
+ const char *note_dies = " dies.";
/* Some monsters get "destroyed" */
if ((r_ptr->flags & RF_DEMON) ||
@@ -3377,7 +3061,7 @@ void do_cmd_throw()
if (special) attack_special(m_ptr, special, tdam);
/* Anger friends */
- if (!(k_info[q_ptr->k_idx].tval == TV_POTION))
+ if (!(q_ptr->k_ptr->tval == TV_POTION))
{
char m_name[80];
monster_desc(m_name, m_ptr, 0);
@@ -3417,7 +3101,7 @@ void do_cmd_throw()
j = (hit_body ? breakage_chance(q_ptr) : 0);
/* Potions smash open */
- if (k_info[q_ptr->k_idx].tval == TV_POTION)
+ if (q_ptr->k_ptr->tval == TV_POTION)
{
if ((hit_body) || (hit_wall) || (randint(100) < j))
{
@@ -3468,8 +3152,6 @@ void do_cmd_throw()
*/
void do_cmd_boomerang()
{
- auto const &k_info = game->edit_data.k_info;
-
int dir;
int j, y, x, ny, nx, ty, tx;
@@ -3486,7 +3168,7 @@ void do_cmd_boomerang()
object_type *o_ptr;
- bool_ hit_body = FALSE;
+ bool hit_body = false;
byte missile_attr;
@@ -3517,7 +3199,7 @@ void do_cmd_boomerang()
q_ptr->number = 1;
/* Description */
- object_desc(o_name, q_ptr, FALSE, 3);
+ object_desc(o_name, q_ptr, false, 3);
/* Find the color and symbol for the object for throwing */
missile_attr = object_attr(q_ptr);
@@ -3628,15 +3310,15 @@ void do_cmd_boomerang()
visible = m_ptr->ml;
/* Note the collision */
- hit_body = TRUE;
+ hit_body = true;
/* Did we hit it (penalize range) */
if (test_hit_fire(chance - cur_dis, m_ptr->ac, m_ptr->ml))
{
- bool_ fear = FALSE;
+ bool fear = false;
/* Assume a default death */
- cptr note_dies = " dies.";
+ const char *note_dies = " dies.";
/* Some monsters get "destroyed" */
if ((r_ptr->flags & RF_DEMON) ||
@@ -3703,7 +3385,7 @@ void do_cmd_boomerang()
if (special) attack_special(m_ptr, special, tdam);
/* Anger friends */
- if (!(k_info[q_ptr->k_idx].tval == TV_POTION))
+ if (!(q_ptr->k_ptr->tval == TV_POTION))
{
char m_name[80];
monster_desc(m_name, m_ptr, 0);
@@ -3739,7 +3421,7 @@ void do_cmd_boomerang()
/* Break the boomerang */
if ((!artifact_p(o_ptr)) && (rand_int(100) < j))
{
- msg_print(format("Your %s is destroyed.", o_name));
+ msg_print(fmt::format("Your {} is destroyed.", o_name));
inc_stack_size_ex(INVEN_BOW, -1, OPTIMIZE, NO_DESCRIBE);
}
}
@@ -3790,21 +3472,22 @@ void do_cmd_boomerang()
}
-static bool_ tport_vertically(bool_ how)
+static bool tport_vertically(bool how)
{
auto const &d_info = game->edit_data.d_info;
+ auto const &dungeon_flags = game->dungeon_flags;
/* quest? */
if (p_ptr->inside_quest)
{
msg_print("There is no effect.");
- return (FALSE);
+ return false;
}
if (dungeon_flags & DF_NO_EASY_MOVE)
{
msg_print("Some powerful force prevents you from teleporting.");
- return FALSE;
+ return false;
}
/* Go down */
@@ -3813,27 +3496,27 @@ static bool_ tport_vertically(bool_ how)
if (dun_level >= d_info[dungeon_type].maxdepth)
{
msg_print("The floor is impermeable.");
- return (FALSE);
+ return false;
}
msg_print("You sink through the floor.");
dun_level++;
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
}
else
{
if (dun_level < d_info[dungeon_type].mindepth)
{
msg_print("There is nothing above you but air.");
- return (FALSE);
+ return false;
}
msg_print("You rise through the ceiling.");
dun_level--;
- p_ptr->leaving = TRUE;
+ p_ptr->leaving = true;
}
- return (TRUE);
+ return true;
}
@@ -3851,9 +3534,9 @@ void do_cmd_immovable_special()
int lose_hp = 0;
- bool_ did_act = FALSE;
+ bool did_act = false;
- bool_ did_load = FALSE;
+ bool did_load = false;
if (foo > 1)
@@ -3884,14 +3567,14 @@ void do_cmd_immovable_special()
}
/* Enter "icky" mode */
- character_icky = TRUE;
+ character_icky = true;
/* Save the screen */
Term_save();
/* Interact until done */
- while (1)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -3918,15 +3601,15 @@ void do_cmd_immovable_special()
if (i == 'a')
{
Term_load();
- character_icky = FALSE;
- did_load = TRUE;
+ character_icky = false;
+ did_load = true;
if (!tgt_pt(&ii, &ij)) break;
/* Teleport to the target */
teleport_player_to(ij, ii);
- did_act = TRUE;
+ did_act = true;
break;
}
@@ -3934,14 +3617,14 @@ void do_cmd_immovable_special()
else if (i == 'b')
{
Term_load();
- character_icky = FALSE;
- did_load = TRUE;
+ character_icky = false;
+ did_load = true;
if (!get_aim_dir(&dir)) return;
- fetch(dir, p_ptr->lev * 15, FALSE);
+ fetch(dir, p_ptr->lev * 15, false);
py_pickup_floor(options->always_pickup);
- did_act = TRUE;
+ did_act = true;
break;
}
@@ -3949,12 +3632,12 @@ void do_cmd_immovable_special()
else if (i == 'c')
{
Term_load();
- character_icky = FALSE;
- did_load = TRUE;
+ character_icky = false;
+ did_load = true;
- if (!tport_vertically(FALSE)) return;
+ if (!tport_vertically(false)) return;
- did_act = TRUE;
+ did_act = true;
break;
}
@@ -3962,12 +3645,12 @@ void do_cmd_immovable_special()
else if (i == 'd')
{
Term_load();
- character_icky = FALSE;
- did_load = TRUE;
+ character_icky = false;
+ did_load = true;
- if (!tport_vertically(TRUE)) return;
+ if (!tport_vertically(true)) return;
- did_act = TRUE;
+ did_act = true;
break;
}
@@ -3986,7 +3669,7 @@ void do_cmd_immovable_special()
Term_load();
/* Leave "icky" mode */
- character_icky = FALSE;
+ character_icky = false;
}
/* Apply stat losses if something was done */
@@ -4017,17 +3700,17 @@ static bool item_tester_hook_sacrificable(object_type const *o_ptr)
{
/* Corpses are */
if (o_ptr->tval == TV_CORPSE && o_ptr->sval == SV_CORPSE_CORPSE)
- return (TRUE);
+ return true;
/* Books without any udun spells */
if ((o_ptr->tval == TV_BOOK) && udun_in_book(o_ptr->sval, o_ptr->pval) <= 0)
{
- return TRUE;
+ return true;
}
}
/* Assume not */
- return (FALSE);
+ return false;
}
/*
@@ -4097,9 +3780,9 @@ void do_cmd_sacrifice()
if (deity_info[agod].desc[i] != NULL)
msg_print(deity_info[agod].desc[i]);
}
- if (get_check(format("Do you want to worship %s? ", deity_info[agod].name)))
+ if (get_check(fmt::format("Do you want to worship {}? ", deity_info[agod].name)))
{
- follow_god(agod, FALSE);
+ follow_god(agod, false);
p_ptr->grace = -200;
inc_piety(p_ptr->pgod, 0);
}
@@ -4230,7 +3913,7 @@ std::vector<s16b> show_monster_inven(int m_idx)
/* Describe the object */
char o_name[80];
- object_desc(o_name, o_ptr, TRUE, 3);
+ object_desc(o_name, o_ptr, true, 3);
/* Hack -- enforce max length */
o_name[lim] = '\0';
@@ -4264,18 +3947,15 @@ std::vector<s16b> show_monster_inven(int m_idx)
/* Clear the line */
prt("", i + 1, col ? col - 2 : col);
- /* Prepare an index --(-- */
- char tmp_val[80];
- strnfmt(tmp_val, 80, "%c)", index_to_label(i));
-
- /* Clear the line with the (possibly indented) index */
- put_str(tmp_val, i + 1, col);
+ /* Display index */
+ put_str(fmt::format("{})", index_to_label(i)), i + 1, col);
/* Display the entry itself */
c_put_str(out_color[i], out_desc[i], i + 1, col + 3);
/* Display the weight if needed */
{
+ char tmp_val[80];
int wgt = o_ptr->weight * o_ptr->number;
strnfmt(tmp_val, 80, "%3d.%1d lb", wgt / 10, wgt % 10);
put_str(tmp_val, i + 1, 71);
@@ -4301,7 +3981,7 @@ void do_cmd_steal()
int dir = 0, item = -1, k = -1;
- bool_ done = FALSE;
+ bool done = false;
/* Only works on adjacent monsters */
if (!get_rep_dir(&dir)) return;
@@ -4357,7 +4037,7 @@ void do_cmd_steal()
{
case ESCAPE:
{
- done = TRUE;
+ done = true;
break;
}
@@ -4381,14 +4061,14 @@ void do_cmd_steal()
/* Verify the item */
if (ver && !verify("Try", -objects[k]))
{
- done = TRUE;
+ done = true;
break;
}
/* Accept that choice */
item = objects[k];
- done = TRUE;
+ done = true;
break;
}
@@ -4463,11 +4143,11 @@ void do_cmd_steal()
{
object_copy(o_ptr, &o_list[item]);
- inven_carry(o_ptr, FALSE);
+ inven_carry(o_ptr, false);
}
/* Delete source item */
- o_list[item].k_idx = 0;
+ o_list[item].k_ptr.reset();
}
screen_load();
diff --git a/src/cmd2.hpp b/src/cmd2.hpp
index 9641dc72..35aed893 100644
--- a/src/cmd2.hpp
+++ b/src/cmd2.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
#include "object_type_fwd.hpp"
#include <vector>
@@ -27,6 +27,5 @@ void do_cmd_fire();
void do_cmd_throw();
void do_cmd_boomerang();
void do_cmd_immovable_special();
-void fetch(int dir, int wgt, bool_ require_los);
void do_cmd_sacrifice();
void do_cmd_steal();
diff --git a/src/cmd3.cc b/src/cmd3.cc
index cbf58820..6498d48b 100644
--- a/src/cmd3.cc
+++ b/src/cmd3.cc
@@ -33,19 +33,21 @@
#include "tables.hpp"
#include "town_type.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
-#include <cassert>
#include <algorithm>
+#include <boost/algorithm/string/predicate.hpp>
+#include <cassert>
#include <fmt/format.h>
#include <memory>
#include <utility>
+using boost::algorithm::equals;
+
/*
* Display p_ptr->inventory
*/
@@ -55,11 +57,10 @@ void do_cmd_inven()
/* Note that we are in "p_ptr->inventory" mode */
- command_wrk = FALSE;
+ command_wrk = false;
/* Save the screen */
- character_icky = TRUE;
- Term_save();
+ screen_save_no_flush();
/* Show the inventory */
show_inven_full();
@@ -81,9 +82,7 @@ void do_cmd_inven()
command_new = inkey();
/* Restore the screen */
- Term_load();
- character_icky = FALSE;
-
+ screen_load_no_flush();
/* Process "Escape" */
if (command_new == ESCAPE)
@@ -96,7 +95,7 @@ void do_cmd_inven()
else
{
/* Mega-Hack -- Don't disable keymaps for this key */
- request_command_inven_mode = TRUE;
+ request_command_inven_mode = true;
}
}
@@ -110,11 +109,10 @@ void do_cmd_equip()
/* Note that we are in "equipment" mode */
- command_wrk = TRUE;
+ command_wrk = true;
/* Save the screen */
- character_icky = TRUE;
- Term_save();
+ screen_save_no_flush();
/* Display the equipment */
show_equip_full();
@@ -137,9 +135,7 @@ void do_cmd_equip()
command_new = inkey();
/* Restore the screen */
- Term_load();
- character_icky = FALSE;
-
+ screen_load_no_flush();
/* Process "Escape" */
if (command_new == ESCAPE)
@@ -152,7 +148,7 @@ void do_cmd_equip()
else
{
/* Mega-Hack -- Don't disable keymaps for this key */
- request_command_inven_mode = TRUE;
+ request_command_inven_mode = true;
}
}
@@ -171,33 +167,32 @@ static bool item_tester_hook_wear(object_type const *o_ptr)
{
object_type *q_ptr = &p_ptr->inventory[i];
- if (!q_ptr->k_idx) continue;
+ if (!q_ptr->k_ptr)
+ {
+ continue;
+ }
- if (object_flags(q_ptr) & TR_ULTIMATE) return (FALSE);
+ if (object_flags(q_ptr) & TR_ULTIMATE)
+ {
+ return false;
+ }
}
}
if ((slot < INVEN_WIELD) || ((p_ptr->body_parts[slot - INVEN_WIELD] == INVEN_WIELD) && (p_ptr->melee_style != SKILL_MASTERY)))
- return (FALSE);
+ return false;
/* Check for a usable slot */
- if (slot >= INVEN_WIELD) return (TRUE);
+ if (slot >= INVEN_WIELD) return true;
/* Assume not wearable */
- return (FALSE);
+ return false;
}
-bool_ is_slot_ok(int slot)
+static bool is_slot_ok(int slot)
{
- if ((slot >= INVEN_WIELD) && (slot < INVEN_TOTAL))
- {
- return (TRUE);
- }
- else
- {
- return (FALSE);
- }
+ return (slot >= INVEN_WIELD) && (slot < INVEN_TOTAL);
}
@@ -216,7 +211,7 @@ void do_cmd_wield()
object_type *i_ptr;
- cptr act;
+ const char *act;
char o_name[80];
@@ -240,7 +235,7 @@ void do_cmd_wield()
if (cursed_p(&p_ptr->inventory[slot]))
{
/* Describe it */
- object_desc(o_name, &p_ptr->inventory[slot], FALSE, 0);
+ object_desc(o_name, &p_ptr->inventory[slot], false, 0);
/* Message */
msg_format("The %s you are %s appears to be cursed.",
@@ -251,12 +246,12 @@ void do_cmd_wield()
}
if ((cursed_p(o_ptr)) && (options->wear_confirm)
- && (object_known_p(o_ptr) || (o_ptr->ident & (IDENT_SENSE))))
+ && (object_known_p(o_ptr)))
{
char dummy[512];
/* Describe it */
- object_desc(o_name, o_ptr, FALSE, 0);
+ object_desc(o_name, o_ptr, false, 0);
strnfmt(dummy, 512, "Really use the %s {cursed}? ", o_name);
if (!(get_check(dummy)))
@@ -277,10 +272,10 @@ void do_cmd_wield()
/* Two handed weapons can't be wielded with a shield */
if ((is_slot_ok(slot - INVEN_WIELD + INVEN_ARM)) &&
- (flags & TR_MUST2H) &&
- (p_ptr->inventory[slot - INVEN_WIELD + INVEN_ARM].k_idx != 0))
+ (flags & TR_MUST2H) &&
+ (p_ptr->inventory[slot - INVEN_WIELD + INVEN_ARM].k_ptr))
{
- object_desc(o_name, o_ptr, FALSE, 0);
+ object_desc(o_name, o_ptr, false, 0);
msg_format("You cannot wield your %s with a shield.", o_name);
return;
}
@@ -293,16 +288,17 @@ void do_cmd_wield()
auto const i_flags = object_flags(i_ptr);
/* Prevent shield from being put on if wielding 2H */
- if ((i_flags & TR_MUST2H) && (i_ptr->k_idx) &&
- (p_ptr->body_parts[slot - INVEN_WIELD] == INVEN_ARM))
+ if ((i_flags & TR_MUST2H) &&
+ i_ptr->k_ptr &&
+ (p_ptr->body_parts[slot - INVEN_WIELD] == INVEN_ARM))
{
- object_desc(o_name, o_ptr, FALSE, 0);
+ object_desc(o_name, o_ptr, false, 0);
msg_format("You cannot wield your %s with a two-handed weapon.", o_name);
return;
}
if ((p_ptr->body_parts[slot - INVEN_WIELD] == INVEN_ARM) &&
- (i_flags & TR_COULD2H))
+ (i_flags & TR_COULD2H))
{
if (!get_check("Are you sure you want to restrict your fighting? "))
{
@@ -312,8 +308,8 @@ void do_cmd_wield()
}
if ((is_slot_ok(slot - INVEN_WIELD + INVEN_ARM)) &&
- (p_ptr->inventory[slot - INVEN_WIELD + INVEN_ARM].k_idx != 0) &&
- (flags & TR_COULD2H))
+ p_ptr->inventory[slot - INVEN_WIELD + INVEN_ARM].k_ptr &&
+ (flags & TR_COULD2H))
{
if (!get_check("Are you sure you want to use this weapon with a shield?"))
{
@@ -344,20 +340,20 @@ void do_cmd_wield()
/* Take off existing item */
if (slot != INVEN_AMMO)
{
- if (o_ptr->k_idx)
+ if (o_ptr->k_ptr)
{
/* Take off existing item */
- inven_takeoff(slot, 255, FALSE);
+ inven_takeoff(slot, 255, false);
}
}
else
{
- if (o_ptr->k_idx)
+ if (o_ptr->k_ptr)
{
if (!object_similar(o_ptr, q_ptr))
{
/* Take off existing item */
- inven_takeoff(slot, 255, FALSE);
+ inven_takeoff(slot, 255, false);
}
else
{
@@ -404,7 +400,7 @@ void do_cmd_wield()
}
/* Describe the result */
- object_desc(o_name, o_ptr, TRUE, 3);
+ object_desc(o_name, o_ptr, true, 3);
/* Message */
msg_format("%s %s (%c).", act, o_name, index_to_label(slot));
@@ -414,16 +410,12 @@ void do_cmd_wield()
{
/* Warn the player */
msg_print("Oops! It feels deathly cold!");
-
- /* Note the curse */
- o_ptr->ident |= (IDENT_SENSE);
- o_ptr->sense = SENSE_CURSED;
}
/* Take care of item sets */
if (o_ptr->name1)
{
- wield_set(o_ptr->name1, a_info[o_ptr->name1].set, FALSE);
+ wield_set(o_ptr->name1, a_info[o_ptr->name1].set, false);
}
/* Recalculate bonuses */
@@ -479,7 +471,7 @@ void do_cmd_takeoff()
energy_use = 50;
/* Take off the item */
- inven_takeoff(item, 255, FALSE);
+ inven_takeoff(item, 255, false);
/* Recalculate hitpoint */
p_ptr->update |= (PU_HP);
@@ -550,7 +542,7 @@ void do_cmd_drop()
energy_use = 50;
/* Drop (some of) the item */
- inven_drop(item, amt, p_ptr->py, p_ptr->px, FALSE);
+ inven_drop(item, amt, p_ptr->py, p_ptr->px, false);
}
@@ -559,18 +551,16 @@ void do_cmd_drop()
*/
void do_cmd_destroy()
{
- auto const &k_info = game->edit_data.k_info;
-
int old_number;
- bool_ force = FALSE;
+ bool force = false;
char o_name[80];
char out_val[160];
/* Hack -- force destruction */
- if (command_arg > 0) force = TRUE;
+ if (command_arg > 0) force = true;
/* Get an item */
@@ -601,7 +591,7 @@ void do_cmd_destroy()
/* Describe the object */
old_number = o_ptr->number;
o_ptr->number = amt;
- object_desc(o_name, o_ptr, TRUE, 3);
+ object_desc(o_name, o_ptr, true, 3);
o_ptr->number = old_number;
/* Verify unless quantity given */
@@ -629,28 +619,12 @@ void do_cmd_destroy()
/* Artifacts cannot be destroyed */
if (artifact_p(o_ptr))
{
- byte feel = SENSE_SPECIAL;
-
+ /* Don't use any energy */
energy_use = 0;
/* Message */
msg_format("You cannot destroy %s.", o_name);
- /* Hack -- Handle icky artifacts */
- if (cursed_p(o_ptr)) feel = SENSE_TERRIBLE;
-
- /* Hack -- inscribe the artifact */
- o_ptr->sense = feel;
-
- /* We have "felt" it (again) */
- o_ptr->ident |= (IDENT_SENSE);
-
- /* Combine the pack */
- p_ptr->notice |= (PN_COMBINE);
-
- /* Window stuff */
- p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
/* Done */
return;
}
@@ -677,7 +651,7 @@ void do_cmd_destroy()
/* Eru wont be happy */
if (flags & TR_BLESSED)
{
- inc_piety(GOD_ERU, -10 * k_info[o_ptr->k_idx].level);
+ inc_piety(GOD_ERU, -10 * o_ptr->k_ptr->level);
}
/* Eliminate the item */
@@ -705,13 +679,13 @@ void do_cmd_observe()
/* Description */
char o_name[80];
- object_desc(o_name, o_ptr, TRUE, 3);
+ object_desc(o_name, o_ptr, true, 3);
/* Describe */
cmsg_format(TERM_L_BLUE, "%s", o_name);
/* Describe it fully */
- if (!object_out_desc(o_ptr, NULL, FALSE, TRUE)) msg_print("You see nothing special.");
+ if (!object_out_desc(o_ptr, NULL, false, true)) msg_print("You see nothing special.");
}
@@ -776,7 +750,7 @@ void do_cmd_inscribe()
/* Describe the activity */
char o_name[80];
- object_desc(o_name, o_ptr, TRUE, 3);
+ object_desc(o_name, o_ptr, true, 3);
/* Message */
msg_format("Inscribing %s.", o_name);
@@ -1032,7 +1006,7 @@ void do_cmd_locate()
x2 = x1 = panel_col_min;
/* Show panels until done */
- while (1)
+ while (true)
{
/* Describe the location */
if ((y2 == y1) && (x2 == x1))
@@ -1119,7 +1093,7 @@ void do_cmd_locate()
* The table of "symbol info" -- each entry is a string of the form
* "X:desc" where "X" is the trigger, and "desc" is the "info".
*/
-static cptr ident_info[] =
+static const char *ident_info[] =
{
" :A dark grid",
"!:A potion (or oil)",
@@ -1350,19 +1324,19 @@ void do_cmd_query_symbol()
char buf[128];
- bool_ all = FALSE;
+ bool all = false;
- bool_ uniq = FALSE;
+ bool uniq = false;
- bool_ norm = FALSE;
+ bool norm = false;
- bool_ name = FALSE;
+ bool name = false;
char temp[80] = "";
- bool_ recall = FALSE;
+ bool recall = false;
bool (*sort_by)(int,int) = nullptr;
@@ -1380,22 +1354,22 @@ void do_cmd_query_symbol()
/* Describe */
if (sym == KTRL('A'))
{
- all = TRUE;
+ all = true;
strcpy(buf, "Full monster list.");
}
else if (sym == KTRL('U'))
{
- all = uniq = TRUE;
+ all = uniq = true;
strcpy(buf, "Unique monster list.");
}
else if (sym == KTRL('N'))
{
- all = norm = TRUE;
+ all = norm = true;
strcpy(buf, "Non-unique monster list.");
}
else if (sym == KTRL('M'))
{
- all = name = TRUE;
+ all = name = true;
if (!get_string("Name:", temp, 70)) return;
strnfmt(buf, 128, "Monsters with a name \"%s\"", temp);
strlower(temp);
@@ -1491,7 +1465,7 @@ void do_cmd_query_symbol()
i = who.size() - 1;
/* Scan the monster memory */
- while (1)
+ while (true)
{
/* Extract a race */
auto r_idx = who[i];
@@ -1509,14 +1483,13 @@ void do_cmd_query_symbol()
Term_addstr( -1, TERM_WHITE, " [(r)ecall, ESC]");
/* Interact */
- while (1)
+ while (true)
{
/* Recall */
if (recall)
{
/* Save the screen */
- character_icky = TRUE;
- Term_save();
+ screen_save_no_flush();
/* Recall on screen */
screen_roff(who[i], 0);
@@ -1532,8 +1505,7 @@ void do_cmd_query_symbol()
if (recall)
{
/* Restore */
- Term_load();
- character_icky = FALSE;
+ screen_load_no_flush();
}
/* Normal commands */
@@ -1575,7 +1547,7 @@ void do_cmd_query_symbol()
/*
* Try to "sense" the grid's mana
*/
-bool_ do_cmd_sense_grid_mana()
+void do_cmd_sense_grid_mana()
{
int chance, i;
@@ -1603,7 +1575,7 @@ bool_ do_cmd_sense_grid_mana()
{
flush_on_failure();
msg_print("You failed to sense the grid's mana.");
- return FALSE;
+ return;
}
/* Try to give an "average" value */
@@ -1619,14 +1591,13 @@ bool_ do_cmd_sense_grid_mana()
{
msg_format("Average Area's mana: %d", (cave[p_ptr->py][p_ptr->px].mana / i) * i);
}
- return TRUE;
}
/*
* Try to add a CLI action.
*/
-void cli_add(cptr active, cptr trigger, cptr descr)
+void cli_add(const char *active, const char *trigger, const char *descr)
{
s16b num;
cli_comm *cli_ptr, *old_ptr;
@@ -1662,7 +1633,7 @@ void cli_add(cptr active, cptr trigger, cptr descr)
if (strchr(trigger, '\''))
{
char temp[80], *t;
- cptr s;
+ const char *s;
for (s = trigger, t = temp; ; s++, t++)
{
/* tokenize() causes each ' to be followed by another character,
@@ -1707,9 +1678,9 @@ void cli_add(cptr active, cptr trigger, cptr descr)
/*
* Get a string using CLI completion.
*/
-static bool_ get_string_cli(cptr prompt, char *buf, int len)
+static bool get_string_cli(const char *prompt, char *buf, int len)
{
- bool_ res;
+ bool res;
/* Paranoia XXX XXX XXX */
@@ -1756,7 +1727,7 @@ void do_cmd_cli()
/* Analyse the input */
for (cli_ptr = cli_info; cli_ptr->comm; cli_ptr++)
{
- if (!strcmp(buff, cli_ptr->comm))
+ if (equals(buff, cli_ptr->comm))
{
/* Process the command without keymaps or macros. */
command_new = cli_ptr->key;
@@ -1790,20 +1761,14 @@ void do_cmd_cli_help()
}
}
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Display the file contents */
show_string(w.c_str(), "Command line help");
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -1813,14 +1778,14 @@ void do_cmd_cli_help()
void do_cmd_html_dump()
{
char tmp_val[81];
- bool_ html = TRUE;
+ bool html = true;
term_win *save;
/* Save the screen */
save = Term_save_to();
if (wizard && get_check("WIZARD MODE: Do an help file dump?"))
- html = FALSE;
+ html = false;
/* Ask for a file */
if (html)
diff --git a/src/cmd3.hpp b/src/cmd3.hpp
index 97d3e22f..0212526c 100644
--- a/src/cmd3.hpp
+++ b/src/cmd3.hpp
@@ -1,9 +1,9 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
void do_cmd_html_dump();
-void cli_add(cptr active, cptr trigger, cptr descr);
+void cli_add(const char *active, const char *trigger, const char *descr);
void do_cmd_cli();
void do_cmd_cli_help();
void do_cmd_inven();
@@ -20,4 +20,4 @@ void do_cmd_target();
void do_cmd_look();
void do_cmd_locate();
void do_cmd_query_symbol();
-bool_ do_cmd_sense_grid_mana();
+void do_cmd_sense_grid_mana();
diff --git a/src/cmd4.cc b/src/cmd4.cc
index a820da41..b24cc72d 100644
--- a/src/cmd4.cc
+++ b/src/cmd4.cc
@@ -35,20 +35,23 @@
#include "tables.hpp"
#include "town_type.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
#include "xtra1.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
#include <algorithm>
+#include <boost/algorithm/string/predicate.hpp>
#include <cassert>
#include <fmt/format.h>
#include <memory>
#include <numeric>
#include <string>
+#include <unordered_set>
#include <vector>
+using boost::algorithm::equals;
+
/*
* Hack -- redraw the screen
*
@@ -62,13 +65,8 @@
*/
void do_cmd_redraw()
{
- int j;
-
- term *old = Term;
-
-
/* Hack -- react to changes */
- Term_xtra(TERM_XTRA_REACT, 0);
+ Term_xtra_react();
/* Combine and Reorder the pack (later) */
@@ -108,22 +106,16 @@ void do_cmd_redraw()
/* Redraw every window */
- for (j = 0; j < 8; j++)
+ for (int j = 0; j < 8; j++)
{
/* Dead window */
if (!angband_term[j]) continue;
- /* Activate */
- Term_activate(angband_term[j]);
-
/* Redraw */
- Term_redraw();
-
- /* Refresh */
- Term_fresh();
-
- /* Restore */
- Term_activate(old);
+ Term_with_active(angband_term[j], []() {
+ Term_redraw();
+ Term_fresh();
+ });
}
}
@@ -140,14 +132,11 @@ void do_cmd_change_name()
char tmp[160];
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Forever */
- while (1)
+ while (true)
{
/* keep mode below 5 */
mode = (mode + 5) % 5;
@@ -185,7 +174,7 @@ void do_cmd_change_name()
{
if (tmp[0] && (tmp[0] != ' '))
{
- file_character(tmp, FALSE);
+ file_character(tmp);
}
}
}
@@ -237,11 +226,7 @@ void do_cmd_change_name()
}
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
-
+ screen_load_no_flush();
/* Redraw everything */
p_ptr->redraw |= (PR_WIPE | PR_FRAME | PR_MAP);
@@ -259,7 +244,7 @@ void do_cmd_message_one()
auto message = messages.at(0);
- cptr msg = format("> %s", message.text_with_count().c_str());
+ const char *msg = format("> %s", message.text_with_count().c_str());
/* Recall one message XXX XXX XXX */
display_message(0, 0, strlen(msg), message.color, msg);
@@ -300,14 +285,11 @@ void do_cmd_messages()
/* Start at leftmost edge */
u32b q = 0;
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Process requests until done */
- while (1)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -483,10 +465,7 @@ void do_cmd_messages()
}
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
// File-local
@@ -514,7 +493,7 @@ static void interact_with_options(std::vector<option_type> const &options, char
/* Interact with the player */
size_t k = 0; /* Currently selected option index */
- while (TRUE)
+ while (true)
{
/* Prompt XXX XXX XXX */
char buf[80];
@@ -540,7 +519,7 @@ static void interact_with_options(std::vector<option_type> const &options, char
}
/* Hilite current option */
- move_cursor(k + 2, 50);
+ Term_gotoxy(50, k + 2);
/* Get a key */
int ch = inkey();
@@ -591,7 +570,7 @@ static void interact_with_options(std::vector<option_type> const &options, char
{
break;
}
- *(options[k].o_var) = TRUE;
+ *(options[k].o_var) = true;
k = (k + 1) % n;
break;
}
@@ -605,7 +584,7 @@ static void interact_with_options(std::vector<option_type> const &options, char
break;
}
- *(options[k].o_var) = FALSE;
+ *(options[k].o_var) = false;
k = (k + 1) % n;
break;
}
@@ -627,12 +606,12 @@ static void interact_with_options(std::vector<option_type> const &options, char
/*
* Interact with some options for cheating
*/
-static void do_cmd_options_cheat(cptr info)
+static void do_cmd_options_cheat(const char *info)
{
// Interact
interact_with_options(options->cheat_options, info, interaction_mode_t::READ_WRITE);
- // If user toggled any of the options to TRUE, then we add those cheats
+ // If user toggled any of the options to true, then we add those cheats
// to the player's "noscore" flags. Note that it doesn't matter what the
// previous value was -- we don't "unset" noscore flags anyway.
for (auto const &option: options->cheat_options)
@@ -664,7 +643,7 @@ s16b toggle_frequency(s16b current)
/*
* Interact with some options for cheating
*/
-static void do_cmd_options_autosave(cptr info)
+static void do_cmd_options_autosave(const char *info)
{
char ch;
@@ -681,7 +660,7 @@ static void do_cmd_options_autosave(cptr info)
Term_clear();
/* Interact with the player */
- while (TRUE)
+ while (true)
{
/* Prompt XXX XXX XXX */
strnfmt(buf, 80,
@@ -712,7 +691,7 @@ static void do_cmd_options_autosave(cptr info)
/* Hilite current option */
- move_cursor(k + 2, 50);
+ Term_gotoxy(50, k + 2);
/* Get a key */
ch = inkey();
@@ -754,7 +733,7 @@ static void do_cmd_options_autosave(cptr info)
case 'Y':
case '6':
{
- (*options->autosave_options[k].o_var) = TRUE;
+ (*options->autosave_options[k].o_var) = true;
k = (k + 1) % n;
break;
@@ -764,7 +743,7 @@ static void do_cmd_options_autosave(cptr info)
case 'N':
case '4':
{
- (*options->autosave_options[k].o_var) = FALSE;
+ (*options->autosave_options[k].o_var) = false;
k = (k + 1) % n;
break;
@@ -793,7 +772,7 @@ static void do_cmd_options_autosave(cptr info)
/*
* Interact with some options
*/
-void do_cmd_options_aux(int page, cptr info, bool_ read_only)
+void do_cmd_options_aux(int page, const char *info, bool read_only)
{
// Scrape together all the options from the relevant page.
std::vector<option_type> page_options;
@@ -820,42 +799,24 @@ void do_cmd_options_aux(int page, cptr info, bool_ read_only)
*/
static void do_cmd_options_win()
{
- int i, j, d;
-
- int y = 0;
-
int x = 0;
-
- char ch;
-
- bool_ go = TRUE;
-
- u32b old_flag[8];
-
-
- /* Memorize old flags */
- for (j = 0; j < ANGBAND_TERM_MAX; j++)
- {
- /* Acquire current flags */
- old_flag[j] = window_flag[j];
- }
-
+ int y = 0;
/* Clear screen */
Term_clear();
/* Interact */
- while (go)
+ while (bool go = true)
{
/* Prompt XXX XXX XXX */
prt("Window Flags (<dir>, t, y, n, ESC) ", 0, 0);
/* Display the windows */
- for (j = 0; j < ANGBAND_TERM_MAX; j++)
+ for (int j = 0; j < ANGBAND_TERM_MAX; j++)
{
byte a = TERM_WHITE;
- cptr s = angband_term_name[j];
+ const char *s = angband_term_name[j];
/* Use color */
if (j == x) a = TERM_L_BLUE;
@@ -865,11 +826,11 @@ static void do_cmd_options_win()
}
/* Display the options */
- for (i = 0; i < 16; i++)
+ for (int i = 0; i < 16; i++)
{
byte a = TERM_WHITE;
- cptr str = window_flag_desc[i];
+ const char *str = window_flag_desc[i];
/* Use color */
if (i == y) a = TERM_L_BLUE;
@@ -881,7 +842,7 @@ static void do_cmd_options_win()
Term_putstr(0, i + 5, -1, a, str);
/* Display the windows */
- for (j = 0; j < ANGBAND_TERM_MAX; j++)
+ for (int j = 0; j < ANGBAND_TERM_MAX; j++)
{
byte a = TERM_WHITE;
@@ -902,14 +863,14 @@ static void do_cmd_options_win()
Term_gotoxy(35 + x * 5, y + 5);
/* Get key */
- ch = inkey();
+ char ch = inkey();
/* Analyze */
switch (ch)
{
case ESCAPE:
{
- go = FALSE;
+ go = false;
break;
}
@@ -918,13 +879,13 @@ static void do_cmd_options_win()
case 't':
{
/* Clear windows */
- for (j = 0; j < ANGBAND_TERM_MAX; j++)
+ for (int j = 0; j < ANGBAND_TERM_MAX; j++)
{
window_flag[j] &= ~(1L << y);
}
/* Clear flags */
- for (i = 0; i < 16; i++)
+ for (int i = 0; i < 16; i++)
{
window_flag[x] &= ~(1L << i);
}
@@ -955,7 +916,7 @@ static void do_cmd_options_win()
default:
{
- d = get_keymap_dir(ch);
+ int d = get_keymap_dir(ch);
x = (x + ddx[d] + 8) % 8;
y = (y + ddy[d] + 16) % 16;
@@ -967,28 +928,17 @@ static void do_cmd_options_win()
}
}
- /* Notice changes */
- for (j = 0; j < ANGBAND_TERM_MAX; j++)
+ /* Refresh all the terms */
+ for (int j = 0; j < ANGBAND_TERM_MAX; j++)
{
- term *old = Term;
-
/* Dead window */
if (!angband_term[j]) continue;
- /* Ignore non-changes */
- if (window_flag[j] == old_flag[j]) continue;
-
- /* Activate */
- Term_activate(angband_term[j]);
-
- /* Erase */
- Term_clear();
-
- /* Refresh */
- Term_fresh();
-
- /* Restore */
- Term_activate(old);
+ /* Redraw */
+ Term_with_active(angband_term[j], [] {
+ Term_clear();
+ Term_fresh();
+ });
}
}
@@ -997,7 +947,7 @@ static void do_cmd_options_win()
* Write all current options to the given preference file in the
* lib/user directory. Modified from KAmband 1.8.
*/
-static errr option_dump(cptr fname)
+static errr option_dump(const char *fname)
{
int i, j;
@@ -1104,7 +1054,7 @@ static void do_cmd_pref_file_hack(int row)
prt("File: ", row + 2, 0);
/* Default filename */
- std::string ftmp = fmt::format("{}.prf", game->player_base);
+ auto ftmp = name_file_pref(game->player_base);
/* Ask for a file (or cancel) */
if (!askfor_aux(&ftmp, 80))
@@ -1113,7 +1063,7 @@ static void do_cmd_pref_file_hack(int row)
}
/* Process the given filename */
- if (process_pref_file(ftmp.c_str()))
+ if (process_pref_file(ftmp))
{
/* Mention failure */
msg_format("Failed to load '%s'!", ftmp.c_str());
@@ -1141,7 +1091,7 @@ void do_cmd_options()
screen_save();
/* Interact */
- while (1)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -1209,7 +1159,7 @@ void do_cmd_options()
prt("File: ", 21, 0);
/* Default filename */
- auto ftmp = fmt::format("{}.prf", game->player_base);
+ auto ftmp = name_file_pref(game->player_base);
/* Ask for a file */
if (!askfor_aux(&ftmp, 80)) continue;
@@ -1233,7 +1183,7 @@ void do_cmd_options()
case '1':
{
/* Process the general options */
- do_cmd_options_aux(1, "User Interface Options", FALSE);
+ do_cmd_options_aux(1, "User Interface Options", false);
break;
}
@@ -1242,7 +1192,7 @@ void do_cmd_options()
case '2':
{
/* Spawn */
- do_cmd_options_aux(2, "Disturbance Options", FALSE);
+ do_cmd_options_aux(2, "Disturbance Options", false);
break;
}
@@ -1251,7 +1201,7 @@ void do_cmd_options()
case '3':
{
/* Spawn */
- do_cmd_options_aux(3, "Game-Play Options", FALSE);
+ do_cmd_options_aux(3, "Game-Play Options", false);
break;
}
@@ -1260,7 +1210,7 @@ void do_cmd_options()
case '4':
{
/* Spawn */
- do_cmd_options_aux(4, "Efficiency Options", FALSE);
+ do_cmd_options_aux(4, "Efficiency Options", false);
break;
}
@@ -1268,7 +1218,7 @@ void do_cmd_options()
/* ToME Options */
case '5':
{
- do_cmd_options_aux(5, "ToME Options", FALSE);
+ do_cmd_options_aux(5, "ToME Options", false);
break;
}
@@ -1276,7 +1226,7 @@ void do_cmd_options()
/* Birth Options - read only */
case '6':
{
- do_cmd_options_aux(6, "Birth Options(read only)", TRUE);
+ do_cmd_options_aux(6, "Birth Options(read only)", true);
break;
}
@@ -1322,7 +1272,7 @@ void do_cmd_options()
prt("Command: Base Delay Factor", 21, 0);
/* Get a new value */
- while (1)
+ while (true)
{
auto const msec = options->delay_factor_ms();
@@ -1357,7 +1307,7 @@ void do_cmd_options()
prt("Command: Hitpoint Warning", 18, 0);
/* Get a new value */
- while (1)
+ while (true)
{
prt(fmt::format("Current hitpoint warning: {:d}0%",
options->hitpoint_warn), 22, 0);
@@ -1427,7 +1377,7 @@ void do_cmd_pref()
/*
* Hack -- append all current macros to the given file
*/
-static errr macro_dump(cptr fname)
+static errr macro_dump(const char *fname)
{
int i;
@@ -1493,7 +1443,7 @@ static errr macro_dump(cptr fname)
*
* Note that both "flush()" calls are extremely important.
*/
-static void do_cmd_macro_aux(char *buf, bool_ macro_screen)
+static void do_cmd_macro_aux(char *buf, bool macro_screen)
{
int i, n = 0;
@@ -1504,7 +1454,7 @@ static void do_cmd_macro_aux(char *buf, bool_ macro_screen)
flush();
/* Do not process macros */
- inkey_base = TRUE;
+ inkey_base = true;
/* First key */
i = inkey();
@@ -1516,7 +1466,7 @@ static void do_cmd_macro_aux(char *buf, bool_ macro_screen)
buf[n++] = i;
/* Do not process macros */
- inkey_base = TRUE;
+ inkey_base = true;
/* Attempt to read a key */
i = inkey_scan();
@@ -1574,7 +1524,7 @@ static void do_cmd_macro_aux_keymap(char *buf)
/*
* Hack -- append all keymaps to the given file
*/
-static errr keymap_dump(cptr fname)
+static errr keymap_dump(const char *fname)
{
int i;
@@ -1608,7 +1558,7 @@ static errr keymap_dump(cptr fname)
/* Dump them */
for (i = 0; i < 256; i++)
{
- cptr act;
+ const char *act;
/* Loop up the keymap */
act = keymap_act[mode][i];
@@ -1654,16 +1604,11 @@ void do_cmd_macros()
/* Keymap mode */
int mode = get_keymap_mode();
-
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save screen */
- Term_save();
-
+ screen_save_no_flush();
/* Process requests until done */
- while (1)
+ while (true)
{
char buf[1024];
@@ -1715,7 +1660,7 @@ void do_cmd_macros()
prt("File: ", 18, 0);
/* Default filename */
- auto tmp = fmt::format("{}.prf", game->player_name);
+ auto tmp = name_file_pref(game->player_name);
/* Ask for a file */
if (!askfor_aux(&tmp, 80))
@@ -1724,7 +1669,7 @@ void do_cmd_macros()
}
/* Process the given filename */
- if (0 != process_pref_file(tmp.c_str()))
+ if (0 != process_pref_file(tmp))
{
/* Prompt */
msg_print("Could not load file!");
@@ -1741,7 +1686,7 @@ void do_cmd_macros()
prt("File: ", 18, 0);
/* Default filename */
- auto tmp = fmt::format("{}.prf", game->player_name);
+ auto tmp = name_file_pref(game->player_name);
/* Ask for a file */
if (!askfor_aux(&tmp, 80))
@@ -1768,7 +1713,7 @@ void do_cmd_macros()
prt("Trigger: ", 18, 0);
/* Get a macro trigger */
- do_cmd_macro_aux(buf, TRUE);
+ do_cmd_macro_aux(buf, true);
/* Acquire action */
k = macro_find_exact(buf);
@@ -1809,7 +1754,7 @@ void do_cmd_macros()
prt("Trigger: ", 18, 0);
/* Get a macro trigger */
- do_cmd_macro_aux(buf, TRUE);
+ do_cmd_macro_aux(buf, true);
/* Clear */
clear_from(20);
@@ -1844,7 +1789,7 @@ void do_cmd_macros()
prt("Trigger: ", 18, 0);
/* Get a macro trigger */
- do_cmd_macro_aux(buf, TRUE);
+ do_cmd_macro_aux(buf, true);
/* Link the macro */
macro_add(buf, buf);
@@ -1863,7 +1808,7 @@ void do_cmd_macros()
prt("File: ", 18, 0);
/* Default filename */
- auto tmp = fmt::format("{}.prf", game->player_name);
+ auto tmp = name_file_pref(game->player_name);
/* Ask for a file */
if (!askfor_aux(&tmp, 80))
@@ -1881,7 +1826,7 @@ void do_cmd_macros()
/* Query a keymap */
else if (i == '7')
{
- cptr act;
+ const char *act;
/* Prompt */
prt("Command: Query a keymap", 16, 0);
@@ -1980,8 +1925,6 @@ void do_cmd_macros()
/* Enter a new action */
else if (i == '0')
{
- char tmp[1024];
-
/* Prompt */
prt("Command: Enter a new action", 16, 0);
@@ -1989,7 +1932,7 @@ void do_cmd_macros()
Term_gotoxy(0, 22);
/* Hack -- limit the value */
- tmp[80] = '\0';
+ buf[80] = '\0';
/* Get an encoded action */
if (!askfor_aux(buf, 80)) continue;
@@ -2010,10 +1953,7 @@ void do_cmd_macros()
}
/* Load screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -2026,24 +1966,13 @@ void do_cmd_visuals()
auto &f_info = game->edit_data.f_info;
auto &k_info = game->edit_data.k_info;
- int i;
-
- FILE *fff;
-
- char tmp[160];
-
char buf[1024];
-
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
-
+ screen_save_no_flush();
/* Interact until done */
- while (1)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -2067,7 +1996,7 @@ void do_cmd_visuals()
prt("Command: ", 15, 0);
/* Prompt */
- i = inkey();
+ int i = inkey();
/* Done */
if (i == ESCAPE) break;
@@ -2082,10 +2011,10 @@ void do_cmd_visuals()
prt("File: ", 17, 0);
/* Default filename */
- strnfmt(tmp, 160, "user-%s.prf", ANGBAND_SYS);
+ auto tmp = name_file_pref(fmt::format("user-{}", ANGBAND_SYS));
/* Query */
- if (!askfor_aux(tmp, 70)) continue;
+ if (!askfor_aux(&tmp, 70)) continue;
/* Process the given filename */
process_pref_file(tmp);
@@ -2101,16 +2030,16 @@ void do_cmd_visuals()
prt("File: ", 17, 0);
/* Default filename */
- strnfmt(tmp, 160, "user-%s.prf", ANGBAND_SYS);
+ auto tmp = name_file_pref(fmt::format("user-{}", ANGBAND_SYS));
/* Get a filename */
- if (!askfor_aux(tmp, 70)) continue;
+ if (!askfor_aux(&tmp, 70)) continue;
/* Build the filename */
- path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
+ path_build(buf, 1024, ANGBAND_DIR_USER, tmp.c_str());
/* Append to the file */
- fff = my_fopen(buf, "a");
+ FILE *fff = my_fopen(buf, "a");
/* Failure */
if (!fff) continue;
@@ -2156,16 +2085,16 @@ void do_cmd_visuals()
prt("File: ", 17, 0);
/* Default filename */
- strnfmt(tmp, 160, "user-%s.prf", ANGBAND_SYS);
+ auto tmp = name_file_pref(fmt::format("user-{}", ANGBAND_SYS));
/* Get a filename */
- if (!askfor_aux(tmp, 70)) continue;
+ if (!askfor_aux(&tmp, 70)) continue;
/* Build the filename */
- path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
+ path_build(buf, 1024, ANGBAND_DIR_USER, tmp.c_str());
/* Append to the file */
- fff = my_fopen(buf, "a");
+ FILE *fff = my_fopen(buf, "a");
/* Failure */
if (!fff) continue;
@@ -2175,18 +2104,15 @@ void do_cmd_visuals()
fprintf(fff, "# Object attr/char definitions\n\n");
/* Dump objects */
- for (std::size_t k = 0; k < k_info.size(); k++)
+ for (auto const &k_entry: k_info)
{
- object_kind *k_ptr = &k_info[k];
-
- /* Skip non-entries */
- if (!k_ptr->name) continue;
+ auto const k_ptr = k_entry.second;
/* Dump a comment */
- fprintf(fff, "# %s\n", k_ptr->name);
+ fprintf(fff, "# %s\n", k_ptr->name.c_str());
/* Dump the object attr/char info */
- fprintf(fff, "K:%zu:0x%02X:0x%02X\n\n", k,
+ fprintf(fff, "K:%d:0x%02X:0x%02X\n\n", k_entry.first,
(byte)(k_ptr->x_attr), (byte)(k_ptr->x_char));
}
@@ -2210,16 +2136,16 @@ void do_cmd_visuals()
prt("File: ", 17, 0);
/* Default filename */
- strnfmt(tmp, 160, "user-%s.prf", ANGBAND_SYS);
+ auto tmp = name_file_pref(fmt::format("user-{}", ANGBAND_SYS));
/* Get a filename */
- if (!askfor_aux(tmp, 70)) continue;
+ if (!askfor_aux(&tmp, 70)) continue;
/* Build the filename */
- path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
+ path_build(buf, 1024, ANGBAND_DIR_USER, tmp.c_str());
/* Append to the file */
- fff = my_fopen(buf, "a");
+ FILE *fff = my_fopen(buf, "a");
/* Failure */
if (!fff) continue;
@@ -2234,10 +2160,13 @@ void do_cmd_visuals()
auto f_ptr = &f_info[f_idx];
/* Skip non-entries */
- if (!f_ptr->name) continue;
+ if (f_ptr->name.empty())
+ {
+ continue;
+ }
/* Dump a comment */
- fprintf(fff, "# %s\n", f_ptr->name);
+ fprintf(fff, "# %s\n", f_ptr->name.c_str());
/* Dump the feature attr/char info */
fprintf(fff, "F:%zu:0x%02X:0x%02X\n\n", f_idx,
@@ -2263,7 +2192,7 @@ void do_cmd_visuals()
prt("Command: Change monster attr/chars", 15, 0);
/* Hack -- query until done */
- while (1)
+ while (true)
{
auto r_ptr = &r_info[r];
@@ -2312,15 +2241,18 @@ void do_cmd_visuals()
/* Modify object attr/chars */
else if (i == '7')
{
- static int k = 0;
+ static auto const k_info_keys =
+ game->edit_data.k_info_keys();
+
+ static int k_idx = 0;
/* Prompt */
prt("Command: Change object attr/chars", 15, 0);
/* Hack -- query until done */
- while (1)
+ while (true)
{
- object_kind *k_ptr = &k_info[k];
+ auto k_ptr = k_info.at(k_info_keys[k_idx]);
byte da = k_ptr->d_attr;
char dc = k_ptr->d_char;
@@ -2330,7 +2262,7 @@ void do_cmd_visuals()
/* Label the object */
Term_putstr(5, 17, -1, TERM_WHITE,
format("Object = %d, Name = %-40.40s",
- k, k_ptr->name));
+ k_info_keys[k_idx], k_ptr->name.c_str()));
/* Label the Default values */
Term_putstr(10, 19, -1, TERM_WHITE,
@@ -2355,12 +2287,12 @@ void do_cmd_visuals()
if (i == ESCAPE) break;
/* Analyze */
- if (i == 'n') k = (k + k_info.size() + 1) % k_info.size();
- if (i == 'N') k = (k + k_info.size() - 1) % k_info.size();
- if (i == 'a') k_info[k].x_attr = (ca + 1);
- if (i == 'A') k_info[k].x_attr = (ca - 1);
- if (i == 'c') k_info[k].x_char = (cc + 1);
- if (i == 'C') k_info[k].x_char = (cc - 1);
+ if (i == 'n') k_idx = (k_idx + k_info_keys.size() + 1) % k_info_keys.size();
+ if (i == 'N') k_idx = (k_idx + k_info_keys.size() - 1) % k_info_keys.size();
+ if (i == 'a') k_ptr->x_attr = (ca + 1);
+ if (i == 'A') k_ptr->x_attr = (ca - 1);
+ if (i == 'c') k_ptr->x_char = (cc + 1);
+ if (i == 'C') k_ptr->x_char = (cc - 1);
}
}
@@ -2373,7 +2305,7 @@ void do_cmd_visuals()
prt("Command: Change feature attr/chars", 15, 0);
/* Hack -- query until done */
- while (1)
+ while (true)
{
auto f_ptr = &f_info[f];
@@ -2385,7 +2317,7 @@ void do_cmd_visuals()
/* Label the object */
Term_putstr(5, 17, -1, TERM_WHITE,
format("Terrain = %d, Name = %-40.40s",
- f, f_ptr->name));
+ f, f_ptr->name.c_str()));
/* Label the Default values */
Term_putstr(10, 19, -1, TERM_WHITE,
@@ -2446,10 +2378,7 @@ void do_cmd_visuals()
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -2462,20 +2391,13 @@ void do_cmd_colors()
FILE *fff;
- char tmp[160];
-
char buf[1024];
-
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
-
+ screen_save_no_flush();
/* Interact until done */
- while (1)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -2507,16 +2429,16 @@ void do_cmd_colors()
prt("File: ", 10, 0);
/* Default file */
- strnfmt(tmp, 160, "user-%s.prf", ANGBAND_SYS);
+ auto tmp = name_file_pref(fmt::format("user-{}", ANGBAND_SYS));
/* Query */
- if (!askfor_aux(tmp, 70)) continue;
+ if (!askfor_aux(&tmp, 70)) continue;
/* Process the given filename */
process_pref_file(tmp);
/* Mega-Hack -- react to changes */
- Term_xtra(TERM_XTRA_REACT, 0);
+ Term_xtra_react();
/* Mega-Hack -- redraw */
Term_redraw();
@@ -2532,13 +2454,13 @@ void do_cmd_colors()
prt("File: ", 10, 0);
/* Default filename */
- strnfmt(tmp, 160, "user-%s.prf", ANGBAND_SYS);
+ auto tmp = name_file_pref(fmt::format("user-{}", ANGBAND_SYS));
/* Get a filename */
- if (!askfor_aux(tmp, 70)) continue;
+ if (!askfor_aux(&tmp, 70)) continue;
/* Build the filename */
- path_build(buf, 1024, ANGBAND_DIR_USER, tmp);
+ path_build(buf, 1024, ANGBAND_DIR_USER, tmp.c_str());
/* Append to the file */
fff = my_fopen(buf, "a");
@@ -2558,7 +2480,7 @@ void do_cmd_colors()
int gv = angband_color_table[i][2];
int bv = angband_color_table[i][3];
- cptr name = "unknown";
+ const char *name = "unknown";
/* Skip non-entries */
if (!kv && !rv && !gv && !bv) continue;
@@ -2593,9 +2515,9 @@ void do_cmd_colors()
prt("Command: Modify colors", 8, 0);
/* Hack -- query until done */
- while (1)
+ while (true)
{
- cptr name;
+ const char *name;
/* Clear */
clear_from(10);
@@ -2648,7 +2570,7 @@ void do_cmd_colors()
if (i == 'B') angband_color_table[a][3] = (angband_color_table[a][3] - 1);
/* Hack -- react to changes */
- Term_xtra(TERM_XTRA_REACT, 0);
+ Term_xtra_react();
/* Hack -- redraw */
Term_redraw();
@@ -2667,10 +2589,7 @@ void do_cmd_colors()
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -2713,7 +2632,7 @@ void do_cmd_version()
/*
* Array of feeling strings
*/
-static cptr do_cmd_feeling_text[11] =
+static const char *do_cmd_feeling_text[11] =
{
"Looks like any other level.",
"You feel there is something special about this level.",
@@ -2736,6 +2655,7 @@ static cptr do_cmd_feeling_text[11] =
void do_cmd_feeling()
{
auto const &d_info = game->edit_data.d_info;
+ auto const &dungeon_flags = game->dungeon_flags;
/* Verify the feeling */
if (feeling < 0) feeling = 0;
@@ -2753,17 +2673,11 @@ void do_cmd_feeling()
return;
}
- /* No useful feeling in special levels */
- if (dungeon_flags & DF_DESC)
+ /* Do we have a description override? */
+ if (auto description = get_level_description())
{
- char buf[1024];
-
- if (get_dungeon_save(buf) || game->generate_special_feeling || (dungeon_flags & DF_DESC_ALWAYS))
- {
- if (!get_level_desc(buf)) msg_print("Someone forgot to describe this level!");
- else msg_print(buf);
- return;
- }
+ msg_print(*description);
+ return;
}
/* No useful feeling in quests */
@@ -2791,7 +2705,6 @@ void do_cmd_feeling()
else
msg_print(do_cmd_feeling_text[feeling]);
}
- return;
}
@@ -2815,7 +2728,7 @@ void do_cmd_load_screen()
byte a = 0;
char c = ' ';
- bool_ okay = TRUE;
+ bool okay = true;
FILE *fff;
@@ -2835,11 +2748,8 @@ void do_cmd_load_screen()
/* Retrieve the current screen size */
Term_get_size(&wid, &hgt);
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Clear the screen */
Term_clear();
@@ -2849,7 +2759,7 @@ void do_cmd_load_screen()
for (y = 0; okay; y++)
{
/* Get a line of data */
- if (my_fgets(fff, buf, 1024)) okay = FALSE;
+ if (my_fgets(fff, buf, 1024)) okay = false;
/* Stop on blank line */
if (!buf[0]) break;
@@ -2875,7 +2785,7 @@ void do_cmd_load_screen()
for (y = 0; okay; y++)
{
/* Get a line of data */
- if (my_fgets(fff, buf, 1024)) okay = FALSE;
+ if (my_fgets(fff, buf, 1024)) okay = false;
/* Stop on blank line */
if (!buf[0]) break;
@@ -2893,7 +2803,7 @@ void do_cmd_load_screen()
for (x = 0; x < len; x++)
{
/* Get the attr/char */
- (Term_what(x, y, &a, &c));
+ Term_what(x, y, &a, &c);
/* Look up the attr */
for (i = 0; i < 16; i++)
@@ -2918,10 +2828,7 @@ void do_cmd_load_screen()
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -2955,12 +2862,8 @@ void do_cmd_save_screen()
/* Retrieve the current screen size */
Term_get_size(&wid, &hgt);
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
-
+ screen_save_no_flush();
/* Dump the screen */
for (y = 0; y < hgt; y++)
@@ -2969,7 +2872,7 @@ void do_cmd_save_screen()
for (x = 0; x < wid; x++)
{
/* Get the attr/char */
- (Term_what(x, y, &a, &c));
+ Term_what(x, y, &a, &c);
/* Dump it */
buf[x] = c;
@@ -2993,7 +2896,7 @@ void do_cmd_save_screen()
for (x = 0; x < wid; x++)
{
/* Get the attr/char */
- (Term_what(x, y, &a, &c));
+ Term_what(x, y, &a, &c);
/* Dump it */
buf[x] = hack[a & 0x0F];
@@ -3020,10 +2923,7 @@ void do_cmd_save_screen()
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -3035,12 +2935,15 @@ void do_cmd_knowledge_artifacts()
auto const &k_info = game->edit_data.k_info;
auto const &a_info = game->edit_data.a_info;
+ auto const k_info_keys = game->edit_data.k_info_keys();
+
int i, z, x, y;
char base_name[80];
/* Scan the artifacts */
- std::vector<bool_> okay(a_info.size(), FALSE);
+ std::vector<bool> okay(a_info.size(), false);
+
for (std::size_t k = 0; k < a_info.size(); k++)
{
auto a_ptr = &a_info[k];
@@ -3052,13 +2955,13 @@ void do_cmd_knowledge_artifacts()
if (!a_ptr->cur_num) continue;
/* Assume okay */
- okay[k] = TRUE;
+ okay[k] = true;
}
- std::vector<bool_> okayk(k_info.size(), FALSE);
- for (std::size_t k = 0; k < k_info.size(); k++)
+ std::unordered_set<int> okayk;
+ for (auto const &k_entry: k_info)
{
- auto k_ptr = &k_info[k];
+ auto k_ptr = k_entry.second;
/* Skip "empty" artifacts */
if (!(k_ptr->flags & TR_NORM_ART)) continue;
@@ -3067,7 +2970,7 @@ void do_cmd_knowledge_artifacts()
if (!k_ptr->artifact) continue;
/* Assume okay */
- okayk[k] = TRUE;
+ okayk.insert(k_entry.first);
}
/* Check the dungeon */
@@ -3093,13 +2996,13 @@ void do_cmd_knowledge_artifacts()
if (object_known_p(o_ptr)) continue;
/* Note the artifact */
- if (k_info[o_ptr->k_idx].flags & TR_NORM_ART)
+ if (o_ptr->k_ptr->flags & TR_NORM_ART)
{
- okayk[o_ptr->k_idx] = FALSE;
+ okayk.erase(o_ptr->k_ptr->idx);
}
else
{
- okay[o_ptr->name1] = FALSE;
+ okay[o_ptr->name1] = false;
}
}
}
@@ -3111,10 +3014,8 @@ void do_cmd_knowledge_artifacts()
/* Scan all objects the monster carries */
for (auto const this_o_idx: m_list[i].hold_o_idxs)
{
- object_type * o_ptr;
-
/* Acquire object */
- o_ptr = &o_list[this_o_idx];
+ auto o_ptr = &o_list[this_o_idx];
/* Ignore random artifacts */
if (o_ptr->tval == TV_RANDART) continue;
@@ -3126,13 +3027,13 @@ void do_cmd_knowledge_artifacts()
if (object_known_p(o_ptr)) continue;
/* Note the artifact */
- if (k_info[o_ptr->k_idx].flags & TR_NORM_ART)
+ if (o_ptr->k_ptr->flags & TR_NORM_ART)
{
- okayk[o_ptr->k_idx] = FALSE;
+ okayk.erase(o_ptr->k_ptr->idx);
}
else
{
- okay[o_ptr->name1] = FALSE;
+ okay[o_ptr->name1] = false;
}
}
}
@@ -3140,10 +3041,10 @@ void do_cmd_knowledge_artifacts()
/* Check the p_ptr->inventory and equipment */
for (i = 0; i < INVEN_TOTAL; i++)
{
- object_type *o_ptr = &p_ptr->inventory[i];
+ auto o_ptr = &p_ptr->inventory[i];
/* Ignore non-objects */
- if (!o_ptr->k_idx) continue;
+ if (!o_ptr->k_ptr) continue;
/* Ignore random artifacts */
if (o_ptr->tval == TV_RANDART) continue;
@@ -3155,13 +3056,13 @@ void do_cmd_knowledge_artifacts()
if (object_known_p(o_ptr)) continue;
/* Note the artifact */
- if (k_info[o_ptr->k_idx].flags & TR_NORM_ART)
+ if (o_ptr->k_ptr->flags & TR_NORM_ART)
{
- okayk[o_ptr->k_idx] = FALSE;
+ okayk.erase(o_ptr->k_ptr->idx);
}
else
{
- okay[o_ptr->name1] = FALSE;
+ okay[o_ptr->name1] = false;
}
}
@@ -3205,36 +3106,35 @@ void do_cmd_knowledge_artifacts()
}
/* Describe the artifact */
- object_desc_store(base_name, q_ptr, FALSE, 0);
+ object_desc_store(base_name, q_ptr, false, 0);
}
/* Hack -- Build the artifact name */
w.write(" The {}\n", base_name);
}
- for (std::size_t k = 0; k < k_info.size(); k++)
+ for (auto const &k: k_info_keys)
{
/* List "dead" ones */
- if (!okayk[k]) continue;
+ if (!okayk.count(k))
+ {
+ continue;
+ }
/* Paranoia */
strcpy(base_name, "Unknown Artifact");
- /* Real object */
- if (k)
- {
- object_type forge;
- object_type *q_ptr;
+ object_type forge;
+ object_type *q_ptr;
- /* Get local object */
- q_ptr = &forge;
+ /* Get local object */
+ q_ptr = &forge;
- /* Create fake object */
- object_prep(q_ptr, k);
+ /* Create fake object */
+ object_prep(q_ptr, k);
- /* Describe the artifact */
- object_desc_store(base_name, q_ptr, FALSE, 0);
- }
+ /* Describe the artifact */
+ object_desc_store(base_name, q_ptr, false, 0);
/* Hack -- Build the artifact name */
w.write(" The {}\n", base_name);
@@ -3270,13 +3170,26 @@ static void do_cmd_knowledge_uniques()
{
auto r_ptr = &r_info[k];
- /* Only print Uniques */
- if ((r_ptr->flags & RF_UNIQUE) &&
- !(r_ptr->flags & RF_PET) &&
- !(r_ptr->flags & RF_NEUTRAL))
+ // Ignore non-uniques
+ if (!(r_ptr->flags & RF_UNIQUE))
+ {
+ continue;
+ }
+
+ // Exclude PET/NEUTRAL monsters
+ if ((r_ptr->flags & RF_PET) || (r_ptr->flags & RF_NEUTRAL))
{
- unique_r_idxs.push_back(k);
+ continue;
}
+
+ // Exclude JOKE monsters if we're playing without joke monsters
+ if (!options->joke_monsters && (r_ptr->flags & RF_JOKEANGBAND))
+ {
+ continue;
+ }
+
+ // Keep
+ unique_r_idxs.push_back(k);
}
// Sort races by level.
@@ -3295,7 +3208,7 @@ static void do_cmd_knowledge_uniques()
/* Only print Uniques */
if (r_ptr->flags & RF_UNIQUE)
{
- bool_ dead = (r_ptr->max_num == 0);
+ bool dead = (r_ptr->max_num == 0);
/* Print a message */
if (dead)
@@ -3333,10 +3246,10 @@ static void plural_aux(char *name)
/* "someone of something" */
else if (strstr(name, " of "))
{
- cptr aider = strstr(name, " of ");
+ const char *aider = strstr(name, " of ");
char dummy[80];
int i = 0;
- cptr ctr = name;
+ const char *ctr = name;
while (ctr < aider)
{
@@ -3380,25 +3293,25 @@ static void plural_aux(char *name)
{
strcpy(&name[name_len - 1], "ies");
}
- else if (name_len >= 4 && streq(&name[name_len - 4], "ouse"))
+ else if (name_len >= 4 && equals(&name[name_len - 4], "ouse"))
{
strcpy(&name[name_len - 4], "ice");
}
- else if (name_len >= 6 && streq(&name[name_len - 6], "kelman"))
+ else if (name_len >= 6 && equals(&name[name_len - 6], "kelman"))
{
strcpy(&name[name_len - 6], "kelmen");
}
- else if (name_len >= 2 && streq(&name[name_len - 2], "ex"))
+ else if (name_len >= 2 && equals(&name[name_len - 2], "ex"))
{
strcpy(&name[name_len - 2], "ices");
}
- else if (name_len >= 3 && streq(&name[name_len - 3], "olf"))
+ else if (name_len >= 3 && equals(&name[name_len - 3], "olf"))
{
strcpy(&name[name_len - 3], "olves");
}
/* Now begins sane cases */
- else if ((name_len >= 2 && streq(&name[name_len - 2], "ch")) || (name_len >= 1 && name[name_len - 1] == 's'))
+ else if ((name_len >= 2 && equals(&name[name_len - 2], "ch")) || (name_len >= 1 && name[name_len - 1] == 's'))
{
strcpy(&name[name_len], "es");
}
@@ -3525,7 +3438,7 @@ static void do_cmd_knowledge_kill_count()
if (r_ptr->flags & RF_UNIQUE)
{
- bool_ dead = (r_ptr->max_num == 0);
+ bool dead = (r_ptr->max_num == 0);
if (dead)
{
@@ -3573,48 +3486,6 @@ static void do_cmd_knowledge_kill_count()
/*
- * Display known objects
- */
-static void do_cmd_knowledge_objects()
-{
- auto const &k_info = game->edit_data.k_info;
-
- fmt::MemoryWriter w;
-
- /* Scan the object kinds */
- for (std::size_t k = 1; k < k_info.size(); k++)
- {
- auto k_ptr = &k_info[k];
-
- /* Hack -- skip artifacts */
- if (k_ptr->flags & (TR_INSTA_ART)) continue;
-
- /* List known flavored objects */
- if (k_ptr->flavor && k_ptr->aware)
- {
- object_type object_type_body;
-
- /* Get local object */
- object_type *i_ptr = &object_type_body;
-
- /* Create fake object */
- object_prep(i_ptr, k);
-
- /* Describe the object */
- char o_name[80];
- object_desc_store(o_name, i_ptr, FALSE, 0);
-
- /* Print a message */
- w.write(" {}\n", o_name);
- }
- }
-
- // Display
- show_string(w.c_str(), "Known Objects");
-}
-
-
-/*
* List recall depths
*/
static void do_cmd_knowledge_dungeons()
@@ -3761,9 +3632,6 @@ void do_cmd_knowledge_notes()
{
/* Spawn */
show_notes_file();
-
- /* Done */
- return;
}
@@ -3774,15 +3642,11 @@ void do_cmd_knowledge()
{
int i;
-
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Interact until done */
- while (1)
+ while (true)
{
/* Clear screen */
Term_clear();
@@ -3793,15 +3657,14 @@ void do_cmd_knowledge()
/* Give some choices */
prt("(1) Display known artifacts", 4, 5);
prt("(2) Display known uniques", 5, 5);
- prt("(3) Display known objects", 6, 5);
- prt("(4) Display kill count", 7, 5);
- prt("(5) Display recall depths", 8, 5);
- prt("(6) Display corruptions", 9, 5);
- prt("(7) Display current pets", 10, 5);
- prt("(8) Display current quests", 11, 5);
- prt("(9) Display current fates", 12, 5);
- prt("(0) Display known dungeon towns", 13, 5);
- prt("(A) Display notes", 14, 5);
+ prt("(3) Display kill count", 7, 5);
+ prt("(4) Display recall depths", 8, 5);
+ prt("(5) Display corruptions", 9, 5);
+ prt("(6) Display current pets", 10, 5);
+ prt("(7) Display current quests", 11, 5);
+ prt("(8) Display current fates", 12, 5);
+ prt("(9) Display known dungeon towns", 13, 5);
+ prt("(0) Display notes", 14, 5);
/* Prompt */
prt("Command: ", 16, 0);
@@ -3830,16 +3693,8 @@ void do_cmd_knowledge()
break;
}
- /* Objects */
- case '3':
- {
- do_cmd_knowledge_objects();
-
- break;
- }
-
/* Kill count */
- case '4':
+ case '3':
{
do_cmd_knowledge_kill_count();
@@ -3847,7 +3702,7 @@ void do_cmd_knowledge()
}
/* Recall depths */
- case '5':
+ case '4':
{
do_cmd_knowledge_dungeons();
@@ -3855,7 +3710,7 @@ void do_cmd_knowledge()
}
/* corruptions */
- case '6':
+ case '5':
{
do_cmd_knowledge_corruptions();
@@ -3863,7 +3718,7 @@ void do_cmd_knowledge()
}
/* Pets */
- case '7':
+ case '6':
{
do_cmd_knowledge_pets();
@@ -3871,7 +3726,7 @@ void do_cmd_knowledge()
}
/* Quests */
- case '8':
+ case '7':
{
do_cmd_knowledge_quests();
@@ -3879,7 +3734,7 @@ void do_cmd_knowledge()
}
/* Fates */
- case '9':
+ case '8':
{
do_cmd_knowledge_fates();
@@ -3887,7 +3742,7 @@ void do_cmd_knowledge()
}
/* Dungeon towns */
- case '0':
+ case '9':
{
do_cmd_knowledge_towns();
@@ -3895,8 +3750,7 @@ void do_cmd_knowledge()
}
/* Notes */
- case 'A':
- case 'a':
+ case '0':
{
do_cmd_knowledge_notes();
@@ -3917,10 +3771,7 @@ void do_cmd_knowledge()
}
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -3930,20 +3781,14 @@ void do_cmd_knowledge()
*/
void do_cmd_checkquest()
{
- /* Enter "icky" mode */
- character_icky = TRUE;
-
/* Save the screen */
- Term_save();
+ screen_save_no_flush();
/* Quest info */
do_cmd_knowledge_quests();
/* Restore the screen */
- Term_load();
-
- /* Leave "icky" mode */
- character_icky = FALSE;
+ screen_load_no_flush();
}
@@ -4132,7 +3977,7 @@ void macro_recorder_stop()
prt("Trigger: ", 0, 0);
/* Get a macro trigger */
- do_cmd_macro_aux(buf, FALSE);
+ do_cmd_macro_aux(buf, false);
/* Link the macro */
macro_add(buf, macro.c_str());
diff --git a/src/cmd4.hpp b/src/cmd4.hpp
index 39f1c16c..29f9134b 100644
--- a/src/cmd4.hpp
+++ b/src/cmd4.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include "h-basic.h"
+#include "h-basic.hpp"
void macro_recorder_start();
void macro_recorder_add(char c);
@@ -25,4 +25,4 @@ void do_cmd_checkquest();
void do_cmd_change_tactic(int i);
void do_cmd_change_movement(int i);
void do_cmd_time();
-void do_cmd_options_aux(int page, cptr info, bool_ read_only);
+void do_cmd_options_aux(int page, const char *info, bool read_only);
diff --git a/src/cmd5.cc b/src/cmd5.cc
index a93759b0..c030addd 100644
--- a/src/cmd5.cc
+++ b/src/cmd5.cc
@@ -37,12 +37,11 @@
#include "stats.hpp"
#include "tables.hpp"
#include "util.hpp"
-#include "util.h"
-#include "variable.h"
#include "variable.hpp"
#include "wizard2.hpp"
#include "xtra1.hpp"
#include "xtra2.hpp"
+#include "z-form.hpp"
#include "z-rand.hpp"
#include <boost/noncopyable.hpp>
@@ -91,29 +90,32 @@ static object_filter_t const &item_tester_hook_browsable()
/*
* Are we using a mage staff
*/
-bool_ is_magestaff()
+bool is_magestaff()
{
- int i;
-
-
- i = 0;
+ int i = 0;
while (p_ptr->body_parts[i] == INVEN_WIELD)
{
object_type *o_ptr = &p_ptr->inventory[INVEN_WIELD + i];
/* Wielding a mage staff */
- if ((o_ptr->k_idx) && (o_ptr->tval == TV_MSTAFF)) return (TRUE);
+ if ((o_ptr->k_ptr) && (o_ptr->tval == TV_MSTAFF))
+ {
+ return true;
+ }
/* Next slot */
i++;
/* Paranoia */
- if (i >= (INVEN_TOTAL - INVEN_WIELD)) break;
+ if (i >= (INVEN_TOTAL - INVEN_WIELD))
+ {
+ break;
+ }
}
/* Not wielding a mage staff */
- return (FALSE);
+ return false;
}
@@ -131,11 +133,9 @@ static int print_book(s16b sval, s32b spell_idx, object_type *obj)
for (auto spell_idx : school_book->spell_idxs)
{
byte color = TERM_L_DARK;
- bool_ is_ok;
char label[8];
- is_ok = is_ok_spell(spell_idx, obj->pval);
- if (is_ok)
+ if (is_ok_spell(spell_idx, obj->pval))
{
color = (get_mana(spell_idx) > get_power(spell_idx)) ? TERM_ORANGE : TERM_L_GREEN;
}
@@ -170,8 +170,7 @@ static void browse_school_spell(int book, int spell_idx, object_type *o_ptr)
I2A(0), I2A(num - 1));
/* Save the screen */
- character_icky = TRUE;
- Term_save();
+ screen_save_no_flush();
/* Display a list of spells */
print_book(book, spell_idx, o_ptr);
@@ -208,8 +207,7 @@ static void browse_school_spell(int book, int spell_idx, object_type *o_ptr)
/* Restore the screen */
- Term_load();
- character_icky = FALSE;
+ screen_load_no_flush();
/* Show choices */
window_stuff();
@@ -267,7 +265,7 @@ static void do_poly_wounds()
s16b change = damroll(p_ptr->lev, 5);
- bool_ Nasty_effect = (randint(5) == 1);
+ bool Nasty_effect = (randint(5) == 1);
if (!(wounds || hit_p || Nasty_effect)) return;
@@ -321,7 +319,7 @@ void do_poly_self()
}
/* Deformities are discriminated against! */
- dec_stat(A_CHR, randint(6), TRUE);
+ dec_stat(A_CHR, randint(6), true);
if (effect_msg[0])
{
@@ -358,7 +356,7 @@ void do_poly_self()
goalexpfact = 100 + 3 * rand_int(poly_power);
/* Roll until an appropriate selection is made */
- while (1)
+ while (true)
{
new_race = rand_int(race_info.size());
expfact = race_info[new_race].ps.exp;
@@ -450,7 +448,7 @@ void do_poly_self()
/*
* Fetch an item (teleport it right underneath the caster)
*/
-void fetch(int dir, int wgt, bool_ require_los)
+void fetch(int dir, int wgt, bool require_los)
{
/* Check to see if an object is already there */
if (!cave[p_ptr->py][p_ptr->px].o_idxs.empty())
@@ -492,7 +490,7 @@ void fetch(int dir, int wgt, bool_ require_los)
int ty = p_ptr->py; /* Where to drop the item */
int tx = p_ptr->px;
- while (1)
+ while (true)
{
ty += ddy[dir];
tx += ddx[dir];
@@ -529,7 +527,7 @@ void fetch(int dir, int wgt, bool_ require_los)
/* Feedback */
char o_name[80];
- object_desc(o_name, o_ptr, TRUE, 0);
+ object_desc(o_name, o_ptr, true, 0);
msg_format("%^s flies through the air to your feet.", o_name);
note_spot(p_ptr->py, p_p