diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 09:59:54 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-07-03 09:59:54 +0000 |
commit | 284b3dcc8ae13d9414c8e527e9aa0ebe07921d43 (patch) | |
tree | 542e222a9970c3e1fe0b7d83db1dcd25aaf6beb1 /crawl-ref/source | |
parent | 05fae4acc24198bfec86f3a5797ab6aaae3ed1fc (diff) | |
download | crawl-ref-284b3dcc8ae13d9414c8e527e9aa0ebe07921d43.tar.gz crawl-ref-284b3dcc8ae13d9414c8e527e9aa0ebe07921d43.zip |
adding warning message when wielding nonweapons
or launchers in melee
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1725 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/fight.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/tutorial.cc | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index f8d8cab9e3..f50b52c696 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3192,13 +3192,14 @@ int melee_attack::mons_to_hit() /////////////////////////////////////////////////////////////////////////// -static void tutorial_weapon_check(const item_def *weapon) +static void wielded_weapon_check(const item_def *weapon) { if (weapon && (weapon->base_type != OBJ_WEAPONS || is_range_weapon(*weapon))) { - learned_something_new(TUT_WIELD_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 } } @@ -3212,8 +3213,8 @@ bool you_attack(int monster_attacked, bool unarmed_attacks) // We're trying to hit a monster, break out of travel/explore now. interrupt_activity(AI_HIT_MONSTER, defender); - // For tutorials, check if the player is fighting with something unsuitable - tutorial_weapon_check(attk.weapon); + // check if the player is fighting with something unsuitable + wielded_weapon_check(attk.weapon); return attk.attack(); } diff --git a/crawl-ref/source/tutorial.cc b/crawl-ref/source/tutorial.cc index 856360742f..7bb9354b1d 100644 --- a/crawl-ref/source/tutorial.cc +++ b/crawl-ref/source/tutorial.cc @@ -1279,8 +1279,6 @@ void learned_something_new(tutorial_event_type seen_what, int x, int y) "look at your abilities or to use one of them."; break; case TUT_WIELD_WEAPON: - text << "You might want to <w>w<magenta>ield a more suitable implement " - "when attacking monsters."; if (Options.tutorial_type == TUT_RANGER_CHAR && you.inv[ you.equip[EQ_WEAPON] ].sub_type == WPN_BOW) { |