diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/abl-show.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/acr.cc | 280 | ||||
-rw-r--r-- | crawl-ref/source/chardump.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/clua.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/delay.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/direct.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/externs.h | 8 | ||||
-rw-r--r-- | crawl-ref/source/initfile.cc | 44 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/misc.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/monplace.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 7 | ||||
-rw-r--r-- | crawl-ref/source/skills2.cc | 5 |
14 files changed, 170 insertions, 223 deletions
diff --git a/crawl-ref/source/abl-show.cc b/crawl-ref/source/abl-show.cc index d720575dd4..a7fa3bba2c 100644 --- a/crawl-ref/source/abl-show.cc +++ b/crawl-ref/source/abl-show.cc @@ -2218,8 +2218,7 @@ void set_god_ability_slots( void ) { if ( god_abilities[you.religion][i] != ABIL_NON_ABILITY ) { - set_god_ability_helper(god_abilities[you.religion][i], - (Options.lowercase_invocations ? 'a' : 'A') + num); + set_god_ability_helper(god_abilities[you.religion][i], 'a' + num); ++num; } } @@ -2238,10 +2237,8 @@ static int find_ability_slot( ability_type which_ability ) // no requested slot, find new one and make it preferred. - // skip over a-e if player prefers them for invocations - const int startpoint = (Options.lowercase_invocations ? 5 : 0); - - for (int slot = startpoint; slot < 52; slot++) + // skip over a-e (invocations) + for (int slot = 5; slot < 52; slot++) { if (you.ability_letter_table[slot] == ABIL_NON_ABILITY) { @@ -2250,8 +2247,8 @@ static int find_ability_slot( ability_type which_ability ) } } - // if we skipped over a-e to reserve them, try them now - for (int slot = startpoint - 1; slot >= 0; slot--) + // if we can't find anything else, try a-e + for (int slot = 4; slot >= 0; slot--) { if (you.ability_letter_table[slot] == ABIL_NON_ABILITY) { diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 5af97eb4a9..cb5995b75f 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -177,6 +177,12 @@ static void setup_cmd_repeat(); static void do_prev_cmd_again(); static void update_replay_state(); +static void show_commandline_options_help(); +static void wanderer_startup_message(); +static void god_greeting_message( bool game_start ); +static void take_starting_note(); +static void startup_tutorial(); + #ifdef DGL_SIMPLE_MESSAGING static void read_messages(); #endif @@ -193,27 +199,8 @@ int main( int argc, char *argv[] ) // parse command line args -- look only for initfile & crawl_dir entries if (!parse_args(argc, argv, true)) { - // print help - puts("Command line options:"); - puts(" -name <string> character name"); - puts(" -race <arg> preselect race (by letter, abbreviation, or name)"); - puts(" -class <arg> preselect class (by letter, abbreviation, or name)"); - puts(" -pizza <string> crawl pizza"); - puts(" -plain don't use IBM extended characters"); - puts(" -dir <path> crawl directory"); - puts(" -rc <file> init file name"); - puts(" -morgue <dir> directory to save character dumps"); - puts(" -macro <dir> directory to save/find macro.txt"); - puts(""); - puts("Command line options override init file options, which override"); - puts("environment options (CRAWL_NAME, CRAWL_PIZZA, CRAWL_DIR, CRAWL_RC)."); - puts(""); - puts("Highscore list options: (Can now be redirected to more, etc)"); - puts(" -scores [N] highscore list"); - puts(" -tscores [N] terse highscore list"); - puts(" -vscores [N] verbose highscore list"); - puts(" -scorefile <filename> scorefile to report on"); - exit(1); + show_commandline_options_help(); + return 1; } // Init monsters up front - needed to handle the mon_glyph option right. @@ -228,7 +215,7 @@ int main( int argc, char *argv[] ) if (Options.sc_entries != 0 || !SysEnv.scorefile.empty()) { hiscores_print_all( Options.sc_entries, Options.sc_format ); - exit(0); + return 0; } else { @@ -241,130 +228,35 @@ int main( int argc, char *argv[] ) // override some options for tutorial init_tutorial_options(); - if (game_start || Options.always_greet) - { - msg::stream << "Welcome, " << you.your_name << " the " - << species_name( you.species,you.experience_level ) - << " " << you.class_name << "." - << std::endl; - // Activate markers only after the welcome message, so the - // player can see any resulting messages. - env.markers.activate_all(); + msg::stream << "Welcome, " << you.your_name << " the " + << species_name( you.species,you.experience_level ) + << " " << you.class_name << "." + << std::endl; - // Starting messages can go here as this should only happen - // at the start of a new game -- bwr - // This message isn't appropriate for Options.always_greet - if (you.char_class == JOB_WANDERER && game_start) - { - int skill_levels = 0; - for (int i = 0; i <= NUM_SKILLS; i++) - skill_levels += you.skills[ i ]; + // Activate markers only after the welcome message, so the + // player can see any resulting messages. + env.markers.activate_all(); - if (skill_levels <= 2) - { - // Demigods and Demonspawn wanderers stand to not be - // able to see any of their skills at the start of - // the game (one or two skills should be easily guessed - // from starting equipment)... Anyways, we'll give the - // player a message to warn them (and give a reason why). -- bwr - mpr("You wake up in a daze, and can't recall much."); - } - } + if (game_start && you.char_class == JOB_WANDERER) + wanderer_startup_message(); - // These need some work -- should make sure that the god's - // name is metioned, else the message might be confusing. - switch (you.religion) - { - case GOD_ZIN: - simple_god_message( " says: Spread the light, my child." ); - break; - case GOD_SHINING_ONE: - simple_god_message( " says: Smite the infidels!" ); - break; - case GOD_KIKUBAAQUDGHA: - case GOD_YREDELEMNUL: - case GOD_NEMELEX_XOBEH: - simple_god_message( " says: Welcome..." ); - break; - case GOD_XOM: - if (game_start) - simple_god_message( " says: A new plaything!" ); - break; - case GOD_VEHUMET: - god_speaks( you.religion, "Let it end in hellfire!"); - break; - case GOD_OKAWARU: - simple_god_message(" says: Welcome, disciple."); - break; - case GOD_MAKHLEB: - god_speaks( you.religion, "Blood and souls for Makhleb!" ); - break; - case GOD_SIF_MUNA: - simple_god_message( " whispers: I know many secrets..."); - break; - case GOD_TROG: - simple_god_message( " says: Kill them all!" ); - break; - case GOD_ELYVILON: - simple_god_message( " says: Go forth and aid the weak!" ); - break; - case GOD_LUGONU: - simple_god_message( " says: Spread carnage and corruption!"); - break; - case GOD_BEOGH: - simple_god_message( - " says: Drown the unbelievers in a sea of blood!"); - break; - default: - break; - } + god_greeting_message( game_start ); - // warn player about their weapon, if unsuitable - wield_warning(false); - } + // warn player about their weapon, if unsuitable + wield_warning(false); if ( game_start ) - { + { if (Options.tutorial_left) - { - // don't allow triggering at game start - Options.tut_just_triggered = true; - // print stats and everything - prep_input(); - msg::streams(MSGCH_TUTORIAL) - << "Press any key to start the tutorial intro, " - "or Escape to skip it." - << std::endl; - const int ch = c_getch(); - - if (ch != ESCAPE) - tut_starting_screen(); - } - - std::ostringstream notestr; - notestr << you.your_name << ", the " - << species_name(you.species,you.experience_level) << " " - << you.class_name - << ", began the quest for the Orb."; - take_note(Note(NOTE_MESSAGE, 0, 0, notestr.str().c_str())); - - notestr.str(""); - notestr.clear(); - - notestr << "HP: " << you.hp << "/" << you.hp_max - << " MP: " << you.magic_points << "/" << you.max_magic_points; - take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, - notestr.str().c_str())); + startup_tutorial(); + take_starting_note(); } while (true) - { input(); - } // Should never reach this stage, right? - #ifdef UNIX unixcurses_shutdown(); #endif @@ -372,6 +264,130 @@ int main( int argc, char *argv[] ) return 0; } // end main() +static void show_commandline_options_help() +{ + puts("Command line options:"); + puts(" -name <string> character name"); + puts(" -race <arg> preselect race (by letter, abbreviation, or name)"); + puts(" -class <arg> preselect class (by letter, abbreviation, or name)"); + puts(" -pizza <string> crawl pizza"); + puts(" -plain don't use IBM extended characters"); + puts(" -dir <path> crawl directory"); + puts(" -rc <file> init file name"); + puts(" -morgue <dir> directory to save character dumps"); + puts(" -macro <dir> directory to save/find macro.txt"); + puts(""); + puts("Command line options override init file options, which override"); + puts("environment options (CRAWL_NAME, CRAWL_PIZZA, CRAWL_DIR, CRAWL_RC)."); + puts(""); + puts("Highscore list options: (Can now be redirected to more, etc)"); + puts(" -scores [N] highscore list"); + puts(" -tscores [N] terse highscore list"); + puts(" -vscores [N] verbose highscore list"); + puts(" -scorefile <filename> scorefile to report on"); +} + +static void wanderer_startup_message() +{ + int skill_levels = 0; + for (int i = 0; i < NUM_SKILLS; i++) + skill_levels += you.skills[ i ]; + + if (skill_levels <= 2) + { + // Demigods and Demonspawn wanderers stand to not be + // able to see any of their skills at the start of + // the game (one or two skills should be easily guessed + // from starting equipment)... Anyways, we'll give the + // player a message to warn them (and give a reason why). -- bwr + mpr("You wake up in a daze, and can't recall much."); + } +} + +static void god_greeting_message( bool game_start ) +{ + switch (you.religion) + { + case GOD_ZIN: + simple_god_message( " says: Spread the light, my child." ); + break; + case GOD_SHINING_ONE: + simple_god_message( " says: Smite the infidels!" ); + break; + case GOD_KIKUBAAQUDGHA: + case GOD_YREDELEMNUL: + case GOD_NEMELEX_XOBEH: + simple_god_message( " says: Welcome..." ); + break; + case GOD_XOM: + if (game_start) + simple_god_message( " says: A new plaything!" ); + break; + case GOD_VEHUMET: + god_speaks( you.religion, "Let it end in hellfire!"); + break; + case GOD_OKAWARU: + simple_god_message(" says: Welcome, disciple."); + break; + case GOD_MAKHLEB: + god_speaks( you.religion, "Blood and souls for Makhleb!" ); + break; + case GOD_SIF_MUNA: + simple_god_message( " whispers: I know many secrets..."); + break; + case GOD_TROG: + simple_god_message( " says: Kill them all!" ); + break; + case GOD_ELYVILON: + simple_god_message( " says: Go forth and aid the weak!" ); + break; + case GOD_LUGONU: + simple_god_message( " says: Spread carnage and corruption!"); + break; + case GOD_BEOGH: + simple_god_message( + " says: Drown the unbelievers in a sea of blood!"); + break; + case GOD_NO_GOD: + case NUM_GODS: + case GOD_RANDOM: + break; + } +} + +static void take_starting_note() +{ + std::ostringstream notestr; + notestr << you.your_name << ", the " + << species_name(you.species,you.experience_level) << " " + << you.class_name + << ", began the quest for the Orb."; + take_note(Note(NOTE_MESSAGE, 0, 0, notestr.str().c_str())); + + notestr.str(""); + notestr.clear(); + + notestr << "HP: " << you.hp << "/" << you.hp_max + << " MP: " << you.magic_points << "/" << you.max_magic_points; + take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, + notestr.str().c_str())); +} + +static void startup_tutorial() +{ + // don't allow triggering at game start + Options.tut_just_triggered = true; + // print stats and everything + prep_input(); + msg::streams(MSGCH_TUTORIAL) + << "Press any key to start the tutorial intro, or Escape to skip it." + << std::endl; + const int ch = c_getch(); + + if (ch != ESCAPE) + tut_starting_screen(); +} + #ifdef WIZARD static void handle_wizard_command( void ) { diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc index c2edaf5137..478ad3657e 100644 --- a/crawl-ref/source/chardump.cc +++ b/crawl-ref/source/chardump.cc @@ -556,7 +556,7 @@ static void sdump_screenshot(dump_params &par) static void sdump_notes(dump_params &par) { std::string &text(par.text); - if ( note_list.size() == 0 || Options.use_notes == false ) + if ( note_list.empty() ) return; text += "\nNotes\nTurn | Place | Note\n"; diff --git a/crawl-ref/source/clua.cc b/crawl-ref/source/clua.cc index 81f5f0cb83..be98456849 100644 --- a/crawl-ref/source/clua.cc +++ b/crawl-ref/source/clua.cc @@ -2078,31 +2078,22 @@ static option_handler handlers[] = { "colour_map", &Options.colour_map, option_hboolean }, { "clean_map", &Options.clean_map, option_hboolean }, { "show_uncursed", &Options.show_uncursed, option_hboolean }, - { "always_greet", &Options.always_greet, option_hboolean }, { "easy_open", &Options.easy_open, option_hboolean }, { "easy_armour", &Options.easy_unequip, option_hboolean }, { "easy_unequip", &Options.easy_unequip, option_hboolean }, { "easy_butcher", &Options.easy_butcher, option_hboolean }, { "always_confirm_butcher", &Options.always_confirm_butcher, option_hboolean }, - { "terse_hand", &Options.terse_hand, option_hboolean }, - { "increasing_skill_progress", &Options.increasing_skill_progress, option_hboolean }, - { "confirm_self_target", &Options.confirm_self_target, option_hboolean }, { "default_target", &Options.default_target, option_hboolean }, - { "safe_autopickup", &Options.safe_autopickup, option_hboolean }, { "autopickup_no_burden", &Options.autopickup_no_burden, option_hboolean }, { "note_skill_max", &Options.note_skill_max, option_hboolean }, - { "use_notes", &Options.use_notes, option_hboolean }, { "delay_message_clear", &Options.delay_message_clear, option_hboolean }, { "no_dark_brand", &Options.no_dark_brand, option_hboolean }, { "auto_list", &Options.auto_list, option_hboolean }, - { "lowercase_invocations", &Options.lowercase_invocations, - option_hboolean }, { "pickup_thrown", &Options.pickup_thrown, option_hboolean }, { "pickup_dropped", &Options.pickup_dropped, option_hboolean }, { "show_waypoints", &Options.show_waypoints, option_hboolean }, { "item_colour", &Options.item_colour, option_hboolean }, { "target_zero_exp", &Options.target_zero_exp, option_hboolean }, - { "safe_zero_exp", &Options.safe_zero_exp, option_hboolean }, { "target_wrap", &Options.target_wrap, option_hboolean }, { "easy_exit_menu", &Options.easy_exit_menu, option_hboolean }, { "dos_use_background_intensity", &Options.dos_use_background_intensity, diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index 40de644ec4..e9ee8bff90 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1170,7 +1170,7 @@ static void paranoid_option_disable( activity_interrupt_type ai, restart.push_back("Ctrl+V"); } - if (Options.autopickup_on && Options.safe_autopickup) + if (Options.autopickup_on) { deactivatees.push_back("autopickup"); Options.autopickup_on = false; diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc index 535f93965c..6bdd6f3200 100644 --- a/crawl-ref/source/direct.cc +++ b/crawl-ref/source/direct.cc @@ -332,7 +332,7 @@ static void direction_again(dist& moves, targeting_type restricts, moves.ty = you.y_pos; // Discard 'Y' player gave to yesno() - if (mode == TARG_ENEMY && Options.confirm_self_target) + if (mode == TARG_ENEMY) getchm(); } else @@ -822,7 +822,7 @@ void direction(dist& moves, targeting_type restricts, // Conceivably we might want to confirm on TARG_ANY too. if ( moves.isTarget && moves.tx == you.x_pos && moves.ty == you.y_pos && - mode == TARG_ENEMY && Options.confirm_self_target && + mode == TARG_ENEMY && !yesno("Really target yourself?", false, 'n')) { mesclr(); diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h index 08744ffc78..582d77e898 100644 --- a/crawl-ref/source/externs.h +++ b/crawl-ref/source/externs.h @@ -1510,20 +1510,15 @@ public: bool colour_map; // add colour to the map bool clean_map; // remove unseen clouds/monsters bool show_uncursed; // label known uncursed items as "uncursed" - bool always_greet; // display greeting message when reloading bool easy_open; // open doors with movement bool easy_unequip; // allow auto-removing of armour / jewelry bool easy_butcher; // open doors with movement bool always_confirm_butcher; // even if only one corpse - bool increasing_skill_progress; // skills go from 0-10 or 10-0 - bool confirm_self_target; // require confirmation before selftarget bool default_target; // start targeting on a real target - bool safe_autopickup; // don't autopickup when monsters visible bool autopickup_no_burden; // don't autopickup if it changes burden bool note_all_skill_levels; // take note for all skill levels (1-27) bool note_skill_max; // take note when skills reach new max bool note_all_spells; // take note when learning any spell - bool use_notes; // take (and dump) notes std::string user_note_prefix; // Prefix for user notes int note_hp_percent; // percentage hp for notetaking int ood_interesting; // how many levels OOD is noteworthy? @@ -1542,7 +1537,6 @@ public: int magic_point_warning; // percentage mp for danger warning char race; // preselected race char cls; // preselected class - bool terse_hand; // use terse description for wielded item bool delay_message_clear; // avoid clearing messages each turn unsigned friend_brand; // Attribute for branding friendly monsters bool no_dark_brand; // Attribute for branding friendly monsters @@ -1555,7 +1549,6 @@ public: bool auto_list; // automatically jump to appropriate item lists bool flush_input[NUM_FLUSH_REASONS]; // when to flush input buff - bool lowercase_invocations; // prefer lowercase invocations char_set_type char_set; FixedVector<unsigned, NUM_DCHAR_TYPES> char_table; @@ -1646,7 +1639,6 @@ public: std::vector<std::string> dump_order; bool level_map_title; // Show title in level map - bool safe_zero_exp; // If true, you feel safe around 0xp monsters bool target_zero_exp; // If true, targeting targets zero-exp // monsters. bool target_wrap; // Wrap around from last to first target diff --git a/crawl-ref/source/initfile.cc b/crawl-ref/source/initfile.cc index 2704b3efe6..e52f81bd13 100644 --- a/crawl-ref/source/initfile.cc +++ b/crawl-ref/source/initfile.cc @@ -600,7 +600,6 @@ void game_options::reset_options() colour_map = true; clean_map = false; show_uncursed = true; - always_greet = true; easy_open = true; easy_unequip = true; easy_butcher = true; @@ -609,12 +608,9 @@ void game_options::reset_options() easy_quit_item_prompts = true; hp_warning = 10; magic_point_warning = 0; - confirm_self_target = true; default_target = true; - safe_autopickup = true; autopickup_no_burden = false; - use_notes = true; user_note_prefix = ""; note_all_skill_levels = false; note_skill_max = false; @@ -622,9 +618,6 @@ void game_options::reset_options() note_hp_percent = 5; ood_interesting = 8; - terse_hand = true; - increasing_skill_progress = true; - // [ds] Grumble grumble. auto_list = true; @@ -683,7 +676,6 @@ void game_options::reset_options() explore_item_greed = 10; explore_greedy = false; - safe_zero_exp = true; target_zero_exp = false; target_wrap = true; target_oos = true; @@ -703,8 +695,6 @@ void game_options::reset_options() flush_input[ FLUSH_ON_MESSAGE ] = false; flush_input[ FLUSH_LUA ] = true; - lowercase_invocations = true; - fire_items_start = 2; // start at slot 'c' // Clear fire_order and set up the defaults. @@ -1821,11 +1811,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) // here as well. heap_brand = curses_attribute(field); } - else if (key == "always_greet") - { - // show greeting when reloading game - always_greet = read_bool( field, always_greet ); - } else if (key == "weapon") { // choose this weapon for classes that get choice @@ -1980,20 +1965,12 @@ void game_options::read_option_line(const std::string &str, bool runscript) { auto_list = read_bool( field, auto_list ); } - else if (key == "confirm_self_target") - { - confirm_self_target = read_bool( field, confirm_self_target ); - } else if (key == "default_target") { default_target = read_bool( field, default_target ); if (default_target) target_unshifted_dirs = false; } - else if (key == "safe_autopickup") - { - safe_autopickup = read_bool( field, safe_autopickup ); - } else if (key == "autopickup_no_burden") { autopickup_no_burden = read_bool( field, autopickup_no_burden ); @@ -2067,10 +2044,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) scrollmarg = 0; scroll_margin_x = scroll_margin_y = scrollmarg; } - else if (key == "use_notes") - { - use_notes = read_bool( field, use_notes ); - } else if (key == "user_note_prefix") { // field is already cleaned up from trim_string() @@ -2088,14 +2061,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) { delay_message_clear = read_bool( field, delay_message_clear ); } - else if (key == "terse_hand") - { - terse_hand = read_bool( field, terse_hand ); - } - else if (key == "increasing_skill_progress") - { - increasing_skill_progress = read_bool( field, increasing_skill_progress ); - } else if (key == "flush") { if (subkey == "failure") @@ -2119,11 +2084,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) = read_bool(field, flush_input[FLUSH_LUA]); } } - else if (key == "lowercase_invocations") - { - lowercase_invocations - = read_bool(field, lowercase_invocations); - } else if (key == "wiz_mode") { // wiz_mode is recognized as a legal key in all compiles -- bwr @@ -2572,10 +2532,6 @@ void game_options::read_option_line(const std::string &str, bool runscript) { level_map_title = read_bool(field, level_map_title); } - else if (key == "safe_zero_exp") - { - safe_zero_exp = read_bool(field, safe_zero_exp); - } else if (key == "target_zero_exp") { target_zero_exp = read_bool(field, target_zero_exp); diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 9ffc8dde3b..ebab0feb0a 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2954,13 +2954,13 @@ bool can_autopickup() return (false); if (you.attribute[ATTR_TRANSFORMATION] == TRAN_AIR - && you.duration[DUR_TRANSFORMATION] > 0) + && you.duration[DUR_TRANSFORMATION] > 0) return (false); if (you.flight_mode() == FL_LEVITATE) return (false); - if ( Options.safe_autopickup && !i_feel_safe() ) + if ( !i_feel_safe() ) return (false); return (true); diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 8604af903b..7734e87d04 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1544,8 +1544,7 @@ std::string cloud_name(cloud_type type) bool mons_is_safe(const struct monsters *mon, bool want_move) { bool is_safe = mons_friendly(mon) || - (Options.safe_zero_exp && - mons_class_flag( mon->type, M_NO_EXP_GAIN )); + mons_class_flag(mon->type, M_NO_EXP_GAIN); #ifdef CLUA_BINDINGS bool moving = ((!you.delay_queue.empty() && diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 3380be6130..c0f4f13b15 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -1444,8 +1444,7 @@ void mark_interesting_monst(struct monsters* monster, beh_type behaviour) mons_level(monster->type) < 99 && !(monster->type >= MONS_EARTH_ELEMENTAL && monster->type <= MONS_AIR_ELEMENTAL) - && (!Options.safe_zero_exp || - !mons_class_flag( monster->type, M_NO_EXP_GAIN ))) + && !mons_class_flag( monster->type, M_NO_EXP_GAIN )) interesting = true; if ( interesting ) diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index 69f768e4cc..792bf67d41 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -319,10 +319,9 @@ void print_stats(void) clear_to_end_of_line(); gotoxy(xcol, 13); - if (you.equip[EQ_WEAPON] != -1) + if (you.weapon()) { - - const item_def& wpn = you.inv[you.equip[EQ_WEAPON]]; + const item_def& wpn = *you.weapon(); textcolor(wpn.colour); const std::string prefix = menu_colour_item_prefix(wpn); @@ -330,9 +329,7 @@ void print_stats(void) if (prefcol != -1) textcolor(prefcol); - cprintf("%s", - wpn.name(DESC_INVENTORY, - Options.terse_hand).substr(0,38).c_str()); + cprintf("%s", wpn.name(DESC_INVENTORY, true).substr(0,38).c_str()); textcolor(LIGHTGREY); } else diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 39a33acc47..cf3a8f90e6 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3208,7 +3208,10 @@ void level_change(bool skip_ability_increase) modify_stat(STAT_RANDOM, 1, false, "level gain"); if (you.experience_level == 5) - mpr("You have gained the ability to fly.", MSGCH_INTRINSIC_GAIN); + { + mpr("You have gained the ability to fly.", + MSGCH_INTRINSIC_GAIN); + } else if (you.experience_level == 15) { mpr("You can now fly continuously.", MSGCH_INTRINSIC_GAIN); @@ -3242,7 +3245,6 @@ void level_change(bool skip_ability_increase) if (you.magic_points < 0) you.magic_points = 0; - if (Options.use_notes) { unwind_var<int> hpmax(you.hp_max); unwind_var<int> hp(you.hp); @@ -3258,6 +3260,7 @@ void level_change(bool skip_ability_increase) you.hp, you.hp_max, you.magic_points, you.max_magic_points); take_note(Note(NOTE_XP_LEVEL_CHANGE, you.experience_level, 0, buf)); } + // recalculate for game calc_hp(); calc_mp(); diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc index 4d7a7bc9d6..6b83e96772 100644 --- a/crawl-ref/source/skills2.cc +++ b/crawl-ref/source/skills2.cc @@ -1878,10 +1878,7 @@ static void display_skill_table(bool show_aptitudes) if ( !show_aptitudes ) { textcolor(CYAN); - if ( !Options.increasing_skill_progress ) - cprintf( " (%d)", (100 - percent_done) / 10 ); - else - cprintf( " (%2d%%)", (percent_done / 5) * 5 ); + cprintf( " (%2d%%)", (percent_done / 5) * 5 ); } else { |