diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-05 20:48:05 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-09-05 20:48:05 +0000 |
commit | 6608eef87f00996c9a9757692e5bb26c25cb35ac (patch) | |
tree | 2de83c7449ff009dc929eaaa50982619726c9adc /crawl-ref/source/fight.cc | |
parent | 88fd21a557af9d87d660e896023b7e8788ea915f (diff) | |
download | crawl-ref-6608eef87f00996c9a9757692e5bb26c25cb35ac.tar.gz crawl-ref-6608eef87f00996c9a9757692e5bb26c25cb35ac.zip |
Added a message when Condensation Shield is extended
(inspired by BR 1763077) and removed double levitation
extension if flying. Also, rods don't give the surge
message anymore as spell enhancers are ignored anyway.
Added message to show when a weapon of reaching is being
used. (FR 1781922)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2058 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 202bb9146c..e32961c628 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2818,7 +2818,20 @@ std::string melee_attack::mons_attack_verb(const mon_attack_def &attk) std::string melee_attack::mons_weapon_desc() { if (weapon && attacker->id() != MONS_DANCING_WEAPON) - return std::string(" with ") + weapon->name(DESC_NOCAP_A); + { + std::string result = ""; + const item_def wpn = *weapon; + if (get_weapon_brand(wpn) == SPWPN_REACHING) + { + int dx = abs(attacker->pos().x - defender->pos().x); + int dy = abs(attacker->pos().y - defender->pos().y); + if ((dx == 2 && dy <= 2) || (dy == 2 && dx <= 2)) + result += " from afar"; + } + result += " with "; + result += weapon->name(DESC_NOCAP_A); + return result; + } return (""); } |