summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-05 00:05:57 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-05 00:05:57 +0000
commit8f913bcaf69f680eabc6bbdd2dff2afb311b4ffb (patch)
tree24917af02d19406c1c40203b26133a88e6804a8c
parent288e44e2590d8791f0841a70ef50108582990278 (diff)
downloadcrawl-ref-8f913bcaf69f680eabc6bbdd2dff2afb311b4ffb.tar.gz
crawl-ref-8f913bcaf69f680eabc6bbdd2dff2afb311b4ffb.zip
Added two command hints: 'v'iewing for certain features,
and how to turn autopickup/autoprayer on again after an encounter with an invisible creature. I also modified selection of book shops, so the offered books are more likely to be different. This changes balance in that on the whole more books are present, so maybe we should simply throw duplicates out rather than reroll. Oh, and manuals are now even rarer than before. Maybe they should be excepted from this new rule. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2056 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/delay.cc9
-rw-r--r--crawl-ref/source/direct.cc20
-rw-r--r--crawl-ref/source/dungeon.cc28
3 files changed, 54 insertions, 3 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index 56940a6726..586fdc1d49 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1058,22 +1058,27 @@ static void paranoid_option_disable( activity_interrupt_type ai,
if (mon && !player_monster_visible(mon) && !mons_is_submerged(mon))
{
std::vector<std::string> deactivatees;
+ std::vector<std::string> restart;
if (Options.autoprayer_on)
{
deactivatees.push_back("autoprayer");
Options.autoprayer_on = false;
+ restart.push_back("Ctrl+V");
}
if (Options.autopickup_on && Options.safe_autopickup)
{
deactivatees.push_back("autopickup");
Options.autopickup_on = false;
+ restart.push_back("Ctrl+A");
}
if (!deactivatees.empty())
- mprf(MSGCH_WARN, "Deactivating %s.",
+ mprf(MSGCH_WARN, "Deactivating %s; reactivate with %s.",
comma_separated_line(deactivatees.begin(),
- deactivatees.end()).c_str());
+ deactivatees.end()).c_str(),
+ comma_separated_line(restart.begin(),
+ restart.end()).c_str());
}
}
}
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index 4d6515b94a..d4a35a4b97 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -1521,6 +1521,23 @@ static std::string marker_feature_description(const coord_def &p)
return ("");
}
+// Is a feature interesting enough to 'v'iew it, even if a player normally
+// doesn't care about descriptions, i.e. does the description hold important
+// information? (Yes, this is entirely subjective. JPEG)
+static bool interesting_feature(dungeon_feature_type feat)
+{
+ switch (feat)
+ {
+ case DNGN_ENTER_ORCISH_MINES:
+ case DNGN_ENTER_SLIME_PITS:
+ case DNGN_ENTER_LABYRINTH:
+// case DNGN_SPARKLING_FOUNTAIN:
+ return true;
+ default:
+ return false;
+ }
+}
+
std::string feature_description(int mx, int my, description_level_type dtype,
bool add_stop)
{
@@ -1862,6 +1879,9 @@ static void describe_cell(int mx, int my)
}
else
{
+ if (interesting_feature(grd[mx][my]))
+ feature_desc += " (Press 'v' for more information.)";
+
msg_channel_type channel = MSGCH_EXAMINE;
if (grd[mx][my] == DNGN_FLOOR
|| grd[mx][my] == DNGN_SHALLOW_WATER
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 725d833866..5218753987 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -4696,6 +4696,11 @@ static void place_shops(int level_number, int nshops)
}
} // end place_shops()
+static bool need_varied_selection(shop_type shop)
+{
+ return (shop == SHOP_BOOK);
+}
+
void place_spec_shop( int level_number,
int shop_x, int shop_y,
int force_s_type, bool representative )
@@ -4747,6 +4752,14 @@ void place_spec_shop( int level_number,
if (representative)
plojy = env.shop[i].type == SHOP_WAND? NUM_WANDS : 16;
+ // for books shops, store how many copies of a given book are on display
+ int stocked[NUM_BOOKS];
+ if (need_varied_selection(env.shop[i].type))
+ {
+ for (int k=0; k < NUM_BOOKS; k++)
+ stocked[k] = 0;
+ }
+
for (j = 0; j < plojy; j++)
{
if (env.shop[i].type != SHOP_WEAPON_ANTIQUE
@@ -4769,7 +4782,14 @@ void place_spec_shop( int level_number,
one_chance_in(4)? MAKE_GOOD_ITEM : item_level,
MAKE_ITEM_RANDOM_RACE );
- if (orb != NON_ITEM
+ // try for a better selection
+ if (orb != NON_ITEM && need_varied_selection(env.shop[i].type))
+ {
+ if (!one_chance_in(stocked[mitm[orb].sub_type] + 1))
+ orb = NON_ITEM; // try again
+ }
+
+ if (orb != NON_ITEM
&& mitm[orb].base_type != OBJ_GOLD
&& (env.shop[i].type != SHOP_GENERAL_ANTIQUE
|| (mitm[orb].base_type != OBJ_MISSILES
@@ -4789,6 +4809,12 @@ void place_spec_shop( int level_number,
if (orb == NON_ITEM)
break;
+ // increase stock of this subtype by 1, unless it is an artefact
+ // (allow for several artefacts of the same underlying subtype)
+ // - the latter is currently unused but would apply to e.g. jewellery
+ if (need_varied_selection(env.shop[i].type) && !is_artefact(mitm[orb]))
+ stocked[mitm[orb].sub_type]++;
+
if (representative && mitm[orb].base_type == OBJ_WANDS)
mitm[orb].plus = 7;