summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-25 10:54:27 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-02-25 10:54:27 +0000
commitcba959997cf353beb0911ea07abcf8ce7f57780c (patch)
treed360e1d4e0deb75330f2bf1e26a52b2b4eb519dc /crawl-ref/source/fight.cc
parenta37d65daf3c8eb782523ab198cba2ee8892e0d0f (diff)
downloadcrawl-ref-cba959997cf353beb0911ea07abcf8ce7f57780c.tar.gz
crawl-ref-cba959997cf353beb0911ea07abcf8ce7f57780c.zip
Better handling of confused monsters - they can finally accidentally hit other
monsters, fall into water, etc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@962 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index dd64129f49..c1809e3348 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -2496,22 +2496,24 @@ void melee_attack::mons_announce_hit(const mon_attack_def &attk)
if (water_attack && attacker_visible && attacker != defender)
mprf("%s uses the watery terrain to its advantage.",
attacker->name(DESC_CAP_THE).c_str());
-
- mprf("%s %s %s%s%s%s",
- attacker->name(DESC_CAP_THE).c_str(),
- attacker->conj_verb( mons_attack_verb(attk) ).c_str(),
- mons_defender_name().c_str(),
- debug_damage_number().c_str(),
- mons_weapon_desc().c_str(),
- attack_strength_punctuation().c_str());
+
+ if (needs_message)
+ mprf("%s %s %s%s%s%s",
+ attacker->name(DESC_CAP_THE).c_str(),
+ attacker->conj_verb( mons_attack_verb(attk) ).c_str(),
+ mons_defender_name().c_str(),
+ debug_damage_number().c_str(),
+ mons_weapon_desc().c_str(),
+ attack_strength_punctuation().c_str());
}
void melee_attack::mons_announce_dud_hit(const mon_attack_def &attk)
{
- mprf("%s %s %s but doesn't do any damage.",
- attacker->name(DESC_CAP_THE).c_str(),
- attacker->conj_verb( mons_attack_verb(attk) ).c_str(),
- mons_defender_name().c_str());
+ if (needs_message)
+ mprf("%s %s %s but doesn't do any damage.",
+ attacker->name(DESC_CAP_THE).c_str(),
+ attacker->conj_verb( mons_attack_verb(attk) ).c_str(),
+ mons_defender_name().c_str());
}
void melee_attack::check_defender_train_dodging()