summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-21 17:54:43 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-21 17:54:43 +0000
commit0e472a37cd47225bb6660aa9f7d12320f7cd4582 (patch)
treed50e76bcb67c83f1bc6c7fbea08122302d6d00c4
parenta36fd3f9f0e5bde3dd9d74e1742cfbd2f045c635 (diff)
downloadcrawl-ref-0e472a37cd47225bb6660aa9f7d12320f7cd4582.tar.gz
crawl-ref-0e472a37cd47225bb6660aa9f7d12320f7cd4582.zip
* Fix 2862312: examination of items in shops not working after buying
something * FR 2836364 : Make controlled blink contaminate the player. * Fix 2841232: display "very slow" in the % screen. * FR 2858960 : Re-add mouseover descriptions for previously seen (but not detected) features out of sight, and for plain floor the stash description like when using 'x'. * Disallow placement of corpses within walls, and allow rock worms to leave corpses elsewhere. * Minor tweaks to the documentation. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10766 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/INSTALL.txt2
-rw-r--r--crawl-ref/docs/tiles_creation.txt3
-rw-r--r--crawl-ref/source/describe.cc10
-rw-r--r--crawl-ref/source/describe.h3
-rw-r--r--crawl-ref/source/mon-data.h4
-rw-r--r--crawl-ref/source/monstuff.cc5
-rw-r--r--crawl-ref/source/output.cc6
-rw-r--r--crawl-ref/source/rltiles/dc-corpse.txt1
-rw-r--r--crawl-ref/source/shopping.cc26
-rw-r--r--crawl-ref/source/spells4.cc8
-rw-r--r--crawl-ref/source/stash.cc12
-rw-r--r--crawl-ref/source/stash.h1
-rw-r--r--crawl-ref/source/tilereg.cc15
13 files changed, 74 insertions, 22 deletions
diff --git a/crawl-ref/INSTALL.txt b/crawl-ref/INSTALL.txt
index 7e085c7c92..e6520f5bca 100644
--- a/crawl-ref/INSTALL.txt
+++ b/crawl-ref/INSTALL.txt
@@ -391,7 +391,7 @@ MinGW include/ folder. Delete the "freetyp2" folder.
* zlib-1.2.3-lib.zip
(http://sourceforge.net/projects/gnuwin32/files/)
-Extract them your MinGW folder.
+Extract them to your MinGW folder.
* SDL-devel-1.2.13-mingw32.tar.gz
(http://www.libsdl.org/download-1.2.php)
diff --git a/crawl-ref/docs/tiles_creation.txt b/crawl-ref/docs/tiles_creation.txt
index 3f4a23f9c6..1c86d59ca4 100644
--- a/crawl-ref/docs/tiles_creation.txt
+++ b/crawl-ref/docs/tiles_creation.txt
@@ -4,7 +4,8 @@ A short guide to Tiles creation
This is a short guide to creating tiles. We assume that you've got some kind of
image editing software (such as Photoshop or the GIMP) as well as some basic
knowledge of how to use it. While the fancier functions can occasionally come
-in useful, simply drawing and erasing of pixels will usually suffice.
+in useful, the simple tools for drawing, selection and erasing of pixels will
+usually suffice.
You may want to download the latest source or even the trunk version. Either
way, the source/rltiles/ directory contains all tiles used in the game, and
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index d5c8a27200..1586fd4b63 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -2017,8 +2017,8 @@ static std::string _get_feature_description_wide(int feat)
void get_feature_desc(const coord_def &pos, describe_info &inf)
{
const dungeon_feature_type feat = grd(pos);
- std::string desc = feature_description(pos, false, DESC_CAP_A, false);
- std::string db_name = grd(pos) == DNGN_ENTER_SHOP ? "A shop" : desc;
+ std::string desc = feature_description(pos, false, DESC_CAP_A, false);
+ std::string db_name = grd(pos) == DNGN_ENTER_SHOP ? "A shop" : desc;
std::string long_desc = getLongDescription(db_name);
inf.body << desc << ".$$";
@@ -2181,7 +2181,7 @@ static bool _describe_spells(const item_def &item)
// Describes all items in the game.
//
//---------------------------------------------------------------
-void describe_item( item_def &item, bool allow_inscribe )
+void describe_item( item_def &item, bool allow_inscribe, bool shopping )
{
if (!is_valid_item(item))
return;
@@ -2189,7 +2189,7 @@ void describe_item( item_def &item, bool allow_inscribe )
while (true)
{
// Memorised spell while reading a spellbook.
- if (you.turn_is_over)
+ if (you.turn_is_over && !shopping)
return;
const bool spells_shown = _show_item_description(item);
@@ -2200,8 +2200,10 @@ void describe_item( item_def &item, bool allow_inscribe )
textcolor(LIGHTGREY);
if (item.base_type == OBJ_BOOKS && in_inventory(item))
+ {
cprintf("Select a spell to read its description or to "
"memorize it.");
+ }
else
cprintf("Select a spell to read its description.");
diff --git a/crawl-ref/source/describe.h b/crawl-ref/source/describe.h
index 18ff36e1d6..ee2b912e83 100644
--- a/crawl-ref/source/describe.h
+++ b/crawl-ref/source/describe.h
@@ -72,7 +72,8 @@ void set_feature_desc_long(const std::string &raw_name,
/* ***********************************************************************
* called from: item_use - shopping
* *********************************************************************** */
-void describe_item(item_def &item, bool allow_inscribe = false);
+void describe_item(item_def &item, bool allow_inscribe = false,
+ bool shopping = false);
void get_item_desc(const item_def &item, describe_info &inf,
bool terse = false);
void inscribe_item(item_def &item, bool proper_prompt);
diff --git a/crawl-ref/source/mon-data.h b/crawl-ref/source/mon-data.h
index b6b04015f5..16bd3fe492 100644
--- a/crawl-ref/source/mon-data.h
+++ b/crawl-ref/source/mon-data.h
@@ -3078,10 +3078,10 @@ static monsterentry mondata[] = {
MONS_ROCK_WORM, 'w', BROWN, "rock worm",
M_NO_FLAGS,
MR_RES_POISON | MR_RES_FIRE | MR_RES_COLD | MR_RES_ELEC,
- 0, 10, MONS_WORM, MONS_ROCK_WORM, MH_NATURAL, -3,
+ 450, 10, MONS_WORM, MONS_ROCK_WORM, MH_NATURAL, -3,
{ {AT_BITE, AF_PLAIN, 22}, AT_NO_ATK, AT_NO_ATK, AT_NO_ATK },
{ 5, 5, 5, 0 },
- 3, 12, MST_NO_SPELLS, CE_NOCORPSE, Z_NOZOMBIE, S_SILENT, I_PLANT,
+ 3, 12, MST_NO_SPELLS, CE_CONTAMINATED, Z_NOZOMBIE, S_SILENT, I_PLANT,
HT_ROCK, 12, DEFAULT_ENERGY, MONUSE_NOTHING, MONEAT_NOTHING, SIZE_LARGE
},
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index b0eed923cd..1cca39083e 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -395,6 +395,11 @@ int place_monster_corpse(const monsters *monster, bool silent,
if (!in_bounds(monster->pos()))
return (-1);
+ // Don't attempt to place corpses within walls, either.
+ // Currently, this only applies to (shapeshifter) rock worms.
+ if (grid_is_wall(grd(monster->pos())))
+ return (-1);
+
item_def corpse;
const int corpse_class = fill_out_corpse(monster, corpse);
diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc
index 2b192757ff..7229de194c 100644
--- a/crawl-ref/source/output.cc
+++ b/crawl-ref/source/output.cc
@@ -2534,9 +2534,9 @@ std::string _status_mut_abilities()
std::string help = (move_cost < 8) ? "very quick" :
(move_cost < 10) ? "quick" :
(move_cost < 13) ? "slow"
- : "";
- if (!help.empty())
- status.push_back(help);
+ : "very slow";
+
+ status.push_back(help);
}
if (you.duration[DUR_SLOW] && !you.duration[DUR_HASTE])
diff --git a/crawl-ref/source/rltiles/dc-corpse.txt b/crawl-ref/source/rltiles/dc-corpse.txt
index 41a653547a..106daf34d0 100644
--- a/crawl-ref/source/rltiles/dc-corpse.txt
+++ b/crawl-ref/source/rltiles/dc-corpse.txt
@@ -75,6 +75,7 @@ worm CORPSE_WORM
swamp_worm CORPSE_SWAMP_WORM
spiny_worm CORPSE_SPINY_WORM
brain_worm CORPSE_BRAIN_WORM
+rock_worm CORPSE_ROCK_WORM
## Wasps ('y')
giant_blowfly CORPSE_GIANT_BLOWFLY
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc
index bef60e9124..dfcdd0306a 100644
--- a/crawl-ref/source/shopping.cc
+++ b/crawl-ref/source/shopping.cc
@@ -92,13 +92,29 @@ static std::string _purchase_keys(const std::string &s)
return (list);
}
-static void _list_shop_keys(const std::string &purchasable, bool viewing)
+static void _list_shop_keys(const std::string &purchasable, bool viewing,
+ int total_stock)
{
+ ASSERT(total_stock > 0);
+
char buf[200];
const int numlines = get_number_of_lines();
cgotoxy(1, numlines - 1, GOTO_CRT);
- std::string pkeys = _purchase_keys(purchasable);
+ std::string pkeys = "";
+ if (viewing)
+ {
+ pkeys = "<w>a</w>";
+ if (total_stock > 1)
+ {
+ pkeys += "-<w>";
+ pkeys += 'a' + total_stock - 1;
+ pkeys += "</w>";
+ }
+ }
+ else
+ pkeys = _purchase_keys(purchasable);
+
if (!pkeys.empty())
{
pkeys = "[" + pkeys + "] Select Item to "
@@ -287,7 +303,7 @@ static bool _in_a_shop( int shopidx )
const std::string purchasable = _shop_print_stock(stock, selected, shop,
total_cost);
- _list_shop_keys(purchasable, viewing);
+ _list_shop_keys(purchasable, viewing, stock.size());
if (!total_cost)
{
@@ -356,7 +372,7 @@ static bool _in_a_shop( int shopidx )
_shop_print("I'm sorry, you don't seem to have enough money.",
1);
}
- else if (!total_cost)
+ else if (!total_cost) // Nothing selected.
continue;
else
{
@@ -451,7 +467,7 @@ static bool _in_a_shop( int shopidx )
item.flags |= (ISFLAG_IDENT_MASK | ISFLAG_NOTED_ID
| ISFLAG_NOTED_GET);
}
- describe_item(item);
+ describe_item(item, false, true);
if (id_stock)
item.flags = old_flags;
}
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index 6484fa1f83..40b416d397 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -1968,7 +1968,13 @@ static int _quadrant_blink(coord_def where, int pow, int, actor *)
int cast_semi_controlled_blink(int pow)
{
- return apply_one_neighbouring_square(_quadrant_blink, pow);
+ int result = apply_one_neighbouring_square(_quadrant_blink, pow);
+
+ // Controlled blink causes glowing.
+ if (result)
+ contaminate_player(1, true);
+
+ return (result);
}
void cast_stoneskin(int pow)
diff --git a/crawl-ref/source/stash.cc b/crawl-ref/source/stash.cc
index f795d2c1b0..836cb074c2 100644
--- a/crawl-ref/source/stash.cc
+++ b/crawl-ref/source/stash.cc
@@ -123,7 +123,7 @@ bool is_stash(int x, int y)
return (false);
}
-void describe_stash(int x, int y)
+std::string get_stash_desc(int x, int y)
{
LevelStashes *ls = StashTrack.find_current_level();
if (ls)
@@ -133,9 +133,17 @@ void describe_stash(int x, int y)
{
const std::string desc = s->description();
if (!desc.empty())
- mprf(MSGCH_EXAMINE_FILTER, "[Stash: %s]", desc.c_str());
+ return ("[Stash: " + desc + "]");
}
}
+ return "";
+}
+
+void describe_stash(int x, int y)
+{
+ std::string desc = get_stash_desc(x, y);
+ if (!desc.empty())
+ mpr(desc.c_str(), MSGCH_EXAMINE_FILTER);
}
diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h
index 3638cd52b1..03363cf65e 100644
--- a/crawl-ref/source/stash.h
+++ b/crawl-ref/source/stash.h
@@ -361,6 +361,7 @@ extern StashTracker StashTrack;
void maybe_update_stashes();
bool is_stash(int x, int y);
inline bool is_stash( const coord_def& p ) { return is_stash(p.x, p.y); }
+std::string get_stash_desc(int x, int y);
void describe_stash(int x, int y);
std::vector<item_def> item_list_in_stash( coord_def pos );
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 2cd1c855b1..a3b43a539d 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -31,6 +31,7 @@ REVISION("$Rev$");
#include "spl-book.h"
#include "spl-cast.h"
#include "spl-util.h"
+#include "stash.h"
#include "stuff.h"
#include "terrain.h"
#include "transfor.h"
@@ -1477,13 +1478,23 @@ bool DungeonRegion::update_alt_text(std::string &alt)
return (false);
if (!map_bounds(gc))
return (false);
- if (!see_grid(gc))
+ if (!is_terrain_seen(gc))
return (false);
if (you.last_clicked_grid == gc)
return (false);
describe_info inf;
- get_square_desc(gc, inf, true);
+ if (see_grid(gc))
+ get_square_desc(gc, inf, true);
+ else if (grd(gc) != DNGN_FLOOR)
+ get_feature_desc(gc, inf);
+ else
+ {
+ // For plain floor, output the stash description.
+ std::string stash = get_stash_desc(gc.x, gc.y);
+ if (!stash.empty())
+ inf.body << "$" << stash;
+ }
alt_desc_proc proc(crawl_view.msgsz.x, crawl_view.msgsz.y);
process_description<alt_desc_proc>(proc, inf);