summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-08 22:46:17 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-08 22:46:17 +0000
commit847d18dc0c092ff23aa03cfc23b7bc1c32f2dabe (patch)
treef5fb2f917eff4b50a42899f1fe6b22198a259e0e
parent7cc66e61e50963ba90a5db8db19cf75890d3c733 (diff)
downloadcrawl-ref-847d18dc0c092ff23aa03cfc23b7bc1c32f2dabe.tar.gz
crawl-ref-847d18dc0c092ff23aa03cfc23b7bc1c32f2dabe.zip
Some more recent trunk commits -> 0.4.
7429, 7672, 7716, 7729, 6646, 7760 * Descriptions, messages, help screen. Also: * Don't allow monsters to polymorph into uniques. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7790 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/dat/database/help.txt8
-rw-r--r--crawl-ref/source/dat/descript/items.txt2
-rw-r--r--crawl-ref/source/dat/lua/eat.lua2
-rw-r--r--crawl-ref/source/debug.cc16
-rw-r--r--crawl-ref/source/dungeon.cc2
-rw-r--r--crawl-ref/source/it_use3.cc12
-rw-r--r--crawl-ref/source/maps.cc29
-rw-r--r--crawl-ref/source/maps.h3
-rw-r--r--crawl-ref/source/message.cc8
-rw-r--r--crawl-ref/source/monstuff.cc1
10 files changed, 60 insertions, 23 deletions
diff --git a/crawl-ref/source/dat/database/help.txt b/crawl-ref/source/dat/database/help.txt
index 1c03077767..f42698a8cc 100644
--- a/crawl-ref/source/dat/database/help.txt
+++ b/crawl-ref/source/dat/database/help.txt
@@ -13,11 +13,11 @@ of the item or the contents of the shop.
Some examples of search strings:
<w>cure mutation</w> find all potions of cure mutation, including potions in shops.
-<w>cloak</w> find all cloaks in the dungeon.
+<w>jell</w> finds every single royal jelly and heaps of royal jellies
<w>Lair:2</w> find everything known to be on Lair:2.
-<w>Lair:[2-4]</w> finds everything on Lair:2-4. Regexes are allowed! Note that
- Lair:[3-10] will not work as intended, since [x-y] is a regex
- character range.
+<w>D:[2-4]</w> finds everything on Dungeon levels 2-4. Regexes are allowed!
+ Note that D:[3-10] will not work as intended, since [x-y] is a
+ regex character range.
<w>.</w> is a shortcut to find everything on your current level.
<w>..</w> is a shortcut for listing all items you know.
<w>Lair.*axe</w> and <w>axe && Lair</w> both show all axes in the Lair.
diff --git a/crawl-ref/source/dat/descript/items.txt b/crawl-ref/source/dat/descript/items.txt
index 5dc72ead33..2b341d1925 100644
--- a/crawl-ref/source/dat/descript/items.txt
+++ b/crawl-ref/source/dat/descript/items.txt
@@ -26,7 +26,7 @@ wearer of the benefits of levitation.
amulet of inaccuracy
This amulet makes its wearer less accurate in hand combat and when
-targeting monsters via ranged weapon or spells.
+targeting monsters via ranged attack or spells.
%%%%
amulet of rage
diff --git a/crawl-ref/source/dat/lua/eat.lua b/crawl-ref/source/dat/lua/eat.lua
index 4bd520b9e5..c29f043456 100644
--- a/crawl-ref/source/dat/lua/eat.lua
+++ b/crawl-ref/source/dat/lua/eat.lua
@@ -12,7 +12,7 @@ function prompt_eat(i)
if item.quantity(i) > 1 then
iname = "one of " .. iname
end
- crawl.formatted_mpr("Eat " .. iname .. "?", "prompt")
+ crawl.mpr("Eat " .. iname .. "?", "prompt")
local res
res = crawl.getch()
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 8ef16c9685..c83b4c584a 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -493,8 +493,20 @@ void wizard_create_spec_monster_name()
if (!err.empty())
{
- mpr(err.c_str());
- return;
+ // Try for a partial match, but not if the user accidently entered
+ // only a few letters.
+ monster_type partial = get_monster_by_name(specs);
+ if (strlen(specs) >= 3 && partial != NON_MONSTER)
+ {
+ mlist.clear();
+ err = mlist.add_mons(mons_type_name(partial, DESC_PLAIN));
+ }
+
+ if (!err.empty())
+ {
+ mpr(err.c_str());
+ return;
+ }
}
mons_spec mspec = mlist.get_monster(0);
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 49e78f8c35..f9c00f73fc 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -3728,7 +3728,7 @@ static bool _build_minivaults(int level_number, int force_vault,
if (in_bounds(where))
{
coord_def tl(where - place.size / 2);
- fit_region_into_map_bounds(tl, place.size);
+ fit_region_into_map_bounds(tl, place.size, 1);
v1x = tl.x;
v1y = tl.y;
}
diff --git a/crawl-ref/source/it_use3.cc b/crawl-ref/source/it_use3.cc
index 19eb0173e7..643b8d161d 100644
--- a/crawl-ref/source/it_use3.cc
+++ b/crawl-ref/source/it_use3.cc
@@ -714,8 +714,16 @@ static bool efreet_flask(void)
if (player_angers_monster(&menv[monster]))
friendly = false;
- mpr(friendly ? "\"Thank you for releasing me!\""
- : "It howls insanely!");
+ if (silenced(you.pos()))
+ {
+ mpr(friendly ? "It nods graciously at you."
+ : "It snaps in your direction!", MSGCH_TALK_VISUAL);
+ }
+ else
+ {
+ mpr(friendly ? "\"Thank you for releasing me!\""
+ : "It howls insanely!", MSGCH_TALK);
+ }
}
else
canned_msg(MSG_NOTHING_HAPPENS);
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 1eb3685d0a..fd8f32f632 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -208,17 +208,24 @@ static bool bad_map_place(const map_def &map,
return (false);
}
-void fit_region_into_map_bounds(coord_def &pos, const coord_def &size)
-{
- ASSERT(size.x <= GXM && size.y <= GYM);
- if (pos.x < X_BOUND_1)
- pos.x = X_BOUND_1;
- if (pos.y < Y_BOUND_1)
- pos.y = Y_BOUND_1;
- if (pos.x + size.x - 1 > X_BOUND_2)
- pos.x = X_BOUND_2 - size.x + 1;
- if (pos.y + size.y - 1 > Y_BOUND_2)
- pos.y = Y_BOUND_2 - size.y + 1;
+void fit_region_into_map_bounds(coord_def &pos, const coord_def &size,
+ int margin)
+{
+ const int X_1(X_BOUND_1 + margin);
+ const int X_2(X_BOUND_2 - margin);
+ const int Y_1(Y_BOUND_1 + margin);
+ const int Y_2(Y_BOUND_2 - margin);
+
+ ASSERT(size.x <= (X_2 - X_1 + 1) && size.y <= (Y_2 - Y_1 + 1));
+
+ if (pos.x < X_1)
+ pos.x = X_1;
+ if (pos.y < Y_1)
+ pos.y = Y_1;
+ if (pos.x + size.x - 1 > X_2)
+ pos.x = X_2 - size.x + 1;
+ if (pos.y + size.y - 1 > Y_2)
+ pos.y = Y_2 - size.y + 1;
}
static bool apply_vault_grid(map_def &def, map_type map,
diff --git a/crawl-ref/source/maps.h b/crawl-ref/source/maps.h
index d420642a43..6908c2af6f 100644
--- a/crawl-ref/source/maps.h
+++ b/crawl-ref/source/maps.h
@@ -45,7 +45,8 @@ int vault_main(map_type vgrid,
// Given a rectangular region, slides it to fit into the map. size must be
// smaller than (GXM,GYM).
-void fit_region_into_map_bounds(coord_def &pos, const coord_def &size);
+void fit_region_into_map_bounds(coord_def &pos, const coord_def &size,
+ int margin = 0);
const map_def *map_by_index(int index);
int map_count();
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index 7ecf54e064..afc854960a 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -514,6 +514,14 @@ static void mpr_check_patterns(const std::string& message,
{
for (unsigned i = 0; i < Options.note_messages.size(); ++i)
{
+ if (channel == MSGCH_EQUIPMENT || channel == MSGCH_FLOOR_ITEMS
+ || channel == MSGCH_MULTITURN_ACTION
+ || channel == MSGCH_EXAMINE || channel == MSGCH_EXAMINE_FILTER
+ || channel == MSGCH_TUTORIAL)
+ {
+ continue;
+ }
+
if (Options.note_messages[i].matches(message))
{
take_note(Note( NOTE_MESSAGE, channel, param, message.c_str() ));
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 5e10ddbf67..c23d93098f 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1431,6 +1431,7 @@ static bool _valid_morph( monsters *monster, int new_mclass )
// Various inappropriate polymorph targets.
if (mons_class_holiness( new_mclass ) != mons_holiness( monster )
+ || mons_class_flag( new_mclass, M_UNIQUE) // no uniques
|| mons_class_flag( new_mclass, M_NO_EXP_GAIN ) // not helpless
|| new_mclass == mons_species( monster->type ) // must be different
|| new_mclass == MONS_PROGRAM_BUG