summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-03 10:58:08 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-03 10:58:08 +0000
commitde61f774d4b9787e998a24d966b45b5a211761dc (patch)
treef841e89492644243d4f5b08e44a2c60d88fea5cc /crawl-ref/source/fight.cc
parent284b3dcc8ae13d9414c8e527e9aa0ebe07921d43 (diff)
downloadcrawl-ref-de61f774d4b9787e998a24d966b45b5a211761dc.tar.gz
crawl-ref-de61f774d4b9787e998a24d966b45b5a211761dc.zip
Made the weapon warning one-off (until you change weapons.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1726 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index f50b52c696..03208d6976 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -3194,12 +3194,14 @@ int melee_attack::mons_to_hit()
static void wielded_weapon_check(const item_def *weapon)
{
- if (weapon &&
- (weapon->base_type != OBJ_WEAPONS
- || is_range_weapon(*weapon)))
- {
- mpr("You might want to wield a more suitable implement when attacking monsters.", MSGCH_WARN);
- learned_something_new(TUT_WIELD_WEAPON); // for tutorial Rangers
+ if (you.received_weapon_warning == false &&
+ weapon &&
+ (weapon->base_type != OBJ_WEAPONS || is_range_weapon(*weapon)))
+ {
+ mpr("You might want to wield a more suitable implement when "
+ "attacking monsters.", MSGCH_WARN);
+ learned_something_new(TUT_WIELD_WEAPON); // for tutorial Rangers
+ you.received_weapon_warning = true;
}
}