From de61f774d4b9787e998a24d966b45b5a211761dc Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 3 Jul 2007 10:58:08 +0000 Subject: 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 --- crawl-ref/source/fight.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/fight.cc') 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; } } -- cgit v1.2.3-54-g00ecf