summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-27 14:34:51 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-27 14:34:51 +0000
commit7ebc330b3bd569f9158e66ad3b26e25c40295b67 (patch)
tree6621cdb391bc40b2e1cc0d8a9d86b7282ce42f8d /crawl-ref/source/item_use.cc
parentdfc01209f51ec34a838e734906cccdd0cbfb0db5 (diff)
downloadcrawl-ref-7ebc330b3bd569f9158e66ad3b26e25c40295b67.tar.gz
crawl-ref-7ebc330b3bd569f9158e66ad3b26e25c40295b67.zip
Warn players that quarterstaves work badly with shields.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2917 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 4187ef411e..173001a6ef 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -342,7 +342,7 @@ void warn_shield_penalties()
if (!player_shield())
return;
- // Warnings are limited to rods and bows at the moment.
+ // Warnings are limited to rods, bows, and quarterstaves at the moment.
const item_def *weapon = player_weapon();
if (!weapon)
return;
@@ -351,6 +351,12 @@ void warn_shield_penalties()
warn_rod_shield_interference(*weapon);
else if (is_range_weapon(*weapon))
warn_launcher_shield_slowdown(*weapon);
+ else if (weapon->base_type == OBJ_WEAPONS
+ && weapon->sub_type == WPN_QUARTERSTAFF)
+ {
+ mprf(MSGCH_WARN, "Your %s severely limits your weapon's effectiveness.",
+ shield_base_name(player_shield()));
+ }
}
int item_special_wield_effect(const item_def &item)