diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-19 08:30:12 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-19 08:30:12 +0000 |
commit | 2e7a87cbd1a89c7025d80d847fef33816aed842d (patch) | |
tree | cbcc3b80d8dedc2108274e0ac55ae97b697d7a1c /crawl-ref/source/fight.cc | |
parent | 5343fcdfc6412ab198569a831cd06f5c808a19e3 (diff) | |
download | crawl-ref-2e7a87cbd1a89c7025d80d847fef33816aed842d.tar.gz crawl-ref-2e7a87cbd1a89c7025d80d847fef33816aed842d.zip |
Go back to using the special damage message for draining monsters in
melee attacks, as the previous way could result in out-of-sequence
messages. Keep the other message for draining beams and miscasts,
though.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8585 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 662a51f259..adb65edeff 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2056,10 +2056,19 @@ void melee_attack::drain_defender() special_damage = 1 + random2(damage_done) / (2 + defender->res_negative_energy()); - if (defender->drain_exp(attacker)) + if (defender->drain_exp(attacker, true)) { if (defender->atype() == ACT_PLAYER) obvious_effect = true; + else if (defender_visible) + { + special_damage_message = + make_stringf( + "%s %s %s!", + atk_name(DESC_CAP_THE).c_str(), + attacker->conj_verb("drain").c_str(), + def_name(DESC_NOCAP_THE).c_str()); + } attacker->god_conduct(DID_NECROMANCY, 2); } |