From b0e9dd8144192b80740469f3d27ae31e2a03cf65 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 3 Jun 2009 19:33:28 +0000 Subject: * Fix compilation for Tiles. * Make several of the old uniques appear earlier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9886 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dungeon.cc | 26 ++++++++-------- crawl-ref/source/item_use.cc | 2 +- crawl-ref/source/mon-data.h | 10 +++---- crawl-ref/source/overmap.cc | 70 +++++++++++++++++++++++--------------------- crawl-ref/source/spl-book.cc | 8 ++++- 5 files changed, 63 insertions(+), 53 deletions(-) diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 6105775886..989d0be217 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -3260,28 +3260,28 @@ static monster_type _choose_unique_by_depth(int step) break; case 3: // depth <= 13 ret = random_choose(MONS_PSYCHE, MONS_EROLCHA, MONS_DONALD, MONS_URUG, - MONS_MICHAEL, MONS_EUSTACHIO, MONS_SONJA, -1); + MONS_MICHAEL, MONS_EUSTACHIO, MONS_SONJA, + MONS_JOSEPH, MONS_ERICA, MONS_JOSEPHINE, + MONS_HAROLD, MONS_NORBERT, MONS_JOZEF, -1); break; case 4: // depth <= 16 - ret = random_choose(MONS_URUG, MONS_MICHAEL, MONS_JOSEPH, MONS_SNORG, - MONS_ERICA, MONS_JOSEPHINE, MONS_HAROLD, - MONS_NORBERT, MONS_JOZEF, MONS_EUSTACHIO, - MONS_SONJA, MONS_AZRAEL, MONS_NESSOS, -1); + ret = random_choose(MONS_URUG, MONS_MICHAEL, MONS_EUSTACHIO, MONS_SONJA, + MONS_SNORG, MONS_ERICA, MONS_JOSEPHINE, MONS_HAROLD, + MONS_ROXANNE, MONS_RUPERT, MONS_NORBERT, MONS_JOZEF, + MONS_AZRAEL, MONS_NESSOS, MONS_AGNES, + MONS_MAUD, MONS_LOUISE, MONS_NERGALLE, -1); break; case 5: // depth <= 19 - ret = random_choose(MONS_SNORG, MONS_ERICA, MONS_JOSEPHINE, - MONS_HAROLD, MONS_NORBERT, MONS_JOZEF, MONS_AGNES, - MONS_MAUD, MONS_LOUISE, MONS_FRANCIS, MONS_FRANCES, + ret = random_choose(MONS_SNORG, MONS_LOUISE, MONS_FRANCIS, MONS_FRANCES, + MONS_RUPERT, MONS_WAYNE, MONS_DUANE, MONS_NORRIS, MONS_AZRAEL, MONS_NESSOS, MONS_NERGALLE, MONS_ROXANNE, MONS_SAINT_ROKA, -1); break; case 6: // depth > 19 default: - ret = random_choose(MONS_LOUISE, MONS_FRANCIS, MONS_FRANCES, - MONS_RUPERT, MONS_WAYNE, MONS_DUANE, MONS_XTAHUA, - MONS_NORRIS, MONS_FREDERICK, MONS_MARGERY, - MONS_BORIS, MONS_NERGALLE, MONS_ROXANNE, - MONS_SAINT_ROKA, -1); + ret = random_choose(MONS_FRANCIS, MONS_FRANCES, MONS_WAYNE, MONS_DUANE, + MONS_XTAHUA, MONS_NORRIS, MONS_FREDERICK, + MONS_MARGERY, MONS_BORIS, MONS_SAINT_ROKA, -1); } return static_cast(ret); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 776f68adb3..0fdd3e0d8d 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -5553,7 +5553,7 @@ void tile_item_use(int idx) handle_read_book(idx); } // else it's a spellbook else if (check_warning_inscriptions(item, OPER_MEMORISE)) - learn_spell(idx); + learn_spell(); // offers all spells, might not be what we want return; case OBJ_SCROLLS: diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h index 3009a58604..65e0c5c2b7 100644 --- a/crawl-ref/source/mon-data.h +++ b/crawl-ref/source/mon-data.h @@ -4031,7 +4031,7 @@ static monsterentry mondata[] = { MONS_ILSUIW, 'm', GREEN, "Ilsuiw", M_UNIQUE | M_WARM_BLOOD | M_SPELLCASTER | M_ACTUAL_SPELLS | M_SPEAKS, MR_RES_POISON | MR_RES_COLD, - 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, 90, + 500, 10, MONS_MERFOLK, MONS_MERFOLK, MH_NATURAL, -9, { {AT_HIT, AF_PLAIN, 10}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 9, 2, 4, 0 }, 5, 18, MST_ILSUIW, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT, I_NORMAL, @@ -4065,7 +4065,7 @@ static monsterentry mondata[] = { M_UNIQUE | M_SPELLCASTER | M_SEE_INVIS | M_EVIL | M_ACTUAL_SPELLS | M_WARM_BLOOD | M_SPEAKS, MR_RES_FIRE | MR_RES_COLD, - 600, 12, MONS_ORC, MONS_ORC, MH_NATURAL, 50, + 600, 12, MONS_ORC, MONS_ORC, MH_NATURAL, -5, { {AT_HIT, AF_PLAIN, 6}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, { 10, 2, 3, 0 }, 9, 11, MST_ORC_SORCERER, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT, I_HIGH, @@ -4077,9 +4077,9 @@ static monsterentry mondata[] = { M_UNIQUE | M_FIGHTER | M_WARM_BLOOD | M_SPELLCASTER | M_PRIEST | M_EVIL | M_SPEAKS, MR_NO_FLAGS, - 600, 15, MONS_ORC, MONS_ORC, MH_NATURAL, -3, - { {AT_HIT, AF_PLAIN, 32}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, - { 15, 4, 7, 0 }, + 600, 15, MONS_ORC, MONS_ORC, MH_NATURAL, -4, + { {AT_HIT, AF_PLAIN, 35}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK }, + { 18, 4, 7, 20 }, 3, 10, MST_DAEVA, CE_CONTAMINATED, Z_NOZOMBIE, S_SHOUT, I_NORMAL, HT_LAND, 10, DEFAULT_ENERGY, MONUSE_WEAPONS_ARMOUR, SIZE_MEDIUM }, diff --git a/crawl-ref/source/overmap.cc b/crawl-ref/source/overmap.cc index 3890c33b95..5c1df7c285 100644 --- a/crawl-ref/source/overmap.cc +++ b/crawl-ref/source/overmap.cc @@ -233,9 +233,8 @@ static std::string _portal_vaults_description_string() std::vector vault_names_vec; portal_vault_map_type::const_iterator ci_portals; - for ( ci_portals = portal_vaults_present.begin(); - ci_portals != portal_vaults_present.end(); - ++ci_portals ) + for (ci_portals = portal_vaults_present.begin(); + ci_portals != portal_vaults_present.end(); ++ci_portals) { vault_names_set.insert(ci_portals->second); } @@ -252,16 +251,15 @@ static std::string _portal_vaults_description_string() for (unsigned int i = 0; i < vault_names_vec.size(); i++) { last_id.depth = 10000; - for ( ci_portals = portal_vaults_present.begin(); - ci_portals != portal_vaults_present.end(); - ++ci_portals ) + for (ci_portals = portal_vaults_present.begin(); + ci_portals != portal_vaults_present.end(); ++ci_portals) { // one line per region should be enough, they're all of // the form D:XX, except for labyrinth portals, of which // you would need 11 (at least) to have a problem. - if ( ci_portals->second == vault_names_vec[i] ) + if (ci_portals->second == vault_names_vec[i]) { - if ( last_id.depth == 10000 ) + if (last_id.depth == 10000) { unsigned char col = (unsigned char) portal_vault_colours[ci_portals->first]; @@ -276,7 +274,7 @@ static std::string _portal_vaults_description_string() const level_id lid = ci_portals->first.id; const level_pos where = ci_portals->first; - if ( lid == last_id ) + if (lid == last_id) { if (!portal_vault_notes[where].empty()) { @@ -302,7 +300,7 @@ static std::string _portal_vaults_description_string() last_id = lid; } } - if ( last_id.depth != 10000 ) + if (last_id.depth != 10000) disp += "\n"; } return disp; @@ -321,13 +319,16 @@ std::string overview_description_string() for (int i = 0; i < NUM_BRANCHES; ++i) { const branch_type branch = branches[i].id; - if ( stair_level.find(branch) != stair_level.end() ) + if (stair_level.find(branch) != stair_level.end()) { - if ( !branchcount ) + if (!branchcount) { disp += "\nBranches:"; if (crawl_state.need_save || !crawl_state.updating_scores) - disp += " (use G to reach them)"; + { + disp += " (use G to reach them and " + "?/B for more information)"; + } disp += EOL; seen_anything = true; } @@ -344,7 +345,7 @@ std::string overview_description_string() disp += " "; } } - if ( branchcount && (branchcount % 4) ) + if (branchcount && (branchcount % 4)) disp += "\n"; // remove unworthy altars from the list we show the user. Yeah, @@ -353,32 +354,36 @@ std::string overview_description_string() // print altars // we loop through everything a dozen times, oh well - if ( !notable_altars.empty() ) + if (!notable_altars.empty()) { disp += "\nAltars:"; if (crawl_state.need_save || !crawl_state.updating_scores) - disp += " (use Ctrl-F \"altar\" to reach them)"; + { + disp += " (use Ctrl-F \"altar\" to reach them and " + "?/G for information about gods)"; + } disp += EOL; seen_anything = true; } level_id last_id; std::map::const_iterator ci_altar; - for ( int cur_god = GOD_NO_GOD; cur_god < NUM_GODS; ++cur_god ) + for (int cur_god = GOD_NO_GOD; cur_god < NUM_GODS; ++cur_god) { + if (cur_god == you.religion) + continue; + last_id.depth = 10000; // fake depth to be sure we don't match + // GOD_NO_GOD becomes your god int real_god = (cur_god == GOD_NO_GOD ? you.religion : cur_god); - if ( cur_god == you.religion ) - continue; - for ( ci_altar = notable_altars.begin(); - ci_altar != notable_altars.end(); - ++ci_altar ) + for (ci_altar = notable_altars.begin(); + ci_altar != notable_altars.end(); ++ci_altar) { - if ( ci_altar->second == real_god ) + if (ci_altar->second == real_god) { - if ( last_id.depth == 10000 ) + if (last_id.depth == 10000) { disp += god_name( ci_altar->second, false ); disp += ": "; @@ -386,7 +391,7 @@ std::string overview_description_string() } else { - if ( last_id == ci_altar->first.id ) + if (last_id == ci_altar->first.id) disp += '*'; else { @@ -397,7 +402,7 @@ std::string overview_description_string() last_id = ci_altar->first.id; } } - if ( last_id.depth != 10000 ) + if (last_id.depth != 10000) disp += "\n"; } @@ -419,18 +424,17 @@ std::string overview_description_string() const int maxcolumn = get_number_of_cols() - 17; int column_count = 0; - for ( ci_shops = shops_present.begin(); - ci_shops != shops_present.end(); - ++ci_shops ) + for (ci_shops = shops_present.begin(); + ci_shops != shops_present.end(); ++ci_shops) { - if ( ci_shops->first.id != last_id ) + if (ci_shops->first.id != last_id) { - if ( column_count > maxcolumn ) + if (column_count > maxcolumn) { disp += "\n"; column_count = 0; } - else if ( column_count != 0 ) + else if (column_count != 0) { disp += " "; ++column_count; @@ -455,7 +459,7 @@ std::string overview_description_string() disp += "\n"; // print portals - if ( !portals_present.empty() || !portal_vaults_present.empty() ) + if (!portals_present.empty() || !portal_vaults_present.empty()) { disp += "\nPortals:\n"; seen_anything = true; diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index ca4d8ce51a..39db6c5a9a 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1426,16 +1426,22 @@ static std::vector _get_mem_list() causes.push_back(make_stringf("you already known %u of them", num_known)); if (num_race) + { causes.push_back(make_stringf("%u cannot be memorized because of " "your race", num_race)); + } if (num_low_xl) + { causes.push_back(make_stringf("%u cannot be memorized because of " "your low experinece level", num_low_xl)); + } if (num_low_levels) + { causes.push_back(make_stringf("%u cannot be memorized because you " "don't have enough free spell levels", num_low_levels)); + } unsigned int total = num_known + num_race + num_low_xl + num_low_levels; if (total < all_spells.size()) @@ -1490,7 +1496,7 @@ static spell_type _choose_mem_spell(std::vector &spells) spell_menu.set_highlighter(NULL); spell_menu.set_tag("spell"); - + for (unsigned int i = 0; i < spells.size(); i++) { const spell_type spell = spells[i]; -- cgit v1.2.3-54-g00ecf